:root {
    --bg: #080b12;
    --bg-soft: #111827;
    --bg-card: rgba(17, 24, 39, 0.78);
    --text: #f8fafc;
    --muted: #a7b0c3;
    --line: rgba(255, 255, 255, 0.1);
    --brand: #f59e0b;
    --brand-2: #fb7185;
    --brand-3: #8b5cf6;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius: 24px;
    --max: 1220px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 10% -10%, rgba(245, 158, 11, 0.18), transparent 28rem),
        radial-gradient(circle at 92% 8%, rgba(251, 113, 133, 0.16), transparent 24rem),
        linear-gradient(180deg, #0a0f1f 0%, var(--bg) 48%, #070912 100%);
    font-family: 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;
}

.wrap {
    width: min(var(--max), calc(100% - 40px));
    margin: 0 auto;
}

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

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

.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: grid;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 14px 36px rgba(245, 158, 11, 0.28);
}

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

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

.main-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #dbe4f4;
    transition: 0.2s ease;
}

.main-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

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

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

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
}

.hero-track {
    position: relative;
    min-height: 680px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.75s ease, transform 0.75s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(8, 11, 18, 0.96), rgba(8, 11, 18, 0.72), rgba(8, 11, 18, 0.42)),
        linear-gradient(0deg, rgba(8, 11, 18, 1), rgba(8, 11, 18, 0.1) 48%, rgba(8, 11, 18, 1)),
        var(--hero-image) center / cover no-repeat;
    filter: saturate(1.15);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 22% 26%, rgba(245, 158, 11, 0.22), transparent 28rem),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.2), transparent 24rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(var(--max), calc(100% - 40px));
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 430px);
    align-items: center;
    gap: 52px;
    padding: 88px 0 70px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 14px 0 18px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-lead {
    max-width: 760px;
    color: #d6deed;
    font-size: 18px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin: 24px 0;
}

.hero-tags span,
.tag-row span {
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.2s ease;
}

.btn-primary {
    color: #111827;
    background: linear-gradient(135deg, var(--brand), #f97316);
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 54px rgba(245, 158, 11, 0.34);
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.14);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    min-height: 540px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow);
    transform: rotate(1.2deg);
}

.hero-poster img {
    width: 100%;
    height: 540px;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    left: 24px;
    bottom: 24px;
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    font-size: 26px;
    background: linear-gradient(135deg, #fff, #fbbf24);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.38);
}

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

.hero-dot {
    width: 38px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
    cursor: pointer;
}

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.quick-search {
    margin-top: -58px;
    position: relative;
    z-index: 8;
}

.filter-panel {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(17, 24, 39, 0.78);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.filter-title {
    margin-bottom: 12px;
    color: #fbbf24;
    font-weight: 800;
}

.filter-controls {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 12px;
}

.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    color: #fff;
    background: rgba(8, 11, 18, 0.72);
    padding: 0 14px;
    outline: none;
}

.filter-controls select option {
    color: #111827;
}

.section {
    padding: 76px 0 0;
}

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

.section-heading h2 {
    margin: 5px 0 0;
    font-size: clamp(28px, 3vw, 42px);
    letter-spacing: -0.03em;
}

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

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

.category-card,
.category-large {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(139, 92, 246, 0.12)), rgba(255, 255, 255, 0.06);
    transition: 0.2s ease;
}

.category-card {
    min-height: 145px;
    padding: 22px;
}

.category-card strong,
.category-large strong {
    display: block;
    font-size: 22px;
    margin-bottom: 10px;
}

.category-card span,
.category-large p {
    color: var(--muted);
}

.category-card:hover,
.category-large:hover,
.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.4);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(17, 24, 39, 0.72);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.18);
    transition: 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

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

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

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, #fff, #fbbf24);
    opacity: 0;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translateY(0);
}

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

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #fbbf24;
    font-size: 13px;
    font-weight: 700;
}

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

.movie-card p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.movie-card.compact h3 {
    font-size: 16px;
}

