:root {
    color-scheme: dark;
    --bg-0: #020617;
    --bg-1: #0f172a;
    --bg-2: #111827;
    --card: rgba(15, 23, 42, 0.88);
    --card-strong: #1e293b;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --yellow: #facc15;
    --red: #ef4444;
    --green: #22c55e;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 30rem),
        radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.14), transparent 28rem),
        linear-gradient(180deg, var(--bg-0), var(--bg-1) 44%, var(--bg-0));
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body::selection {
    background: rgba(34, 211, 238, 0.35);
}

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

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

button,
input,
select {
    font: inherit;
}

main {
    min-height: 70vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.28);
}

.header-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 26px rgba(34, 211, 238, 0.22);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

.desktop-nav > a,
.nav-menu > button {
    color: var(--soft);
    border: 0;
    background: transparent;
    padding: 10px 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.desktop-nav > a:hover,
.desktop-nav > a.is-active,
.nav-menu:hover > button {
    color: white;
}

.nav-menu {
    position: relative;
}

.nav-menu-panel {
    position: absolute;
    top: 100%;
    left: 0;
    width: 220px;
    display: grid;
    padding: 12px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-menu:hover .nav-menu-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-menu-panel a {
    padding: 9px 10px;
    border-radius: 10px;
    color: var(--soft);
}

.nav-menu-panel a:hover {
    color: white;
    background: rgba(30, 41, 59, 0.95);
}

.header-search {
    width: 260px;
    display: flex;
    align-items: center;
    background: rgba(30, 41, 59, 0.88);
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
}

.header-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    color: white;
    background: transparent;
    padding: 10px 14px;
}

.header-search button {
    border: 0;
    padding: 10px 16px;
    color: white;
    cursor: pointer;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.mobile-nav-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.86);
    cursor: pointer;
}

.mobile-nav-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: white;
}

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

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

.mobile-nav a {
    padding: 10px 12px;
    color: var(--soft);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.72);
}

.hero-carousel {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: #020617;
}

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
}

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

.hero-slide img,
.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.76) 46%, rgba(15, 23, 42, 0.12) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 34%);
}

.hero-content {
    position: relative;
    z-index: 5;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 640px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1240px;
}

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

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    max-width: 760px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero-content h2 {
    margin-top: 14px;
    font-size: clamp(28px, 4vw, 52px);
}

.hero-content p,
.page-hero p,
.detail-info p {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--soft);
    font-size: 18px;
}

.hero-facts,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0 0;
}

.hero-facts span,
.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    color: var(--soft);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 34px rgba(34, 211, 238, 0.22);
}

.ghost-button {
    color: white;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 20;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: white;
    background: rgba(15, 23, 42, 0.54);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
    backdrop-filter: blur(8px);
}

.hero-prev {
    left: 28px;
}

.hero-next {
    right: 28px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

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

.section-block,
.category-band,
.filter-panel,
.page-hero,
.detail-content {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.top-offset {
    margin-top: -30px;
    position: relative;
    z-index: 10;
}

.section-block {
    padding: 62px 0;
}

.narrow-block {
    padding-top: 24px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading > a {
    color: var(--cyan);
    font-weight: 800;
}

.no-link {
    justify-content: flex-start;
}

.compact-heading {
    margin-bottom: 16px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 12px 34px rgba(2, 6, 23, 0.22);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow: 0 26px 60px rgba(2, 6, 23, 0.38);
}

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

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

.movie-card:hover .poster-link img {
    transform: scale(1.09);
    filter: brightness(0.74);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: rgba(34, 211, 238, 0.9);
    box-shadow: 0 18px 38px rgba(34, 211, 238, 0.24);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: white;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 12px;
}

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

.movie-card-body h2 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.28;
}

.movie-card-body h2 a:hover {
    color: var(--cyan);
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    padding: 4px 8px;
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.16);
    border: 1px solid rgba(34, 211, 238, 0.16);
    font-size: 12px;
}

.category-band {
    width: 100%;
    padding: 64px max(16px, calc((100% - 1240px) / 2));
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.95));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

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

.category-tile,
.category-overview-main {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    overflow: hidden;
    border-radius: 24px;
    position: relative;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.82), rgba(249, 115, 22, 0.72));
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.28);
    transition: transform 0.22s ease;
}

.category-tile:hover,
.category-overview-card:hover .category-overview-main {
    transform: translateY(-5px) scale(1.01);
}

