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

:root {
    --blackboard: #1a2e1a;
    --blackboard-dark: #0f1a0f;
    --blackboard-light: #2d4a2d;
    --chalk-white: #f5f5dc;
    --chalk-yellow: #fffacd;
    --chalk-green: #90ee90;
    --chalk-blue: #add8e6;
    --chalk-pink: #ffb6c1;
    --muted: rgba(245, 245, 220, 0.72);
    --line: rgba(255, 250, 205, 0.25);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--chalk-white);
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 10%, rgba(255, 250, 205, 0.08), transparent 26%),
        radial-gradient(circle at 86% 3%, rgba(173, 216, 230, 0.08), transparent 26%),
        linear-gradient(145deg, var(--blackboard-dark), var(--blackboard) 48%, #102510);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: 0.55;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 2px solid rgba(255, 250, 205, 0.28);
    background: rgba(15, 26, 15, 0.9);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 78px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--chalk-white);
    font-family: "Patrick Hand", "Microsoft YaHei", cursive;
    font-size: clamp(1.7rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: 0.03em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--blackboard);
    background: var(--chalk-yellow);
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    box-shadow: 0 0 24px rgba(255, 250, 205, 0.3);
    font-size: 0.82rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.nav-link {
    position: relative;
    color: rgba(245, 245, 220, 0.86);
    font-weight: 700;
    padding: 8px 0;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--chalk-yellow);
    transition: width 0.24s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--chalk-yellow);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.big-search input,
.filter-bar input {
    min-width: 180px;
    color: var(--chalk-white);
    background: rgba(45, 74, 45, 0.82);
    border: 1px solid rgba(255, 250, 205, 0.36);
    border-radius: 999px;
    outline: none;
    padding: 10px 14px;
}

.header-search input::placeholder,
.big-search input::placeholder,
.filter-bar input::placeholder {
    color: rgba(245, 245, 220, 0.55);
}

.header-search input:focus,
.big-search input:focus,
.filter-bar input:focus {
    border-color: var(--chalk-yellow);
    box-shadow: 0 0 0 3px rgba(255, 250, 205, 0.14);
}

.header-search button,
.big-search button,
.filter-bar button,
.btn {
    cursor: pointer;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.big-search button,
.filter-bar button.active,
.btn-primary {
    color: var(--blackboard);
    background: var(--chalk-yellow);
    box-shadow: 0 10px 24px rgba(255, 250, 205, 0.18);
}

.header-search button {
    padding: 10px 16px;
}

.header-search button:hover,
.big-search button:hover,
.btn:hover,
.filter-bar button:hover {
    transform: translateY(-2px);
}

.menu-button {
    display: none;
    margin-left: auto;
    color: var(--chalk-yellow);
    background: rgba(255, 250, 205, 0.08);
    border: 1px solid rgba(255, 250, 205, 0.24);
    border-radius: 10px;
    padding: 8px 12px;
}

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

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

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

.hero-bg {
    position: absolute;
    inset: -18px;
    background-position: center;
    background-size: cover;
    filter: blur(16px) saturate(1.2) brightness(0.52);
    transform: scale(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 26, 15, 0.96), rgba(15, 26, 15, 0.72), rgba(15, 26, 15, 0.4)),
        radial-gradient(circle at 78% 44%, rgba(255, 250, 205, 0.16), transparent 30%);
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 410px);
    align-items: center;
    gap: clamp(36px, 7vw, 86px);
    min-height: 620px;
    padding: 70px 0 100px;
}

.eyebrow {
    color: var(--chalk-green);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: var(--chalk-yellow);
    font-family: "Patrick Hand", "Microsoft YaHei", cursive;
    font-size: clamp(2.8rem, 7vw, 6rem);
    line-height: 0.95;
    text-shadow: 0 0 28px rgba(255, 250, 205, 0.18);
}

.hero p,
.page-hero p,
.detail-copy .lead {
    max-width: 720px;
    color: rgba(245, 245, 220, 0.9);
    font-size: clamp(1.05rem, 2vw, 1.28rem);
    line-height: 1.85;
}

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

.hero-tags span,
.tag-row span {
    color: var(--chalk-yellow);
    background: rgba(255, 250, 205, 0.09);
    border: 1px solid rgba(255, 250, 205, 0.28);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 0.84rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
}

