:root {
    --primary-950: #082f49;
    --primary-900: #0c4a6e;
    --primary-800: #075985;
    --primary-700: #0369a1;
    --primary-600: #0284c7;
    --primary-500: #0ea5e9;
    --primary-100: #e0f2fe;
    --accent-600: #d97706;
    --accent-500: #f59e0b;
    --accent-400: #fbbf24;
    --neutral-950: #0c0a09;
    --neutral-900: #1c1917;
    --neutral-800: #292524;
    --neutral-700: #44403c;
    --neutral-600: #57534e;
    --neutral-500: #78716c;
    --neutral-200: #e7e5e4;
    --neutral-100: #f5f5f4;
    --neutral-50: #fafaf9;
    --white: #ffffff;
    --shadow-sm: 0 8px 24px rgba(12, 74, 110, 0.08);
    --shadow-md: 0 16px 40px rgba(12, 74, 110, 0.14);
    --shadow-xl: 0 26px 70px rgba(12, 74, 110, 0.22);
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

img,
video {
    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, var(--primary-900), var(--primary-800));
    box-shadow: 0 10px 28px rgba(8, 47, 73, 0.28);
}

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

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

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--primary-950);
    background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
    box-shadow: 0 8px 22px rgba(245, 158, 11, 0.38);
    font-size: 15px;
}

.brand-text {
    font-size: 20px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 650;
}

.nav-link {
    opacity: 0.92;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--accent-400);
    opacity: 1;
}

.menu-button {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.menu-button span {
    width: 20px;
    height: 2px;
    border-radius: 99px;
    background: var(--white);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    padding: 10px 16px 18px;
    background: var(--primary-900);
}

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

.mobile-nav a {
    padding: 12px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero {
    position: relative;
    height: 560px;
    overflow: hidden;
    color: var(--white);
    background: var(--neutral-950);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 22%, rgba(245, 158, 11, 0.36), transparent 28%),
        linear-gradient(90deg, rgba(8, 47, 73, 0.94) 0%, rgba(8, 47, 73, 0.74) 42%, rgba(0, 0, 0, 0.28) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-500);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 14px 0 18px;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    font-weight: 700;
}

.tag-row span {
    background: var(--primary-100);
    color: var(--primary-700);
}

.hero-actions,
.page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-accent {
    color: var(--white);
    background: var(--accent-500);
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.34);
}

.btn-accent:hover {
    background: var(--accent-600);
}

.btn-glass {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.hero-controls {
    position: absolute;
    right: 34px;
    bottom: 30px;
    display: flex;
    gap: 8px;
    z-index: 5;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.54);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-dot.is-active {
    background: var(--accent-500);
    transform: scale(1.15);
}

.home-search-section {
    margin-top: -46px;
    position: relative;
    z-index: 10;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1.6fr) repeat(3, minmax(140px, 0.7fr));
    gap: 14px;
    align-items: end;
    padding: 20px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(18px);
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--neutral-700);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--neutral-200);
    border-radius: 12px;
    padding: 0 13px;
    color: var(--neutral-900);
    background: var(--white);
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.quick-categories {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 2px;
}

.nav-category-link,
.related-category-links a {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--primary-700);
    background: var(--primary-100);
    font-weight: 800;
    font-size: 13px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-category-link:hover,
.related-category-links a:hover {
    color: var(--white);
    background: var(--primary-600);
}

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

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

.section-heading.compact {
    margin-bottom: 18px;
}

.section-heading h2,
.page-hero h1 {
    margin: 4px 0 0;
    color: var(--neutral-900);
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.14;
}

.section-more {
    color: var(--primary-600);
    font-weight: 800;
}

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

.category-card,
.category-overview-card,
.info-card,
.detail-card,
.side-card,
.rank-preview,
.latest-preview {
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 18px;
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: end;
    isolation: isolate;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    transition: transform 0.3s ease;
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(0deg, rgba(12, 74, 110, 0.92), rgba(12, 74, 110, 0.18));
}

.category-card span {
    font-size: 20px;
    font-weight: 900;
}

.category-card p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 13px;
}

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

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

.movie-card {
    min-width: 0;
}

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

.movie-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: var(--radius-md);
    background: var(--neutral-200);
    box-shadow: var(--shadow-sm);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

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

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

.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.54), transparent 46%);
    opacity: 0;
    transition: opacity 0.24s ease;
}

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

.movie-year {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 8px;
    color: var(--white);
    background: var(--accent-500);
    font-size: 12px;
    font-weight: 900;
}

.movie-card-body {
    padding: 10px 2px 0;
}

.movie-card h3,
.rank-row h3,
.detail-card h1,
.info-card h2,
.side-card h2,
.category-overview-card h2 {
    margin: 0;
    color: var(--neutral-900);
}

.movie-card h3 {
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.movie-card:hover h3,
.rank-row:hover h3 {
    color: var(--primary-600);
}

.movie-card p,
.rank-row p {
    margin: 6px 0 8px;
    color: var(--neutral-600);
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--neutral-500);
    font-size: 12px;
}

.movie-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
}

.movie-meta span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: var(--neutral-300);
}

.tag-row {
    margin-top: 8px;
}

.highlight-panel {
    padding: 34px;
    border-radius: 26px;
    background: linear-gradient(135deg, var(--primary-100), #fff7ed);
}

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 176px;
    gap: 18px;
    overflow-x: auto;
    padding: 2px 4px 16px;
    scrollbar-width: thin;
}

.two-column-section {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 22px;
}

