:root {
    color-scheme: dark;
    --ink: #2b1507;
    --paper: #fff7e6;
    --paper-deep: #f8e6be;
    --gold: #f5c86a;
    --gold-strong: #d99a22;
    --red: #8b1e16;
    --red-deep: #4a0c08;
    --brown: #5a2b13;
    --muted: #8a633f;
    --line: rgba(139, 30, 22, 0.18);
    --shadow: 0 24px 60px rgba(59, 19, 8, 0.22);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(245, 200, 106, 0.24), transparent 34rem),
        linear-gradient(180deg, #fff3d2 0%, #f6dfaa 46%, #f4d896 100%);
    font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: linear-gradient(90deg, rgba(74, 12, 8, 0.98), rgba(139, 30, 22, 0.96), rgba(74, 12, 8, 0.98));
    border-bottom: 2px solid rgba(245, 200, 106, 0.5);
    box-shadow: 0 14px 34px rgba(48, 10, 6, 0.28);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(1220px, calc(100% - 32px));
    min-height: 78px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #ffe8ad;
    flex: 0 0 auto;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #4a0c08;
    font-family: "Ma Shan Zheng", cursive;
    font-size: 28px;
    background: radial-gradient(circle at 30% 20%, #fff5c8, #f5c86a 60%, #c77918);
    box-shadow: 0 0 26px rgba(245, 200, 106, 0.48);
}

.brand strong {
    display: block;
    font-family: "Ma Shan Zheng", cursive;
    font-size: clamp(24px, 2.5vw, 34px);
    line-height: 1;
    letter-spacing: 0.04em;
}

.brand small {
    display: block;
    margin-top: 4px;
    color: #eecb82;
    font-size: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    overflow-x: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    white-space: nowrap;
    color: #ffe8ad;
    padding: 10px 13px;
    border-radius: 999px;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: #4a0c08;
    background: #f5c86a;
    transform: translateY(-1px);
}

.header-search {
    position: relative;
    flex: 0 0 238px;
}

.header-search input {
    width: 100%;
    border: 1px solid rgba(245, 200, 106, 0.48);
    color: #fff6d9;
    background: rgba(58, 12, 8, 0.54);
    border-radius: 999px;
    padding: 11px 76px 11px 16px;
    outline: none;
}

.header-search input::placeholder {
    color: rgba(255, 232, 173, 0.72);
}

.header-search button {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    border: 0;
    border-radius: 999px;
    color: #4a0c08;
    background: #f5c86a;
    padding: 0 14px;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    border: 1px solid rgba(245, 200, 106, 0.45);
    color: #ffe8ad;
    background: rgba(58, 12, 8, 0.52);
    border-radius: 14px;
    width: 44px;
    height: 44px;
    cursor: pointer;
}

.page-shell {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: clamp(620px, 78vh, 820px);
    color: #fff8dd;
    background: #3c0906;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.08);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(38, 6, 4, 0.94) 0%, rgba(74, 12, 8, 0.72) 45%, rgba(74, 12, 8, 0.2) 100%),
        linear-gradient(0deg, rgba(44, 7, 4, 0.95) 0%, rgba(44, 7, 4, 0.24) 52%, rgba(44, 7, 4, 0.62) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 120px 0 150px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.58fr);
    gap: 48px;
    align-items: center;
}

.hero-kicker {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    width: fit-content;
    color: #4a0c08;
    background: rgba(245, 200, 106, 0.92);
    border-radius: 999px;
    padding: 9px 16px;
    font-weight: 700;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.25);
}

