:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --text: #e5e7eb;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #f59e0b;
    --accent-strong: #fb923c;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 8%, rgba(245, 158, 11, 0.2), transparent 30%),
        radial-gradient(circle at 78% 4%, rgba(249, 115, 22, 0.16), transparent 32%),
        linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #111827;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 12px 36px rgba(245, 158, 11, 0.28);
}

.logo-text {
    font-size: 1.12rem;
    background: linear-gradient(90deg, #fbbf24, #fb923c, #fef3c7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 15px;
    border-radius: 999px;
    color: var(--muted-strong);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

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

.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 76vh;
    display: grid;
    align-items: center;
    padding: 62px 0 42px;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(110deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.76) 46%, rgba(120, 53, 15, 0.24) 100%),
        radial-gradient(circle at 82% 22%, rgba(245, 158, 11, 0.26), transparent 30%);
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-slider {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 36px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.84), rgba(30, 41, 59, 0.56));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-slide {
    display: none;
    min-height: 560px;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.78fr);
    gap: 32px;
    align-items: center;
    padding: 56px;
}

.hero-slide.active {
    display: grid;
    animation: fadeIn 0.55s ease both;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 14px 0 18px;
    font-size: clamp(2.35rem, 6vw, 5.4rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
    margin: 0;
    max-width: 720px;
    color: var(--muted-strong);
    font-size: 1.08rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 13px;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.12);
    font-size: 0.88rem;
    font-weight: 700;
}

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

.hero-tags span,
.card-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #fef3c7;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.18);
    font-size: 0.82rem;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    box-shadow: 0 18px 45px rgba(245, 158, 11, 0.28);
}

.btn.secondary {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.14);
}

.btn.ghost {
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.32);
    background: rgba(245, 158, 11, 0.08);
}

.hero-media {
    position: relative;
    align-self: stretch;
    min-height: 440px;
    border-radius: 30px;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.42);
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 0.6s ease;
}

.hero-media:hover img {
    transform: scale(1.1);
}

.hero-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.78));
}

.hero-glow {
    position: absolute;
    inset: auto 18px 18px;
    height: 90px;
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.hero-controls {
    position: absolute;
    left: 56px;
    bottom: 38px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 28px;
    height: 8px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.22);
    cursor: pointer;
}

.hero-dot.active {
    width: 52px;
    background: linear-gradient(90deg, #fbbf24, #fb923c);
}

.search-panel {
    margin-top: -26px;
    position: relative;
    z-index: 4;
    padding: 18px;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: var(--shadow);
}

.quick-search,
.filter-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.filter-panel {
    grid-template-columns: 1fr minmax(150px, 190px);
    margin-bottom: 24px;
}

.wide-filter {
    grid-template-columns: 1fr minmax(150px, 190px) minmax(150px, 190px);
}

input,
select {
    min-height: 46px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: #fff;
    background: rgba(2, 6, 23, 0.55);
    padding: 0 14px;
    outline: none;
}

input:focus,
select:focus {
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.quick-links a,
.text-link {
    color: #fbbf24;
    font-weight: 800;
}

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

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

.section-heading h2,
.ranking-panel h2,
.content-card h2 {
    margin: 0;
    font-size: clamp(1.55rem, 4vw, 2.25rem);
    line-height: 1.1;
}

.section-heading p,
.ranking-panel p,
.content-card p {
    color: var(--muted);
    margin: 9px 0 0;
}

.section-more {
    color: #fbbf24;
    font-weight: 900;
}

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

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

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.44;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.category-tile:hover img {
    opacity: 0.6;
    transform: scale(1.08);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.9));
}

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

.category-tile span {
    font-size: 1.15rem;
    font-weight: 900;
}

.category-tile p {
    margin: 8px 0 0;
    color: var(--muted-strong);
    font-size: 0.9rem;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 26px;
    align-items: start;
}

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

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

.movie-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.66));
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
    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.45);
    box-shadow: 0 24px 70px rgba(245, 158, 11, 0.14);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #1e293b);
}

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

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

.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 900;
    backdrop-filter: blur(12px);
}

.year-badge {
    left: 12px;
    color: #111827;
    background: rgba(251, 191, 36, 0.94);
}

