:root {
    --blackboard: #1a2e1a;
    --blackboard-dark: #0f1a0f;
    --blackboard-light: #2d4a2d;
    --chalk-white: #f5f5dc;
    --chalk-yellow: #fffacd;
    --chalk-blue: #9bd3ff;
    --chalk-green: #90ee90;
    --chalk-pink: #ffb6c1;
    --vintage-gold: #ffd700;
    --vintage-beige: #d4c5aa;
    --line: rgba(255, 250, 205, 0.28);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
    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.08), transparent 32rem),
        linear-gradient(180deg, var(--blackboard-dark), var(--blackboard) 28rem, var(--blackboard-dark));
    font-family: "Patrick Hand", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.08;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 48px 48px;
}

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: 50;
    background: rgba(15, 26, 15, 0.94);
    border-bottom: 2px solid var(--line);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 800;
    letter-spacing: 0.03em;
}

.logo-mark {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    color: var(--blackboard-dark);
    background: var(--chalk-yellow);
    border-radius: 12px;
    box-shadow: 0 0 0 4px rgba(255, 250, 205, 0.12);
}

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

.nav-link {
    padding: 10px 4px;
    color: rgba(245, 245, 220, 0.82);
    font-weight: 700;
    transition: color 0.2s ease;
}

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

.header-search,
.mobile-search,
.home-search-card,
.search-page-form {
    display: flex;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.home-search-card input,
.search-page-form input,
.filter-panel input {
    border: 1px solid rgba(255, 250, 205, 0.28);
    border-radius: 12px;
    color: var(--chalk-white);
    background: rgba(45, 74, 45, 0.8);
    outline: none;
}

.header-search input {
    width: 220px;
    padding: 10px 12px;
}

.header-search button,
.mobile-search button,
.home-search-card button,
.search-page-form button {
    border: 0;
    border-radius: 12px;
    padding: 10px 16px;
    color: var(--blackboard-dark);
    background: var(--chalk-yellow);
    font-weight: 800;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    border: 0;
    color: var(--chalk-white);
    background: transparent;
    font-size: 30px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 16px;
}

.mobile-panel.open {
    display: block;
}

.mobile-nav {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.mobile-search input {
    flex: 1;
    padding: 12px;
}

.hero-carousel {
    position: relative;
    height: min(76vh, 720px);
    min-height: 520px;
    overflow: hidden;
    background: var(--blackboard-dark);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 26, 15, 0.95), rgba(26, 46, 26, 0.72), rgba(26, 46, 26, 0.28)),
        linear-gradient(0deg, rgba(15, 26, 15, 1), transparent 50%);
}

.hero-content {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding-bottom: 92px;
}

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

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

.hero-copy h1,
.page-hero h1,
.detail-content-card h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 0.95;
    color: var(--chalk-white);
    text-shadow: 0 4px 28px rgba(0, 0, 0, 0.45);
}

.hero-copy p,
.page-hero p {
    margin: 0 0 20px;
    max-width: 820px;
    color: rgba(245, 245, 220, 0.9);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

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

.hero-tags span,
.tag-list span,
.quick-tags a {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--chalk-yellow);
    border: 1px solid rgba(255, 250, 205, 0.3);
    background: rgba(255, 250, 205, 0.08);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 20px 0 24px;
    color: rgba(245, 245, 220, 0.86);
}

.hero-meta strong {
    color: var(--blackboard-dark);
    background: var(--chalk-yellow);
    padding: 6px 12px;
    border-radius: 8px;
}

.primary-btn,
.outline-btn,
.more-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    padding: 12px 20px;
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    color: var(--blackboard-dark);
    background: var(--chalk-yellow);
    border: 2px solid var(--chalk-yellow);
}

.primary-btn:hover,
.outline-btn:hover,
.more-link:hover {
    transform: translateY(-2px);
}

.primary-btn.full {
    width: 100%;
}

.outline-btn,
.more-link {
    color: var(--chalk-yellow);
    border: 2px solid rgba(255, 250, 205, 0.32);
    background: rgba(45, 74, 45, 0.5);
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 250, 205, 0.35);
    border-radius: 50%;
    color: var(--chalk-white);
    background: rgba(15, 26, 15, 0.7);
    cursor: pointer;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    background: rgba(245, 245, 220, 0.45);
}

.hero-dots button.active {
    width: 32px;
    border-radius: 999px;
    background: var(--chalk-yellow);
}

.page-intro,
.page-hero {
    padding: 54px 0 10px;
}

