@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-blue: #add8e6;
    --chalk-green: #90ee90;
    --chalk-pink: #ffb6c1;
    --vintage-gold: #ffd700;
    --vintage-beige: #d4c5aa;
    --line: rgba(255, 250, 205, 0.24);
    --shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--chalk-white);
    background:
        radial-gradient(circle at top left, rgba(255, 250, 205, 0.12), transparent 28rem),
        radial-gradient(circle at top right, rgba(173, 216, 230, 0.10), transparent 24rem),
        linear-gradient(145deg, var(--blackboard-dark), var(--blackboard) 45%, #132613);
    font-family: "Patrick Hand", "Microsoft YaHei", "PingFang SC", cursive, system-ui, sans-serif;
    line-height: 1.6;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    opacity: 0.08;
    background-image:
        linear-gradient(rgba(245, 245, 220, 0.22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245, 245, 220, 0.18) 1px, transparent 1px);
    background-size: 42px 42px;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background: rgba(15, 26, 15, 0.88);
    border-bottom: 2px solid rgba(255, 215, 0, 0.25);
}

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

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--vintage-gold);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 0 0 14px rgba(255, 215, 0, 0.22);
}

.logo-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--blackboard-dark);
    background: var(--chalk-yellow);
    border-radius: 999px;
    box-shadow: 0 0 0 4px rgba(255, 250, 205, 0.16);
    font-size: 16px;
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    color: rgba(245, 245, 220, 0.82);
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover {
    color: var(--blackboard-dark);
    background: var(--chalk-yellow);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    color: var(--chalk-yellow);
    background: rgba(255, 250, 205, 0.08);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 24px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    background: rgba(45, 74, 45, 0.95);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.18);
}

.hero-track {
    position: relative;
    min-height: 620px;
}

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

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    min-height: 620px;
    object-fit: cover;
    filter: saturate(0.9) brightness(0.55);
    transform: scale(1.02);
}

.hero-backdrop::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(15, 26, 15, 0.96) 0%, rgba(15, 26, 15, 0.76) 43%, rgba(15, 26, 15, 0.18) 100%),
        linear-gradient(0deg, var(--blackboard-dark), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 42px;
    align-items: center;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 74px 0;
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 8px 14px;
    color: var(--chalk-yellow);
    background: rgba(255, 250, 205, 0.10);
    border: 1px solid rgba(255, 250, 205, 0.26);
    border-radius: 999px;
}

.hero h1 {
    margin: 0;
    color: var(--chalk-yellow);
    font-size: clamp(44px, 7vw, 86px);
    line-height: 0.95;
    letter-spacing: 2px;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
}

.hero h2 {
    margin: 18px 0 12px;
    color: var(--chalk-white);
    font-size: clamp(30px, 4.2vw, 56px);
    line-height: 1.05;
}

.hero p {
    margin: 0;
    max-width: 760px;
    color: rgba(245, 245, 220, 0.90);
    font-size: 21px;
}

.hero-actions,
.card-actions,
.filter-bar,
.pager-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    color: var(--blackboard-dark);
    background: var(--chalk-yellow);
    border: 1px solid rgba(255, 250, 205, 0.55);
    border-radius: 999px;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.34);
}

.btn.secondary {
    color: var(--chalk-white);
    background: rgba(45, 74, 45, 0.72);
    border-color: rgba(255, 215, 0, 0.28);
}

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

.hero-poster {
    position: relative;
    overflow: hidden;
    min-height: 500px;
    border: 2px solid rgba(255, 215, 0, 0.36);
    border-radius: 28px;
    background: rgba(45, 74, 45, 0.45);
    box-shadow: var(--shadow);
    transform: rotate(1deg);
}

.hero-poster img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.hero-poster::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(15, 26, 15, 0.72), transparent 52%);
}

.hero-poster-title {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 18px;
    z-index: 1;
}

.hero-poster-title strong {
    display: block;
    color: var(--chalk-yellow);
    font-size: 28px;
}

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

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

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

.section {
    padding: 54px 0;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    color: var(--chalk-yellow);
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
}

.section-head p,
.page-title p,
.category-intro,
.detail-lead {
    margin: 10px 0 0;
    color: rgba(245, 245, 220, 0.78);
    font-size: 18px;
}

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

.movie-card {
    overflow: hidden;
    background: rgba(45, 74, 45, 0.72);
    border: 2px solid rgba(255, 250, 205, 0.18);
    border-radius: var(--radius);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
    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, 215, 0, 0.46);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(145deg, rgba(255, 250, 205, 0.10), rgba(173, 216, 230, 0.10));
}

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

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

.movie-play,
.poster-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 56px;
    height: 56px;
    place-items: center;
    color: var(--blackboard-dark);
    background: rgba(255, 250, 205, 0.92);
    border-radius: 999px;
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.movie-card-body {
    padding: 16px;
}

.movie-card h3 {
    margin: 0 0 8px;
    color: var(--chalk-white);
    font-size: 22px;
    line-height: 1.2;
}

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

.movie-desc {
    min-height: 3.2em;
    margin: 0 0 12px;
    color: rgba(245, 245, 220, 0.72);
}

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

.movie-meta span,
.movie-tags span,
.movie-tags a,
.info-tags span,
.detail-meta span,
.breadcrumb a,
.breadcrumb span {
    display: inline-flex;
    padding: 5px 9px;
    color: rgba(245, 245, 220, 0.88);
    background: rgba(15, 26, 15, 0.45);
    border: 1px solid rgba(255, 250, 205, 0.16);
    border-radius: 999px;
    font-size: 14px;
}

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

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

