:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: #1e293b;
    --bg-card-deep: #111827;
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-deep: #0891b2;
    --gold: #facc15;
    --green: #4ade80;
    --pink: #f472b6;
    --radius: 18px;
    --shadow: 0 24px 70px rgba(8, 145, 178, 0.18);
    --header-height: 64px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
}

.nav-shell {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #001018;
    background: linear-gradient(135deg, #22d3ee, #67e8f9);
    box-shadow: 0 0 24px rgba(34, 211, 238, 0.45);
    font-size: 14px;
}

.brand-text {
    color: var(--text);
    font-size: 20px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    white-space: nowrap;
}

.nav-link,
.mobile-nav-link {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-nav-link:hover,
.nav-link.is-active,
.mobile-nav-link.is-active {
    color: var(--cyan);
}

.nav-link:hover {
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.92);
    color: var(--text);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--muted-strong);
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.98);
}

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

.mobile-nav-panel {
    padding: 16px 0;
    display: grid;
    gap: 12px;
}

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
    margin-top: var(--header-height);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 25%, rgba(34, 211, 238, 0.28), transparent 26%),
        linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.82) 28%, rgba(2, 6, 23, 0.34) 62%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1180px) / 2));
    bottom: 82px;
    width: min(780px, calc(100% - 64px));
    z-index: 2;
}

.hero-kicker,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cyan);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
    margin-bottom: 12px;
}

.section-eyebrow.gold {
    color: var(--gold);
}

.section-eyebrow.green {
    color: var(--green);
}

.section-eyebrow.pink {
    color: var(--pink);
}

.hero-content h1,
.page-hero h1,
.detail-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-hero p {
    margin: 0;
    color: var(--muted-strong);
    font-size: clamp(16px, 2vw, 20px);
    max-width: 760px;
}

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

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.72);
    color: #dbeafe;
    font-size: 12px;
    padding: 5px 10px;
}

.hero-actions,
.inline-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.primary-button,
.ghost-button,
.section-more,
.inline-link-row a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.primary-button {
    color: #001018;
    background: linear-gradient(135deg, #22d3ee, #67e8f9);
    box-shadow: 0 16px 35px rgba(34, 211, 238, 0.28);
}

.ghost-button,
.inline-link-row a {
    color: #e2e8f0;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.62);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.inline-link-row a:hover {
    transform: translateY(-2px);
}

.ghost-button:hover,
.inline-link-row a:hover {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.55);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(2, 6, 23, 0.56);
    color: #fff;
    font-size: 34px;
    line-height: 1;
    z-index: 4;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(8, 145, 178, 0.72);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
    padding: 72px 0;
}

.dark-section {
    background: var(--bg-soft);
}