.page-intro h2,
.page-hero h1 {
    margin-top: 0;
}

.slim-hero {
    margin-top: 24px;
    padding: 48px;
    border: 2px solid var(--line);
    border-radius: 28px;
    background:
        radial-gradient(circle at 15% 10%, rgba(255, 250, 205, 0.12), transparent 28rem),
        linear-gradient(135deg, rgba(45, 74, 45, 0.86), rgba(15, 26, 15, 0.92));
    box-shadow: var(--shadow);
}

.block-section {
    padding: 34px 0;
}

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

.section-heading > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
}

.section-heading p {
    margin: 0;
    color: rgba(245, 245, 220, 0.68);
}

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

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

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 250, 205, 0.18);
    border-radius: 18px;
    background: rgba(45, 74, 45, 0.78);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.26);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: var(--chalk-yellow);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(255, 250, 205, 0.06);
}

.movie-card.small .poster-link,
.movie-card.mini .poster-link {
    aspect-ratio: 3 / 4;
}

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

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

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
}

.play-chip {
    left: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--blackboard-dark);
    background: var(--chalk-yellow);
    font-weight: 900;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-chip {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    top: 10px;
    left: 10px;
    min-width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    color: var(--blackboard-dark);
    background: var(--vintage-gold);
    font-weight: 900;
}

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

.movie-card-body h3 {
    margin: 0 0 8px;
    font-size: 20px;
    line-height: 1.25;
}

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

.movie-card-body p {
    min-height: 48px;
    margin: 0 0 12px;
    color: rgba(245, 245, 220, 0.76);
    line-height: 1.55;
}

.meta-row,
.score-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    font-size: 14px;
    color: rgba(245, 245, 220, 0.65);
}

.score-row {
    justify-content: space-between;
    margin-top: 9px;
    color: var(--chalk-yellow);
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border: 2px solid rgba(255, 250, 205, 0.22);
    border-radius: 22px;
    background: var(--blackboard-light);
    box-shadow: var(--shadow);
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    opacity: 0.32;
    filter: saturate(1.1);
}

.category-tile > div {
    position: absolute;
    inset: auto 18px 18px 18px;
}

.category-tile h3 {
    margin: 0 0 8px;
    font-size: 28px;
}

.category-tile p {
    margin: 0 0 12px;
    color: rgba(245, 245, 220, 0.76);
}

.category-tile span,
.category-count {
    color: var(--chalk-yellow);
    font-weight: 900;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 28px;
    align-items: start;
}

.ranking-list {
    display: grid;
    gap: 12px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 48px 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(255, 250, 205, 0.22);
    border-radius: 16px;
    background: rgba(45, 74, 45, 0.72);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
    border-color: var(--chalk-yellow);
    transform: translateX(4px);
}

.ranking-row img {
    width: 58px;
    height: 76px;
    object-fit: cover;
    border-radius: 10px;
}

.ranking-row strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ranking-row em {
    color: var(--chalk-yellow);
    font-style: normal;
    font-weight: 900;
}

.ranking-row span:last-child {
    grid-column: 3 / -1;
    color: rgba(245, 245, 220, 0.65);
    font-size: 14px;
}

.ranking-number {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: var(--blackboard-dark);
    background: var(--chalk-yellow);
    border-radius: 12px;
    font-weight: 900;
}

.home-search-card,
.search-page-form {
    padding: 22px;
    border: 2px solid rgba(255, 250, 205, 0.22);
    border-radius: 24px;
    background: rgba(45, 74, 45, 0.72);
}

.home-search-card input,
.search-page-form input {
    flex: 1;
    min-width: 0;
    padding: 14px;
}

.quick-tags {
    margin-top: 18px;
}

.strip-section {
    overflow: hidden;
}

.horizontal-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(210px, 1fr);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 14px;
}

.category-overview-list {
    display: grid;
    gap: 26px;
    padding: 34px 0;
}

.category-overview-card {
    border: 2px solid rgba(255, 250, 205, 0.22);
    border-radius: 26px;
    padding: 24px;
    background: rgba(45, 74, 45, 0.68);
    box-shadow: var(--shadow);
}

.category-overview-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.category-overview-head h2 {
    margin: 0 0 8px;
    font-size: 32px;
}

.category-overview-head p {
    margin: 0;
    color: rgba(245, 245, 220, 0.72);
}

