:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --emerald-700: #047857;
    --emerald-600: #059669;
    --emerald-500: #10b981;
    --emerald-400: #34d399;
    --teal-500: #14b8a6;
    --sky-500: #0ea5e9;
    --white: #ffffff;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 18px 42px rgba(15, 23, 42, 0.14);
    --shadow-lg: 0 28px 80px rgba(2, 6, 23, 0.32);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--slate-800);
    background: var(--slate-50);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
    box-shadow: 0 14px 36px rgba(2, 6, 23, 0.24);
    backdrop-filter: blur(14px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--slate-900);
    background: linear-gradient(135deg, var(--emerald-400), var(--teal-500));
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(16, 185, 129, 0.38);
}

.brand-text strong,
.brand-text small {
    display: block;
}

.brand-text strong {
    font-size: 22px;
    letter-spacing: 0.02em;
}

.brand-text small {
    color: var(--slate-300);
    font-size: 12px;
}

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

.nav-link,
.mobile-nav-link {
    color: var(--slate-200);
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: var(--white);
    background: rgba(16, 185, 129, 0.18);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    background: rgba(255, 255, 255, 0.08);
    border: 0;
    border-radius: 12px;
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--white);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

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

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

.hero-section {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-900), var(--slate-700) 52%, var(--emerald-700));
}

.hero-background {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 16%, rgba(52, 211, 153, 0.28), transparent 34%),
        radial-gradient(circle at 84% 20%, rgba(14, 165, 233, 0.18), transparent 30%),
        linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.46));
}

.hero-container {
    position: relative;
    min-height: 560px;
    padding: 64px 0;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: center;
    gap: 52px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--emerald-300, #6ee7b7);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 16px 0 10px;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-copy h2 {
    margin: 0 0 16px;
    color: var(--emerald-300, #6ee7b7);
    font-size: clamp(24px, 3.2vw, 40px);
}

.hero-copy p {
    max-width: 740px;
    margin: 0 0 28px;
    color: var(--slate-200);
    font-size: 18px;
}

.hero-actions,
.quick-links,
.hero-tags,
.tag-list,
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.primary-button,
.ghost-button,
.text-button,
.search-row button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-row button {
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--emerald-400), var(--teal-500));
    box-shadow: 0 16px 34px rgba(16, 185, 129, 0.28);
}

.primary-button {
    padding: 12px 20px;
}

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

.ghost-button {
    padding: 11px 18px;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover,
.search-row button:hover {
    transform: translateY(-2px);
}

.hero-tags,
.tag-list {
    margin-top: 18px;
}

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    color: var(--emerald-700);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.14);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags span {
    color: var(--emerald-100, #d1fae5);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.14);
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(14, 165, 233, 0.18)), var(--slate-800);
    box-shadow: var(--shadow-lg);
}

.hero-poster::after,
.poster-frame::after,
.compact-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.46));
    pointer-events: none;
}

.hero-poster img,
.poster-frame img,
.compact-poster img,
.category-tile img,
.category-cover-wall img,
.side-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-controls {
    position: absolute;
    right: 0;
    bottom: 42px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    font-size: 24px;
}

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

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

.hero-dot.is-active {
    width: 28px;
    background: var(--emerald-400);
}

.quick-search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 26px;
    margin-top: -38px;
    padding: 26px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 2;
}

.search-panel label,
.toolbar-search span {
    display: block;
    margin-bottom: 10px;
    color: var(--slate-700);
    font-weight: 800;
}

