:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-soft: rgba(30, 41, 59, 0.52);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --orange: #fb923c;
    --violet: #a78bfa;
    --yellow: #facc15;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 8%, rgba(8, 145, 178, 0.18), transparent 32rem),
        radial-gradient(circle at 82% 0%, rgba(124, 58, 237, 0.14), transparent 34rem),
        var(--bg);
    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,
video {
    display: block;
    max-width: 100%;
}

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.86);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    backdrop-filter: blur(18px);
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    box-shadow: 0 0 35px rgba(34, 211, 238, 0.25);
}

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

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

.nav-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--muted-strong);
    font-size: 14px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.1);
}

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

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

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

.hero-carousel {
    position: relative;
    height: min(760px, 84vh);
    min-height: 560px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-layer,
.detail-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #020617 4%, rgba(2, 6, 23, 0.78) 48%, rgba(2, 6, 23, 0.32));
}

.hero-side-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.58));
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 86px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--cyan);
    font-weight: 700;
    font-size: 15px;
}

.eyebrow span {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 7px rgba(34, 211, 238, 0.1);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(34px, 7vw, 70px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-desc,
.page-hero p,
.detail-one-line {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--muted-strong);
    font-size: 17px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-meta span {
    padding: 6px 12px;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    color: var(--cyan);
    font-size: 13px;
    font-weight: 700;
}

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

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

.primary-btn {
    color: #031018;
    background: var(--cyan);
    box-shadow: 0 14px 40px rgba(34, 211, 238, 0.28);
}

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

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.hero-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    cursor: pointer;
    font-size: 38px;
    line-height: 1;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.intro-search {
    margin-top: -42px;
    position: relative;
    z-index: 8;
}

.search-panel {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.86);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.site-search {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    outline: none;
    color: var(--text);
    background: rgba(2, 6, 23, 0.58);
}

.site-search:focus {
    border-color: rgba(34, 211, 238, 0.72);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-chip {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
    border-color: rgba(34, 211, 238, 0.48);
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.1);
}

.content-section {
    padding: 70px 0 0;
}

.section-heading {
    display: flex;
    align-items: end;
    gap: 18px;
    margin-bottom: 28px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 6px 0 0;
    color: var(--muted);
}

.section-heading > span {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(34, 211, 238, 0.3), transparent);
}

.section-heading.orange > span {
    background: linear-gradient(to right, rgba(251, 146, 60, 0.34), transparent);
}

.section-heading.blue > span {
    background: linear-gradient(to right, rgba(96, 165, 250, 0.32), transparent);
}

.section-heading.violet > span {
    background: linear-gradient(to right, rgba(167, 139, 250, 0.32), transparent);
}

.section-heading.yellow > span {
    background: linear-gradient(to right, rgba(250, 204, 21, 0.3), transparent);
}

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

.catalog-grid {
    margin-top: 28px;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 211, 238, 0.45);
    box-shadow: 0 22px 60px rgba(8, 145, 178, 0.12);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.8);
}

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

.movie-card:hover .poster-link img {
    transform: scale(1.08);
    opacity: 0.86;
}

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

.card-rating,
.rank-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.card-rating {
    right: 10px;
    bottom: 10px;
    min-width: 42px;
    height: 28px;
    color: #140b00;
    background: var(--yellow);
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 34px;
    height: 34px;
    color: white;
    background: rgba(8, 145, 178, 0.88);
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 15px;
}

.card-title {
    display: block;
    min-height: 48px;
    color: white;
    font-weight: 800;
    line-height: 1.35;
}

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

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

.card-line {
    display: -webkit-box;
    min-height: 42px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 8px;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.08);
    font-size: 12px;
}

.movie-card-compact .card-body {
    padding: 12px;
}

.movie-card-compact .card-title {
    min-height: 40px;
    font-size: 14px;
}

.movie-card-compact .card-line {
    display: none;
}

.glass-section,
.soft-panel {
    margin-top: 70px;
    padding: 42px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.42));
}

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

.category-tile {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.88);
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    opacity: 0.58;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
    opacity: 0.76;
}

.category-tile span {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.98), transparent 70%);
}

.category-tile strong,
.category-tile small {
    position: absolute;
    left: 16px;
    right: 16px;
}