.filter-panel {
    margin: 28px 0;
    padding: 20px;
    border: 2px solid rgba(255, 250, 205, 0.24);
    border-radius: 22px;
    background: rgba(15, 26, 15, 0.38);
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 14px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: rgba(245, 245, 220, 0.72);
}

.filter-panel input {
    width: 100%;
    padding: 12px;
}

.filter-status {
    margin-top: 14px;
    color: rgba(245, 245, 220, 0.72);
}

.filter-status strong {
    color: var(--chalk-yellow);
}

.search-summary {
    margin: 22px 0;
    color: var(--chalk-yellow);
    font-weight: 900;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding-top: 28px;
}

.breadcrumb {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(245, 245, 220, 0.72);
}

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

.detail-main,
.detail-side {
    display: grid;
    gap: 22px;
    align-content: start;
}

.detail-player-card,
.detail-content-card,
.poster-card,
.side-card {
    border: 2px solid rgba(255, 250, 205, 0.24);
    border-radius: 24px;
    background: rgba(45, 74, 45, 0.7);
    box-shadow: var(--shadow);
}

.detail-player-card,
.detail-content-card,
.side-card {
    padding: 20px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #000;
}

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

.video-play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 8px;
    border: 0;
    color: var(--chalk-white);
    background: radial-gradient(circle, rgba(15, 26, 15, 0.1), rgba(15, 26, 15, 0.68));
    cursor: pointer;
}

.video-play-overlay span {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--blackboard-dark);
    background: var(--chalk-yellow);
    font-size: 30px;
}

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

.player-note {
    margin-top: 12px;
    color: rgba(245, 245, 220, 0.65);
    font-size: 14px;
}

.detail-content-card h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.detail-one-line {
    margin: 0 0 22px;
    color: rgba(245, 245, 220, 0.84);
    font-size: 20px;
    line-height: 1.7;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.detail-meta-grid div {
    padding: 14px;
    border: 1px solid rgba(255, 250, 205, 0.18);
    border-radius: 16px;
    background: rgba(15, 26, 15, 0.32);
}

.detail-meta-grid span {
    display: block;
    margin-bottom: 4px;
    color: rgba(245, 245, 220, 0.58);
}

.detail-meta-grid strong {
    color: var(--chalk-yellow);
}

.text-section {
    margin-top: 24px;
}

.text-section h2,
.side-card h2 {
    color: var(--chalk-yellow);
}

.text-section p {
    color: rgba(245, 245, 220, 0.9);
    font-size: 18px;
    line-height: 1.9;
}

.poster-card {
    overflow: hidden;
    padding: 14px;
}

.poster-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 14px;
}

.side-related-list {
    display: grid;
    gap: 12px;
}

.side-related-list a {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 10px;
    align-items: center;
}

.side-related-list img {
    width: 56px;
    height: 76px;
    object-fit: cover;
    border-radius: 10px;
}

.side-related-list span {
    line-height: 1.4;
}

.side-related-list em {
    color: var(--chalk-yellow);
    font-style: normal;
}

.site-footer {
    margin-top: 60px;
    border-top: 2px solid var(--line);
    background: rgba(15, 26, 15, 0.92);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 28px 0;
    color: rgba(245, 245, 220, 0.7);
}

.footer-inner strong {
    color: var(--chalk-yellow);
    margin-right: 12px;
}

.is-filter-hidden {
    display: none !important;
}

@media (max-width: 1000px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

    .category-grid,
    .two-column-section,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-side {
        grid-template-columns: 260px 1fr;
    }
}

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

    .header-inner {
        min-height: 64px;
    }

    .hero-carousel {
        min-height: 580px;
        height: 76vh;
    }

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

    .hero-shade {
        background: linear-gradient(0deg, rgba(15, 26, 15, 1), rgba(15, 26, 15, 0.58));
    }

    .slim-hero {
        padding: 26px;
        border-radius: 22px;
    }

    .section-heading,
    .category-overview-head,
    .footer-inner {
        display: grid;
    }

    .card-grid,
    .featured-grid,
    .compact-grid,
    .category-page-grid,
    .mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .category-grid,
    .filter-grid,
    .detail-meta-grid,
    .detail-side {
        grid-template-columns: 1fr;
    }

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

    .movie-card-body p {
        min-height: 0;
        font-size: 14px;
    }

    .ranking-row {
        grid-template-columns: 40px 52px minmax(0, 1fr);
    }

    .ranking-row em {
        grid-column: 3;
    }

    .home-search-card,
    .search-page-form {
        display: grid;
    }
}
