@import url("https://fonts.googleapis.com/css2?family=Patrick+Hand&display=swap");

:root {
    --blackboard-dark: #0f1a0f;
    --blackboard: #1a2e1a;
    --blackboard-light: #2d4a2d;
    --chalk-white: #f5f5dc;
    --chalk-yellow: #fffacd;
    --chalk-blue: #add8e6;
    --chalk-green: #90ee90;
    --chalk-pink: #ffb6c1;
    --vintage-gold: #ffd700;
    --vintage-beige: #d4c5aa;
    --line: rgba(255, 250, 205, 0.22);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    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.12), transparent 30%),
        radial-gradient(circle at 75% 15%, rgba(173, 216, 230, 0.1), transparent 26%),
        linear-gradient(135deg, var(--blackboard-dark), var(--blackboard) 48%, #102410);
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 100vh;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 26, 15, 0.86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

.nav-shell {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--blackboard);
    background: var(--chalk-yellow);
    border-radius: 14px;
    box-shadow: 0 0 0 5px rgba(255, 250, 205, 0.08);
    font-family: "Patrick Hand", cursive;
    font-size: 28px;
}

.brand-text,
.footer-brand {
    font-family: "Patrick Hand", "Microsoft YaHei", cursive;
    font-size: 30px;
    color: var(--chalk-yellow);
    text-shadow: 0 2px 18px rgba(255, 250, 205, 0.18);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    padding: 10px 15px;
    border-radius: 999px;
    color: rgba(245, 245, 220, 0.82);
    transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.main-nav a:hover {
    color: var(--chalk-yellow);
    background: rgba(255, 250, 205, 0.08);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(45, 74, 45, 0.7);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--chalk-yellow);
}

.home-hero {
    width: min(1380px, calc(100% - 24px));
    margin: 20px auto 0;
}

.hero-board {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    border: 2px solid rgba(255, 250, 205, 0.28);
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(45, 74, 45, 0.96), rgba(15, 26, 15, 0.98));
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(245, 245, 220, 0.07);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(18px) saturate(1.08);
    transform: scale(1.08);
    opacity: 0.25;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 26, 15, 0.96) 0%, rgba(26, 46, 26, 0.76) 55%, rgba(15, 26, 15, 0.42) 100%),
        radial-gradient(circle at 82% 20%, rgba(255, 215, 0, 0.16), transparent 28%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 390px);
    align-items: center;
    gap: 44px;
    min-height: 72vh;
    padding: clamp(34px, 6vw, 74px);
}

.eyebrow,
.section-kicker,
.page-kicker {
    display: inline-flex;
    color: var(--chalk-green);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 800;
}

.hero-copy h1 {
    margin: 14px 0 18px;
    font-family: "Patrick Hand", "Microsoft YaHei", cursive;
    font-size: clamp(48px, 7vw, 90px);
    line-height: 0.96;
    color: var(--chalk-yellow);
    text-shadow: 0 4px 28px rgba(0, 0, 0, 0.32);
}

.hero-copy p {
    max-width: 720px;
    margin: 0 0 24px;
    color: rgba(245, 245, 220, 0.88);
    font-size: clamp(16px, 1.6vw, 20px);
    line-height: 1.9;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.rank-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 250, 205, 0.22);
    color: rgba(245, 245, 220, 0.88);
    background: rgba(255, 250, 205, 0.06);
    font-size: 13px;
}

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

.btn-primary,
.btn-ghost,
.section-more,
.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    min-height: 46px;
    padding: 0 20px;
    font-weight: 900;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary,
.play-button {
    color: var(--blackboard);
    background: var(--chalk-yellow);
    box-shadow: 0 12px 32px rgba(255, 250, 205, 0.18);
}

.btn-primary:hover,
.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 42px rgba(255, 250, 205, 0.26);
}

