:root {
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-800: #166534;
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --white: #ffffff;
    --black: #000000;
    --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.08);
    --shadow-md: 0 8px 18px rgba(28, 25, 23, 0.10);
    --shadow-xl: 0 22px 45px rgba(28, 25, 23, 0.18);
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: var(--stone-800);
    background: linear-gradient(135deg, var(--amber-50), var(--stone-50) 48%, var(--green-50));
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--stone-200);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    width: min(100% - 32px, 1280px);
    height: 64px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-600), var(--green-700));
    box-shadow: var(--shadow-md);
    transform: translateZ(0);
    transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.06);
}

.brand-text {
    font-size: 1.25rem;
    background: linear-gradient(90deg, var(--amber-700), var(--green-700));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.mobile-link {
    color: var(--stone-700);
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 9px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover {
    color: var(--green-700);
    background: var(--green-50);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    border-radius: 12px;
    padding: 10px;
}

.menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--stone-800);
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-link {
    display: block;
    padding: 12px 14px;
}

.hero {
    position: relative;
    min-height: 68vh;
    overflow: hidden;
    background: var(--stone-900);
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 24%, rgba(251, 191, 36, 0.22), transparent 28%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.58) 48%, rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    inset: 0;
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 100%);
    color: var(--white);
    padding: 72px 0;
}

.hero-pills,
.hero-tags,
.hero-actions,
.detail-meta,
.tag-row,
.detail-tags,
.quick-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-pills {
    margin-bottom: 18px;
}

.hero-pills span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 14px;
    background: var(--green-600);
    font-weight: 700;
}

.hero-pills strong {
    color: var(--amber-400);
}

.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(2.4rem, 6vw, 5.8rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
    font-weight: 900;
}

.hero p {
    margin: 0 0 22px;
    max-width: 680px;
    color: #e5e7eb;
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-tags {
    margin-bottom: 30px;
}

.hero-tags span,
.tag-row span,
.detail-tags a {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.20);
    color: var(--white);
    padding: 6px 12px;
    font-size: 0.88rem;
    backdrop-filter: blur(10px);
}

.primary-button,
.ghost-button,
.section-more,
.full-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    min-height: 48px;
    padding: 0 26px;
    color: var(--white);
    background: linear-gradient(90deg, var(--green-600), var(--green-700));
    box-shadow: 0 14px 28px rgba(22, 163, 74, 0.30);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.ghost-button {
    min-height: 48px;
    padding: 0 22px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

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

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

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

.page-top {
    padding-top: 36px;
    padding-bottom: 64px;
}

.search-panel {
    width: min(100% - 32px, 1280px);
    margin: -44px auto 56px;
    position: relative;
    z-index: 4;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(231, 229, 228, 0.92);
}

.search-inner {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px);
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
}

.search-inner h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1,
.category-overview h2 {
    margin: 0;
    color: var(--stone-900);
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.search-inner h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.search-inner p,
.section-kicker,
.page-hero p,
.category-overview p,
.movie-line,
.detail-copy p,
.side-card p {
    color: var(--stone-600);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 18px;
    border: 1px solid var(--stone-200);
    border-radius: 999px;
    background: var(--stone-50);
}

.search-box span {
    color: var(--green-700);
    font-weight: 800;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--stone-800);
}

.inline-search {
    width: min(100%, 460px);
}

.content-section {
    margin: 0 0 72px;
}

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

.compact-heading {
    align-items: flex-start;
}

.section-heading h2 {
    font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.section-kicker {
    margin: 8px 0 0;
}

.section-more {
    min-height: 40px;
    padding: 0 18px;
    color: var(--green-700);
    background: var(--green-50);
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--stone-200);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.14), transparent);
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.play-chip {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--green-700);
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.region-chip,
.rank-badge {
    position: absolute;
    top: 10px;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 10px;
    padding: 0 10px;
    color: var(--white);
    font-size: 0.82rem;
    font-weight: 800;
}

.region-chip {
    right: 10px;
    background: var(--amber-500);
}

.rank-badge {
    left: 10px;
    background: var(--green-600);
}

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    margin: 0 0 8px;
    min-height: 2.7em;
    color: var(--stone-900);
    font-size: 1.05rem;
    line-height: 1.35;
    font-weight: 800;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-info h3 a:hover {
    color: var(--green-700);
}