.movie-card.compact p {
    display: none;
}

.section-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
}

.rank-panel {
    position: sticky;
    top: 92px;
    align-self: start;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(17, 24, 39, 0.72);
}

.compact-heading {
    align-items: center;
    margin-bottom: 18px;
}

.compact-heading h2 {
    font-size: 28px;
}

.rank-list {
    display: grid;
    gap: 12px;
}

.rank-item {
    display: grid;
    grid-template-columns: 36px 54px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    transition: 0.2s ease;
}

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

.rank-item img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-num,
.rank-badge {
    font-weight: 900;
    color: #fbbf24;
}

.rank-info strong,
.rank-info em {
    display: block;
}

.rank-info em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.rank-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #111827;
    background: #fbbf24;
}

.page-main {
    padding-top: 48px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 330px;
    padding: 54px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(139, 92, 246, 0.16)),
        rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow);
}

.category-hero {
    background:
        linear-gradient(90deg, rgba(8, 11, 18, 0.94), rgba(8, 11, 18, 0.68)),
        var(--category-image) center / cover no-repeat;
}

.ranking-hero {
    background:
        radial-gradient(circle at 18% 20%, rgba(251, 191, 36, 0.24), transparent 24rem),
        radial-gradient(circle at 80% 10%, rgba(251, 113, 133, 0.18), transparent 22rem),
        rgba(255, 255, 255, 0.06);
}

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

.category-large {
    min-height: 260px;
    display: flex;
    align-items: end;
    padding: 28px;
    background:
        linear-gradient(180deg, rgba(8, 11, 18, 0.14), rgba(8, 11, 18, 0.88)),
        var(--category-image) center / cover no-repeat;
}

.category-large span {
    color: #fbbf24;
    font-weight: 800;
}

.detail-main {
    padding-top: 28px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    padding: 18px 0;
}

.breadcrumb a {
    color: #fbbf24;
}

.detail-hero {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 10% 10%, rgba(245, 158, 11, 0.16), transparent 22rem),
        rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

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

.detail-meta {
    margin: 20px 0;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.detail-tags {
    margin-bottom: 24px;
}

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

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    align-content: center;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.82));
    z-index: 4;
}

.player-overlay.is-hidden {
    display: none;
}

.play-circle {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    font-size: 34px;
    background: linear-gradient(135deg, #fff, #fbbf24);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
}

.player-overlay strong {
    font-size: 22px;
}

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding-top: 30px;
}

.story-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(17, 24, 39, 0.72);
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.story-card p {
    margin: 0;
    color: #d6deed;
}

.site-footer {
    margin-top: 86px;
    border-top: 1px solid var(--line);
    background: rgba(8, 11, 18, 0.84);
}

.footer-inner {
    width: min(var(--max), calc(100% - 40px));
    margin: 0 auto;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
}

.footer-inner strong {
    color: #fff;
    font-size: 20px;
}

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

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

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

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

    .section-split,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

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

    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 20px;
        right: 20px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(8, 11, 18, 0.95);
        box-shadow: var(--shadow);
    }

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

    .hero-carousel,
    .hero-track {
        min-height: 760px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 58px;
    }

    .hero-poster {
        min-height: auto;
        transform: none;
    }

    .hero-poster img {
        height: 430px;
    }

    .filter-controls,
    .detail-hero,
    .category-large-grid {
        grid-template-columns: 1fr;
    }

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

    .page-hero {
        padding: 34px;
    }

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

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 32px 0;
    }
}

@media (max-width: 520px) {
    .wrap,
    .header-inner,
    .footer-inner,
    .hero-content {
        width: min(100% - 28px, var(--max));
    }

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

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

    .movie-grid,
    .ranking-grid,
    .compact-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .movie-card {
        display: grid;
        grid-template-columns: 118px 1fr;
    }

    .poster-link {
        aspect-ratio: 2 / 3;
    }

    .hero-poster img {
        height: 360px;
    }

    .player-overlay strong {
        padding: 0 20px;
        text-align: center;
    }
}