.rank-preview,
.latest-preview {
    padding: 24px;
}

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

.rank-row-link {
    display: grid;
    grid-template-columns: 56px 72px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.small-rank .rank-row-link {
    grid-template-columns: 42px 54px minmax(0, 1fr);
}

.rank-row-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
    font-weight: 900;
}

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

.small-rank .rank-row img {
    width: 54px;
    height: 72px;
}

.rank-row-main {
    min-width: 0;
}

.heat-badge {
    white-space: nowrap;
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--accent-600);
    background: #fffbeb;
    font-size: 13px;
    font-weight: 900;
}

.small-rank .heat-badge {
    display: none;
}

.movie-list {
    display: grid;
    gap: 16px;
}

.movie-card-list .movie-card-link {
    display: grid;
    grid-template-columns: 178px minmax(0, 1fr);
    gap: 18px;
    padding: 12px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.movie-card-list .movie-poster {
    aspect-ratio: 16 / 9;
}

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

.gradient-page-hero {
    color: var(--white);
    background:
        radial-gradient(circle at 88% 18%, rgba(245, 158, 11, 0.28), transparent 26%),
        linear-gradient(135deg, var(--primary-900), var(--primary-700));
}

.gradient-page-hero h1 {
    color: var(--white);
}

.gradient-page-hero p {
    max-width: 760px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.breadcrumb a {
    color: inherit;
    font-weight: 800;
}

.breadcrumb a:hover {
    color: var(--accent-400);
}

.breadcrumb span:not(:first-child)::before,
.breadcrumb a + span::before,
.breadcrumb a + a::before {
    content: "/";
    margin-right: 8px;
    color: rgba(255, 255, 255, 0.48);
}

.detail-breadcrumb {
    color: var(--neutral-600);
    margin: 22px 0;
}

.detail-breadcrumb span:not(:first-child)::before,
.detail-breadcrumb a + span::before,
.detail-breadcrumb a + a::before {
    color: var(--neutral-300);
}

.detail-breadcrumb a:hover {
    color: var(--primary-600);
}

.related-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 24px;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    padding: 18px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-overview-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.category-poster-stack {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.category-poster-stack img {
    height: 124px;
    width: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.category-overview-card p,
.info-card p {
    color: var(--neutral-600);
}

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

.player-shell,
.detail-card,
.side-card {
    overflow: hidden;
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000000;
    box-shadow: var(--shadow-xl);
}

.movie-video,
.player-overlay,
.player-overlay img,
.player-shadow {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-video {
    z-index: 1;
    background: #000000;
}

.player-overlay {
    z-index: 2;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #000000;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay img {
    object-fit: cover;
}

.player-shadow {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.18));
}

.play-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    color: var(--white);
    background: var(--accent-500);
    box-shadow: 0 22px 48px rgba(245, 158, 11, 0.38);
    font-size: 30px;
    padding-left: 4px;
}

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

.detail-card h1 {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.16;
}

.detail-meta {
    margin-top: 12px;
    font-size: 14px;
}

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

.detail-tags span {
    color: var(--primary-700);
    background: var(--primary-100);
}

.detail-section {
    margin-top: 26px;
    padding-top: 24px;
    border-top: 1px solid var(--neutral-200);
}

.detail-section h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 21px;
}

.detail-section p {
    margin: 0;
    color: var(--neutral-700);
    font-size: 16px;
    line-height: 1.9;
}

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

.side-list .movie-card-list .movie-card-link {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    padding: 0;
    box-shadow: none;
}

.side-list .movie-card-list .movie-poster {
    aspect-ratio: 2 / 3;
    border-radius: 10px;
}

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

.info-page {
    display: grid;
    gap: 18px;
}

.info-card {
    padding: 24px;
}

.empty-state {
    display: none;
    margin-top: 28px;
    padding: 30px;
    border-radius: var(--radius-lg);
    color: var(--neutral-600);
    text-align: center;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.empty-state.is-visible {
    display: block;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
    padding: 50px 0 34px;
}

.footer-brand {
    color: var(--white);
    font-size: 18px;
}

.site-footer p {
    color: var(--neutral-300);
}

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

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

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

.footer-bottom {
    padding: 18px;
    border-top: 1px solid var(--neutral-800);
    text-align: center;
    color: var(--neutral-500);
    font-size: 14px;
}

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

@media (max-width: 1080px) {
    .desktop-nav {
        gap: 14px;
        font-size: 14px;
    }

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

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

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

    .sticky-card {
        position: static;
    }
}

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

    .menu-button {
        display: flex;
    }

    .hero {
        height: 620px;
    }

    .hero-content {
        align-items: end;
        padding-bottom: 90px;
    }

    .hero-copy p {
        font-size: 16px;
    }

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

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

    .category-overview-card,
    .movie-card-list .movie-card-link,
    .rank-row-link {
        grid-template-columns: 1fr;
    }

    .rank-row img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .heat-badge {
        justify-self: start;
    }
}

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

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

    .hero {
        height: 560px;
    }

    .hero-copy h1 {
        font-size: 34px;
    }

    .hero-actions,
    .page-hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .hero-controls {
        left: 16px;
        right: auto;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .category-grid,
    .category-overview-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }

    .highlight-panel {
        padding: 20px;
    }

    .movie-card-list .movie-card-link {
        grid-template-columns: 120px minmax(0, 1fr);
    }

    .side-list .movie-card-list .movie-card-link {
        grid-template-columns: 82px minmax(0, 1fr);
    }

    .category-poster-stack img {
        height: 96px;
    }
}