.movie-meta {
    margin: 0 0 10px;
    color: var(--stone-500);
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-line {
    margin: 0 0 12px;
    font-size: 0.92rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row span {
    background: var(--green-50);
    color: var(--green-700);
    font-size: 0.78rem;
    padding: 4px 8px;
}

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

.category-tile,
.category-overview,
.rank-panel,
.side-card,
.detail-main,
.page-hero,
.filter-toolbar {
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--stone-200);
    box-shadow: var(--shadow-md);
}

.category-tile {
    padding: 22px;
}

.tile-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.tile-main span {
    color: var(--stone-900);
    font-size: 1.2rem;
    font-weight: 900;
}

.tile-main strong {
    color: var(--green-700);
    font-size: 0.9rem;
}

.category-tile p {
    min-height: 3.2em;
    margin: 0 0 16px;
    color: var(--stone-600);
}

.tile-links {
    display: grid;
    gap: 7px;
}

.tile-links a {
    color: var(--stone-700);
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tile-links a:hover {
    color: var(--green-700);
}

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

.rank-panel {
    position: sticky;
    top: 88px;
    padding: 22px;
}

.rank-list,
.side-card.slim {
    display: grid;
    gap: 10px;
}

.rank-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: var(--stone-50);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: var(--green-50);
    transform: translateX(3px);
}

.rank-num {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-600), var(--green-700));
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    color: var(--stone-900);
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-year {
    color: var(--stone-500);
    font-size: 0.86rem;
}

.page-hero {
    margin-bottom: 28px;
    padding: clamp(28px, 5vw, 56px);
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(22, 163, 74, 0.18), transparent 35%),
        linear-gradient(135deg, var(--white), var(--amber-50));
}

.page-hero span {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--green-700);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.page-hero h1 {
    font-size: clamp(2rem, 5vw, 4.5rem);
}

.page-hero p {
    max-width: 760px;
    margin: 14px 0 0;
    font-size: 1.08rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--stone-500);
    font-size: 0.95rem;
}

.breadcrumb a:hover {
    color: var(--green-700);
}

.filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px;
}

.quick-links a {
    border-radius: 999px;
    padding: 9px 14px;
    color: var(--green-700);
    background: var(--green-50);
    font-weight: 800;
}

.category-overview {
    margin-bottom: 28px;
    padding: 24px;
}

.category-overview h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
}

.category-overview p {
    margin: 8px 0 0;
}

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

.detail-main {
    overflow: hidden;
}

.player-card {
    padding: 0;
    background: var(--black);
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: var(--black);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--black);
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--white);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.18));
    cursor: pointer;
}

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

.big-play {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--green-700);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-xl);
}

.detail-copy {
    padding: 30px;
}

.detail-copy h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

.detail-copy h2 {
    margin: 30px 0 10px;
    color: var(--stone-900);
    font-size: 1.35rem;
}

.detail-meta {
    margin: 16px 0 20px;
}

.detail-meta span {
    border-radius: 12px;
    padding: 8px 12px;
    color: var(--stone-800);
    background: var(--amber-100);
    font-weight: 800;
}

.lead-text {
    padding-left: 16px;
    border-left: 4px solid var(--green-600);
    font-size: 1.08rem;
}

.detail-tags {
    margin-top: 28px;
}

.detail-tags a {
    color: var(--green-700);
    background: var(--green-50);
}

.detail-side {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 22px;
}

.side-card {
    overflow: hidden;
    padding: 18px;
}

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

.side-card h2 {
    margin: 0 0 10px;
    color: var(--stone-900);
    font-size: 1.25rem;
}

.full-button {
    width: 100%;
    margin-top: 14px;
}

.hidden-card {
    display: none !important;
}

.no-results {
    grid-column: 1 / -1;
    padding: 28px;
    border-radius: 18px;
    color: var(--stone-600);
    background: var(--white);
    border: 1px solid var(--stone-200);
    text-align: center;
}

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

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

    .rank-panel,
    .detail-side {
        position: static;
    }
}

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

    .menu-button {
        display: block;
    }

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

    .hero {
        min-height: 72vh;
    }

    .hero-copy {
        padding: 56px 0 80px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }

    .search-inner,
    .filter-toolbar,
    .section-heading,
    .category-overview-head {
        grid-template-columns: 1fr;
        align-items: stretch;
        flex-direction: column;
    }

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

    .detail-copy {
        padding: 22px;
    }
}

@media (max-width: 520px) {
    .header-inner,
    .page-container,
    .search-panel,
    .hero-content,
    .mobile-nav {
        width: min(100% - 22px, 1280px);
    }

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

    .search-panel {
        margin-top: -28px;
        padding: 16px;
        border-radius: 18px;
    }

    .movie-info {
        padding: 12px;
    }

    .movie-info h3 {
        font-size: 0.98rem;
    }

    .movie-line {
        display: none;
    }

    .category-tile,
    .category-overview,
    .rank-panel,
    .side-card,
    .page-hero,
    .filter-toolbar {
        border-radius: 18px;
    }
}
