:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: #111827;
    --panel-strong: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.22);
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --amber: #facc15;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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, 23, 42, 0.94);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    backdrop-filter: blur(16px);
    box-shadow: 0 14px 40px rgba(2, 6, 23, 0.35);
}

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

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

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    font-size: 15px;
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.36);
}

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

.nav-link {
    color: #cbd5e1;
    font-size: 15px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: white;
}

.nav-dropdown {
    position: relative;
}

.dropdown-trigger {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 180px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.24s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    display: block;
    padding: 9px 12px;
    border-radius: 12px;
    color: #cbd5e1;
}

.dropdown-panel a:hover {
    background: rgba(51, 65, 85, 0.72);
    color: white;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.page-filter input {
    width: 190px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
    color: white;
    outline: none;
    padding: 10px 16px;
    transition: width 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.header-search input:focus {
    width: 250px;
}

.header-search input:focus,
.mobile-search input:focus,
.page-filter input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

.header-search button,
.mobile-search button,
.page-filter button {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    cursor: pointer;
    padding: 10px 16px;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.9);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: white;
    border-radius: 3px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

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

.mobile-nav-inner {
    display: grid;
    gap: 10px;
    padding: 14px 0 18px;
}

.mobile-link {
    padding: 10px 12px;
    border-radius: 12px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
}

.mobile-link.is-active {
    color: white;
    background: rgba(34, 211, 238, 0.12);
}

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

.mobile-search input {
    width: 100%;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.05) contrast(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 72% 28%, rgba(34, 211, 238, 0.22), transparent 28%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.76) 45%, rgba(15, 23, 42, 0.18) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, transparent 44%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    min-height: 620px;
}

.hero-copy {
    width: min(690px, 100%);
    padding-top: 36px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--amber);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero p {
    display: -webkit-box;
    max-width: 640px;
    margin: 22px 0 24px;
    overflow: hidden;
    color: #cbd5e1;
    font-size: 20px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.hero-meta,
.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    color: #cbd5e1;
}

.hero-meta span,
.movie-meta-line span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.52);
    padding: 5px 11px;
    font-size: 13px;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.34);
}

.btn-ghost,
.section-action {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.66);
    color: white;
}

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

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

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
    transition: background 0.2s ease, width 0.2s ease;
}

.hero-dot.is-active {
    width: 54px;
    background: var(--cyan);
}

.section {
    padding: 72px 0;
}

.dark-section {
    background: rgba(2, 6, 23, 0.54);
}

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

.section-heading span {
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.section-heading h2 {
    margin: 8px 0 8px;
    font-size: clamp(28px, 3.8vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.section-heading p {
    margin: 0;
    max-width: 680px;
    color: var(--muted);
}

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

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

.category-tile {
    min-height: 248px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.22), transparent 28%),
        linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.92));
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.38);
}

.category-tile > a {
    display: block;
    padding: 24px 24px 12px;
}

.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(59, 130, 246, 0.2));
    font-size: 26px;
}

.category-tile h3 {
    margin: 18px 0 10px;
    font-size: 24px;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
}

.category-samples {
    display: grid;
    gap: 8px;
    padding: 0 24px 24px;
}

.category-samples a {
    color: #cbd5e1;
    font-size: 14px;
}

.category-samples a:hover {
    color: white;
}

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

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

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

.movie-card {
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.78);
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.24);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.38);
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.38);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.74);
}

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

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

.rating-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.76);
    color: var(--amber);
    padding: 5px 10px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

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

.movie-card h3 {
    margin: 12px 0 9px;
    font-size: 19px;
    line-height: 1.25;
}

.movie-card h3 a:hover {
    color: var(--cyan);
}

.movie-card p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta-line {
    gap: 7px;
}

.movie-meta-line span {
    padding: 3px 8px;
    font-size: 12px;
}

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

.tag-row span {
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.1);
    color: #bae6fd;
    padding: 4px 9px;
    font-size: 12px;
}

.split-section {
    background: radial-gradient(circle at 50% 0%, rgba(34, 211, 238, 0.11), transparent 35%);
}

.split-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 36px;
}

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

.rank-item {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.76);
    padding: 10px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.34);
}

.rank-item img {
    width: 72px;
    height: 96px;
    border-radius: 14px;
    object-fit: cover;
    background: rgba(30, 41, 59, 0.74);
}