.category-tile span,
.category-overview-main span {
    font-size: 38px;
}

.category-tile strong,
.category-overview-main h2 {
    margin: 12px 0 6px;
    font-size: 22px;
}

.category-tile em,
.category-overview-main p {
    color: rgba(255, 255, 255, 0.82);
    font-style: normal;
    font-size: 14px;
}

.category-tone-1,
.category-tone-1 .category-overview-main {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.86), rgba(6, 182, 212, 0.74));
}

.category-tone-2,
.category-tone-2 .category-overview-main {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.84), rgba(236, 72, 153, 0.7));
}

.category-tone-3,
.category-tone-3 .category-overview-main {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.82), rgba(20, 184, 166, 0.74));
}

.category-tone-4,
.category-tone-4 .category-overview-main {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.86), rgba(234, 179, 8, 0.72));
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 26px;
}

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

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

.compact-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.78);
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-item:hover {
    background: rgba(30, 41, 59, 0.94);
    transform: translateX(4px);
}

.compact-item img {
    width: 96px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.compact-item strong,
.compact-item em {
    display: block;
}

.compact-item strong {
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-item em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

.ranking-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.82);
    padding: 24px;
    box-shadow: var(--shadow);
}

.ranking-list {
    display: grid;
    gap: 9px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 48px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    color: var(--soft);
    background: rgba(30, 41, 59, 0.52);
}

.ranking-item:hover {
    color: white;
    background: rgba(34, 211, 238, 0.14);
}

.ranking-number {
    font-weight: 900;
    color: var(--yellow);
}

.ranking-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-score {
    color: #fde68a;
    text-align: right;
    font-weight: 800;
}

.page-hero {
    margin-top: 34px;
    padding: 74px;
    border: 1px solid var(--line);
    border-radius: 34px;
    overflow: hidden;
    position: relative;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.74));
    box-shadow: var(--shadow);
}

.small-hero h1,
.category-hero h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.filter-panel {
    margin-top: 26px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.82);
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 14px;
}

.filter-grid label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
}

.filter-grid input,
.filter-grid select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: white;
    outline: none;
    background: rgba(2, 6, 23, 0.78);
    padding: 0 13px;
}

.category-overview-card {
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
    overflow: hidden;
}

.category-overview-main {
    min-height: 220px;
    border-radius: 0;
}

.category-samples {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.category-samples a {
    color: var(--soft);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    padding: 42px 0 70px;
    background: #020617;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.28;
    filter: blur(2px);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.82) 48%, rgba(2, 6, 23, 0.58) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 55%);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 4px 0 28px;
    color: var(--muted);
}

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

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

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

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

.detail-info h1 {
    font-size: clamp(34px, 5vw, 64px);
}

.detail-tags {
    margin: 24px 0 4px;
}

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

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid var(--line);
    background: #000;
    box-shadow: var(--shadow);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.16), rgba(2, 6, 23, 0.5));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.video-play-button {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 24px 52px rgba(34, 211, 238, 0.28);
    font-size: 38px;
    padding-left: 5px;
}

.article-block {
    max-width: 920px;
    color: var(--soft);
    font-size: 18px;
}

.article-block h2 {
    margin: 34px 0 10px;
    color: white;
    font-size: 28px;
}

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.88);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
}

.footer-brand p {
    max-width: 460px;
    color: var(--muted);
}

.footer-links h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

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

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

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

.footer-bottom {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 14px;
}

.searchable-card.is-hidden {
    display: none;
}

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

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

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

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

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

    .mobile-nav-button {
        display: block;
        margin-left: auto;
    }

    .header-inner {
        min-height: 68px;
    }

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

    .hero-arrow {
        display: none;
    }

    .page-hero {
        padding: 44px 24px;
    }

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

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

    .two-column-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .brand-name {
        font-size: 18px;
    }

    .hero-content h1,
    .hero-content h2,
    .page-hero h1,
    .detail-info h1 {
        letter-spacing: -0.04em;
    }

    .hero-content p,
    .page-hero p,
    .detail-info p {
        font-size: 16px;
    }

    .hero-actions {
        width: 100%;
    }

    .primary-button,
    .ghost-button {
        flex: 1 1 auto;
    }

    .movie-grid,
    .movie-grid-home,
    .category-grid,
    .category-overview-grid,
    .filter-grid {
        grid-template-columns: 1fr;
    }

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

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

    .video-play-button {
        width: 72px;
        height: 72px;
        font-size: 30px;
    }
}
