:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --faint: #64748b;
    --cyan: #22d3ee;
    --blue: #60a5fa;
    --red: #fb7185;
    --gold: #fbbf24;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.12), transparent 36rem),
        radial-gradient(circle at 80% 10%, rgba(96, 165, 250, 0.10), transparent 32rem),
        linear-gradient(180deg, #0f172a 0%, #020617 42%, #000 100%);
}

body.is-locked {
    overflow: hidden;
}

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

img {
    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;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
    backdrop-filter: blur(18px);
}

.nav-shell {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 76px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

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

.brand-name,
.footer-brand {
    font-size: 1.55rem;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

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

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

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.38);
}

.nav-search input,
.mobile-search input,
.big-search input,
.filter-bar input,
.filter-bar select {
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(2, 6, 23, 0.66);
    outline: none;
}

.nav-search input {
    width: 200px;
    border: 0;
    padding: 10px 12px;
    background: transparent;
}

.nav-search button,
.mobile-search button,
.big-search button {
    border: 0;
    cursor: pointer;
    color: #001018;
    font-weight: 900;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.nav-search button {
    padding: 10px 16px;
}

.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.85);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.96);
}

.mobile-search {
    display: flex;
    gap: 10px;
    padding: 0 16px 18px;
}

.mobile-search input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 999px;
}

.mobile-search button {
    padding: 0 18px;
}

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

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.45) 52%, rgba(0, 0, 0, 0.1) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.26) 48%, rgba(2, 6, 23, 0.36) 100%);
}

.hero-inner {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 76vh;
    padding: 0 0 128px;
}

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

.eyebrow,
.hero-kicker {
    margin: 0 0 12px;
    color: var(--cyan);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(2.6rem, 7vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: -0.08em;
}

.hero-text,
.page-hero p,
.detail-one-line,
.split-text {
    max-width: 760px;
    color: #cbd5e1;
    font-size: 1.08rem;
    line-height: 1.85;
}

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

.hero-meta span,
.detail-meta span,
.card-meta span,
.tag-row span {
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.72);
    border-radius: 999px;
}

.hero-meta span,
.detail-meta span {
    padding: 8px 12px;
}

.card-meta span,
.tag-row span {
    padding: 5px 9px;
    font-size: 0.78rem;
}

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

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

.primary-btn {
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 40px rgba(34, 211, 238, 0.24);
}

.ghost-btn,
.section-action {
    border: 1px solid rgba(34, 211, 238, 0.36);
    color: var(--cyan);
    background: rgba(15, 23, 42, 0.62);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-action:hover,
.movie-card:hover,
.category-card:hover,
.category-overview-card:hover,
.ranking-card:hover {
    transform: translateY(-3px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(12px);
    cursor: pointer;
    font-size: 2rem;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-bottom {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    transform: translateX(-50%);
}

.hero-dots {
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.32);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: var(--cyan);
}

.hero-thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: min(520px, 52vw);
}

.hero-thumb {
    overflow: hidden;
    position: relative;
    min-height: 82px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: var(--panel);
}

.hero-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.hero-thumb span {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 8px;
    font-size: 0.76rem;
    font-weight: 900;
    text-shadow: 0 2px 14px #000;
}

.search-hero,
.content-section {
    padding: 72px 0 0;
}

.search-panel,
.split-grid,
.player-layout,
.detail-content-grid {
    display: grid;
    gap: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.76));
    box-shadow: var(--shadow);
}

.search-panel {
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
    padding: 30px;
}

.search-panel h2,
.section-head h2,
.split-grid h2,
.player-side h2,
.detail-article h2,
.detail-facts h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.6rem);
    letter-spacing: -0.05em;
}

.big-search,
.filter-bar {
    display: grid;
    gap: 12px;
}

.big-search {
    grid-template-columns: 1fr auto;
}

.big-search input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    border-radius: 18px;
}

.big-search button {
    padding: 0 24px;
}

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

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

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

.movie-card,
.ranking-card,
.category-overview-card,
.category-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.24);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover,
.ranking-card:hover,
.category-overview-card:hover,
.category-card:hover {
    border-color: rgba(34, 211, 238, 0.42);
    box-shadow: 0 28px 70px rgba(34, 211, 238, 0.10);
}

.poster-link,
.ranking-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(96, 165, 250, 0.08));
}

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

.movie-card:hover .poster-link img,
.ranking-card:hover .ranking-poster img {
    transform: scale(1.05);
}

.poster-badge,
.poster-type,
.rank-number {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
}

.poster-badge {
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    color: #001018;
    background: var(--cyan);
}

.poster-type {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    color: #fff;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 18px;
}

.card-body h2,
.ranking-card h2 {
    margin: 0 0 10px;
    font-size: 1.05rem;
    line-height: 1.35;
}

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

.card-body p,
.ranking-card p,
.player-side p,
.detail-article p,
.detail-facts dd,
.footer-grid p {
    color: var(--muted);
    line-height: 1.75;
}

.card-meta,
.tag-row {
    margin-top: 12px;
}

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

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