.gradient-section {
    background: linear-gradient(180deg, #020617, #0f172a);
}

.rail-section {
    background: #020617;
    overflow: hidden;
}

.category-entry-section {
    background: linear-gradient(180deg, #020617, #0f172a 54%, #0f172a);
}

.section-heading {
    margin-bottom: 30px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.with-actions {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.section-more {
    min-height: 40px;
    color: var(--cyan);
    border: 1px solid rgba(34, 211, 238, 0.35);
    background: rgba(8, 145, 178, 0.08);
}

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

.category-tile,
.category-overview-card,
.filter-panel,
.movie-card,
.list-card,
.detail-content-card,
.side-info-card,
.player-card,
.masonry-card,
.category-neighbor-links {
    border: 1px solid var(--border);
    background: rgba(30, 41, 59, 0.72);
    box-shadow: 0 20px 45px rgba(2, 6, 23, 0.18);
}

.category-tile {
    min-height: 142px;
    border-radius: var(--radius);
    padding: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.category-tile span {
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
}

.category-tile p,
.category-overview-card p {
    color: var(--muted);
    font-size: 14px;
    margin: 10px 0 0;
}

.category-tile:hover,
.movie-card:hover,
.masonry-card:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow: var(--shadow);
}

.filter-panel {
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.search-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
}

.search-box span {
    color: var(--muted-strong);
    font-weight: 800;
}

.search-box input {
    width: 100%;
    border: 1px solid var(--border);
    outline: none;
    color: var(--text);
    background: rgba(15, 23, 42, 0.9);
    border-radius: 999px;
    padding: 13px 18px;
}

.search-box input:focus {
    border-color: rgba(34, 211, 238, 0.62);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.72);
    color: var(--muted-strong);
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 800;
}

.filter-chip.is-active,
.filter-chip:hover {
    color: #001018;
    border-color: transparent;
    background: var(--cyan);
}

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

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

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

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

.movie-card {
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-poster {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0f172a;
}

.compact-card .movie-poster {
    aspect-ratio: 3 / 4;
}

.movie-poster img,
.list-poster img,
.masonry-card img,
.detail-poster,
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-shade {
    position: absolute;
    inset: auto 0 0 0;
    height: 45%;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.85), transparent);
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
    color: #001018;
    background: rgba(103, 232, 249, 0.94);
}

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

.movie-title,
.list-title {
    display: inline-block;
    color: var(--text);
    font-weight: 800;
    font-size: 18px;
    line-height: 1.35;
    margin-bottom: 9px;
    transition: color 0.2s ease;
}

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

.movie-title:hover,
.list-title:hover {
    color: var(--cyan);
}

.movie-card-body p,
.list-content p,
.detail-content-card p {
    color: var(--muted);
    margin: 0 0 14px;
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    color: var(--muted-strong);
    font-size: 13px;
    margin-bottom: 12px;
}

.meta-line span:not(:last-child)::after {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-left: 12px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.55);
    vertical-align: middle;
}

.movie-rail {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 18px;
    scroll-snap-type: x mandatory;
}

.movie-rail::-webkit-scrollbar {
    height: 8px;
}

.movie-rail::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 999px;
}

.rail-item {
    flex: 0 0 340px;
    scroll-snap-align: start;
}

.list-stack {
    display: grid;
    gap: 16px;
}

.list-card {
    display: grid;
    grid-template-columns: 240px 70px 1fr;
    gap: 20px;
    align-items: stretch;
    border-radius: var(--radius);
    overflow: hidden;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.list-card:hover {
    background: rgba(30, 41, 59, 0.92);
    border-color: rgba(34, 211, 238, 0.38);
}

.list-poster {
    min-height: 180px;
    overflow: hidden;
    background: #0f172a;
}

.list-rank {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: #001018;
    background: linear-gradient(135deg, var(--gold), #fef08a);
    font-weight: 900;
}

.list-content {
    padding: 22px 22px 22px 0;
}

.masonry-grid {
    columns: 3 280px;
    column-gap: 18px;
}

.masonry-card {
    border-radius: var(--radius);
    margin: 0 0 18px;
    display: inline-block;
    width: 100%;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.masonry-card a {
    display: block;
}

.masonry-card img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.masonry-card strong,
.masonry-card span {
    display: block;
    padding: 0 18px;
}

.masonry-card strong {
    padding-top: 16px;
    font-size: 18px;
}

.masonry-card span {
    padding-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.page-main {
    padding-top: var(--header-height);
}

.page-hero {
    position: relative;
    padding: 96px 0 70px;
    background:
        radial-gradient(circle at 76% 20%, rgba(34, 211, 238, 0.16), transparent 30%),
        linear-gradient(180deg, #020617, #0f172a);
    overflow: hidden;
}

.compact-hero {
    padding-bottom: 54px;
}

.split-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
    align-items: center;
}

.category-neighbor-links {
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-neighbor-links a {
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--border);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 800;
}

.category-neighbor-links a:hover {
    color: var(--cyan);
    border-color: rgba(34, 211, 238, 0.5);
}

.category-overview-card {
    border-radius: var(--radius);
    overflow: hidden;
    padding: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-overview-main {
    display: block;
}

.category-label {
    color: var(--cyan);
    font-size: 13px;
    font-weight: 900;
}

.category-overview-card h2 {
    margin: 8px 0 0;
}

.category-preview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.category-preview-links a {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.7);
    font-size: 12px;
}

.detail-hero {
    position: relative;
    min-height: 470px;
    padding: 104px 0 56px;
    background-image: var(--detail-poster);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.detail-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.25), transparent 30%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.42)),
        linear-gradient(to top, #0f172a, rgba(15, 23, 42, 0.12));
    backdrop-filter: blur(2px);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted-strong);
    margin-bottom: 38px;
    font-size: 14px;
}

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

.detail-title-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.detail-title-row p {
    max-width: 780px;
}

.detail-section {
    padding-top: 42px;
}

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

.player-card {
    border-radius: 22px;
    padding: 12px;
    margin-bottom: 26px;
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
}

.player-video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-video {
    z-index: 1;
    background: #000;
}

.player-cover {
    z-index: 2;
    border: 0;
    padding: 0;
    background: #000;
    color: var(--text);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.player-cover.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.player-cover-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle, rgba(34, 211, 238, 0.25), transparent 36%),
        rgba(2, 6, 23, 0.46);
}