.category-card,
.info-panel,
.rank-panel,
.detail-card {
    background: rgba(45, 74, 45, 0.72);
    border: 2px solid rgba(255, 215, 0, 0.22);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.category-card {
    padding: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 215, 0, 0.48);
}

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

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

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-samples a {
    padding: 5px 9px;
    color: var(--chalk-blue);
    background: rgba(173, 216, 230, 0.10);
    border-radius: 999px;
}

.rank-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-item {
    display: grid;
    grid-template-columns: 58px 76px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    background: rgba(15, 26, 15, 0.38);
    border: 1px solid rgba(255, 250, 205, 0.14);
    border-radius: 16px;
}

.rank-no {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    color: var(--blackboard-dark);
    background: var(--chalk-yellow);
    border-radius: 14px;
    font-weight: 900;
}

.rank-thumb {
    overflow: hidden;
    width: 76px;
    height: 102px;
    border-radius: 12px;
}

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

.rank-info h3 {
    margin: 0 0 6px;
    color: var(--chalk-white);
    font-size: 22px;
}

.rank-info p {
    margin: 0;
    color: rgba(245, 245, 220, 0.72);
}

.page-hero {
    padding: 56px 0 30px;
}

.page-title {
    max-width: 860px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin: 24px 0;
    padding: 16px;
    background: rgba(45, 74, 45, 0.72);
    border: 2px solid rgba(255, 250, 205, 0.18);
    border-radius: var(--radius);
}

.search-input,
.select-input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    color: var(--chalk-white);
    background: rgba(15, 26, 15, 0.74);
    border: 1px solid rgba(255, 250, 205, 0.22);
    border-radius: 999px;
    outline: 0;
    font: inherit;
}

.search-input:focus,
.select-input:focus {
    border-color: rgba(255, 215, 0, 0.62);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.12);
}

.filter-bar {
    margin: 0 0 22px;
}

.filter-chip {
    padding: 8px 12px;
    color: var(--chalk-white);
    background: rgba(15, 26, 15, 0.46);
    border: 1px solid rgba(255, 250, 205, 0.18);
    border-radius: 999px;
    cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
    color: var(--blackboard-dark);
    background: var(--chalk-yellow);
}

.detail-hero {
    padding: 34px 0 56px;
}

.breadcrumb {
    margin-bottom: 18px;
}

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

.player-box {
    position: relative;
    overflow: hidden;
    background: #050805;
    border: 2px solid rgba(255, 215, 0, 0.28);
    border-radius: 22px;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-box video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(0deg, rgba(15, 26, 15, 0.72), rgba(15, 26, 15, 0.36));
    cursor: pointer;
    z-index: 2;
}

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

.play-button {
    display: grid;
    width: 92px;
    height: 92px;
    place-items: center;
    color: var(--blackboard-dark);
    background: var(--chalk-yellow);
    border: 0;
    border-radius: 999px;
    font-size: 34px;
    box-shadow: 0 0 0 16px rgba(255, 250, 205, 0.12);
    cursor: pointer;
}

.detail-title {
    margin: 24px 0 0;
}

.detail-meta {
    margin: 14px 0 0;
}

.detail-card {
    padding: 24px;
    margin-top: 22px;
}

.detail-card h2 {
    margin: 0 0 14px;
    color: var(--chalk-yellow);
    font-size: 30px;
}

.detail-card p {
    margin: 0;
    color: rgba(245, 245, 220, 0.84);
    font-size: 18px;
}

.side-poster {
    overflow: hidden;
    border: 2px solid rgba(255, 215, 0, 0.28);
    border-radius: 22px;
    background: rgba(45, 74, 45, 0.5);
    box-shadow: var(--shadow);
}

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

.side-info {
    padding: 18px;
}

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

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

.related-card {
    overflow: hidden;
    background: rgba(45, 74, 45, 0.66);
    border: 1px solid rgba(255, 250, 205, 0.16);
    border-radius: 16px;
}

.related-card a:first-child {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
}

.related-card h3 {
    margin: 0;
    padding: 12px;
    color: var(--chalk-white);
    font-size: 18px;
}

.site-footer {
    margin-top: 42px;
    padding: 38px 0;
    color: rgba(245, 245, 220, 0.74);
    background: rgba(15, 26, 15, 0.92);
    border-top: 2px solid rgba(255, 215, 0, 0.20);
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    gap: 28px;
    align-items: start;
}

.footer-logo {
    margin-bottom: 8px;
}

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

.footer-links a {
    padding: 8px 12px;
    color: var(--chalk-yellow);
    background: rgba(255, 250, 205, 0.08);
    border-radius: 999px;
}

.is-filtered-out {
    display: none !important;
}

@media (max-width: 980px) {
    .desktop-nav {
        display: none;
    }

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

    .mobile-nav.open {
        display: grid;
        gap: 8px;
    }

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

    .hero-poster {
        min-height: auto;
        transform: none;
    }

    .hero-poster img {
        height: auto;
        aspect-ratio: 16 / 10;
    }

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

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

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

@media (max-width: 680px) {
    .header-inner,
    .footer-inner,
    .container {
        width: min(100% - 24px, 1180px);
    }

    .site-logo {
        font-size: 23px;
    }

    .hero,
    .hero-track,
    .hero-backdrop img {
        min-height: 700px;
    }

    .hero-content {
        gap: 24px;
        padding: 42px 0 76px;
    }

    .hero p {
        font-size: 18px;
    }

    .section-head {
        display: block;
    }

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

    .movie-card-body {
        padding: 12px;
    }

    .movie-card h3 {
        font-size: 19px;
    }

    .rank-item {
        grid-template-columns: 44px 62px 1fr;
    }

    .rank-item .btn {
        grid-column: 1 / -1;
    }

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

    .detail-card,
    .category-card {
        padding: 18px;
    }
}