.btn-ghost {
    color: var(--chalk-yellow);
    background: rgba(255, 250, 205, 0.08);
    border: 1px solid rgba(255, 250, 205, 0.3);
}

.hero-poster {
    position: relative;
    display: block;
    border: 3px solid rgba(255, 250, 205, 0.35);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: var(--shadow), 0 0 50px rgba(255, 250, 205, 0.12);
    transform: rotate(1.5deg);
}

.hero-poster::after,
.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.7));
    pointer-events: none;
}

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

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.hero-dots {
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 999px;
    background: rgba(245, 245, 220, 0.35);
    border: 0;
    cursor: pointer;
}

.hero-dot.active {
    width: 38px;
    background: var(--chalk-yellow);
}

.hero-rank-link,
.section-more,
.text-link {
    color: var(--chalk-yellow);
    font-weight: 800;
}

.quick-search {
    margin-top: -42px;
    position: relative;
    z-index: 3;
    padding: 22px;
    background: rgba(15, 26, 15, 0.86);
    border: 1px solid rgba(255, 250, 205, 0.24);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.big-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.big-search input {
    width: 100%;
    padding: 16px 20px;
}

.big-search button {
    padding: 0 28px;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.quick-links a {
    color: rgba(245, 245, 220, 0.86);
    background: rgba(255, 250, 205, 0.08);
    border: 1px solid rgba(255, 250, 205, 0.18);
    border-radius: 999px;
    padding: 8px 12px;
}

.page-section {
    padding: 66px 0 0;
}

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

.section-head h2,
.content-section h2,
.player-section h2,
.category-overview-card h2 {
    margin: 0 0 7px;
    color: var(--chalk-yellow);
    font-family: "Patrick Hand", "Microsoft YaHei", cursive;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1;
}

.section-head p,
.content-section p,
.category-overview-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

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

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    background: linear-gradient(180deg, rgba(45, 74, 45, 0.95), rgba(15, 26, 15, 0.96));
    border: 1px solid rgba(255, 250, 205, 0.22);
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px) rotate(-0.2deg);
    border-color: rgba(255, 250, 205, 0.5);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.35);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.28);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.play-dot {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--blackboard);
    background: var(--chalk-yellow);
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--blackboard);
    background: var(--chalk-pink);
    border-radius: 50%;
    font-weight: 900;
}

.movie-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    flex: 1;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: rgba(245, 245, 220, 0.72);
    font-size: 0.86rem;
}

.card-meta span {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    padding: 2px 8px;
}

.movie-card h3 {
    margin: 0;
    color: var(--chalk-white);
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--chalk-yellow);
}

.movie-card p {
    margin: 0;
    color: rgba(245, 245, 220, 0.72);
    font-size: 0.94rem;
    line-height: 1.65;
}

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

.category-tile,
.category-overview-card,
.page-hero,
.detail-hero,
.player-section,
.content-section,
.rank-panel {
    background: rgba(15, 26, 15, 0.68);
    border: 1px solid rgba(255, 250, 205, 0.22);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.category-tile {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: end;
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
    transition: transform 0.35s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(15, 26, 15, 0.92));
}

.category-tile span,
.category-tile small {
    position: relative;
    z-index: 2;
}

.category-tile span {
    color: var(--chalk-yellow);
    font-size: 1.28rem;
    font-weight: 900;
}

.category-tile small {
    color: rgba(245, 245, 220, 0.78);
    line-height: 1.5;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
    align-items: start;
}

.rank-panel {
    position: sticky;
    top: 100px;
    padding: 20px;
}

.section-head.slim h2 {
    font-size: 2.4rem;
}

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

.rank-list.wide {
    gap: 18px;
}

.rank-row {
    display: grid;
    grid-template-columns: 72px 42px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    background: rgba(45, 74, 45, 0.55);
    border: 1px solid rgba(255, 250, 205, 0.16);
    border-radius: 18px;
}

.rank-cover img {
    width: 72px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-num {
    color: var(--chalk-pink);
    font-family: "Patrick Hand", cursive;
    font-size: 2rem;
    font-weight: 900;
    text-align: center;
}

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

.rank-info p {
    margin: 0 0 8px;
    color: rgba(245, 245, 220, 0.74);
    line-height: 1.6;
}

.inner-page {
    padding: 42px 0 80px;
}

.page-hero {
    padding: clamp(28px, 5vw, 54px);
    margin-bottom: 34px;
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 250, 205, 0.14), transparent 34%),
        rgba(15, 26, 15, 0.78);
}

