:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-soft: rgba(30, 41, 59, 0.64);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --brand: #fbbf24;
    --brand-strong: #f59e0b;
    --cyan: #22d3ee;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 12% 5%, rgba(251, 191, 36, 0.16), transparent 30rem),
        radial-gradient(circle at 90% 10%, rgba(34, 211, 238, 0.13), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
    color: var(--text);
}

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

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;
    backdrop-filter: blur(18px);
    background: rgba(2, 6, 23, 0.9);
    border-bottom: 1px solid rgba(30, 41, 59, 0.82);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: var(--brand);
    white-space: nowrap;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    color: #0f172a;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 12px 30px rgba(251, 191, 36, 0.24);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    color: #cbd5e1;
    font-weight: 650;
}

.nav-links a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    color: var(--brand);
    transform: translateY(-1px);
}

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

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-slider {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.015);
    transition: opacity 0.75s ease, transform 1.1s ease;
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.74) 42%, rgba(2, 6, 23, 0.38)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 44%);
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 48px;
    align-items: center;
    padding: 72px 0 56px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 13px;
    border: 1px solid rgba(251, 191, 36, 0.34);
    border-radius: 999px;
    color: var(--brand);
    background: rgba(251, 191, 36, 0.09);
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 18px;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: white;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.03;
    letter-spacing: -0.06em;
    font-weight: 950;
}

.hero-desc {
    max-width: 700px;
    margin: 22px 0 0;
    color: #dbeafe;
    line-height: 1.9;
    font-size: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    padding: 7px 12px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.66);
    font-size: 13px;
    font-weight: 750;
}

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

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

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

.btn-primary {
    background: linear-gradient(135deg, #fbbf24, #f97316);
    color: #0f172a;
    box-shadow: 0 18px 38px rgba(251, 191, 36, 0.24);
}

.btn-secondary {
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.76);
    color: #f8fafc;
}

.hero-side {
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 28px;
    padding: 18px;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.hero-poster {
    border-radius: 20px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.82);
}

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

.hero-dot {
    width: 38px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.34);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--brand);
}

.main-content {
    padding: 54px 0 76px;
}

.page-hero {
    padding: 74px 0 34px;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.16), transparent 28rem),
        rgba(2, 6, 23, 0.22);
}

.page-hero p {
    max-width: 780px;
    color: var(--soft);
    line-height: 1.9;
    font-size: 17px;
}

.section {
    margin-top: 54px;
}

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

.section-eyebrow {
    margin: 0 0 7px;
    color: var(--brand);
    font-weight: 850;
    letter-spacing: 0.08em;
    font-size: 13px;
    text-transform: uppercase;
}

.section h2,
.detail-section h2 {
    margin: 0;
    color: white;
    font-size: clamp(24px, 3.2vw, 38px);
    line-height: 1.15;
    font-weight: 920;
    letter-spacing: -0.03em;
}

.section-copy {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 14px;
    margin: 24px 0 28px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.64);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.2);
}

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

.search-panel input:focus,
.search-panel select:focus {
    border-color: rgba(251, 191, 36, 0.64);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.68);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.42);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transform: scale(1.001);
    transition: transform 0.28s ease, filter 0.28s ease;
}

.movie-card:hover img {
    transform: scale(1.06);
    filter: saturate(1.08) contrast(1.04);
}

.card-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #0f172a;
    background: var(--brand);
    font-size: 12px;
    font-weight: 900;
}

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

.movie-card h3 {
    margin: 0;
    color: white;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 860;
}

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

.movie-card p {
    margin: 8px 0 0;
    color: #94a3b8;
    line-height: 1.65;
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-line {
    margin-top: 10px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 720;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 11px;
}

.tag-list span {
    border-radius: 999px;
    padding: 4px 8px;
    color: #fde68a;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.18);
    font-size: 11px;
    font-weight: 760;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background:
        linear-gradient(135deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72)),
        var(--tile-image);
    background-size: cover;
    background-position: center;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.26);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: auto 18px 18px auto;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.16);
    filter: blur(4px);
}

.category-tile h2,
.category-tile h3 {
    position: relative;
    z-index: 2;
    margin: 0;
    color: white;
    font-size: 24px;
    font-weight: 900;
}

.category-tile p {
    position: relative;
    z-index: 2;
    margin: 9px 0 0;
    color: #cbd5e1;
    line-height: 1.65;
    font-size: 14px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 82px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.7);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    border-color: rgba(251, 191, 36, 0.42);
}

.rank-num {
    width: 44px;
    height: 44px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    color: #0f172a;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    font-weight: 950;
}

.rank-item img {
    width: 82px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
    background: #0f172a;
}

.rank-item h3 {
    margin: 0;
    color: white;
    font-size: 16px;
    font-weight: 850;
}

.rank-item p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.55;
    font-size: 13px;
}

.breadcrumb {
    margin: 30px 0 18px;
    color: #94a3b8;
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: start;
}

.player-card,
.detail-card,
.side-card,
.text-page-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: white;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #0f172a;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    font-size: 32px;
    box-shadow: 0 24px 52px rgba(251, 191, 36, 0.26);
}

.play-copy {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.detail-title {
    padding: 24px;
}

.detail-title h1 {
    font-size: clamp(30px, 4vw, 54px);
}

.detail-title p {
    color: #cbd5e1;
    line-height: 1.85;
    font-size: 17px;
}

.detail-section {
    padding: 24px;
    border-top: 1px solid var(--line);
}

.detail-section p {
    color: #cbd5e1;
    line-height: 1.95;
    font-size: 16px;
}

.side-card {
    padding: 18px;
}

.side-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 18px;
    background: #0f172a;
}

.side-meta {
    display: grid;
    gap: 11px;
    color: #cbd5e1;
    font-size: 14px;
}

.side-meta div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.side-meta span:first-child {
    color: #94a3b8;
}

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

.text-page-card {
    padding: 28px;
    color: #cbd5e1;
    line-height: 1.9;
}

.text-page-card h2,
.text-page-card h3 {
    color: white;
}

.empty-state {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    padding: 22px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    text-align: center;
}

.site-footer {
    border-top: 1px solid rgba(30, 41, 59, 0.82);
    background: rgba(2, 6, 23, 0.92);
    padding: 46px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 28px;
}

.footer-title {
    color: white;
    font-weight: 900;
    margin: 0 0 12px;
}

.site-footer p,
.site-footer a {
    color: #94a3b8;
    line-height: 1.75;
}

.site-footer a:hover {
    color: var(--brand);
}

.footer-links {
    display: grid;
    gap: 9px;
}

.copyright-line {
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: #64748b;
    font-size: 14px;
}

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

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

    .hero-content,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-side {
        display: none;
    }
}

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.96);
        box-shadow: var(--shadow);
    }

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

    .nav-links a {
        padding: 12px;
        border-radius: 12px;
    }

    .hero,
    .hero-slider,
    .hero-content {
        min-height: 560px;
    }

    .hero-content {
        padding-top: 48px;
    }

    .search-panel {
        grid-template-columns: 1fr;
    }

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

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

    .brand {
        font-size: 18px;
    }

    .hero-desc,
    .page-hero p,
    .detail-title p {
        font-size: 15px;
    }

    .movie-grid,
    .related-grid,
    .category-grid,
    .rank-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 48px 72px minmax(0, 1fr);
    }

    .rank-item img {
        width: 72px;
    }

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