:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --muted: #94a3b8;
    --text: #e2e8f0;
    --white: #ffffff;
    --line: rgba(148, 163, 184, 0.18);
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --blue: #38bdf8;
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 36rem),
        radial-gradient(circle at 88% 12%, rgba(59, 130, 246, 0.12), transparent 34rem),
        linear-gradient(180deg, #020617 0%, #0f172a 50%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.12));
    border-bottom: 1px solid transparent;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
    background: rgba(2, 6, 23, 0.94);
    border-color: var(--line);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.35);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #03121a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 34px rgba(34, 211, 238, 0.36);
    font-size: 15px;
    font-weight: 900;
}

.brand-text {
    display: grid;
    gap: 1px;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
    color: var(--white);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link,
.mobile-link {
    border-radius: 999px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #cffafe;
    background: rgba(34, 211, 238, 0.12);
}

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

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

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(18px);
}

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

.mobile-link {
    padding: 11px 14px;
}

.hero {
    position: relative;
    height: 74vh;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.08) 45%, rgba(2, 6, 23, 0.7) 100%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    bottom: 94px;
    width: min(650px, calc(100% - 48px));
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--cyan);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-desc,
.page-hero p,
.detail-one-line {
    color: #cbd5e1;
    font-size: 18px;
}

.hero-desc {
    max-width: 620px;
    margin: 22px 0 0;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 999px;
    background: rgba(8, 145, 178, 0.13);
    color: #a5f3fc;
    font-size: 13px;
    font-weight: 700;
}

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

.primary-button,
.ghost-button,
.text-link,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    min-height: 46px;
    padding: 0 22px;
    color: #03121a;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 14px 35px rgba(34, 211, 238, 0.26);
}

.ghost-button {
    min-height: 46px;
    padding: 0 22px;
    color: #e0f2fe;
    border: 1px solid rgba(226, 232, 240, 0.18);
    background: rgba(15, 23, 42, 0.58);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(226, 232, 240, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.6);
    color: var(--white);
    font-size: 30px;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(34, 211, 238, 0.24);
    transform: translateY(-50%) scale(1.04);
}

.hero-prev {
    left: 22px;
    transform: translateY(-50%);
}

.hero-next {
    right: 22px;
    transform: translateY(-50%);
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.38);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

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

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

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

.quick-search {
    margin-top: -42px;
    position: relative;
    z-index: 5;
}

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

.section-heading p {
    margin: 0 0 6px;
    color: var(--cyan);
    font-weight: 800;
}

.section-heading h2 {
    margin: 0;
    color: var(--white);
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.03em;
}

.section-link,
.text-link {
    color: #a5f3fc;
}

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

.category-card,
.category-overview-card,
.movie-card,
.player-card,
.prose-block,
.filter-panel,
.page-hero,
.detail-hero {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.category-card {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: auto -45px -65px auto;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.13);
}

.category-card span {
    color: var(--white);
    font-size: 19px;
    font-weight: 900;
}

.category-card strong {
    color: var(--cyan);
    font-size: 28px;
}

.category-card p,
.category-card em {
    color: var(--muted);
    font-style: normal;
    font-size: 14px;
}

.category-card em {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(150px, 190px));
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-md);
}

.search-box {
    display: grid;
    gap: 6px;
}

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

.search-box input,
.filter-select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.48);
    color: var(--text);
    outline: 0;
}

.search-box input {
    padding: 0 16px;
}

.filter-select {
    align-self: end;
    padding: 0 14px;
}

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

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.44);
    background: rgba(15, 23, 42, 0.94);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.95);
}

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

.movie-card:hover .card-poster img {
    transform: scale(1.06);
    filter: saturate(1.12);
}

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

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 900;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 10px;
    background: rgba(34, 211, 238, 0.9);
    color: #03212c;
    font-size: 12px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: rgba(2, 6, 23, 0.78);
    color: var(--cyan);
    border: 1px solid rgba(34, 211, 238, 0.35);
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 3.15em;
    color: var(--white);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-title:hover {
    color: #67e8f9;
}

.card-meta {
    margin: 8px 0;
    color: var(--muted);
    font-size: 13px;
}

.card-desc {
    display: -webkit-box;
    overflow: hidden;
    min-height: 4.8em;
    margin: 0 0 12px;
    color: #cbd5e1;
    font-size: 14px;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tag-row span {
    min-height: 26px;
    padding: 3px 9px;
    font-size: 12px;
}

.page-hero,
.detail-hero {
    border-radius: var(--radius-lg);
    padding: 44px;
    overflow: hidden;
    position: relative;
}

.page-hero::after,
.detail-hero::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    right: -90px;
    top: -80px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.12);
    pointer-events: none;
}

.compact-hero {
    margin-top: 12px;
}

.category-overview-grid {
    display: grid;
    gap: 18px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    align-items: center;
    padding: 18px;
    border-radius: var(--radius-md);
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.category-cover-stack img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.category-overview-card h2 {
    margin: 0 0 8px;
    color: var(--white);
    font-size: 28px;
}

.category-overview-card p {
    margin: 0 0 16px;
    color: #cbd5e1;
}

.breadcrumb {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: #a5f3fc;
}

.detail-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 34px;
    align-items: center;
}

.detail-poster img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: 0 22px 70px rgba(2, 6, 23, 0.5);
}

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

.detail-one-line {
    margin: 18px 0;
}

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

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

.player-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

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

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

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.64));
    cursor: pointer;
}

.play-layer.hidden {
    display: none;
}

.play-layer span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #03121a;
    font-size: 30px;
    box-shadow: 0 20px 60px rgba(34, 211, 238, 0.36);
}

.player-copy {
    padding: 22px 26px 26px;
}

.player-copy h2 {
    margin: 0 0 8px;
    color: var(--white);
    font-size: 26px;
}

.player-copy p {
    margin: 0;
    color: #cbd5e1;
}

.prose-block {
    padding: 34px;
    border-radius: var(--radius-lg);
}

.prose-block h2 {
    margin: 0 0 12px;
    color: var(--white);
    font-size: 26px;
}

.prose-block h2:not(:first-child) {
    margin-top: 28px;
}

.prose-block p {
    margin: 0;
    color: #dbeafe;
    font-size: 17px;
}

.empty-state {
    display: none;
    margin: 22px 0 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.68);
}

.empty-state.is-visible {
    display: block;
}

.site-footer {
    margin-top: 42px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.72);
}

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

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

.site-footer p {
    color: var(--muted);
    margin: 0;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 16px;
}

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

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: #67e8f9;
}

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

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

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

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

    .menu-button {
        display: block;
    }

    .hero {
        height: 78vh;
        min-height: 560px;
    }

    .hero-content {
        bottom: 82px;
    }

    .hero-arrow {
        display: none;
    }

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

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

    .category-overview-card,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .category-cover-stack {
        grid-template-columns: repeat(4, 1fr);
    }

    .page-hero,
    .detail-hero,
    .prose-block {
        padding: 26px;
    }

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

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

    .brand-text strong {
        font-size: 17px;
    }

    .brand-text em {
        display: none;
    }

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

    .hero-desc,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

    .hero-tags span:nth-child(n+3) {
        display: none;
    }

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

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

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

    .player-copy {
        padding: 18px;
    }
}
