: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;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
    --soft-border: rgba(255, 250, 205, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(255, 250, 205, 0.08), transparent 32rem),
        radial-gradient(circle at bottom right, rgba(173, 216, 230, 0.08), transparent 32rem),
        var(--blackboard);
    color: var(--chalk-white);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
    line-height: 1.65;
}

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

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

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

.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.96);
    border-bottom: 2px solid rgba(255, 250, 205, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(1.35rem, 2vw, 2rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    color: var(--chalk-white);
}

.logo-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--chalk-yellow);
    color: var(--blackboard-dark);
    box-shadow: 0 0 26px rgba(255, 250, 205, 0.35);
}

.desktop-nav,
.mobile-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: rgba(245, 245, 220, 0.86);
    font-weight: 700;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.header-search,
.mobile-search {
    display: flex;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid rgba(255, 250, 205, 0.26);
    border-radius: 12px;
    background: rgba(45, 74, 45, 0.92);
    color: var(--chalk-white);
    padding: 11px 13px;
    outline: none;
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.filter-panel input::placeholder {
    color: rgba(245, 245, 220, 0.56);
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.ghost-button {
    border: 0;
    border-radius: 12px;
    padding: 11px 18px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.header-search button,
.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--chalk-yellow);
    color: var(--blackboard-dark);
}

.secondary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(45, 74, 45, 0.68);
    color: var(--chalk-yellow);
    border: 1px solid rgba(255, 250, 205, 0.28);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.header-search button:hover,
.mobile-search button:hover {
    transform: translateY(-2px);
}

.primary-button.small {
    padding: 9px 14px;
    font-size: 0.95rem;
}

.mobile-menu-button {
    display: none;
    border: 0;
    background: transparent;
    color: var(--chalk-white);
    font-size: 1.8rem;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 16px;
    border-top: 1px solid rgba(255, 250, 205, 0.22);
    flex-direction: column;
    align-items: stretch;
}

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

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

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

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, var(--blackboard) 0%, rgba(26, 46, 26, 0.74) 42%, rgba(26, 46, 26, 0.26) 100%),
        linear-gradient(to right, rgba(15, 26, 15, 0.8), rgba(15, 26, 15, 0.16));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 76px;
}

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

.hero-kicker,
.section-kicker,
.detail-kicker,
.page-hero span {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--chalk-yellow);
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1,
.section-heading h2 {
    margin: 0;
    color: var(--chalk-white);
    line-height: 1.1;
    font-weight: 1000;
    letter-spacing: 0.02em;
}

.hero h1 {
    font-size: clamp(2.8rem, 7vw, 5.8rem);
    text-shadow: 0 8px 36px rgba(0, 0, 0, 0.5);
}

.hero p {
    max-width: 660px;
    margin: 18px 0 0;
    color: rgba(245, 245, 220, 0.92);
    font-size: clamp(1rem, 1.7vw, 1.25rem);
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta {
    margin: 22px 0 26px;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.rank-meta span,
.tag-cloud span {
    border: 1px solid rgba(255, 250, 205, 0.28);
    border-radius: 999px;
    background: rgba(15, 26, 15, 0.62);
    color: rgba(245, 245, 220, 0.9);
    padding: 5px 11px;
    font-size: 0.9rem;
}

.hero-meta span:first-child,
.detail-meta span:first-child {
    background: var(--chalk-yellow);
    color: var(--blackboard-dark);
    font-weight: 900;
}

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

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

.hero-controls button {
    border: 1px solid rgba(255, 250, 205, 0.28);
    background: rgba(15, 26, 15, 0.74);
    color: var(--chalk-white);
    cursor: pointer;
}

.hero-controls > button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.5rem;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    padding: 0;
}

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

.page-section,
.page-shell {
    padding: 58px 0;
}

.page-shell {
    min-height: 62vh;
}

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

.section-heading h2 {
    font-size: clamp(2rem, 3.6vw, 3.4rem);
}

.section-heading p,
.page-hero p,
.chalk-note p,
.site-footer p {
    color: rgba(245, 245, 220, 0.78);
    margin: 10px 0 0;
}

.section-more {
    color: var(--chalk-yellow);
    font-weight: 900;
}

.highlight-panel,
.category-overview-block,
.filter-panel,
.content-panel,
.info-panel,
.player-panel,
.chalk-note {
    border: 2px solid rgba(255, 250, 205, 0.22);
    border-radius: 22px;
    background: rgba(45, 74, 45, 0.62);
    box-shadow: var(--shadow);
}

.highlight-panel {
    padding: 34px;
}

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

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

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

.movie-card {
    min-width: 0;
    border: 2px solid rgba(255, 250, 205, 0.16);
    border-radius: 18px;
    background: rgba(45, 74, 45, 0.86);
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 250, 205, 0.78);
    box-shadow: 0 20px 60px rgba(255, 250, 205, 0.12);
}

.card-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--blackboard-dark);
}

.movie-card.compact .poster-wrap {
    aspect-ratio: 16 / 10;
}

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

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

.score-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 999px;
    background: rgba(15, 26, 15, 0.84);
    color: var(--chalk-yellow);
    padding: 4px 9px;
    font-size: 0.85rem;
    font-weight: 900;
}

.play-badge {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 250, 205, 0.92);
    color: var(--blackboard-dark);
    font-weight: 900;
    opacity: 0;
    transform: scale(0.82);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-badge {
    opacity: 1;
    transform: scale(1);
}

