:root {
    --ink: #18223b;
    --muted: #64718a;
    --paper: #f7f8fc;
    --white: #ffffff;
    --navy: #202b59;
    --violet: #6c5ce7;
    --coral: #ff6b6b;
    --gold: #ffbf69;
    --line: #e7eaf3;
    --shadow: 0 16px 40px rgba(31, 43, 89, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    line-height: 1.7;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    width: 100%;
    max-width: 100%;
    object-fit: cover;
}

.container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: flex;
    gap: 28px;
    align-items: center;
    justify-content: space-between;
    min-height: 82px;
}

.brand {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 10px;
    align-items: center;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    color: var(--white);
    font-weight: 900;
    place-items: center;
    background: linear-gradient(135deg, var(--coral), var(--violet));
    border-radius: 14px 14px 14px 3px;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 16px;
}

.brand small {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 1px;
}

.main-nav {
    overflow-x: auto;
}

.main-nav ul {
    display: flex;
    min-width: max-content;
    gap: 4px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.nav-item a {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    padding: 9px 10px;
    color: var(--muted);
    font-size: 13px;
    border-radius: 10px;
}

.nav-item a:hover,
.nav-item.is-active a {
    color: var(--violet);
    font-weight: 700;
    background: #f0edff;
}

main {
    padding: 42px 0 0;
}

.hero {
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(120deg, #202b59 0%, #5547a6 64%, #ff7a72 100%);
    border-radius: 28px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 30px;
    align-items: center;
    min-height: 330px;
    padding: 46px 58px;
}

.eyebrow {
    margin: 0 0 12px;
    color: #ffcfc8;
    font-size: 13px;
    letter-spacing: 2px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 14px;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.16;
}

.hero h1 a {
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.35);
    text-underline-offset: 8px;
}

.hero-copy {
    max-width: 570px;
    color: #eef0ff;
}

.hero-image {
    height: 255px;
    border: 7px solid rgba(255, 255, 255, 0.20);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.button {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    color: var(--white);
    font-weight: 700;
    background: var(--coral);
    border-radius: 12px;
}

.button.is-light {
    color: var(--navy);
    background: var(--white);
}

.section {
    margin-top: 72px;
}

.section-heading {
    display: flex;
    gap: 18px;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-heading h2 {
    margin: 0;
    font-size: 28px;
}

.section-heading p {
    max-width: 570px;
    margin: 0;
    color: var(--muted);
}

.text-link {
    color: var(--violet);
    font-weight: 700;
    white-space: nowrap;
}

.feature-grid,
.comic-grid,
.category-grid,
.rank-grid,
.review-grid {
    display: grid;
    gap: 20px;
}

.feature-grid {
    grid-template-columns: repeat(3, 1fr);
}

.feature-card,
.comic-card,
.category-card,
.review-card,
.list-panel,
.about-panel,
.download-panel,
.article-shell {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(31, 43, 89, 0.04);
}

.feature-card {
    padding: 25px;
}

.feature-icon,
.category-icon {
    display: grid;
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
    color: var(--violet);
    font-size: 22px;
    background: #f0edff;
    border-radius: 14px;
    place-items: center;
}

.feature-card p,
.category-card p,
.review-card p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 14px;
}

.comic-grid {
    grid-template-columns: repeat(4, 1fr);
}

.comic-card {
    overflow: hidden;
}

.comic-card img {
    aspect-ratio: 3 / 4;
}

.comic-info {
    padding: 15px;
}

.comic-info h3 {
    margin-bottom: 5px;
    font-size: 17px;
}

.comic-info p,
.comic-meta {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.category-grid {
    grid-template-columns: repeat(4, 1fr);
}

.category-card {
    min-height: 190px;
    padding: 23px;
}

.category-card h3 {
    margin-bottom: 8px;
}

.rank-grid {
    grid-template-columns: repeat(3, 1fr);
}

.rank-item {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.rank-item:last-child {
    border-bottom: 0;
}

.rank-number {
    color: var(--coral);
    font-size: 22px;
    font-weight: 900;
}

.rank-item img {
    width: 58px;
    height: 72px;
    border-radius: 9px;
}

.rank-item h3 {
    margin: 0 0 3px;
    font-size: 15px;
}

.rank-item p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.list-panel {
    padding: 20px 24px;
}

.tag-row,
.filter-row,
.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag,
.filter {
    padding: 7px 12px;
    color: var(--muted);
    font-size: 13px;
    background: #f7f8fc;
    border-radius: 99px;
}

.filter {
    color: var(--violet);
    font-weight: 700;
    background: #f0edff;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.timeline-item {
    padding: 20px;
    background: var(--white);
    border-top: 4px solid var(--coral);
    border-radius: 0 0 16px 16px;
}

.timeline-item time {
    color: var(--coral);
    font-weight: 700;
}

.review-grid {
    grid-template-columns: repeat(3, 1fr);
}

.review-card {
    padding: 24px;
}

.review-card strong {
    color: var(--violet);
}

.about-panel {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 35px;
    padding: 38px;
}

.about-panel p {
    color: var(--muted);
}

.stats-row {
    margin-top: 22px;
}

.stat {
    min-width: 112px;
    padding: 12px;
    background: #f7f8fc;
    border-radius: 12px;
}

.stat strong,
.stat span {
    display: block;
}

.stat strong {
    color: var(--violet);
    font-size: 22px;
}

.stat span {
    color: var(--muted);
    font-size: 12px;
}

.about-image {
    min-height: 280px;
    border-radius: 16px;
}

.download-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    padding: 38px;
    color: var(--white);
    background: linear-gradient(135deg, #202b59, #6c5ce7);
}

.download-panel p {
    color: #e7e3ff;
}

.qr {
    display: grid;
    width: 136px;
    height: 136px;
    color: var(--navy);
    font-weight: 900;
    text-align: center;
    background: repeating-linear-gradient(45deg, #fff 0 7px, #e5e0ff 7px 14px);
    border: 10px solid #fff;
    border-radius: 12px;
    place-items: center;
}

.breadcrumbs {
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs a {
    color: var(--violet);
}

.catalog-hero,
.article-shell {
    padding: 34px;
}

.catalog-hero {
    color: var(--white);
    background: var(--navy);
    border-radius: 20px;
}

.catalog-hero h1,
.article-shell h1 {
    font-size: 34px;
}

.catalog-hero p {
    margin: 0;
    color: #dde1fa;
}

.article-shell {
    max-width: 900px;
    margin: 0 auto;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 14px;
    border-bottom: 1px solid var(--line);
}

.reading-note {
    padding: 16px 18px;
    margin-bottom: 24px;
    color: #46506e;
    background: #f0edff;
    border-radius: 12px;
}

.chapter-pages {
    display: grid;
    gap: 22px;
}

.chapter-page {
    overflow: hidden;
    border-radius: 14px;
}

.chapter-page img {
    aspect-ratio: 16 / 10;
}

.chapter-end {
    padding: 22px;
    margin-top: 24px;
    text-align: center;
    background: #f7f8fc;
    border-radius: 14px;
}

.chapter-nav {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 24px;
}

.site-footer {
    padding: 42px 0;
    margin-top: 72px;
    background: var(--white);
    border-top: 1px solid var(--line);
}

.footer-inner {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.footer-inner p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 900px) {
    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 13px 0;
    }

    .main-nav {
        width: 100%;
    }

    .hero-grid,
    .about-panel {
        grid-template-columns: 1fr;
    }

    .comic-grid,
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-grid,
    .rank-grid,
    .review-grid,
    .timeline {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 560px) {
    .container {
        width: min(100% - 24px, 1200px);
    }

    main {
        padding-top: 24px;
    }

    .hero-grid,
    .catalog-hero,
    .article-shell,
    .about-panel,
    .download-panel {
        padding: 24px;
    }

    .feature-grid,
    .rank-grid,
    .review-grid,
    .timeline {
        grid-template-columns: 1fr;
    }

    .section {
        margin-top: 52px;
    }

    .section-heading,
    .footer-inner,
    .download-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .chapter-nav {
        flex-direction: column;
    }
}
