* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #1e293b;
    --text: #f8fafc;
    --muted: #9ca3af;
    --line: rgba(148, 163, 184, 0.18);
    --amber: #f59e0b;
    --amber-strong: #d97706;
    --green: #22c55e;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--amber), #facc15);
    color: white;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
}

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

.site-nav a,
.side-link {
    color: #cbd5e1;
    padding: 10px 14px;
    border-radius: 999px;
    transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active,
.side-link:hover,
.side-link.active {
    color: white;
    background: rgba(245, 158, 11, 0.18);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    color: white;
}

.hero {
    position: relative;
    overflow: hidden;
}

.hero-stage {
    position: relative;
    height: 600px;
    background: #0f172a;
}

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

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

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

.hero-kicker,
.card-category {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 7px 13px;
    border-radius: 999px;
    background: var(--amber);
    color: white;
    font-size: 13px;
    font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 18px 0;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.one-line {
    color: #e5e7eb;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.75;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.hero-tags span,
.tag-row span {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(15, 23, 42, 0.66);
    color: #e2e8f0;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 14px 26px;
    font-weight: 800;
    transition: 0.2s ease;
}

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

.btn.primary:hover {
    background: var(--amber-strong);
    transform: translateY(-2px) scale(1.02);
}

.btn.ghost {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.32);
    color: white;
}

.btn.ghost:hover {
    border-color: rgba(245, 158, 11, 0.7);
    color: #fcd34d;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    color: white;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-arrow:hover,
.scroll-controls button:hover {
    background: rgba(245, 158, 11, 0.88);
}

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

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

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

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

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

.hero-panel {
    position: relative;
    margin-top: -72px;
    z-index: 5;
    padding-bottom: 30px;
}

.hero-search,
.filter-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.hero-search input,
.filter-bar input,
.filter-bar select {
    min-height: 48px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.7);
    color: white;
    padding: 0 16px;
    outline: none;
}

.filter-bar select {
    min-width: 150px;
}

.hero-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: rgba(245, 158, 11, 0.65);
}

.hero-search button {
    min-height: 48px;
    border: 0;
    border-radius: 16px;
    background: var(--amber);
    color: white;
    padding: 0 24px;
    font-weight: 800;
    cursor: pointer;
}

.hero-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 18px;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.category-chips a {
    color: #cbd5e1;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
    border-radius: 999px;
    padding: 10px 14px;
}

.category-chips a:hover {
    color: white;
    border-color: rgba(245, 158, 11, 0.62);
}

.section {
    padding: 68px 0;
}

.section.muted,
.rank-preview {
    background: rgba(15, 23, 42, 0.42);
}

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

.section-head h2,
.side-panel h2,
.detail-section h2,
.detail-side h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.section-head a,
.text-link {
    color: #fcd34d;
    font-weight: 700;
}

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

.featured-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 22px;
}

.featured-side {
    display: grid;
    gap: 16px;
}

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #1e293b;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.movie-card.horizontal {
    display: grid;
    grid-template-columns: 148px 1fr;
    min-height: 150px;
}

.card-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #0f172a;
}

.movie-card.horizontal .card-cover {
    aspect-ratio: auto;
    height: 100%;
}

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

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.72));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after {
    opacity: 1;
}

.card-category {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 5px 9px;
    font-size: 12px;
    border-radius: 8px;
}

.rank-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.62);
    color: #fcd34d;
    font-weight: 900;
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    transform: translate(-50%, -50%) scale(0.78);
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--amber);
    color: white;
    opacity: 0;
    transition: 0.25s ease;
    box-shadow: 0 18px 38px rgba(245, 158, 11, 0.34);
}

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

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 10px;
    font-size: 17px;
    line-height: 1.35;
}

.card-body h3 a:hover,
.rank-info h3 a:hover {
    color: #fcd34d;
}

.card-body p,
.rank-info p,
.category-body p,
.detail-section p {
    color: var(--muted);
    line-height: 1.75;
    margin: 0 0 14px;
}

