:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: rgba(15, 23, 42, 0.74);
    --panel-strong: rgba(30, 41, 59, 0.9);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --green: #4ade80;
    --orange: #fb923c;
    --shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.14), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.14), transparent 32rem),
        linear-gradient(135deg, #0f172a 0%, #1e293b 54%, #0f172a 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-shell {
    min-height: 100vh;
    overflow: hidden;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled,
.site-header.is-open {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

.nav-container {
    width: min(1180px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 26px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    color: white;
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

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

.desktop-nav,
.desktop-cats,
.footer-links,
.mobile-cats {
    display: flex;
    align-items: center;
    gap: 18px;
}

.desktop-nav {
    margin-left: auto;
}

.nav-link,
.desktop-cats a,
.footer-links a,
.mobile-link,
.mobile-cats a {
    color: #cbd5e1;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.desktop-cats a:hover,
.footer-links a:hover,
.mobile-link:hover,
.mobile-cats a:hover,
.nav-link.active,
.mobile-link.active {
    color: var(--cyan);
}

.desktop-cats {
    padding-left: 18px;
    border-left: 1px solid var(--line);
    font-size: 14px;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.6);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    background: white;
    border-radius: 99px;
}

.mobile-panel {
    display: none;
    padding: 0 24px 22px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.96);
}

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

.mobile-link {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.mobile-cats {
    flex-wrap: wrap;
    padding-top: 14px;
}

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

.hero-slide,
.page-hero {
    background-size: cover;
    background-position: center;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 1s ease, transform 5s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

.hero-overlay,
.page-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.72) 44%, rgba(15, 23, 42, 0.2) 100%),
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.38) 50%, rgba(15, 23, 42, 0.2) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding-bottom: 118px;
    max-width: none;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
    max-width: 820px;
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.lead-text {
    max-width: 760px;
    margin: 0 0 24px;
    color: var(--muted-strong);
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.75;
}

.hero-kicker,
.page-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-tags,
.detail-tags,
.mini-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-pill,
.mini-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 999px;
    color: #dff9ff;
    background: rgba(14, 116, 144, 0.22);
    font-size: 13px;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.section-more,
.rank-entry,
.hero-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 850;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn,
.hero-search button {
    border: 0;
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    color: white;
    box-shadow: 0 18px 40px rgba(34, 211, 238, 0.22);
}

.ghost-btn,
.rank-entry,
.section-more {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.55);
    color: #e2e8f0;
    backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.rank-entry:hover,
.section-more:hover,
.hero-search button:hover {
    transform: translateY(-2px);
}

.hero-tools {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 32px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hero-search {
    flex: 1;
    max-width: 620px;
    display: flex;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: white;
    padding: 0 18px;
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 112px;
    z-index: 5;
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.62);
    transition: width 0.25s ease, background 0.25s ease;
}

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

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

.soft-band {
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.52), rgba(15, 23, 42, 0.35));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 32px;
}

.section-head h2 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
}

.section-head p {
    margin: 0;
    color: var(--muted);
    max-width: 720px;
    line-height: 1.7;
}

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

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

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

.movie-card,
.category-card-large,
.text-card,
.filter-panel,
.wide-card {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(14px);
}

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.015);
    border-color: rgba(34, 211, 238, 0.35);
    box-shadow: 0 24px 80px rgba(34, 211, 238, 0.12), 0 20px 60px rgba(0, 0, 0, 0.28);
}

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

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
}

.feature-grid .poster-wrap {
    aspect-ratio: 16 / 10;
}

.poster-wrap img,
.category-tile img,
.category-cover img,
.detail-poster img,
.wide-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .poster-wrap img,
.category-tile:hover img,
.category-card-large:hover .category-cover img {
    transform: scale(1.1);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.82), transparent 55%);
}

.year-badge,
.play-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.year-badge {
    top: 12px;
    right: 12px;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: white;
    font-size: 12px;
}

.play-badge {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.86);
    color: white;
    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

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

.card-body {
    padding: 18px;
}

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

.card-body h3,
.wide-card h3,
.category-copy h2 {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.card-body p,
.wide-card p,
.category-copy p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--muted-strong);
    font-size: 13px;
}

.card-meta span:not(:last-child)::after {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-left: 10px;
    border-radius: 50%;
    background: rgba(203, 213, 225, 0.45);
    vertical-align: middle;
}

.mini-tags {
    margin-top: 14px;
}

.mini-tags span {
    min-height: 24px;
    padding: 4px 9px;
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

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

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

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 2;
}

.category-tile span {
    font-size: 24px;
    font-weight: 900;
}

.category-tile p {
    margin: 8px 0 0;
    color: var(--muted-strong);
    line-height: 1.6;
}

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

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

.wide-card {
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.22s ease, background 0.22s ease;
}