.rank-copy {
    display: grid;
    gap: 4px;
}

.rank-copy strong {
    color: white;
    font-size: 17px;
}

.rank-copy em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.movie-card-compact {
    display: grid;
    grid-template-columns: 116px 1fr;
}

.movie-card-compact .poster-link {
    aspect-ratio: auto;
    min-height: 162px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.22), transparent 34%),
        linear-gradient(135deg, #020617 0%, #0f172a 48%, #111827 100%);
}

.compact-hero {
    padding: 92px 0 58px;
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 18px;
}

.page-filter {
    display: flex;
    gap: 10px;
    max-width: 620px;
    margin-top: 28px;
}

.page-filter input {
    width: 100%;
    min-height: 50px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.filter-row button {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: #cbd5e1;
    cursor: pointer;
    padding: 9px 16px;
}

.filter-row button.is-active,
.filter-row button:hover {
    border-color: rgba(34, 211, 238, 0.46);
    color: white;
    background: rgba(34, 211, 238, 0.13);
}

.empty-state {
    display: none;
    margin: 36px 0 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    color: var(--muted);
    padding: 24px;
    text-align: center;
}

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

.ranking-grid {
    display: grid;
    gap: 16px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 116px 1fr;
    gap: 18px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.78);
    padding: 12px;
}

.ranking-poster {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.ranking-poster img {
    width: 116px;
    height: 156px;
    object-fit: cover;
    background: rgba(30, 41, 59, 0.74);
}

.ranking-poster span {
    position: absolute;
    top: 8px;
    left: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    padding: 4px 9px;
    font-weight: 900;
}

.ranking-copy h2 {
    margin: 4px 0 10px;
    font-size: 24px;
}

.ranking-copy p {
    margin: 0 0 16px;
    color: var(--muted);
}

.detail-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(18px) saturate(1.1);
    transform: scale(1.08);
    opacity: 0.52;
}

.detail-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.62)),
        linear-gradient(0deg, rgba(2, 6, 23, 1), transparent 42%);
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    padding: 42px 0 58px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: white;
}

.detail-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 34px;
    align-items: end;
}

.detail-poster img {
    width: 260px;
    height: 380px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 24px;
    object-fit: cover;
    background: rgba(30, 41, 59, 0.74);
    box-shadow: var(--shadow);
}

.detail-copy h1 {
    max-width: 860px;
    font-size: clamp(34px, 5vw, 58px);
}

.detail-one-line {
    max-width: 820px;
    color: #cbd5e1;
    font-size: 20px;
}

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

.player-section {
    padding-top: 32px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background:
        radial-gradient(circle, rgba(34, 211, 238, 0.2), transparent 34%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.18));
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-overlay span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: white;
    font-size: 36px;
    box-shadow: 0 18px 60px rgba(37, 99, 235, 0.45);
}

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

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

.content-card,
.side-card {
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.2);
    padding: 28px;
}

.content-card h2,
.side-card h2,
.site-footer h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.content-card p {
    margin: 0 0 24px;
    color: #cbd5e1;
    font-size: 17px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px 16px;
    margin: 0;
}

.side-card dt {
    color: var(--muted);
}

.side-card dd {
    margin: 0;
    color: white;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.86);
    padding: 48px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
}

.site-footer p {
    max-width: 460px;
    color: var(--muted);
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: white;
}

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

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

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

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

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

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

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

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

    .hero,
    .hero-content {
        min-height: 560px;
    }

    .hero p {
        font-size: 17px;
    }

    .section-heading,
    .split-grid,
    .detail-content-grid,
    .footer-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

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

    .detail-poster img {
        width: 190px;
        height: 278px;
    }

    .page-filter,
    .mobile-search {
        display: grid;
        grid-template-columns: 1fr auto;
    }
}

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

    .hero,
    .hero-content {
        min-height: 540px;
    }

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

    .hero-copy {
        padding-top: 74px;
    }

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

    .movie-card-compact,
    .ranking-card {
        grid-template-columns: 96px 1fr;
    }

    .ranking-poster img {
        width: 96px;
        height: 132px;
    }

    .section {
        padding: 52px 0;
    }

    .compact-hero {
        padding: 70px 0 44px;
    }

    .player-shell {
        border-radius: 18px;
    }

    .player-overlay span {
        width: 74px;
        height: 74px;
        font-size: 28px;
    }
}