.card-body {
    padding: 15px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: var(--chalk-white);
    font-size: 1.05rem;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.card-desc {
    min-height: 44px;
    margin: 0 0 12px;
    color: rgba(245, 245, 220, 0.74);
    font-size: 0.92rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta {
    gap: 7px;
    margin-bottom: 9px;
}

.card-meta span {
    padding: 3px 8px;
    font-size: 0.78rem;
}

.tag-line {
    color: var(--chalk-blue);
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.category-tile {
    display: grid;
    grid-template-columns: 136px 1fr;
    gap: 18px;
    border-radius: 22px;
    border: 2px solid rgba(173, 216, 230, 0.26);
    background: linear-gradient(135deg, rgba(45, 74, 45, 0.92), rgba(15, 26, 15, 0.72));
    padding: 18px;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

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

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

.category-thumbs img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 10px;
}

.category-tile h3,
.chalk-note h2,
.content-panel h2,
.info-panel h2,
.category-overview-head h2 {
    margin: 0 0 8px;
    color: var(--chalk-yellow);
}

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

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

.split-section {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 28px;
}

.chalk-note {
    position: sticky;
    top: 100px;
    align-self: start;
    padding: 28px;
}

.chalk-note strong {
    display: block;
    margin-top: 18px;
    font-size: 2.3rem;
    color: var(--chalk-yellow);
}

.chalk-note span {
    display: block;
    color: rgba(245, 245, 220, 0.72);
}

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

.rank-row {
    border-radius: 18px;
    border: 1px solid rgba(255, 250, 205, 0.18);
    background: rgba(15, 26, 15, 0.42);
    overflow: hidden;
}

.rank-link {
    display: grid;
    grid-template-columns: 72px 92px 1fr;
    gap: 16px;
    align-items: center;
    padding: 12px;
}

.rank-number {
    color: var(--chalk-yellow);
    font-weight: 1000;
    font-size: 1.6rem;
    text-align: center;
}

.rank-row img {
    width: 92px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-content h3 {
    margin: 0 0 5px;
}

.rank-content p {
    margin: 0 0 8px;
    color: rgba(245, 245, 220, 0.74);
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

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

.page-hero,
.detail-hero {
    border-radius: 28px;
    border: 2px solid rgba(255, 250, 205, 0.24);
    background:
        linear-gradient(135deg, rgba(45, 74, 45, 0.92), rgba(15, 26, 15, 0.72)),
        radial-gradient(circle at top right, rgba(255, 215, 0, 0.12), transparent 30rem);
    padding: clamp(28px, 5vw, 54px);
    box-shadow: var(--shadow);
}

.small-hero {
    margin-bottom: 32px;
}

.page-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.8rem);
}

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

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

.category-overview-block {
    padding: 26px;
    margin-top: 28px;
}

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

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

.filter-panel {
    margin: 28px 0;
    padding: 22px;
}

.filter-search label,
.filter-row label {
    display: grid;
    gap: 8px;
    color: var(--chalk-yellow);
    font-weight: 900;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 14px;
    align-items: end;
    margin-top: 16px;
}

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

.movie-detail-page {
    padding-top: 30px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 34px;
    align-items: center;
}

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

.detail-info h1 {
    font-size: clamp(2.3rem, 5vw, 4.7rem);
}

.detail-info p {
    color: rgba(245, 245, 220, 0.84);
    font-size: 1.1rem;
}

.detail-meta,
.tag-cloud {
    margin: 18px 0;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.player-panel {
    margin: 34px 0;
    padding: 16px;
}

.video-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
}

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

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.12));
    color: var(--chalk-white);
    cursor: pointer;
}

.player-start.hidden {
    display: none;
}

.player-start span {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--chalk-yellow);
    color: var(--blackboard-dark);
    font-size: 2rem;
    box-shadow: 0 0 42px rgba(255, 250, 205, 0.36);
}

.player-start strong {
    font-size: 1.25rem;
}

.player-status {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 10px;
    margin: 0;
    color: rgba(245, 245, 220, 0.76);
    text-align: center;
    font-size: 0.92rem;
    pointer-events: none;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
}

.content-panel,
.info-panel {
    padding: 28px;
}

.content-panel p {
    color: rgba(245, 245, 220, 0.84);
    font-size: 1.04rem;
}

.info-panel dl {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px 16px;
    margin: 0;
}

.info-panel dt {
    color: var(--chalk-yellow);
    font-weight: 900;
}

.info-panel dd {
    margin: 0;
    color: rgba(245, 245, 220, 0.82);
}

.site-footer {
    margin-top: 60px;
    padding: 42px 0;
    border-top: 2px solid rgba(255, 250, 205, 0.2);
    background: rgba(15, 26, 15, 0.78);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr;
    gap: 28px;
}

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

.site-footer a:not(.footer-logo) {
    display: block;
    margin: 6px 0;
    color: rgba(245, 245, 220, 0.78);
}

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

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

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

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

    .chalk-note {
        position: static;
    }
}

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

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

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

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

    .movie-grid,
    .featured-grid,
    .small-grid,
    .category-grid,
    .filter-row,
    .footer-grid,
    .detail-hero {
        grid-template-columns: 1fr 1fr;
    }

    .category-tile,
    .rank-link {
        grid-template-columns: 1fr;
    }

    .rank-number {
        text-align: left;
    }
}

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

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

    .logo-text {
        font-size: 1.15rem;
    }

    .hero {
        min-height: 580px;
    }

    .hero h1 {
        font-size: 2.6rem;
    }

    .hero-actions,
    .section-heading,
    .category-overview-head {
        align-items: stretch;
        flex-direction: column;
    }

    .movie-grid,
    .featured-grid,
    .small-grid,
    .category-grid,
    .filter-row,
    .footer-grid,
    .detail-hero,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .highlight-panel,
    .category-overview-block,
    .filter-panel,
    .content-panel,
    .info-panel {
        padding: 18px;
    }

    .rank-row img {
        width: 100%;
        height: 160px;
    }
}
