:root {
    color-scheme: dark;
    --bg: #080d18;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --brand: #f59e0b;
    --brand-strong: #f97316;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.12), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #111827 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.page-shell,
.hero-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, #fbbf24, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    box-shadow: 0 12px 28px rgba(251, 146, 60, 0.32);
    font-size: 15px;
}

.site-nav {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 18px;
    color: #dbeafe;
    font-size: 15px;
    font-weight: 700;
}

.site-nav a {
    opacity: 0.88;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.site-nav a:hover {
    color: var(--brand);
    opacity: 1;
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
}

.top-search input,
.filter-bar input,
.filter-bar select {
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font: inherit;
}

.top-search input {
    width: 190px;
    padding: 8px 4px 8px 12px;
}

.top-search button,
.btn,
.filter-bar button,
.player-cover strong {
    border: 0;
    color: #111827;
    font-weight: 900;
    cursor: pointer;
    border-radius: 999px;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    box-shadow: 0 14px 32px rgba(251, 146, 60, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button {
    padding: 8px 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
}

.btn:hover,
.top-search button:hover,
.filter-bar button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 38px rgba(251, 146, 60, 0.32);
}

.btn-secondary {
    color: #f8fafc;
    border: 1px solid rgba(248, 250, 252, 0.24);
    background: rgba(15, 23, 42, 0.64);
    box-shadow: none;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 9px 12px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.8);
    font-size: 20px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.03);
    filter: brightness(0.42) saturate(1.05);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.64), rgba(15, 23, 42, 0.18)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 42%);
}

.hero-shell {
    position: relative;
    min-height: 72vh;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) 360px;
    align-items: center;
    gap: 46px;
    padding: 86px 0 92px;
}

.hero-content {
    max-width: 760px;
}

.eyebrow,
.meta-line,
.breadcrumb,
.card-kicker {
    color: var(--brand);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.hero h2 {
    margin: 16px 0;
    font-size: clamp(38px, 7vw, 82px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.07em;
}

.hero p {
    margin: 0;
    max-width: 680px;
    color: #e2e8f0;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.78;
}

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

.hero-tags,
.movie-meta,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.hero-tags span,
.movie-meta span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    padding: 6px 10px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.56);
    font-size: 12px;
    font-weight: 800;
}

.hero-card {
    position: relative;
    padding: 14px;
    border: 1px solid rgba(248, 250, 252, 0.16);
    border-radius: 32px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.12), rgba(15, 23, 42, 0.64));
    box-shadow: var(--shadow);
}

.hero-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.8);
}

.hero-card-caption {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 28px;
    padding: 16px;
    border: 1px solid rgba(248, 250, 252, 0.16);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(14px);
}

.hero-card-caption strong {
    display: block;
    font-size: 18px;
}

.hero-card-caption span {
    color: #cbd5e1;
    font-size: 13px;
}

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

.hero-dots button {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(248, 250, 252, 0.32);
}

.hero-dots button.is-active {
    background: linear-gradient(90deg, #fbbf24, #fb923c);
}

.page-shell {
    padding: 42px 0 70px;
}

.section-block {
    margin-top: 56px;
}

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

.section-head h1,
.section-head h2,
.page-title h1,
.detail-main h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.section-head p,
.page-title p,
.category-intro p,
.detail-main p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-link {
    color: var(--brand);
    font-weight: 900;
    white-space: nowrap;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(2, 6, 23, 0.8);
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.05);
    filter: saturate(1.08);
}

.score-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 950;
}

.score-pill {
    right: 10px;
    bottom: 10px;
    min-width: 44px;
    padding: 6px 10px;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #fb923c);
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 36px;
    height: 36px;
    color: #fff;
    background: rgba(2, 6, 23, 0.78);
    border: 1px solid rgba(248, 250, 252, 0.22);
    font-style: normal;
}

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

.movie-card h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 950;
}

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

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

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

.category-card {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background:
        radial-gradient(circle at 15% 8%, rgba(245, 158, 11, 0.18), transparent 12rem),
        rgba(15, 23, 42, 0.76);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.category-card h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 950;
}

.category-card p {
    color: var(--muted);
    line-height: 1.75;
}

.count-pill {
    width: max-content;
    border-radius: 999px;
    padding: 7px 12px;
    color: #111827;
    background: #fbbf24;
    font-size: 12px;
    font-weight: 950;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 180px 140px;
    gap: 12px;
    margin: 26px 0 30px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.74);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.64);
}

.filter-bar button {
    min-height: 46px;
}

.page-title {
    padding: 34px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 34px;
    background:
        radial-gradient(circle at 12% 10%, rgba(245, 158, 11, 0.18), transparent 16rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
    box-shadow: var(--shadow);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background: #020617;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.34) blur(2px);
    transform: scale(1.04);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), #020617 95%);
}

.detail-shell {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 38px;
    padding: 58px 0 48px;
}

.detail-poster {
    padding: 12px;
    border-radius: 30px;
    border: 1px solid rgba(248, 250, 252, 0.16);
    background: rgba(15, 23, 42, 0.7);
    box-shadow: var(--shadow);
}

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

.detail-main {
    align-self: center;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.breadcrumb a:hover {
    color: #fbbf24;
}

.detail-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 0;
    color: #e2e8f0;
    font-weight: 800;
}

.detail-meta-line span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.player-section,
.text-panel {
    margin-top: 42px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 32px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.player-section h2,
.text-panel h2 {
    margin: 0 0 18px;
    font-size: 28px;
    font-weight: 950;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.82));
}

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

.play-icon {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    font-size: 34px;
    box-shadow: 0 20px 54px rgba(251, 146, 60, 0.36);
}

.player-cover strong {
    display: inline-flex;
    padding: 10px 18px;
    font-size: 15px;
}

.text-panel p {
    color: var(--muted);
    line-height: 1.9;
}

.related-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.empty-state {
    display: none;
    padding: 28px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    border-radius: 24px;
}

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

@media (max-width: 1120px) {
    .top-search {
        display: none;
    }

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

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

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

@media (max-width: 820px) {
    .header-inner {
        min-height: 64px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

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

    .site-nav {
        order: 4;
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 14px;
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.94);
    }

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

    .hero,
    .hero-shell {
        min-height: auto;
    }

    .hero-shell {
        grid-template-columns: 1fr;
        padding: 54px 0 80px;
    }

    .hero-card {
        max-width: 330px;
    }

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

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

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

    .detail-shell {
        grid-template-columns: 1fr;
        padding-top: 36px;
    }

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

@media (max-width: 520px) {
    .header-inner,
    .footer-inner,
    .page-shell,
    .hero-shell,
    .detail-shell {
        width: min(100% - 22px, 1180px);
    }

    .movie-grid,
    .movie-grid-dense,
    .category-grid,
    .related-strip {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .hero h2 {
        font-size: 42px;
    }

    .page-title,
    .player-section,
    .text-panel {
        padding: 20px;
        border-radius: 24px;
    }
}
