:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.62);
    --bg-card-strong: rgba(15, 23, 42, 0.92);
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --cyan: #22d3ee;
    --cyan-strong: #06b6d4;
    --green: #22c55e;
    --orange: #fb923c;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    --radius: 22px;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    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.16), transparent 34%), #020617;
    color: var(--text);
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, #22d3ee, #2563eb);
    box-shadow: 0 0 28px rgba(34, 211, 238, 0.35);
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong {
    font-size: 22px;
    letter-spacing: 0.04em;
}

.brand-copy em {
    color: rgba(103, 232, 249, 0.76);
    font-size: 12px;
    font-style: normal;
}

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

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

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    padding: 10px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: white;
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
}

.mobile-nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

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

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

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

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

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.34) 52%, rgba(2, 6, 23, 0.76)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.36) 46%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
    position: relative;
    height: 78vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: 92px;
}

.hero-copy {
    max-width: 720px;
    display: grid;
    gap: 20px;
    animation: heroLift 0.6s ease both;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span,
.hero-keywords span,
.genre-pill {
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
    color: #a5f3fc;
    padding: 7px 12px;
    font-size: 13px;
    backdrop-filter: blur(12px);
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.06em;
    text-shadow: 0 20px 50px rgba(0, 0, 0, 0.42);
}

.hero-copy p {
    margin: 0;
    color: #cbd5e1;
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.85;
}

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

.primary-btn,
.ghost-btn,
.filter-panel button,
.hero-search button,
.global-search-box button,
.category-overview-head a,
.section-heading a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    border: 0;
    padding: 0 22px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.hero-search button,
.global-search-box button {
    color: white;
    background: linear-gradient(135deg, #22d3ee, #2563eb);
    box-shadow: 0 16px 36px rgba(34, 211, 238, 0.28);
}

.ghost-btn,
.filter-panel button,
.category-overview-head a,
.section-heading a {
    color: white;
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid var(--line);
}

.primary-btn:hover,
.ghost-btn:hover,
.filter-panel button:hover,
.hero-search button:hover,
.global-search-box button:hover,
.category-overview-head a:hover,
.section-heading a:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    width: 52px;
    height: 52px;
    transform: translateY(-50%);
    border: 1px solid var(--line);
    border-radius: 50%;
    color: white;
    background: rgba(2, 6, 23, 0.62);
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-arrow.left {
    left: 22px;
}

.hero-arrow.right {
    right: 22px;
}

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

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

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

.search-strip {
    padding: 28px 0;
    background: linear-gradient(180deg, #020617, #0f172a);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.search-strip .container {
    display: grid;
    gap: 16px;
}

.search-strip h2 {
    margin: 0;
    font-size: 22px;
}

.hero-search,
.filter-panel,
.global-search-box {
    display: grid;
    grid-template-columns: 1fr 180px 180px auto;
    gap: 12px;
}

.global-search-box {
    grid-template-columns: 1fr auto;
    margin-bottom: 26px;
}

.hero-search input,
.hero-search select,
.filter-panel input,
.filter-panel select,
.global-search-box input {
    min-height: 48px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: white;
    outline: 0;
    background: rgba(15, 23, 42, 0.82);
    padding: 0 15px;
}

.section-block {
    padding: 78px 0;
    background: #020617;
}

.section-block.darker,
.dark-block:nth-of-type(even) {
    background: #0f172a;
}

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

.section-heading p {
    margin: 0 0 7px;
    color: #67e8f9;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.section-heading h2,
.category-intro h2,
.detail-section h2,
.detail-aside h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
}

.section-heading.slim {
    align-items: center;
    justify-content: flex-start;
}

.section-heading.slim span {
    width: 5px;
    height: 36px;
    border-radius: 999px;
    background: var(--cyan);
}

.movie-grid {
    display: grid;
    gap: 22px;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.16);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(34, 211, 238, 0.34);
    box-shadow: 0 26px 52px rgba(8, 145, 178, 0.16);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover img {
    transform: scale(1.09);
}

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 62%);
}

.play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%) scale(0.82);
    border-radius: 50%;
    color: white;
    background: rgba(6, 182, 212, 0.88);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.genre-pill {
    position: absolute;
    top: 12px;
    right: 12px;
    max-width: calc(100% - 24px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: white;
    font-weight: 800;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.3);
}

.card-body {
    display: grid;
    gap: 8px;
    padding: 16px;
}

.card-body strong {
    color: white;
    font-size: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.card-body span {
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-tile,
.category-overview-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.96));
}

.category-tile {
    min-height: 150px;
    display: grid;
    align-content: end;
    gap: 10px;
    padding: 20px;
}

.category-tile::before,
.category-overview-card::before,
.page-hero::before {
    content: "";
    position: absolute;
    right: -34px;
    top: -34px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.24);
    filter: blur(4px);
}

.category-tile strong {
    font-size: 22px;
}

.category-tile span,
.category-overview-head p,
.category-intro p,
.detail-section p,
.site-footer p {
    color: #cbd5e1;
    line-height: 1.8;
}

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

