:root {
    --blackboard: #1a2e1a;
    --blackboard-dark: #0f1a0f;
    --blackboard-light: #2d4a2d;
    --chalk-white: #f5f5dc;
    --chalk-yellow: #fffacd;
    --chalk-blue: #add8e6;
    --chalk-green: #90ee90;
    --chalk-pink: #ffb6c1;
    --vintage-gold: #ffd700;
    --vintage-beige: #d4c5aa;
    --ink: #071107;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    --soft-shadow: 0 2px 18px rgba(245, 245, 220, 0.14);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--chalk-white);
    background:
        radial-gradient(circle at top left, rgba(255, 250, 205, 0.10), transparent 32rem),
        linear-gradient(180deg, var(--blackboard-dark), var(--blackboard) 28rem, var(--blackboard-dark));
    font-family: "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 250, 205, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 250, 205, 0.03) 1px, transparent 1px);
    background-size: 38px 38px;
    opacity: 0.36;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 26, 15, 0.88);
    border-bottom: 1px solid rgba(255, 250, 205, 0.16);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--ink);
    background: var(--chalk-yellow);
    border: 2px solid var(--vintage-gold);
    border-radius: 50%;
    box-shadow: var(--soft-shadow);
}

.brand-text {
    font-size: 1.3rem;
    color: var(--chalk-yellow);
    text-shadow: 0 0 18px rgba(255, 250, 205, 0.25);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 10px 12px;
    color: rgba(245, 245, 220, 0.78);
    border: 1px solid transparent;
    border-radius: 999px;
    transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--chalk-yellow);
    border-color: rgba(255, 250, 205, 0.26);
    background: rgba(255, 250, 205, 0.08);
}

.nav-link.subtle {
    font-size: 0.92rem;
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 250, 205, 0.25);
    border-radius: 12px;
    color: var(--chalk-yellow);
    background: rgba(255, 250, 205, 0.08);
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 250, 205, 0.12);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 26, 15, 0.95), rgba(26, 46, 26, 0.74) 44%, rgba(15, 26, 15, 0.30)),
        linear-gradient(0deg, var(--blackboard-dark), rgba(15, 26, 15, 0.18) 52%, rgba(15, 26, 15, 0.42));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 72vh;
    display: flex;
    align-items: flex-end;
    padding: 110px 0 76px;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--vintage-gold);
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(2.8rem, 7vw, 6.6rem);
    line-height: 0.95;
    color: var(--chalk-white);
    text-shadow: 0 4px 28px rgba(0, 0, 0, 0.42);
}

.hero-text {
    max-width: 680px;
    margin: 0 0 24px;
    color: rgba(245, 245, 220, 0.9);
    font-size: clamp(1rem, 2vw, 1.22rem);
}

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

.hero-meta span,
.movie-detail-meta span,
.rank-meta span,
.tags span {
    padding: 5px 10px;
    color: var(--chalk-yellow);
    background: rgba(15, 26, 15, 0.72);
    border: 1px solid rgba(255, 250, 205, 0.22);
    border-radius: 999px;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.button-primary,
.button-secondary,
.section-more,
.clear-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 250, 205, 0.26);
    transition: 0.22s ease;
}

.button-primary {
    color: var(--ink);
    background: var(--chalk-yellow);
    border-color: var(--vintage-gold);
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(255, 215, 0, 0.18);
}

.button-secondary,
.section-more,
.clear-filter {
    color: var(--chalk-yellow);
    background: rgba(255, 250, 205, 0.08);
}

.button-primary:hover,
.button-secondary:hover,
.section-more:hover,
.clear-filter:hover {
    transform: translateY(-2px);
    box-shadow: var(--soft-shadow);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 1px solid var(--chalk-yellow);
    border-radius: 50%;
    background: transparent;
}

.hero-dot.is-active {
    background: var(--chalk-yellow);
}

main {
    padding: 48px 0 72px;
}

.page-hero {
    padding: 64px 0 34px;
    background: radial-gradient(circle at 20% 15%, rgba(255, 250, 205, 0.12), transparent 26rem);
}

.page-hero h1,
.detail-title {
    margin: 0 0 14px;
    font-size: clamp(2.1rem, 5vw, 4.8rem);
    line-height: 1.05;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: rgba(245, 245, 220, 0.8);
    font-size: 1.08rem;
}

.content-section {
    margin-top: 64px;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(1.65rem, 4vw, 2.6rem);
}

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

.movie-card {
    overflow: hidden;
    background: rgba(45, 74, 45, 0.72);
    border: 2px solid rgba(255, 250, 205, 0.14);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(255, 250, 205, 0.42);
    transform: translateY(-5px);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34), var(--soft-shadow);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--blackboard-dark);
}

.movie-card-large .movie-cover {
    aspect-ratio: 16 / 21;
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.32s ease;
}

.movie-card:hover img {
    transform: scale(1.08);
}

.cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 26, 15, 0.78), transparent 58%);
    opacity: 0.95;
}

.play-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    color: var(--ink);
    background: rgba(255, 250, 205, 0.92);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.88);
    opacity: 0;
    transition: 0.22s ease;
}

