:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-solid: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.62);
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --accent: #f59e0b;
    --accent-strong: #d97706;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
    --radius: 18px;
    --max: 1280px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.10), transparent 34rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    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(var(--max), calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    background: rgba(15, 23, 42, 0.96);
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
    transition: background 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header.is-scrolled {
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

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

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

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 10px 26px rgba(245, 158, 11, 0.24);
    font-size: 15px;
}

.brand-text {
    font-size: 1.25rem;
    color: white;
}

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

.nav-link,
.header-search {
    padding: 10px 14px;
    color: #cbd5e1;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.header-search:hover {
    color: white;
    background: rgba(30, 41, 59, 0.86);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 210px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.98);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

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

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

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

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

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

.mobile-nav {
    display: none;
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    background: rgba(30, 41, 59, 0.98);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.mobile-nav a {
    display: block;
    padding: 10px 12px;
    color: #cbd5e1;
    border-radius: 10px;
}

.mobile-nav a:hover {
    color: white;
    background: rgba(51, 65, 85, 0.9);
}

.home-main {
    min-height: 100vh;
}

.page-main {
    padding-top: 88px;
    min-height: 100vh;
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 500px;
    max-height: 800px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.62) 45%, rgba(0, 0, 0, 0.15)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.05) 38%);
}

.hero-content {
    position: absolute;
    left: max(16px, calc((100vw - var(--max)) / 2));
    top: 50%;
    width: min(680px, calc(100% - 32px));
    transform: translateY(-42%);
}

.hero-kicker,
.page-kicker {
    margin: 0 0 12px;
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
    margin: 0 0 18px;
    color: white;
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-desc {
    max-width: 620px;
    margin: 0 0 24px;
    color: #d1d5db;
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-meta,
.detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    color: #cbd5e1;
}

.hero-meta strong {
    color: var(--accent);
    font-size: 1.5rem;
}

.hero-meta span,
.detail-meta span {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.48);
}

.hero-actions,
.section-heading,
.filter-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-button,
.ghost-button,
.reset-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.primary-button {
    background: var(--accent);
    color: white;
    box-shadow: 0 18px 34px rgba(245, 158, 11, 0.24);
}

.primary-button:hover {
    background: var(--accent-strong);
    transform: scale(1.04);
}

.ghost-button,
.reset-button {
    background: rgba(15, 23, 42, 0.62);
    border-color: rgba(203, 213, 225, 0.22);
    color: #e2e8f0;
}

.ghost-button:hover,
.reset-button:hover {
    background: rgba(30, 41, 59, 0.92);
    color: white;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.52);
    color: white;
    font-size: 36px;
    line-height: 1;
    backdrop-filter: blur(10px);
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-arrow--prev {
    left: 18px;
}

.hero-arrow--next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
    padding: 52px 0 0;
}

.section-gap-small {
    margin-top: 22px;
}

.section-heading {
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-heading h2,
.page-hero h1,
.copy-card h2 {
    margin: 0;
    color: white;
    font-weight: 900;
    letter-spacing: -0.03em;
}

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

.section-heading a {
    color: var(--accent);
    font-weight: 800;
}

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

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

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

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

.movie-grid--catalog {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

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

.movie-card a {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.66);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.movie-card a:hover {
    transform: translateY(-6px);
    background: rgba(30, 41, 59, 0.72);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.36);
}

.poster-frame {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

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

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 54%);
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.92);
    color: white;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.75);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.year-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.58);
    color: white;
    font-size: 0.78rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 12px;
}