.hero h1 {
    margin: 22px 0 18px;
    font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
    font-size: clamp(46px, 7vw, 86px);
    line-height: 1.02;
    letter-spacing: 0.02em;
    text-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

.hero-lead {
    max-width: 720px;
    color: #ffe7b6;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.85;
}

.hero-meta,
.movie-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hero-meta span,
.movie-meta span,
.card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    color: #6b260e;
    background: rgba(255, 236, 179, 0.88);
    padding: 4px 11px;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.section-actions,
.player-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #4a0c08;
    background: linear-gradient(135deg, #fff0b3, #f5c86a 55%, #d78d1c);
    box-shadow: 0 16px 34px rgba(245, 200, 106, 0.28);
}

.btn-secondary {
    color: #ffe8ad;
    border: 1px solid rgba(245, 200, 106, 0.54);
    background: rgba(76, 12, 7, 0.52);
}

.btn:hover {
    transform: translateY(-2px);
}

.hero-side {
    align-self: stretch;
    display: grid;
    align-content: end;
}

.hero-panel {
    border: 1px solid rgba(245, 200, 106, 0.3);
    border-radius: var(--radius-lg);
    background: rgba(72, 14, 8, 0.68);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(16px);
    padding: 24px;
}

.hero-panel h2 {
    margin: 0 0 14px;
    color: #ffe8ad;
    font-size: 22px;
    font-weight: 900;
}

.hero-panel p {
    color: #f3cc85;
    line-height: 1.8;
}

.hero-dots {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 42px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 42px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 232, 173, 0.38);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #f5c86a;
}

.section {
    padding: 70px 0;
}

.section.compact {
    padding: 42px 0;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    color: #5a170c;
    font-family: "Noto Serif SC", "Noto Sans SC", serif;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.18;
    font-weight: 900;
}

.section-heading p {
    max-width: 680px;
    color: var(--muted);
    line-height: 1.8;
}

.category-strip,
.category-grid {
    display: grid;
    gap: 18px;
}

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

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    border-radius: var(--radius-lg);
    color: #fff5d0;
    background:
        linear-gradient(135deg, rgba(139, 30, 22, 0.96), rgba(84, 20, 12, 0.92)),
        radial-gradient(circle at top right, rgba(245, 200, 106, 0.5), transparent 48%);
    padding: 26px;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 34px 84px rgba(72, 14, 8, 0.26);
}

.category-card h3 {
    margin: 0 0 12px;
    font-size: 25px;
    font-weight: 900;
}

.category-card p {
    margin: 0;
    color: #f4d59a;
    line-height: 1.75;
}

.category-card .card-link-text {
    display: inline-flex;
    margin-top: 20px;
    color: #fff0b3;
    font-weight: 800;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.movie-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 250, 235, 0.86);
    box-shadow: 0 18px 52px rgba(102, 45, 15, 0.14);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 30, 22, 0.35);
    box-shadow: 0 28px 72px rgba(102, 45, 15, 0.22);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #4a0c08, #b96c1d);
}

.poster-link img,
.detail-poster img,
.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.05);
}

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px;
}

.card-body h3 {
    margin: 12px 0 10px;
    color: #4a0c08;
    font-size: 20px;
    line-height: 1.35;
    font-weight: 900;
}

.card-body p {
    margin: 0;
    color: #765233;
    line-height: 1.72;
    font-size: 14px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag-list span {
    border-radius: 999px;
    color: #73320d;
    background: #f8e3b0;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

.card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-height: 40px;
    margin-top: auto;
    padding: 0 16px;
    border-radius: 999px;
    color: #fff6dc;
    background: linear-gradient(135deg, #8b1e16, #5a0d08);
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 190px));
    gap: 12px;
    border: 1px solid rgba(139, 30, 22, 0.16);
    border-radius: var(--radius-lg);
    background: rgba(255, 250, 235, 0.82);
    padding: 18px;
    box-shadow: 0 18px 46px rgba(102, 45, 15, 0.12);
    margin-bottom: 28px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    color: #4a0c08;
    border: 1px solid rgba(139, 30, 22, 0.22);
    border-radius: 999px;
    background: #fff8e8;
    padding: 0 16px;
    outline: none;
}

.no-result {
    display: none;
    border-radius: var(--radius-lg);
    color: #7a3a15;
    background: rgba(255, 250, 235, 0.76);
    padding: 28px;
    text-align: center;
    font-weight: 700;
}

.no-result.is-visible {
    display: block;
}

.rank-list {
    display: grid;
    gap: 16px;
}

.rank-item {
    display: grid;
    grid-template-columns: 70px 118px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 250, 235, 0.9);
    padding: 16px;
    box-shadow: 0 16px 42px rgba(102, 45, 15, 0.12);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: #4a0c08;
    background: linear-gradient(135deg, #fff0b3, #f5c86a);
    font-size: 22px;
    font-weight: 900;
}

.rank-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    background: linear-gradient(135deg, #4a0c08, #b96c1d);
}