.card-meta,
.detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    color: #94a3b8;
    font-size: 13px;
}

.card-meta span,
.detail-meta span {
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
}

.scroll-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 4px 0 18px;
    scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
    display: none;
}

.scroll-cell {
    flex: 0 0 280px;
}

.scroll-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scroll-controls button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: #334155;
    color: white;
    font-size: 26px;
    cursor: pointer;
}

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

.rank-preview-grid {
    grid-template-columns: repeat(2, 1fr);
}

.rank-item {
    display: grid;
    grid-template-columns: 86px 56px 1fr;
    gap: 16px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.72);
    padding: 12px;
}

.rank-cover {
    height: 116px;
    border-radius: 14px;
    overflow: hidden;
}

.rank-number {
    color: #fcd34d;
    font-size: 28px;
    font-weight: 900;
    text-align: center;
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.page-hero.small {
    position: relative;
    overflow: hidden;
    padding: 86px 0 64px;
    background:
        radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.22), transparent 28%),
        radial-gradient(circle at 80% 8%, rgba(59, 130, 246, 0.18), transparent 28%),
        linear-gradient(135deg, #020617, #111827 52%, #0f172a);
}

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

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

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

.category-block {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.7);
    box-shadow: var(--shadow);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 180px;
    overflow: hidden;
}

.category-body {
    padding: 22px;
}

.category-body h2 {
    margin: 0 0 12px;
}

.layout-with-side {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 26px;
    align-items: start;
}

.side-panel,
.detail-side {
    position: sticky;
    top: 94px;
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.76);
    padding: 18px;
}

.filter-bar {
    grid-template-columns: 1fr 160px;
    margin-bottom: 24px;
    box-shadow: none;
}

.filter-bar.wide {
    max-width: 760px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    display: flex;
    align-items: end;
    padding: 80px 0 70px;
}

.detail-overlay {
    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.3));
    backdrop-filter: blur(4px);
}

.detail-head {
    position: relative;
    z-index: 2;
}

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

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-copy {
    max-width: 760px;
}

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

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

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: black;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 16px;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
    cursor: pointer;
}

.play-overlay span {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--amber);
    font-size: 38px;
    box-shadow: 0 20px 50px rgba(245, 158, 11, 0.42);
}

.play-overlay strong {
    font-size: 20px;
}

.play-overlay[hidden] {
    display: none;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
}

.detail-section,
.detail-side {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    padding: 24px;
}

.detail-section + .detail-section {
    margin-top: 18px;
}

.detail-section h2,
.detail-side h2 {
    margin-bottom: 16px;
}

.detail-side dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px 14px;
    margin: 0;
}

.detail-side dt {
    color: #94a3b8;
}

.detail-side dd {
    margin: 0;
    color: #e2e8f0;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: #020617;
    padding: 38px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a:hover {
    color: #fcd34d;
}

[data-filter-item].is-hidden {
    display: none;
}

@media (max-width: 980px) {
    .site-nav {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.96);
    }

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

    .nav-toggle {
        display: block;
    }

    .hero-stage {
        height: 620px;
    }

    .hero-mini-grid,
    .featured-layout,
    .category-list,
    .rank-preview-grid,
    .detail-grid,
    .detail-layout,
    .layout-with-side {
        grid-template-columns: 1fr;
    }

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

    .side-panel,
    .detail-side {
        position: static;
    }

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

@media (max-width: 640px) {
    .header-inner {
        height: 64px;
    }

    .hero-stage {
        height: 560px;
    }

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

    .hero-arrow {
        display: none;
    }

    .hero-panel {
        margin-top: -42px;
    }

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

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

    .movie-card.horizontal {
        grid-template-columns: 112px 1fr;
    }

    .rank-item {
        grid-template-columns: 72px 42px 1fr;
        gap: 10px;
    }

    .rank-cover {
        height: 96px;
    }

    .rank-number {
        font-size: 20px;
    }

    .category-covers {
        height: 132px;
    }

    .detail-hero {
        min-height: auto;
        padding: 58px 0 50px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}