.card-body h3 {
    margin: 0 0 6px;
    color: white;
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 800;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card a:hover h3 {
    color: #fbbf24;
}

.card-meta,
.card-desc {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.84rem;
}

.card-desc {
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.movie-card--large .card-body h3 {
    font-size: 1.25rem;
}

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

.movie-card--wide a {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 18px;
    padding: 14px;
    align-items: center;
}

.movie-card--wide .poster-frame {
    border-radius: 14px;
}

.movie-card--wide .card-body {
    padding: 0;
}

.movie-card--wide .card-body h3 {
    font-size: 1.28rem;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.card-tags span,
.detail-tags span {
    padding: 5px 9px;
    border-radius: 8px;
    background: rgba(51, 65, 85, 0.84);
    color: #cbd5e1;
    font-size: 0.78rem;
}

.ranking-panel {
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid var(--line);
}

.ranking-panel--page {
    gap: 12px;
}

.movie-card--ranking a {
    display: grid;
    grid-template-columns: 42px 78px 1fr;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
}

.movie-card--ranking .poster-frame {
    border-radius: 12px;
}

.movie-card--ranking .play-badge,
.movie-card--ranking .year-badge {
    display: none;
}

.movie-card--ranking .card-body {
    padding: 0;
}

.rank-number {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 900;
}

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

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

.category-card a {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 260px;
    border-radius: 22px;
    background: #111827;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card a:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 62px rgba(0, 0, 0, 0.42);
}

.category-card img {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.category-card__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.34), transparent);
}

.category-card__content {
    position: absolute;
    inset: auto 0 0;
    padding: 22px;
}

.category-card__content h3 {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 900;
}

.category-card__content p {
    margin: 0;
    color: #d1d5db;
    font-size: 0.9rem;
}

.page-hero {
    padding: 58px 0 24px;
}

.page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.08;
}

.page-hero p:last-child {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 1.08rem;
}

.filter-panel {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: #cbd5e1;
    font-weight: 700;
}

.filter-search {
    margin-bottom: 16px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.56);
    color: white;
    padding: 0 14px;
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(245, 158, 11, 0.62);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.10);
}

.filter-row label {
    min-width: 180px;
    flex: 1;
}

.reset-button {
    border-color: rgba(148, 163, 184, 0.22);
    margin-top: 30px;
}

.empty-state {
    margin-top: 28px;
    padding: 34px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.62);
}

.seo-section,
.copy-card {
    padding: 28px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid var(--line);
}

.seo-section h2,
.copy-card h2 {
    margin-bottom: 14px;
}

.seo-section p,
.copy-card p {
    color: #cbd5e1;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #94a3b8;
    padding-top: 20px;
    padding-bottom: 20px;
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 520px;
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(2px) saturate(0.92);
    transform: scale(1.03);
}

.detail-bg-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.35)),
        linear-gradient(0deg, #020617, transparent 38%);
}

.detail-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 36px;
    align-items: center;
    padding: 54px 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.detail-one-line {
    max-width: 820px;
    margin: 0 0 22px;
    color: #d1d5db;
    font-size: 1.15rem;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-start {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.24));
    color: white;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-start span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.94);
    font-size: 38px;
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.22);
    transform: translateX(3px);
}

.video-start.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.copy-card p {
    margin: 0 0 20px;
    font-size: 1.02rem;
}

.copy-card p:last-child {
    margin-bottom: 0;
}

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

.footer-inner {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0 34px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.3fr;
    gap: 28px;
}

.footer-brand p,
.footer-column p,
.footer-column a {
    color: #94a3b8;
    font-size: 0.94rem;
}

.footer-column {
    display: grid;
    align-content: start;
    gap: 8px;
}

.footer-column h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: white;
}

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

.footer-bottom {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: #64748b;
    font-size: 0.9rem;
    border-top: 1px solid rgba(148, 163, 184, 0.10);
}

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

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

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

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

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

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

    .hero-carousel {
        min-height: 560px;
        height: 78vh;
    }

    .hero-content {
        top: auto;
        bottom: 92px;
        transform: none;
    }

    .hero-arrow {
        width: 42px;
        height: 42px;
        font-size: 30px;
    }

    .movie-grid--six,
    .movie-grid--large,
    .movie-grid--four,
    .movie-grid--catalog,
    .category-grid,
    .category-grid--overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .movie-card--wide a,
    .movie-card--ranking a {
        grid-template-columns: 86px 1fr;
    }

    .movie-card--ranking .rank-number {
        grid-column: 1 / -1;
        justify-content: flex-start;
        width: auto;
        height: auto;
    }

    .detail-hero-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

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

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

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

    .reset-button {
        margin-top: 4px;
    }
}

@media (max-width: 480px) {
    .container,
    .header-inner,
    .mobile-nav,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 24px, var(--max));
    }

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

    .card-body {
        padding: 10px;
    }

    .card-body h3 {
        font-size: 0.94rem;
    }

    .movie-card--wide a {
        grid-template-columns: 76px 1fr;
        gap: 12px;
    }

    .category-card a,
    .category-card img {
        min-height: 210px;
    }
}