.btn-ghost,
.section-more {
    color: var(--chalk-yellow);
    border: 1px solid rgba(255, 250, 205, 0.32);
    background: rgba(15, 26, 15, 0.28);
}

.btn-ghost:hover,
.section-more:hover {
    transform: translateY(-2px);
    background: rgba(255, 250, 205, 0.08);
}

.hero-poster {
    position: relative;
    justify-self: end;
    width: min(100%, 360px);
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    overflow: hidden;
    border: 2px solid rgba(255, 250, 205, 0.35);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.44);
}

.hero-poster img,
.poster-wrap img,
.mini-card img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(255, 250, 205, 0.08), rgba(173, 216, 230, 0.06));
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: clamp(26px, 6vw, 74px);
    right: clamp(26px, 6vw, 74px);
    bottom: 24px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.hero-dots button {
    cursor: pointer;
    white-space: nowrap;
    color: rgba(245, 245, 220, 0.78);
    border: 1px solid rgba(255, 250, 205, 0.18);
    border-radius: 999px;
    background: rgba(15, 26, 15, 0.58);
    padding: 9px 14px;
}

.hero-dots button.is-active,
.hero-dots button:hover {
    color: var(--blackboard);
    background: var(--chalk-yellow);
}

.main-content {
    padding: 46px 0 70px;
}

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

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

.section-heading h2,
.page-head h1 {
    margin: 6px 0 0;
    color: var(--chalk-white);
    font-family: "Patrick Hand", "Microsoft YaHei", cursive;
    font-size: clamp(34px, 4.2vw, 56px);
    line-height: 1;
}

.section-heading p,
.page-head p {
    margin: 10px 0 0;
    color: rgba(245, 245, 220, 0.72);
    line-height: 1.8;
    max-width: 760px;
}

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

.movie-grid.compact-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.movie-card {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 250, 205, 0.18);
    border-radius: 22px;
    overflow: hidden;
    background: rgba(45, 74, 45, 0.62);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 250, 205, 0.48);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.26);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 26, 15, 0.55);
}

.poster-wrap img {
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-wrap img {
    transform: scale(1.06);
}

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(transparent, rgba(15, 26, 15, 0.86));
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: 12px;
    color: var(--blackboard);
    background: var(--vintage-gold);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.22);
}

.movie-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    min-height: 190px;
}

.card-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(245, 245, 220, 0.68);
    font-size: 13px;
}

.movie-card h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.36;
    color: var(--chalk-yellow);
}

.movie-card p {
    margin: 0;
    color: rgba(245, 245, 220, 0.72);
    font-size: 14px;
    line-height: 1.7;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 12px;
    padding: 16px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 250, 205, 0.18);
    border-radius: 20px;
    background: rgba(15, 26, 15, 0.42);
}

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

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--chalk-yellow);
}

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

.category-card {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    border: 1px solid rgba(255, 250, 205, 0.18);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(255, 250, 205, 0.12), transparent 34%),
        rgba(45, 74, 45, 0.68);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-card h2 {
    margin: 0 0 8px;
    color: var(--chalk-yellow);
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: rgba(245, 245, 220, 0.72);
    line-height: 1.7;
}

.category-card span {
    color: var(--chalk-green);
    font-weight: 800;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 92px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(255, 250, 205, 0.17);
    border-radius: 20px;
    background: rgba(45, 74, 45, 0.55);
}

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

.rank-thumb {
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(15, 26, 15, 0.5);
}

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

.rank-info h2 {
    margin: 0 0 8px;
    color: var(--chalk-yellow);
    font-size: 22px;
}

.rank-info p {
    margin: 0 0 10px;
    color: rgba(245, 245, 220, 0.75);
    line-height: 1.7;
}

.rank-heat {
    color: var(--vintage-gold);
    font-weight: 900;
    white-space: nowrap;
}