.list-card {
    display: grid;
    grid-template-columns: auto 148px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, background 0.2s ease;
}

.list-card:hover {
    transform: translateX(4px);
    background: rgba(30, 41, 59, 0.82);
}

.list-card img {
    width: 148px;
    height: 84px;
    object-fit: cover;
    border-radius: 12px;
}

.list-rank,
.list-dot {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: white;
    background: rgba(34, 211, 238, 0.18);
    font-weight: 800;
}

.list-dot::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--cyan);
}

.list-info {
    display: grid;
    gap: 7px;
}

.list-info strong {
    font-size: 19px;
}

.list-info em,
.list-info span {
    color: var(--muted);
    font-style: normal;
    line-height: 1.65;
}

.page-main {
    min-height: 60vh;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 86px 0 56px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(37, 99, 235, 0.08)),
        #020617;
    border-bottom: 1px solid var(--line);
}

.page-hero p {
    margin: 0 0 12px;
    color: #67e8f9;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.page-hero h1 {
    position: relative;
    max-width: 880px;
    margin: 0;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.breadcrumb {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: #a5f3fc;
}

.breadcrumb > * + *::before {
    content: "/";
    margin-right: 10px;
    color: #64748b;
}

.hero-inline-links {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-inline-links a {
    color: #cbd5e1;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    padding: 8px 12px;
    font-size: 13px;
}

.category-intro {
    margin-bottom: 22px;
}

.category-intro p {
    max-width: 850px;
    margin: 12px 0 0;
}

.filter-panel {
    margin-bottom: 28px;
}

.category-overview-card {
    padding: 24px;
}

.overview-stack {
    display: grid;
    gap: 24px;
}

.category-overview-head {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px 20px;
    align-items: center;
    margin-bottom: 18px;
}

.category-overview-head h2,
.category-overview-head p {
    margin: 0;
}

.category-overview-head p {
    grid-column: 1 / 2;
}

.mini-grid .movie-card:nth-child(n+4) {
    display: none;
}

.rank-top-grid {
    margin-bottom: 34px;
}

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

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px) saturate(1.08);
    transform: scale(1.05);
    opacity: 0.58;
}

.detail-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.55)),
        linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.4));
}

.detail-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 44px;
    align-items: end;
    min-height: 560px;
    padding: 70px 0;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
}

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

.detail-heading {
    display: grid;
    gap: 18px;
}

.detail-heading h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-heading p {
    max-width: 760px;
    margin: 0;
    color: #dbeafe;
    font-size: 19px;
    line-height: 1.9;
}

.player-section {
    padding: 44px 0;
    background: #020617;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.main-video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-button {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    border: 0;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, #22d3ee, #2563eb);
    box-shadow: 0 20px 55px rgba(34, 211, 238, 0.38);
    cursor: pointer;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.player-button span {
    margin-left: 5px;
    font-size: 36px;
}

.player-button.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.82);
}

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

.detail-article,
.detail-aside {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    padding: 28px;
}

.detail-section + .detail-section {
    margin-top: 28px;
}

.detail-section p {
    margin: 16px 0 0;
}

.aside-grid {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.aside-grid .movie-card .card-body span {
    display: none;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
}

.footer-brand {
    font-size: 22px;
    font-weight: 800;
}

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

.site-footer a:not(.footer-brand) {
    display: block;
    color: #94a3b8;
    margin: 8px 0;
}

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

.footer-bottom {
    margin-top: 36px;
    padding: 20px;
    border-top: 1px solid var(--line);
    color: #64748b;
    text-align: center;
}

.no-results {
    grid-column: 1 / -1;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    padding: 24px;
    text-align: center;
}

@keyframes heroLift {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-search input,
    .filter-panel input {
        grid-column: 1 / -1;
    }

    .three-cols,
    .four-cols,
    .category-grid,
    .footer-grid,
    .detail-layout,
    .detail-hero-inner {
        grid-template-columns: 1fr 1fr;
    }

    .detail-hero-inner {
        align-items: center;
    }

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

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

    .brand-copy strong {
        font-size: 18px;
    }

    .hero-carousel,
    .hero-content {
        min-height: 82vh;
        height: 82vh;
    }

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

    .hero-copy {
        gap: 16px;
    }

    .hero-actions,
    .hero-search,
    .filter-panel,
    .global-search-box,
    .three-cols,
    .four-cols,
    .category-grid,
    .footer-grid,
    .detail-layout,
    .detail-hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        display: grid;
    }

    .hero-arrow {
        display: none;
    }

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

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

    .list-card {
        grid-template-columns: auto 96px 1fr;
        gap: 12px;
    }

    .list-card img {
        width: 96px;
        height: 64px;
    }

    .list-info span {
        display: none;
    }

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

    .detail-hero-inner {
        min-height: auto;
        padding: 44px 0;
    }

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

    .player-wrap {
        border-radius: 18px;
    }

    .player-button {
        width: 68px;
        height: 68px;
    }

    .category-overview-head {
        grid-template-columns: 1fr;
    }
}