.small-hero h1 {
    font-size: clamp(2.7rem, 6vw, 5rem);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    color: rgba(245, 245, 220, 0.74);
}

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

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 26px 0;
    padding: 16px;
    background: rgba(15, 26, 15, 0.55);
    border: 1px solid rgba(255, 250, 205, 0.18);
    border-radius: 16px;
}

.filter-bar input {
    flex: 1 1 260px;
}

.filter-bar button {
    color: var(--chalk-white);
    background: rgba(255, 250, 205, 0.08);
    border: 1px solid rgba(255, 250, 205, 0.2);
    padding: 10px 16px;
}

.filter-bar button.active {
    color: var(--blackboard);
}

.empty-tip {
    display: none;
    color: var(--chalk-pink);
    padding: 30px 0;
    text-align: center;
}

.empty-tip.show {
    display: block;
}

[data-filter-card].is-hidden {
    display: none;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.category-preview img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: clamp(24px, 5vw, 54px);
    align-items: center;
    padding: clamp(20px, 4vw, 34px);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 26px;
    border: 2px solid rgba(255, 250, 205, 0.3);
    box-shadow: var(--shadow);
}

.detail-meta {
    display: grid;
    gap: 8px;
    margin: 22px 0;
    color: rgba(245, 245, 220, 0.78);
}

.detail-tags {
    margin-bottom: 26px;
}

.player-section,
.content-section {
    margin-top: 34px;
    padding: clamp(20px, 4vw, 34px);
}

.player-card {
    position: relative;
    overflow: hidden;
    background: #000;
    border: 2px solid rgba(255, 250, 205, 0.24);
    border-radius: 24px;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-player {
    background: #000;
}

.player-cover {
    z-index: 3;
    display: grid;
    place-items: center;
    cursor: pointer;
    padding: 0;
    background: #000;
    border: 0;
    opacity: 1;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 250, 205, 0.1), rgba(0, 0, 0, 0.58));
}

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

.player-play {
    position: absolute;
    z-index: 4;
    display: grid;
    place-items: center;
    width: clamp(64px, 10vw, 96px);
    height: clamp(64px, 10vw, 96px);
    color: var(--blackboard);
    background: var(--chalk-yellow);
    border-radius: 50%;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.4);
    font-size: clamp(1.6rem, 4vw, 2.4rem);
}

.content-section p {
    margin-bottom: 28px;
    font-size: 1.05rem;
    line-height: 1.9;
}

.movie-card-small .movie-card-body {
    padding: 14px;
}

.site-footer {
    margin-top: 80px;
    border-top: 2px solid rgba(255, 250, 205, 0.24);
    background: rgba(15, 26, 15, 0.88);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    padding: 42px 0;
}

.site-footer p,
.site-footer a {
    color: rgba(245, 245, 220, 0.72);
    line-height: 1.75;
}

.site-footer a {
    display: block;
    margin: 6px 0;
}

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

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

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

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

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

    .split-section,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

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

    .menu-button {
        display: inline-flex;
    }

    .main-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: calc(100% + 10px);
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        background: rgba(15, 26, 15, 0.96);
        border: 1px solid rgba(255, 250, 205, 0.28);
        border-radius: 18px;
        box-shadow: var(--shadow);
    }

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

    .nav-link {
        padding: 13px;
    }

    .hero {
        min-height: 760px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        min-height: 720px;
        padding-top: 42px;
        gap: 26px;
    }

    .hero-poster {
        width: min(280px, 72vw);
        margin: 0 auto;
    }

    .quick-search {
        margin-top: -26px;
    }

    .big-search {
        grid-template-columns: 1fr;
    }

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

    .category-overview-card {
        grid-template-columns: 1fr;
    }

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

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

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

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

    .hero h1,
    .detail-copy h1,
    .page-hero h1 {
        font-size: 2.85rem;
    }

    .section-head {
        display: block;
    }

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

    .rank-row {
        grid-template-columns: 64px 36px minmax(0, 1fr);
    }

    .rank-cover img {
        width: 64px;
        height: 86px;
    }

    .detail-hero,
    .player-section,
    .content-section,
    .page-hero {
        border-radius: 18px;
    }
}