.category-tile strong {
    bottom: 48px;
    font-size: 18px;
}

.category-tile small {
    bottom: 18px;
    color: var(--muted-strong);
}

.preview-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.preview-heading h3 {
    margin: 0;
    color: var(--cyan);
    font-size: 24px;
}

.preview-heading p {
    margin: 4px 0 0;
    color: var(--muted);
}

.preview-heading a,
.text-link {
    color: var(--cyan);
}

.category-preview + .category-preview {
    margin-top: 42px;
}

.page-main {
    padding-bottom: 80px;
}

.page-hero {
    padding-top: 76px;
}

.small-hero {
    padding-bottom: 30px;
}

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

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

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 20px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
}

.category-collage {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    overflow: hidden;
    border-radius: 18px;
}

.category-collage img {
    width: 100%;
    height: 86px;
    object-fit: cover;
}

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

.category-overview-card p {
    margin: 0 0 16px;
    color: var(--muted-strong);
}

.top-rank-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 22px;
    margin-top: 20px;
}

.top-rank-card a {
    position: relative;
    display: block;
    min-height: 330px;
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: var(--panel);
}

.top-rank-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.74;
}

.top-rank-card a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.96), transparent 72%);
}

.top-rank-card div {
    position: absolute;
    z-index: 2;
    left: 22px;
    right: 22px;
    bottom: 20px;
}

.top-rank-card h2,
.top-rank-card p {
    margin: 0;
}

.top-rank-card p {
    display: -webkit-box;
    margin-top: 8px;
    overflow: hidden;
    color: var(--muted-strong);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.top-rank-card strong {
    display: inline-flex;
    margin-top: 12px;
    color: var(--yellow);
}

.top-rank-num {
    position: absolute;
    z-index: 2;
    top: 18px;
    left: 18px;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: var(--cyan);
    color: #02131a;
    font-size: 24px;
    font-weight: 900;
}

.detail-hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
}

.detail-head {
    position: relative;
    z-index: 2;
    padding-top: 70px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 34px;
    align-items: end;
    min-height: 480px;
    padding-bottom: 52px;
}

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

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

.detail-poster span {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--yellow);
    color: #140b00;
    font-weight: 900;
}

.detail-copy {
    max-width: 840px;
}

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

.player-section {
    margin-top: -18px;
    position: relative;
    z-index: 3;
}

.player-section h2 {
    margin: 0 0 18px;
    font-size: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 28px;
    background: #000;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.play-overlay[hidden] {
    display: none;
}

.play-overlay span {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--cyan);
    color: #001018;
    font-size: 32px;
    box-shadow: 0 18px 48px rgba(34, 211, 238, 0.34);
}

.play-overlay strong {
    display: block;
    margin-top: 116px;
    position: absolute;
    font-size: 18px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-top: 46px;
}

.text-panel {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.76);
}

.text-panel h2 {
    margin: 0 0 16px;
    color: var(--cyan);
}

.text-panel p {
    margin: 0;
    color: var(--muted-strong);
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 36px;
}

.site-footer p,
.site-footer a {
    display: block;
    margin-top: 8px;
    color: var(--muted);
}

.site-footer h3 {
    margin: 0 0 10px;
}

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

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

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

    .top-rank-grid,
    .category-overview-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }
}

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

    .menu-button {
        display: inline-block;
    }

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

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

    .hero-content {
        padding-bottom: 80px;
    }

    .hero-arrow {
        display: none;
    }

    .movie-grid,
    .wide-grid,
    .mini-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .glass-section,
    .soft-panel {
        padding: 24px;
        border-radius: 22px;
    }

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

    .section-heading > span {
        width: 100%;
        flex: none;
    }

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

    .detail-layout {
        min-height: auto;
        padding-top: 30px;
    }

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

    .detail-hero {
        min-height: auto;
    }

    .detail-copy h1 {
        font-size: 40px;
    }

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

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

    .movie-grid,
    .wide-grid,
    .mini-grid,
    .category-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .card-body {
        padding: 12px;
    }

    .card-title {
        min-height: 42px;
        font-size: 14px;
    }

    .card-line,
    .tag-row {
        display: none;
    }
}