.search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.search-row input,
.toolbar-search input,
.search-toolbox input,
.search-toolbox select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    color: var(--slate-800);
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-row input:focus,
.toolbar-search input:focus,
.search-toolbox input:focus,
.search-toolbox select:focus {
    border-color: var(--emerald-400);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

.search-row button {
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    cursor: pointer;
}

.quick-links a {
    padding: 10px 14px;
    color: var(--emerald-700);
    background: rgba(16, 185, 129, 0.1);
    border-radius: 999px;
    font-weight: 800;
}

.content-section {
    padding: 52px 0 0;
}

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

.section-heading h2 {
    margin: 0 0 6px;
    color: var(--slate-800);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.18;
}

.section-heading p {
    margin: 0;
    color: var(--slate-500);
}

.section-link,
.text-button {
    color: var(--emerald-700);
    font-weight: 800;
}

.movie-grid {
    display: grid;
    gap: 22px;
}

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

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

.movie-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(16, 185, 129, 0.34);
    box-shadow: var(--shadow-md);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5.2;
    overflow: hidden;
    background: linear-gradient(135deg, var(--slate-800), var(--emerald-700));
}

.movie-card.large .poster-frame {
    aspect-ratio: 16 / 10;
}

.poster-frame img {
    transition: transform 0.35s ease;
}

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

.poster-year {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    padding: 4px 9px;
    color: var(--white);
    background: rgba(15, 23, 42, 0.72);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

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

.movie-card-body h3 {
    margin: 5px 0 8px;
    color: var(--slate-900);
    font-size: 19px;
    line-height: 1.35;
}

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

.movie-card-body p {
    min-height: 48px;
    margin: 0;
    color: var(--slate-600);
    font-size: 14px;
}

.movie-meta {
    color: var(--emerald-700);
    font-size: 12px;
    font-weight: 800;
}

.emerald-panel {
    margin-top: 52px;
    padding: 34px;
    background: linear-gradient(135deg, rgba(236, 253, 245, 0.95), rgba(240, 253, 250, 0.95));
    border: 1px solid rgba(16, 185, 129, 0.14);
    border-radius: 28px;
}

.category-grid,
.category-overview-grid {
    display: grid;
    gap: 22px;
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    padding: 22px;
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-800), var(--emerald-700));
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
}

.category-tile img {
    position: absolute;
    inset: 0;
    opacity: 0.22;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.82));
}

.category-tile strong,
.category-tile small {
    position: relative;
    z-index: 1;
    display: block;
}

.category-tile strong {
    margin-top: 84px;
    font-size: 20px;
}

.category-tile small {
    margin-top: 8px;
    color: var(--slate-200);
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: 34px;
}

.rank-list,
.compact-list {
    display: grid;
    gap: 12px;
}

.rank-item,
.compact-card {
    display: grid;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover,
.compact-card:hover {
    transform: translateY(-2px);
    border-color: rgba(16, 185, 129, 0.35);
}

.rank-item {
    grid-template-columns: 52px minmax(0, 1fr) auto;
}

.rank-number {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--emerald-400), var(--teal-500));
    border-radius: 12px;
    font-weight: 900;
}

.rank-title {
    color: var(--slate-900);
    font-weight: 800;
}

.rank-meta {
    color: var(--slate-500);
    font-size: 13px;
}

.compact-card {
    grid-template-columns: 66px minmax(0, 1fr);
}

.compact-poster {
    position: relative;
    aspect-ratio: 1 / 1.25;
    overflow: hidden;
    background: linear-gradient(135deg, var(--slate-800), var(--emerald-700));
    border-radius: 12px;
}

.compact-info strong,
.compact-info small {
    display: block;
}

.compact-info strong {
    color: var(--slate-900);
    font-weight: 850;
}

.compact-info small {
    margin-top: 5px;
    color: var(--slate-500);
}

.page-hero {
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-900), var(--slate-700) 55%, var(--emerald-700));
    padding: 70px 0;
}

.page-hero h1 {
    max-width: 860px;
    margin: 12px 0 14px;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.12;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--slate-200);
    font-size: 18px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
}

.category-cover-wall {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    min-height: 220px;
    background: var(--slate-800);
}

.category-cover-wall img {
    min-height: 110px;
}

.category-overview-body {
    padding: 24px;
}

