:root {
    --ink: #202338;
    --muted: #677085;
    --paper: #fffdf8;
    --line: #e9e5dc;
    --banana: #ffd34e;
    --purple: #6250b8;
    --shadow: 0 16px 35px rgba(42, 35, 79, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #fffdf8 0%, #f7f7ff 52%, #fffaf0 100%);
    color: var(--ink);
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 16px;
    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% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 253, 248, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 78px;
}

.brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    font-size: 21px;
    font-weight: 800;
}

.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px 12px 17px 17px;
    background: var(--banana);
    box-shadow: inset -5px -5px 0 rgba(188, 134, 0, 0.30);
}

.main-nav {
    display: flex;
    flex: 1;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav a {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 5px;
    padding: 8px 10px;
    border-radius: 10px;
    color: #51586a;
    font-size: 14px;
    font-weight: 700;
}

.main-nav a:hover,
.main-nav a.active {
    background: #fff0ae;
    color: #3c2d00;
}

.header-search {
    flex: 0 0 164px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: #ffffff;
    font-size: 13px;
}

.hero {
    position: relative;
    overflow: hidden;
    margin-top: 34px;
    padding: 55px 56px;
    border-radius: 28px;
    background: #2b2355;
    color: #ffffff;
}

.hero::after {
    position: absolute;
    top: -120px;
    right: -40px;
    width: 330px;
    height: 330px;
    border: 48px solid var(--banana);
    border-radius: 50%;
    content: "";
}

.eyebrow,
.kicker {
    margin: 0 0 11px;
    color: var(--banana);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.hero h1 {
    position: relative;
    z-index: 1;
    display: inline-block;
    margin: 0;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.1;
}

.hero p {
    position: relative;
    z-index: 1;
    max-width: 650px;
    margin: 20px 0 0;
    color: #e4e0f6;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 25px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 17px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-weight: 800;
}

.button.primary {
    background: var(--banana);
    color: #372a00;
}

.button.ghost {
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

main section,
.page-shell {
    margin-top: 58px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.section-head h2,
.article-title {
    margin: 0;
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1.25;
}

.section-head p {
    max-width: 540px;
    margin: 0;
    color: var(--muted);
}

.text-link {
    color: var(--purple);
    font-size: 14px;
    font-weight: 800;
}

.feature-grid,
.comic-grid,
.category-grid,
.rank-grid,
.chapter-grid {
    display: grid;
    gap: 18px;
}

.feature-grid {
    grid-template-columns: repeat(3, 1fr);
}

.feature-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 17px;
    min-height: 184px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.feature-card img {
    height: 150px;
    border-radius: 14px;
}

.tag,
.status,
.number {
    display: inline-flex;
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1efff;
    color: var(--purple);
    font-size: 12px;
    font-weight: 800;
}

.feature-card h3,
.comic-card h3,
.category-card h3,
.rank-card h3,
.chapter-card h3 {
    margin: 8px 0 4px;
    font-size: 18px;
    line-height: 1.35;
}

.feature-card p,
.comic-card p,
.category-card p,
.rank-card p,
.chapter-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.comic-grid {
    grid-template-columns: repeat(4, 1fr);
}

.comic-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
}

.comic-card img {
    aspect-ratio: 3 / 4;
}

.comic-card-body {
    padding: 14px;
}

.category-grid {
    grid-template-columns: repeat(4, 1fr);
}

.category-card {
    min-height: 180px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: #ffffff;
    transition: transform 180ms ease;
}

.category-card:hover {
    transform: translateY(-4px);
}

.category-icon {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    border-radius: 14px;
    background: #fff0ae;
    font-size: 20px;
}

.spotlight,
.about-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    overflow: hidden;
    border-radius: 24px;
}

.spotlight {
    background: #132d31;
    color: #ffffff;
}

.spotlight img {
    min-height: 330px;
}

.spotlight-copy {
    padding: 48px;
}

.spotlight-copy h2 {
    margin: 0;
    font-size: 35px;
    line-height: 1.2;
}

.spotlight-copy p {
    color: #c9dcdb;
}

.rank-grid {
    grid-template-columns: repeat(3, 1fr);
}

.rank-card {
    display: grid;
    grid-template-columns: auto 68px 1fr;
    align-items: center;
    gap: 13px;
    padding: 13px;
    border-bottom: 1px solid var(--line);
}

.rank-card img {
    height: 86px;
    border-radius: 12px;
}

.number {
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    background: #2b2355;
    color: #ffffff;
}

.topic-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.topic-bar a {
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: #4f5261;
    font-size: 14px;
    font-weight: 700;
}

.chapter-grid {
    grid-template-columns: repeat(3, 1fr);
}

.chapter-card {
    padding: 21px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff3bf, #fffdf8);
}

.chapter-card:nth-child(2) {
    background: linear-gradient(135deg, #e9e4ff, #fbfaff);
}

.chapter-card:nth-child(3) {
    background: linear-gradient(135deg, #dff7f2, #fbfffe);
}

.quote-box,
.about-panel,
.stats-panel,
.article-head {
    padding: 34px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.quote-box {
    border-left: 7px solid var(--banana);
}

.quote-box blockquote {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
}

.quote-box cite {
    display: block;
    margin-top: 14px;
    color: var(--muted);
    font-size: 14px;
    font-style: normal;
}

.about-grid {
    gap: 26px;
    overflow: visible;
}

.about-panel p {
    color: #50566a;
}

.stats-panel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.stat strong {
    display: block;
    color: var(--purple);
    font-size: 30px;
}

.app-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 30px;
    padding: 36px;
    border-radius: 25px;
    background: linear-gradient(135deg, #ffe376, #ffc64e);
}

.app-panel h2 {
    margin: 0;
    font-size: 31px;
}

.app-panel p {
    max-width: 690px;
    margin: 8px 0 0;
}

.qr-mark {
    display: grid;
    width: 116px;
    height: 116px;
    place-items: center;
    border: 10px solid #ffffff;
    border-radius: 16px;
    background: repeating-conic-gradient(#342700 0 25%, #ffffff 0 50%) 50% / 22px 22px;
    color: #342700;
    font-weight: 900;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs span {
    color: #aaaeb9;
}

.page-intro {
    padding: 34px;
    border-radius: 23px;
    background: #eeebff;
}

.page-intro h1 {
    margin: 0;
    font-size: 38px;
}

.page-intro p {
    max-width: 760px;
    margin: 12px 0 0;
    color: #56506f;
}

.article {
    max-width: 900px;
    margin: 0 auto;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    color: var(--muted);
    font-size: 14px;
}

.article-note {
    margin-top: 22px;
    padding: 18px 20px;
    border-radius: 15px;
    background: #fff7d7;
    color: #67500a;
}

.reading-pages {
    display: grid;
    gap: 22px;
    margin-top: 28px;
}

.reading-pages figure {
    margin: 0;
    overflow: hidden;
    border-radius: 18px;
    background: #eeeeee;
}

.reading-pages img {
    aspect-ratio: 16 / 10;
}

.reading-pages figcaption {
    padding: 10px 14px;
    color: var(--muted);
    background: #ffffff;
    font-size: 13px;
}

.chapter-end {
    padding: 28px;
    border-radius: 20px;
    text-align: center;
    background: #edf9f5;
}

.site-footer {
    margin-top: 64px;
    padding: 38px 0 28px;
    border-top: 1px solid var(--line);
    color: #697084;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 14px;
}

@media (max-width: 850px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 0;
    }

    .main-nav {
        order: 3;
        flex-basis: 100%;
    }

    .header-search {
        margin-left: auto;
    }

    .feature-grid,
    .rank-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .comic-grid,
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .spotlight,
    .about-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1200px);
    }

    .header-search {
        display: none;
    }

    .hero {
        margin-top: 22px;
        padding: 36px 24px;
    }

    .hero::after {
        right: -100px;
        width: 240px;
        height: 240px;
    }

    .section-head {
        align-items: start;
        flex-direction: column;
    }

    .feature-grid,
    .rank-grid,
    .chapter-grid {
        grid-template-columns: 1fr;
    }

    .feature-card {
        grid-template-columns: 84px 1fr;
    }

    .app-panel {
        grid-template-columns: 1fr;
        padding: 28px;
    }

    .footer-inner {
        flex-direction: column;
    }
}