.wide-card:hover {
    transform: translateY(-4px);
    background: var(--panel-strong);
}

.wide-card a {
    display: grid;
    grid-template-columns: auto 96px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
}

.wide-card img {
    width: 96px;
    height: 132px;
    border-radius: 14px;
}

.rank-num {
    color: var(--cyan);
    font-size: 28px;
    font-weight: 950;
    font-variant-numeric: tabular-nums;
}

.page-hero,
.detail-hero {
    position: relative;
    padding-top: 112px;
}

.slim-hero {
    min-height: 380px;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at 20% 35%, rgba(34, 211, 238, 0.18), transparent 28rem),
        linear-gradient(135deg, rgba(8, 47, 73, 0.42), rgba(15, 23, 42, 0.2));
}

.category-hero,
.rank-hero {
    min-height: 480px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 72px;
}

.hero-content.in-page {
    width: min(1180px, calc(100% - 32px));
    height: auto;
    padding: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--muted-strong);
    font-weight: 650;
}

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

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

.category-card-large {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 22px;
    border-radius: 24px;
    padding: 16px;
    overflow: hidden;
}

.category-cover {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border-radius: 20px;
}

.category-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.9), transparent 60%);
}

.category-cover span {
    position: absolute;
    left: 16px;
    bottom: 16px;
    z-index: 2;
    font-size: 22px;
    font-weight: 900;
}

.category-copy {
    padding: 12px 12px 12px 0;
}

.category-preview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-preview-links a {
    padding: 8px 10px;
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.55);
}

.category-preview-links a:hover {
    color: var(--cyan);
}

.filter-panel {
    margin-bottom: 30px;
    padding: 18px;
    border-radius: 24px;
}

.search-box {
    display: grid;
    gap: 8px;
    color: var(--muted-strong);
    font-weight: 800;
}

.search-box input {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 16px;
    outline: none;
    padding: 0 18px;
    color: white;
    background: rgba(2, 6, 23, 0.45);
}

.search-box input:focus {
    border-color: rgba(34, 211, 238, 0.65);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.filter-chip {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
    color: var(--muted-strong);
}

.filter-chip.active,
.filter-chip:hover {
    border-color: rgba(34, 211, 238, 0.62);
    background: rgba(8, 145, 178, 0.28);
    color: white;
}

.empty-state {
    display: none;
    margin-top: 24px;
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: 22px;
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.6);
}

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

.detail-hero {
    padding-bottom: 20px;
}

.detail-container {
    padding-top: 18px;
}

.player-panel {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(2, 6, 23, 0.68);
    box-shadow: var(--shadow);
}

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

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

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: white;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.22));
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    padding-left: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    box-shadow: 0 24px 70px rgba(34, 211, 238, 0.28);
    font-size: 32px;
}

.play-layer strong {
    font-size: 18px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 28px;
    margin-top: 34px;
    align-items: start;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
}

.detail-copy {
    min-width: 0;
}

.detail-copy h1 {
    font-size: clamp(32px, 4vw, 52px);
}

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

.detail-meta span {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.54);
}

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

.text-card {
    padding: 28px;
    border-radius: 24px;
}

.text-card h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.text-card p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.9;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.5);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: 1.2fr auto;
    gap: 22px;
    align-items: center;
}

.footer-brand {
    margin-bottom: 10px;
    color: var(--cyan);
    font-size: 22px;
}

.footer-inner p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.copyright {
    grid-column: 1 / -1;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 14px;
}

[hidden] {
    display: none !important;
}

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

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

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

    .menu-toggle {
        display: inline-flex;
    }

    .home-hero {
        height: 720px;
    }

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

    .hero-tools {
        flex-direction: column;
        align-items: stretch;
        bottom: 28px;
    }

    .hero-search {
        max-width: none;
    }

    .hero-dots {
        left: 24px;
        right: auto;
        bottom: 154px;
    }

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

    .poster-row,
    .category-grid,
    .ranking-grid,
    .ranking-list,
    .category-list-large,
    .detail-text-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .detail-poster {
        max-width: 260px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .nav-container {
        height: 64px;
    }

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

    .home-hero {
        height: 760px;
    }

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

    .hero-search {
        border-radius: 22px;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-search input {
        min-height: 42px;
    }

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

    .movie-grid,
    .catalog-grid,
    .poster-row,
    .category-grid,
    .ranking-grid,
    .ranking-list,
    .category-list-large,
    .detail-text-section {
        grid-template-columns: 1fr;
    }

    .feature-grid .poster-wrap {
        aspect-ratio: 3 / 4;
    }

    .category-card-large,
    .wide-card a {
        grid-template-columns: 1fr;
    }

    .wide-card img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
    }

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

    .play-icon {
        width: 68px;
        height: 68px;
    }
}
