:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --orange: #fb923c;
    --green: #34d399;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.15), transparent 32rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(30, 41, 59, 0.9);
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.32);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #04111d;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.3);
}

.logo-text {
    font-size: 22px;
    background: linear-gradient(90deg, #67e8f9, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: var(--soft);
    font-weight: 700;
}

.desktop-nav a,
.mobile-panel a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
    color: var(--cyan);
}

.header-search {
    display: flex;
    align-items: center;
    width: min(280px, 26vw);
    position: relative;
}

.header-search input,
.hero-search input,
.filter-input {
    width: 100%;
    border: 1px solid rgba(51, 65, 85, 0.9);
    border-radius: 14px;
    outline: none;
    color: var(--text);
    background: rgba(15, 23, 42, 0.82);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
    padding: 10px 14px 10px 40px;
}

.header-search span {
    position: absolute;
    left: 14px;
    color: #64748b;
}

.header-search input:focus,
.hero-search input:focus,
.filter-input:focus {
    border-color: rgba(34, 211, 238, 0.75);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
    background: rgba(15, 23, 42, 0.95);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(51, 65, 85, 0.9);
    border-radius: 12px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.92);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(51, 65, 85, 0.72);
    padding: 16px;
    background: rgba(15, 23, 42, 0.98);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel-inner {
    width: min(1180px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 14px;
}

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

.hero {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    border-bottom: 1px solid rgba(30, 41, 59, 0.7);
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.08);
    filter: saturate(1.12) brightness(0.52);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.82) 44%, rgba(2, 6, 23, 0.32) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.3) 0%, rgba(2, 6, 23, 0.92) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.62fr);
    align-items: center;
    gap: 46px;
    padding: 86px 0 76px;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 12px;
    border: 1px solid rgba(34, 211, 238, 0.35);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.14);
    font-size: 14px;
    font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-weight: 950;
    letter-spacing: -0.06em;
    line-height: 1.02;
}

.hero h1 {
    font-size: clamp(42px, 6vw, 82px);
}

.hero-lead {
    width: min(660px, 100%);
    margin: 22px 0 24px;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.85;
}

.meta-row,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.meta-pill,
.tag-pill,
.rank-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(125, 211, 252, 0.2);
}

.tag-pill {
    color: #c4b5fd;
    background: rgba(124, 58, 237, 0.12);
    border-color: rgba(167, 139, 250, 0.2);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 900;
    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 {
    color: #06101b;
    background: linear-gradient(135deg, #67e8f9, #60a5fa);
    box-shadow: 0 18px 38px rgba(34, 211, 238, 0.25);
}

.btn-ghost {
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.62);
}

.btn-ghost:hover {
    border-color: rgba(34, 211, 238, 0.5);
}

.hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.55);
    box-shadow: var(--shadow);
}

.hero-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: rgba(15, 23, 42, 0.6);
}

.hero-card-info {
    position: absolute;
    inset-inline: 18px;
    bottom: 18px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(16px);
}

.hero-card-info strong {
    display: block;
    font-size: 20px;
    margin-bottom: 6px;
}

.hero-card-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.4);
    cursor: pointer;
}

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

.hero-search-card {
    position: relative;
    z-index: 5;
    margin-top: -48px;
}

.hero-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 14px;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: var(--shadow);
}

.hero-search input {
    min-height: 52px;
    padding: 0 18px;
}

.section {
    padding: 70px 0 0;
}

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

.section-kicker {
    margin: 0 0 8px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-desc,
.page-hero p,
.category-intro,
.detail-summary {
    color: var(--muted);
    line-height: 1.8;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: 0 12px 42px rgba(2, 6, 23, 0.28);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 22px 64px rgba(34, 211, 238, 0.11);
}

.poster-link {
    display: block;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.8));
}

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

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 46%, rgba(2, 6, 23, 0.86) 100%);
}

.card-type {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ecfeff;
    background: rgba(8, 145, 178, 0.78);
    font-size: 12px;
    font-weight: 900;
}

.card-content {
    padding: 16px;
}

.card-title {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.3;
}

.card-title a:hover {
    color: var(--cyan);
}

.card-line {
    margin: 0;
    min-height: 48px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.card-meta {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #94a3b8;
    font-size: 13px;
}

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

.category-card {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 14rem),
        rgba(15, 23, 42, 0.68);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.42);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 92px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.62);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #06101b;
    font-weight: 950;
    background: linear-gradient(135deg, #67e8f9, #60a5fa);
}

.rank-poster img {
    width: 92px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
}

.rank-info h2,
.rank-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.page-hero {
    padding: 76px 0 26px;
}

.page-hero-card {
    padding: 32px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 24rem),
        rgba(15, 23, 42, 0.66);
    box-shadow: var(--shadow);
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin: 26px 0 30px;
}

.filter-input {
    min-height: 50px;
    padding: 0 16px;
}

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

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

.detail-hero {
    padding-top: 52px;
}

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

.player-shell {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

.stream-player video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
    object-fit: contain;
    cursor: pointer;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72)),
        var(--poster-bg);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    z-index: 4;
}

.play-button {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #04111d;
    background: linear-gradient(135deg, #67e8f9, #60a5fa);
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.32);
    font-size: 30px;
    transform: translateZ(0);
    transition: transform 0.2s ease;
}

.play-cover:hover .play-button {
    transform: scale(1.08);
}

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

.detail-panel {
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.66);
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    margin-bottom: 20px;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: rgba(15, 23, 42, 0.8);
}

.detail-title {
    margin: 28px 0 22px;
}

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

.detail-text-block {
    padding: 26px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.54);
    margin-top: 24px;
}

.detail-text-block h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-text-block p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.9;
}

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

.site-footer {
    margin-top: 80px;
    border-top: 1px solid rgba(30, 41, 59, 0.86);
    background: rgba(2, 6, 23, 0.76);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 34px;
    padding: 42px 0;
    color: var(--muted);
}

.footer-inner h2,
.footer-inner h3 {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 18px;
}

.footer-inner p,
.footer-inner a {
    color: var(--muted);
    line-height: 1.8;
}

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

.footer-links a:hover {
    color: var(--cyan);
}

.empty-state {
    display: none;
    padding: 42px;
    text-align: center;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: var(--muted);
    background: rgba(15, 23, 42, 0.58);
}

@media (max-width: 1080px) {
    .movie-grid,
    .movie-grid.compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .detail-panel {
        max-width: 420px;
    }
}

@media (max-width: 880px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        align-items: end;
        padding-top: 60px;
        gap: 28px;
    }

    .hero-card {
        display: none;
    }

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

    .section-head,
    .filter-bar {
        grid-template-columns: 1fr;
        display: grid;
        align-items: start;
    }

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

@media (max-width: 620px) {
    .nav-wrap,
    .container,
    .footer-inner {
        width: min(100% - 24px, 1180px);
    }

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

    .hero {
        min-height: 650px;
    }

    .hero-content {
        min-height: 650px;
        padding: 46px 0 82px;
    }

    .movie-grid,
    .movie-grid.compact,
    .category-grid,
    .related-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .card-content {
        padding: 13px;
    }

    .card-title {
        font-size: 16px;
    }

    .card-line {
        min-height: auto;
        font-size: 13px;
    }

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

    .rank-item .btn {
        grid-column: 2 / -1;
        width: 100%;
    }

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

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

    .detail-text-block,
    .page-hero-card {
        padding: 22px;
    }
}