.movie-card:hover .play-dot {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.score,
.rank-badge {
    position: absolute;
    top: 12px;
    padding: 5px 9px;
    color: var(--ink);
    background: var(--chalk-yellow);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 900;
}

.score {
    right: 12px;
}

.rank-badge {
    left: 12px;
}

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    margin: 0 0 8px;
    color: var(--chalk-yellow);
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-meta,
.movie-desc {
    margin: 0 0 10px;
    color: rgba(245, 245, 220, 0.76);
    font-size: 0.92rem;
}

.movie-desc {
    min-height: 44px;
}

.tags {
    align-items: flex-start;
}

.tags span {
    font-size: 0.78rem;
}

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

.category-card {
    min-height: 188px;
    padding: 26px;
    background:
        linear-gradient(145deg, rgba(45, 74, 45, 0.9), rgba(15, 26, 15, 0.82)),
        radial-gradient(circle at top right, rgba(255, 215, 0, 0.12), transparent 16rem);
    border: 2px solid rgba(255, 250, 205, 0.15);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: 0.25s ease;
}

.category-card:hover {
    border-color: rgba(255, 250, 205, 0.42);
    transform: translateY(-4px);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
    color: var(--chalk-yellow);
}

.category-card p {
    margin: 0 0 22px;
    color: rgba(245, 245, 220, 0.78);
}

.filter-panel {
    margin: 30px 0 26px;
    padding: 18px;
    background: rgba(15, 26, 15, 0.72);
    border: 1px solid rgba(255, 250, 205, 0.16);
    border-radius: var(--radius);
}

.filter-line {
    display: flex;
    align-items: end;
    gap: 16px;
}

.search-box {
    display: grid;
    gap: 8px;
    flex: 1;
    color: var(--chalk-yellow);
    font-weight: 800;
}

.search-box input,
.filter-select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    color: var(--chalk-white);
    background: rgba(45, 74, 45, 0.82);
    border: 1px solid rgba(255, 250, 205, 0.22);
    border-radius: 12px;
    outline: none;
}

.search-box input:focus,
.filter-select:focus {
    border-color: var(--chalk-yellow);
    box-shadow: var(--soft-shadow);
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.no-results {
    margin: 14px 0 0;
    color: var(--chalk-pink);
}

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

.rank-card {
    display: grid;
    grid-template-columns: 92px 58px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
    background: rgba(45, 74, 45, 0.72);
    border: 1px solid rgba(255, 250, 205, 0.16);
    border-radius: 18px;
}

.rank-cover {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: var(--blackboard-dark);
}

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

.rank-number {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: var(--ink);
    background: var(--chalk-yellow);
    border-radius: 50%;
    font-weight: 900;
}

.rank-body h3 {
    margin: 0 0 8px;
    color: var(--chalk-yellow);
}

.rank-body p {
    margin: 0 0 10px;
    color: rgba(245, 245, 220, 0.78);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 30px;
    align-items: start;
}

.player-card,
.detail-card {
    overflow: hidden;
    background: rgba(45, 74, 45, 0.75);
    border: 2px solid rgba(255, 250, 205, 0.15);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(0deg, rgba(15, 26, 15, 0.82), rgba(15, 26, 15, 0.24));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.big-play {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    color: var(--ink);
    background: var(--chalk-yellow);
    border: 3px solid var(--vintage-gold);
    border-radius: 50%;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.35);
}

.player-caption,
.detail-card {
    padding: 22px;
}

.player-caption h1,
.detail-card h2 {
    margin: 0 0 12px;
    color: var(--chalk-yellow);
}

.player-caption p,
.detail-card p {
    margin: 0 0 14px;
    color: rgba(245, 245, 220, 0.82);
}

.poster-card {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255, 250, 205, 0.18);
    background: var(--blackboard-dark);
}

.poster-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
    color: rgba(245, 245, 220, 0.68);
}

.breadcrumb a {
    color: var(--chalk-yellow);
}

.site-footer {
    padding: 32px 0;
    background: rgba(15, 26, 15, 0.94);
    border-top: 1px solid rgba(255, 250, 205, 0.12);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;
    color: rgba(245, 245, 220, 0.72);
}

.footer-inner strong {
    color: var(--chalk-yellow);
}

.footer-inner p {
    max-width: 680px;
    margin: 6px 0 0;
}

.footer-links {
    display: flex;
    gap: 14px;
}

@media (max-width: 1024px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 760px) {
    .menu-button {
        display: inline-grid;
        place-items: center;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        padding: 14px;
        background: rgba(15, 26, 15, 0.98);
        border: 1px solid rgba(255, 250, 205, 0.18);
        border-radius: 18px;
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero,
    .hero-content {
        min-height: 68vh;
    }

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

    .section-head,
    .filter-line,
    .filter-controls,
    .footer-inner {
        align-items: stretch;
        flex-direction: column;
        display: flex;
    }

    .rank-card {
        grid-template-columns: 72px 42px 1fr;
        gap: 12px;
    }

    .rank-number {
        width: 38px;
        height: 38px;
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .brand-text {
        font-size: 1.05rem;
    }

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

    .hero-content {
        padding-bottom: 64px;
    }

    .rank-card {
        grid-template-columns: 64px 1fr;
    }

    .rank-number {
        position: absolute;
        margin-left: 42px;
        margin-top: -34px;
    }
}