.rank-badge {
    right: 12px;
    color: #fff;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 0.82rem;
}

.meta-row a {
    color: #fbbf24;
    font-weight: 800;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 1.08rem;
    line-height: 1.32;
}

.movie-card p {
    min-height: 4.8em;
    margin: 0;
    color: var(--muted-strong);
    font-size: 0.92rem;
}

.ranking-panel,
.content-card,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.ranking-panel {
    padding: 22px;
}

.sticky-panel {
    position: sticky;
    top: 92px;
}

.rank-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.rank-item {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.rank-item:hover {
    background: rgba(245, 158, 11, 0.1);
}

.rank-number {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    font-weight: 900;
}

.rank-name {
    font-weight: 800;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-score {
    color: #fde68a;
    font-weight: 900;
}

.page-hero {
    padding: 86px 0 68px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(120, 53, 15, 0.28)),
        radial-gradient(circle at 78% 22%, rgba(245, 158, 11, 0.24), transparent 32%);
    border-bottom: 1px solid var(--line);
}

.compact-page-hero h1,
.category-hero h1 {
    max-width: 900px;
}

.category-overview-grid {
    display: grid;
    gap: 18px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 22px;
    padding: 18px;
    align-items: center;
}

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

.category-cover-stack img {
    aspect-ratio: 2 / 3;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.category-overview-card h2 {
    margin: 0 0 10px;
    font-size: 1.5rem;
}

.category-overview-card p {
    margin: 0 0 16px;
    color: var(--muted-strong);
}

.empty-state {
    display: none;
    margin: 24px 0 0;
    padding: 18px;
    border-radius: 18px;
    color: var(--muted-strong);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
}

.filter-grid.has-empty + .empty-state {
    display: block;
}

.movie-card.is-hidden {
    display: none;
}

.detail-hero {
    padding: 60px 0 36px;
    background:
        linear-gradient(135deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.82)),
        radial-gradient(circle at 78% 18%, rgba(245, 158, 11, 0.22), transparent 34%);
}

.detail-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 28px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.92rem;
}

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

.detail-meta {
    display: grid;
    gap: 8px;
    margin-top: 24px;
    color: var(--muted-strong);
}

.detail-meta a {
    color: #fbbf24;
    font-weight: 800;
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 30px;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.video-frame video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    cursor: pointer;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    color: #fff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.62));
    border: 0;
    cursor: pointer;
    z-index: 3;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-icon {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #fb923c);
    font-size: 2rem;
    box-shadow: 0 22px 62px rgba(245, 158, 11, 0.36);
}

.play-text {
    font-size: 1.1rem;
    font-weight: 900;
}

.content-card {
    padding: 28px;
}

.content-card h2 + p {
    margin-bottom: 24px;
}

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

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 28px;
    padding: 38px 0;
}

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

.footer-grid h3 {
    margin: 0 0 12px;
}

.footer-grid a:not(.logo) {
    display: block;
    color: var(--muted-strong);
    margin: 8px 0;
}

.footer-bottom {
    padding: 18px;
    text-align: center;
    border-top: 1px solid var(--line);
    color: var(--muted);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1080px) {
    .hero-slide,
    .split-layout,
    .detail-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-media {
        min-height: 360px;
    }

    .ranking-panel.sticky-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .menu-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(2, 6, 23, 0.96);
        box-shadow: var(--shadow);
    }

    .site-nav.open {
        display: grid;
    }

    .nav-link {
        border-radius: 14px;
    }

    .hero-section {
        min-height: auto;
        padding-top: 28px;
    }

    .hero-slide {
        padding: 28px;
        min-height: auto;
    }

    .hero-media {
        min-height: 320px;
    }

    .hero-controls {
        left: 28px;
        bottom: 22px;
    }

    .quick-search,
    .filter-panel,
    .wide-filter {
        grid-template-columns: 1fr;
    }

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

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

    .category-overview-card {
        grid-template-columns: 1fr;
    }

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

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

    .hero-slide {
        padding: 22px;
        border-radius: 24px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        letter-spacing: -0.04em;
    }

    .hero-media {
        min-height: 260px;
        border-radius: 22px;
    }

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

    .detail-grid {
        gap: 22px;
    }

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

    .video-frame {
        border-radius: 20px;
    }
}