.detail-hero {
    padding: 44px 0 24px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 34px;
    align-items: start;
    padding: 28px;
    border: 1px solid rgba(255, 250, 205, 0.18);
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(173, 216, 230, 0.1), transparent 26%),
        rgba(45, 74, 45, 0.62);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border: 2px solid rgba(255, 250, 205, 0.28);
    border-radius: 24px;
    aspect-ratio: 2 / 3;
    background: rgba(15, 26, 15, 0.5);
}

.detail-info h1 {
    margin: 10px 0 16px;
    color: var(--chalk-yellow);
    font-family: "Patrick Hand", "Microsoft YaHei", cursive;
    font-size: clamp(38px, 5vw, 72px);
    line-height: 1;
}

.detail-info p {
    color: rgba(245, 245, 220, 0.8);
    line-height: 1.9;
    font-size: 17px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 12px;
}

.player-section {
    margin-top: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 250, 205, 0.22);
    border-radius: 26px;
    background: #050805;
    box-shadow: var(--shadow);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #050805;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: rgba(5, 8, 5, 0.34);
    transition: opacity 0.28s ease, visibility 0.28s ease;
    z-index: 3;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-button {
    border: 0;
    cursor: pointer;
    font-size: 18px;
}

.story-panel {
    margin-top: 28px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.story-card {
    padding: 22px;
    border: 1px solid rgba(255, 250, 205, 0.17);
    border-radius: 22px;
    background: rgba(45, 74, 45, 0.54);
}

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

.story-card p {
    margin: 0;
    color: rgba(245, 245, 220, 0.76);
    line-height: 1.9;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(255, 250, 205, 0.16);
    border-radius: 16px;
    background: rgba(45, 74, 45, 0.55);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.mini-card img {
    border-radius: 12px;
    aspect-ratio: 2 / 3;
}

.mini-card strong {
    display: block;
    color: var(--chalk-yellow);
    line-height: 1.4;
}

.mini-card em {
    display: block;
    margin-top: 6px;
    color: rgba(245, 245, 220, 0.62);
    font-style: normal;
    font-size: 13px;
}

.empty-state {
    display: none;
    padding: 28px;
    text-align: center;
    color: rgba(245, 245, 220, 0.74);
    border: 1px dashed rgba(255, 250, 205, 0.2);
    border-radius: 20px;
}

.empty-state.is-visible {
    display: block;
}

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: rgba(15, 26, 15, 0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 28px;
    padding: 38px 0;
}

.footer-grid p {
    color: rgba(245, 245, 220, 0.72);
    line-height: 1.8;
}

.footer-grid h3 {
    margin: 0 0 12px;
    color: var(--chalk-yellow);
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: rgba(245, 245, 220, 0.72);
}

.footer-grid a:hover {
    color: var(--chalk-yellow);
}

.footer-bottom {
    padding: 18px 0;
    text-align: center;
    color: rgba(245, 245, 220, 0.58);
    border-top: 1px solid rgba(255, 250, 205, 0.12);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(245, 245, 220, 0.62);
    font-size: 14px;
}

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

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

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

@media (max-width: 860px) {
    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(15, 26, 15, 0.96);
    }

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

    .hero-content,
    .detail-layout,
    .story-panel,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        min-height: 78vh;
        padding: 34px 22px 104px;
    }

    .hero-poster {
        justify-self: start;
        width: min(68vw, 260px);
    }

    .section-heading,
    .page-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

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

    .rank-heat {
        grid-column: 3;
    }
}

@media (max-width: 560px) {
    .site-shell {
        width: min(100% - 22px, 1180px);
    }

    .hero-board {
        border-radius: 24px;
    }

    .hero-content {
        gap: 22px;
    }

    .hero-copy h1 {
        font-size: 44px;
    }

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

    .movie-card {
        display: grid;
        grid-template-columns: 118px minmax(0, 1fr);
    }

    .poster-wrap {
        height: 100%;
    }

    .movie-card-body {
        min-height: 0;
    }
}
