/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff6b6b;
    --secondary: #ff8787;
    --accent: #ffa8a8;
    --dark: #ee5a52;
    --bg-light: #fff5f5;
    --bg-white: #ffffff;
    --text-dark: #2d2d2d;
    --text: #4a4a4a;
    --text-light: #8a8a8a;
    --border: #ffe0e0;
    --shadow: 0 4px 12px rgba(255, 107, 107, 0.15);
    --shadow-lg: 0 8px 24px rgba(255, 107, 107, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* 顶部导航栏 */
.site-header {
    background: var(--bg-white);
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.header-logo {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.logo-text {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.logo-sub {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
    background: var(--bg-light);
    padding: 4px 10px;
    border-radius: 12px;
}

.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: all 0.3s;
}

/* 主横幅 */
.hero-section {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8f0 100%);
    padding: 100px 0;
}

.hero-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    animation: fadeInLeft 0.6s ease-out;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 25px;
    font-weight: 500;
}

.hero-desc {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text);
}

.hero-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: fadeInRight 0.6s ease-out;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 主容器 */
.main-content {
    padding: 0;
}

/* 介绍区块 */
.intro-section {
    padding: 80px 0;
    background: var(--bg-white);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--primary);
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-dark);
}

.section-more {
    color: var(--primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s;
}

.section-more:hover {
    color: var(--dark);
}

.section-body {
    font-size: 17px;
    line-height: 1.9;
    color: var(--text-dark);
}

.section-body p {
    margin-bottom: 25px;
}

.section-body p:last-child {
    margin-bottom: 0;
}

/* 漫画区块 */
.comics-section {
    padding: 80px 0;
    background: var(--bg-white);
}

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

.comic-card {
    background: var(--bg-light);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.comic-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-cover {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
    background: var(--text-dark);
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary);
    color: var(--bg-white);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
}

.card-info {
    padding: 25px;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.card-meta {
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 12px;
}

.card-desc {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-light);
}

/* 分类区块 */
.categories-section {
    padding: 80px 0;
    background: var(--bg-white);
}

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

.category-card {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.category-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary);
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.category-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 20px;
}

.category-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s;
}

.category-link:hover {
    color: var(--dark);
}

/* 排行区块 */
.ranking-section {
    padding: 80px 0;
    background: var(--bg-white);
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 60px 120px 1fr auto;
    gap: 25px;
    align-items: center;
    background: var(--bg-light);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.ranking-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.rank-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
}

.rank-cover {
    width: 120px;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border);
}

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

.rank-info {
    flex: 1;
}

.rank-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.rank-meta {
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 10px;
}

.rank-desc {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-light);
}

.rank-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 10px 25px;
    border: 2px solid var(--primary);
    border-radius: 25px;
    transition: all 0.3s;
}

.rank-link:hover {
    background: var(--primary);
    color: var(--bg-white);
}

/* 页面标题 */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 80px 0;
    text-align: center;
}

.page-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--bg-white);
    margin-bottom: 15px;
}

.page-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
}

/* 漫画详情 */
.comic-detail {
    padding: 60px 0;
    background: var(--bg-white);
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 50px;
    align-items: start;
}

.detail-cover {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--border);
}

.detail-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.detail-info {
    flex: 1;
}

.detail-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.detail-meta {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 25px;
}

.detail-desc {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 30px;
}

.detail-desc p {
    margin-bottom: 20px;
}

.detail-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    background: var(--bg-light);
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 15px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

/* 章节列表 */
.chapters-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.chapters-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 30px;
}

.chapters-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.chapter-item {
    background: var(--bg-white);
    color: var(--text-dark);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-align: center;
    transition: all 0.3s;
}

.chapter-item:hover {
    background: var(--primary);
    color: var(--bg-white);
    border-color: var(--primary);
}

/* 信息区块 */
.info-section {
    padding: 60px 0;
    background: var(--bg-white);
}

.info-content {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border);
}

.info-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.info-content p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-light);
}

/* 页脚 */
.site-footer {
    background: var(--text-dark);
    color: var(--bg-white);
    padding: 60px 0 20px;
    margin-top: 50px;
}

.footer-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--accent);
}

.footer-text {
    font-size: 15px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

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

.footer-bottom p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero-wrapper {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-image {
        order: -1;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: var(--bg-white);
        flex-direction: column;
        padding: 30px;
        gap: 0;
        box-shadow: var(--shadow-lg);
        transition: left 0.3s;
        z-index: 99;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .nav-link {
        display: block;
        padding: 15px 0;
    }

    .mobile-toggle {
        display: flex;
    }

    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero-title {
        font-size: 36px;
    }

    .section-title {
        font-size: 32px;
    }

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

    .ranking-item {
        grid-template-columns: 50px 100px 1fr;
    }

    .rank-link {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .page-title {
        font-size: 32px;
    }

    .comics-grid {
        grid-template-columns: 1fr;
    }
}