.category-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 172px;
    padding: 22px;
}

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

.category-card strong {
    font-size: 1.25rem;
}

.category-card em {
    color: var(--muted);
    font-style: normal;
    line-height: 1.6;
}

.split-grid {
    grid-template-columns: 0.86fr 1.14fr;
    align-items: start;
    padding: 30px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 64px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.42);
}

.rank-item span {
    color: var(--cyan);
    font-weight: 900;
}

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

.rank-item b,
.rank-item em {
    display: block;
}

.rank-item em {
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 0.85rem;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.page-hero {
    padding: 96px 0 78px;
    background:
        radial-gradient(circle at 16% 20%, rgba(34, 211, 238, 0.16), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.86));
}

.compact-page-hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.6rem);
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    min-height: 210px;
}

.category-overview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-overview-card div {
    padding: 22px;
}

.category-overview-card strong {
    font-size: 1.5rem;
}

.category-overview-card p {
    color: var(--muted);
    line-height: 1.7;
}

.mini-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-title-row span {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.09);
}

.filter-section {
    padding-bottom: 52px;
}

.filter-bar {
    grid-template-columns: 1fr 180px 180px;
    margin-bottom: 24px;
}

.expanded-filter {
    grid-template-columns: 1fr 190px 190px;
}

.empty-state {
    display: none;
    margin-top: 24px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.72);
}

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

.ranking-grid {
    display: grid;
    gap: 18px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 18px;
    padding: 14px;
}

.ranking-poster {
    border-radius: 18px;
    overflow: hidden;
}

.rank-number {
    top: 10px;
    left: 10px;
    width: 42px;
    height: 42px;
    color: #001018;
    background: linear-gradient(135deg, var(--gold), var(--cyan));
}

.detail-hero {
    min-height: 560px;
    display: flex;
    align-items: end;
}

.detail-backdrop {
    z-index: -2;
    filter: saturate(1.12);
}

.detail-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.35)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 52%, rgba(2, 6, 23, 0.24) 100%);
}

.detail-head {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 34px;
    align-items: end;
    padding: 120px 0 62px;
}

.detail-poster-wrap {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.66);
    box-shadow: var(--shadow);
}

.detail-poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 22px;
    object-fit: cover;
}

.detail-copy h1 {
    font-size: clamp(2.4rem, 5.5vw, 5.2rem);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
}

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

.player-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
    padding: 22px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 24px;
    background: #000;
}

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

.player-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 0;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-layer.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-play-icon {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 42px rgba(34, 211, 238, 0.38);
    font-size: 1.8rem;
}

.player-layer strong {
    font-size: clamp(1.3rem, 3vw, 2rem);
}

.player-layer em {
    color: #cbd5e1;
    font-style: normal;
}

.player-side {
    padding: 18px;
}

.detail-content-grid {
    grid-template-columns: minmax(0, 1fr) 330px;
    padding: 30px;
}

.detail-article p {
    font-size: 1.05rem;
}

.detail-facts dl {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 14px 16px;
    margin: 20px 0 0;
}

.detail-facts dt {
    color: var(--cyan);
    font-weight: 900;
}

.detail-facts dd {
    margin: 0;
}

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

.compact-card .card-body h2 {
    font-size: 0.96rem;
}

.compact-card .card-body p {
    font-size: 0.9rem;
}

.site-footer {
    margin-top: 82px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), #000);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
    padding: 46px 0;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 1.05rem;
}

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

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

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0 28px;
    border-top: 1px solid var(--line);
    color: var(--faint);
}

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

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

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

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

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .mobile-nav.is-open {
        display: grid;
        gap: 12px;
        padding-top: 16px;
    }

    .mobile-link {
        padding: 12px 16px;
    }

    .hero-carousel,
    .hero-inner {
        min-height: 74vh;
    }

    .hero-inner {
        padding-bottom: 92px;
    }

    .hero-arrow,
    .hero-thumbs {
        display: none;
    }

    .search-panel,
    .split-grid,
    .player-layout,
    .detail-content-grid,
    .detail-head,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .detail-poster-wrap {
        max-width: 260px;
    }

    .filter-bar,
    .expanded-filter {
        grid-template-columns: 1fr;
    }

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

    .footer-bottom {
        flex-direction: column;
    }
}

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

    .nav-shell {
        min-height: 66px;
    }

    .brand-name {
        font-size: 1.25rem;
    }

    .hero-copy h1,
    .hero-copy h2,
    .page-hero h1,
    .detail-copy h1 {
        letter-spacing: -0.05em;
    }

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

    .card-body {
        padding: 14px;
    }

    .card-meta span:nth-child(2) {
        display: none;
    }

    .category-card {
        min-height: 150px;
        padding: 18px;
    }

    .ranking-card {
        grid-template-columns: 105px 1fr;
    }

    .detail-head {
        padding-top: 78px;
    }

    .player-layout,
    .detail-content-grid,
    .search-panel,
    .split-grid {
        padding: 16px;
        border-radius: 20px;
    }
}