.rank-copy h3 {
    margin: 0 0 8px;
    color: #4a0c08;
    font-size: 22px;
    font-weight: 900;
}

.rank-copy p {
    margin: 8px 0 0;
    color: #765233;
    line-height: 1.7;
}

.detail-hero {
    padding: 58px 0 42px;
    color: #fff6d8;
    background:
        linear-gradient(90deg, rgba(38, 6, 4, 0.96), rgba(139, 30, 22, 0.88)),
        radial-gradient(circle at top right, rgba(245, 200, 106, 0.4), transparent 45%);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #f4d59a;
    font-size: 14px;
    margin-bottom: 22px;
}

.breadcrumb a {
    color: #ffe8ad;
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 34px;
    align-items: start;
}

.detail-title h1 {
    margin: 0 0 18px;
    font-family: "Noto Serif SC", "Noto Sans SC", serif;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.15;
    font-weight: 900;
}

.detail-title p {
    color: #ffe2a5;
    line-height: 1.9;
    font-size: 18px;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(245, 200, 106, 0.35);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #4a0c08, #b96c1d);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.player-section {
    padding: 46px 0 72px;
}

.player-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #1a0503;
    box-shadow: 0 32px 90px rgba(57, 12, 6, 0.32);
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #120302;
}

.video-frame video {
    width: 100%;
    height: 100%;
    background: #120302;
    object-fit: contain;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    border: 0;
    color: #4a0c08;
    background:
        linear-gradient(180deg, rgba(18, 3, 2, 0.18), rgba(18, 3, 2, 0.72)),
        rgba(18, 3, 2, 0.26);
    cursor: pointer;
}

.play-overlay span {
    display: inline-grid;
    place-items: center;
    width: 94px;
    height: 94px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff0b3, #f5c86a);
    box-shadow: 0 22px 52px rgba(0, 0, 0, 0.36);
    font-size: 34px;
    text-indent: 4px;
}

.play-overlay.is-hidden {
    display: none;
}

.article-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 250, 235, 0.9);
    box-shadow: 0 18px 52px rgba(102, 45, 15, 0.12);
    padding: clamp(22px, 3vw, 34px);
    margin-top: 28px;
}

.article-card h2 {
    margin: 0 0 14px;
    color: #4a0c08;
    font-size: 28px;
    font-weight: 900;
}

.article-card p {
    margin: 0;
    color: #5e3a22;
    line-height: 2;
    font-size: 17px;
}

.site-footer {
    color: #ffe8ad;
    background: linear-gradient(180deg, #5a0d08, #2a0503);
    border-top: 2px solid rgba(245, 200, 106, 0.46);
    padding: 54px 0 36px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr repeat(3, 1fr);
    gap: 34px;
}

.site-footer h3,
.site-footer h4 {
    margin: 0 0 14px;
    color: #fff1bd;
    font-weight: 900;
}

.site-footer h3 {
    font-family: "Ma Shan Zheng", cursive;
    font-size: 30px;
}

.site-footer p,
.site-footer a {
    color: #e7bd73;
    line-height: 1.8;
    font-size: 14px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-bottom {
    margin-top: 38px;
    padding-top: 24px;
    border-top: 1px solid rgba(245, 200, 106, 0.22);
    color: #cc9a4f;
    font-size: 13px;
}

@media (max-width: 1100px) {
    .header-search {
        display: none;
    }

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

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

@media (max-width: 840px) {
    .header-inner {
        min-height: 70px;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: calc(100% + 8px);
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        border: 1px solid rgba(245, 200, 106, 0.32);
        border-radius: 20px;
        background: rgba(74, 12, 8, 0.98);
        padding: 12px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        border-radius: 14px;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 96px 0 130px;
    }

    .hero-side {
        display: none;
    }

    .section-heading {
        display: block;
    }

    .movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        max-width: 320px;
    }

    .rank-item {
        grid-template-columns: 48px 86px minmax(0, 1fr);
    }

    .rank-item .card-action {
        grid-column: 2 / -1;
    }

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

@media (max-width: 560px) {
    .brand small {
        display: none;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .hero {
        min-height: 640px;
    }

    .category-strip,
    .category-grid,
    .movie-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 42px 74px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .rank-number {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

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