/* 全局样式 */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #6c5ce7;
    --accent-color: #fdcb6e;
    --text-color: #2d3436;
    --light-text: #636e72;
    --bg-color: #ffffff;
    --light-bg: #f9f9f9;
    --border-color: #dfe6e9;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

.section-header h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-header p {
    color: var(--light-text);
    font-size: 1.1rem;
}

/* 头部导航 */
.header {
    background-color: var(--bg-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

.logo h1 {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 700;
}

.main-nav ul {
    display: flex;
}

.main-nav li {
    margin-left: 25px;
}

.main-nav a {
    font-weight: 500;
    color: var(--text-color);
    padding: 5px 0;
    position: relative;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.main-nav a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.main-nav a:hover:after {
    width: 100%;
}

/* 首页轮播 */
.banner {
    padding: 40px 0;
    background-color: var(--light-bg);
}

.slider {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}

.slide {
    position: relative;
}

.slide img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.slide-content h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* 漫画卡片通用样式 */
.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.comic-card {
    background-color: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.comic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.comic-cover {
    position: relative;
    overflow: hidden;
}

.comic-cover img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.comic-card:hover .comic-cover img {
    transform: scale(1.05);
}

.comic-info {
    padding: 15px;
}

.comic-info h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-color);
}

.comic-info p {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.tag {
    display: inline-block;
    padding: 3px 8px;
    background-color: var(--accent-color);
    color: var(--text-color);
    border-radius: 15px;
    font-size: 0.8rem;
    margin-right: 5px;
}

/* 最新上架 */
.latest-section {
    padding: 80px 0;
}

/* 热门推荐 */
.popular-section {
    padding: 80px 0;
    background-color: var(--light-bg);
}

/* 漫画分类 */
.categories-section {
    padding: 80px 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.category-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.category-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-item:hover img {
    transform: scale(1.05);
}

.category-item h3 {
    position: absolute;
    bottom: 50px;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    font-size: 1.5rem;
}

.category-item p {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.9rem;
}

/* 排行榜 */
.ranking-section {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.ranking-tabs {
    background-color: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.tab-header {
    display: flex;
    background-color: var(--primary-color);
    color: white;
}

.tab-item {
    padding: 15px 20px;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    text-align: center;
}

.tab-item.active, .tab-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.tab-content {
    padding: 20px;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.ranking-item:last-child {
    border-bottom: none;
}

.rank {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    width: 40px;
    text-align: center;
}

.ranking-item img {
    width: 100px;
    height: 130px;
    object-fit: cover;
    border-radius: 5px;
    margin: 0 20px;
}

.ranking-info {
    flex: 1;
}

.ranking-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.ranking-info p {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.rating {
    display: flex;
    align-items: center;
}

.star {
    color: var(--accent-color);
    margin-right: 10px;
}

.score {
    font-weight: 700;
}

/* 连载更新 */
.updates-section {
    padding: 80px 0;
}

.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.update-card {
    background-color: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.update-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.update-cover {
    position: relative;
    overflow: hidden;
}

.update-cover img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.update-card:hover .update-cover img {
    transform: scale(1.05);
}

.update-info {
    padding: 15px;
}

.update-info h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text-color);
}

.update-chapter {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.update-time {
    color: var(--light-text);
    font-size: 0.8rem;
}

/* 漫画资讯 */
.articles-section {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 30px;
}

.article-card {
    background-color: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.article-image {
    position: relative;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 20px;
}

.article-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.article-excerpt {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-date {
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 500;
}

/* 页脚 */
.footer {
    background-color: #2d3436;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
}

.footer-logo h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    flex: 2;
}

.link-group {
    flex: 1;
    min-width: 150px;
    margin-bottom: 30px;
}

.link-group h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: white;
    position: relative;
}

.link-group h4:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.link-group ul li {
    margin-bottom: 10px;
}

.link-group a {
    color: #dfe6e9;
    font-size: 0.9rem;
}

.link-group a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: #b2bec3;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-bottom a {
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .main-nav {
        display: none;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .slide-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .comic-grid, .category-grid, .updates-grid, .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .slide-content h2 {
        font-size: 1.8rem;
    }
    
    .footer-content {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .comic-grid, .category-grid, .updates-grid, .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .ranking-item {
        flex-direction: column;
        text-align: center;
    }
    
    .rank {
        margin-bottom: 10px;
    }
    
    .ranking-item img {
        margin: 10px 0;
    }
}