.play-overlay-button {
    position: relative;
    z-index: 3;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    color: #001018;
    background: linear-gradient(135deg, #22d3ee, #67e8f9);
    font-size: 28px;
    box-shadow: 0 0 40px rgba(34, 211, 238, 0.45);
}

.detail-content-card,
.side-info-card {
    border-radius: var(--radius);
    padding: 26px;
    margin-bottom: 26px;
}

.detail-content-card h2,
.side-info-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-content-card p {
    font-size: 16px;
    color: #d1d5db;
}

.detail-sidebar {
    position: sticky;
    top: 84px;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: #0f172a;
    margin-bottom: 18px;
}

.side-info-card dl {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px 14px;
    margin: 0 0 20px;
}

.side-info-card dt {
    color: var(--muted);
}

.side-info-card dd {
    margin: 0;
    color: var(--text);
}

.side-info-card a {
    color: var(--cyan);
}

.related-block {
    margin-top: 34px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
    padding: 48px 0;
}

.footer-brand {
    margin-bottom: 16px;
}

.footer-brand-block p,
.site-footer li,
.site-footer a {
    color: var(--muted);
}

.site-footer h3 {
    margin: 0 0 16px;
    font-size: 16px;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 9px;
}

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

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 18px 0;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 1120px) {
    .desktop-nav {
        gap: 12px;
    }

    .nav-link {
        font-size: 13px;
    }

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

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

@media (max-width: 920px) {
    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

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

    .hero-arrow {
        display: none;
    }

    .hero-content {
        left: 24px;
        bottom: 92px;
        width: calc(100% - 48px);
    }

    .with-actions,
    .detail-title-row,
    .filter-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .split-hero,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        position: static;
    }

    .list-card {
        grid-template-columns: 170px 58px 1fr;
    }
}

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

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

    .hero-slider {
        height: auto;
        min-height: 610px;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-hero h1 {
        font-size: 40px;
    }

    .section {
        padding: 52px 0;
    }

    .category-tile-grid,
    .category-overview-grid,
    .movie-grid,
    .compact-grid,
    .four-grid,
    .three-grid {
        grid-template-columns: 1fr;
    }

    .category-tile {
        min-height: auto;
    }

    .search-box {
        min-width: 0;
        flex-direction: column;
        align-items: stretch;
    }

    .list-card {
        display: block;
    }

    .list-poster {
        aspect-ratio: 16 / 10;
    }

    .list-rank {
        justify-content: flex-start;
        padding: 16px 18px 0;
    }

    .list-content {
        padding: 16px 18px 20px;
    }

    .rail-item {
        flex-basis: 280px;
    }

    .detail-hero {
        min-height: 520px;
    }

    .detail-title-row .primary-button {
        width: 100%;
    }

    .play-overlay-button {
        width: 68px;
        height: 68px;
        font-size: 24px;
    }
}