.category-overview-body h2 {
    margin: 0 0 10px;
    color: var(--slate-900);
}

.category-overview-body p {
    color: var(--slate-600);
}

.toolbar,
.search-toolbox {
    display: grid;
    gap: 18px;
    margin-bottom: 28px;
    padding: 22px;
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.filter-chip {
    min-height: 42px;
    padding: 0 16px;
    color: var(--slate-700);
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
}

.filter-chip.is-active {
    color: var(--white);
    background: var(--emerald-600);
    border-color: var(--emerald-600);
}

.search-toolbox {
    grid-template-columns: minmax(0, 1fr) 180px;
}

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

.movie-detail-shell {
    padding: 34px 0 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--slate-500);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--emerald-700);
    font-weight: 800;
}

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

.player-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--slate-950);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    color: var(--white);
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.35), rgba(2, 6, 23, 0.76));
    border: 0;
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
}

.play-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--emerald-400), var(--teal-500));
    border-radius: 50%;
    box-shadow: 0 18px 50px rgba(16, 185, 129, 0.42);
}

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 14px;
    margin: 0;
    color: var(--slate-100);
    text-align: center;
    pointer-events: none;
}

.card-panel,
.side-card,
.prose-card {
    background: var(--white);
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
}

.detail-content {
    margin-top: 24px;
    padding: 30px;
}

.detail-content h1 {
    margin: 12px 0 14px;
    color: var(--slate-900);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.16;
}

.detail-lead {
    color: var(--slate-600);
    font-size: 18px;
}

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

.detail-meta-grid span {
    padding: 14px;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 14px;
}

.detail-meta-grid strong {
    display: block;
    color: var(--slate-500);
    font-size: 12px;
}

.detail-content h2 {
    margin: 30px 0 10px;
    color: var(--slate-900);
}

.detail-content p {
    color: var(--slate-700);
}

.side-card {
    margin-bottom: 20px;
    padding: 20px;
}

.side-card h2 {
    margin: 16px 0 10px;
    color: var(--slate-900);
}

.side-card p {
    color: var(--slate-600);
}

.side-poster {
    aspect-ratio: 4 / 5.2;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--slate-800), var(--emerald-700));
}

.prose-card {
    padding: 30px;
}

.prose-card h2 {
    margin-top: 0;
}

.site-footer {
    margin-top: 72px;
    color: var(--slate-300);
    background: var(--slate-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.25fr repeat(3, 1fr);
    gap: 34px;
    padding: 46px 0;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: var(--white);
}

.site-footer p,
.site-footer ul {
    margin: 0;
}

.site-footer ul {
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 8px;
}

.site-footer a:hover {
    color: var(--emerald-400);
}

.footer-bottom {
    padding: 18px 16px;
    color: var(--slate-500);
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.footer-bottom p {
    margin: 0;
}

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

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

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

    .detail-layout {
        grid-template-columns: 1fr;
    }

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

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

    .mobile-menu-button {
        display: block;
    }

    .hero-container {
        min-height: auto;
        padding: 44px 0 72px;
    }

    .hero-track {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .hero-controls {
        right: auto;
        left: 0;
        bottom: 26px;
    }

    .quick-search-panel,
    .toolbar,
    .search-toolbox,
    .split-layout,
    .footer-grid,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .full-rank-list,
    .category-overview-grid,
    .detail-side {
        grid-template-columns: 1fr;
    }

    .quick-search-panel {
        align-items: stretch;
    }
}

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

    .brand-text strong {
        font-size: 18px;
    }

    .brand-text small {
        display: none;
    }

    .search-row,
    .rank-item {
        grid-template-columns: 1fr;
    }

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

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

    .movie-card-body p,
    .tag-list {
        display: none;
    }

    .hero-track {
        min-height: 690px;
    }

    .hero-poster {
        max-width: 280px;
    }

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

    .detail-content {
        padding: 22px;
    }

    .page-hero {
        padding: 48px 0;
    }
}
