:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(96, 165, 250, 0.16);
    --line-bright: rgba(96, 165, 250, 0.38);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --blue: #3b82f6;
    --cyan: #22d3ee;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
    --radius: 22px;
    --radius-sm: 14px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.28), transparent 34rem),
        radial-gradient(circle at 85% 10%, rgba(34, 211, 238, 0.12), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.9));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.38);
}

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

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

.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: white;
    box-shadow: 0 0 28px rgba(59, 130, 246, 0.45);
}

.brand-text {
    font-size: 1.5rem;
    background: linear-gradient(90deg, #60a5fa, #67e8f9, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 700;
    transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.16);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.13);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.06);
    color: white;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 21px;
    height: 2px;
    margin: 5px auto;
    border-radius: 99px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 12px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

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

.main-space {
    padding-bottom: 56px;
}

.page-main {
    padding-top: 92px;
    padding-bottom: 56px;
}

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

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

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1s ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.76) 44%, rgba(2, 6, 23, 0.24)),
        linear-gradient(180deg, rgba(2, 6, 23, 0.22), #020617 96%);
}

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

.hero-labels,
.hero-meta,
.tag-row,
.movie-meta,
.hero-actions,
.footer-links,
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-labels span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(96, 165, 250, 0.18);
    color: #bfdbfe;
    font-size: 0.82rem;
    font-weight: 800;
}

.hero-content h1 {
    margin: 18px 0 16px;
    font-size: clamp(2.7rem, 6vw, 5.9rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

.hero-content p {
    margin: 0 0 22px;
    color: #dbeafe;
    font-size: clamp(1rem, 2vw, 1.35rem);
    line-height: 1.8;
}

.hero-meta {
    margin-bottom: 28px;
    color: var(--muted);
}

.hero-meta span,
.movie-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.primary-button,
.ghost-button,
.inline-search button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 900;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button,
.inline-search button {
    color: white;
    background: linear-gradient(135deg, var(--blue), #06b6d4);
    box-shadow: 0 18px 46px rgba(37, 99, 235, 0.36);
}

.ghost-button,
.section-more {
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line-bright);
}

.primary-button:hover,
.ghost-button:hover,
.inline-search button:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 56px rgba(37, 99, 235, 0.44);
}

.hero-dots {
    position: absolute;
    left: max(24px, calc((100vw - 1240px) / 2));
    bottom: 48px;
    display: flex;
    gap: 10px;
}

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

.hero-dot.is-active {
    width: 68px;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.section-block {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
}

.search-panel {
    margin-top: -34px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 24px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.78));
    box-shadow: var(--shadow);
}

.search-panel h2,
.section-heading h2,
.content-card h2,
.player-caption h2 {
    margin: 0;
    color: white;
    font-size: clamp(1.4rem, 2.7vw, 2.2rem);
    letter-spacing: -0.03em;
}

.search-panel p,
.section-heading p,
.content-card p,
.category-tile p,
.player-caption p,
.page-hero-content p,
.detail-hero-content p {
    color: var(--muted);
    line-height: 1.8;
}

.inline-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.inline-search input,
.filter-input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 16px;
    color: white;
    background: rgba(2, 6, 23, 0.62);
    outline: none;
}

.inline-search input:focus,
.filter-input:focus {
    border-color: rgba(96, 165, 250, 0.62);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

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

.section-heading h2::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 28px;
    margin-right: 12px;
    border-radius: 999px;
    vertical-align: -5px;
    background: linear-gradient(180deg, var(--blue), var(--cyan));
}

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

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 16px 50px rgba(2, 6, 23, 0.32);
    isolation: isolate;
}

.category-tile img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 0.45s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.93));
}

.category-glow {
    position: absolute;
    inset: auto 18px 18px auto;
    width: 74px;
    height: 74px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.25);
    filter: blur(20px);
}

.category-tile strong {
    color: white;
    font-size: 1.35rem;
    position: relative;
}

.category-tile p {
    margin: 8px 0 0;
    position: relative;
}

.category-tile:hover img {
    transform: scale(1.12);
}

.filter-toolbar {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
}

.filter-pills {
    gap: 8px;
}

.filter-pill {
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 14px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

.filter-pill:hover,
.filter-pill.is-active {
    color: #dbeafe;
    border-color: var(--line-bright);
    background: rgba(37, 99, 235, 0.22);
}

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

.dense-grid,
.ranking-grid,
.mini-feature-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(96, 165, 250, 0.14);
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72));
    box-shadow: 0 20px 58px rgba(2, 6, 23, 0.22);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(96, 165, 250, 0.5);
    box-shadow: 0 30px 80px rgba(37, 99, 235, 0.18);
}

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

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

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

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

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

.play-chip {
    right: 10px;
    bottom: 10px;
    min-height: 30px;
    padding: 0 12px;
    color: white;
    background: rgba(37, 99, 235, 0.9);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.32);
}

.rank-badge {
    top: 10px;
    left: 10px;
    width: 34px;
    height: 34px;
    color: white;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 12px 34px rgba(239, 68, 68, 0.32);
}

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

.movie-card h3 {
    margin: 0 0 8px;
    color: white;
    font-size: 1rem;
    line-height: 1.35;
}

.movie-card p {
    margin: 0 0 10px;
    min-height: 3.1em;
    color: var(--subtle);
    font-size: 0.9rem;
    line-height: 1.55;
}

.movie-meta {
    gap: 7px;
    margin-bottom: 10px;
    color: #cbd5e1;
    font-size: 0.78rem;
}

.movie-meta span + span::before {
    content: "·";
    margin-right: 7px;
    color: #475569;
}

.movie-card .tag-row {
    gap: 6px;
}

.movie-card .tag-row span {
    min-height: 24px;
    padding: 0 8px;
    font-size: 0.72rem;
    background: rgba(30, 41, 59, 0.78);
    border-color: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
}

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

.movie-card-compact h3 {
    font-size: 0.95rem;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    align-items: flex-end;
    background: rgba(15, 23, 42, 0.8);
}

.small-hero {
    min-height: 330px;
    background:
        radial-gradient(circle at 20% 10%, rgba(59, 130, 246, 0.35), transparent 30rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.96));
}

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

.page-hero-shade,
.detail-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.24)),
        linear-gradient(180deg, transparent, #020617 96%);
}

.page-hero-content,
.detail-hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 66px 0;
}

.page-hero-content h1,
.detail-hero-content h1 {
    margin: 12px 0 14px;
    font-size: clamp(2.2rem, 5vw, 4.6rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.eyebrow {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 0 13px;
    border: 1px solid rgba(96, 165, 250, 0.22);
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.18);
    font-size: 0.85rem;
    font-weight: 900;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: #bfdbfe;
    font-size: 0.95rem;
}

.breadcrumb span {
    color: var(--subtle);
}

.category-preview {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0;
}

.detail-title-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 28px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.player-panel,
.detail-side,
.content-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.video-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius) var(--radius) 0 0;
    background: #000;
}

.video-shell video,
.video-cover,
.video-cover img,
.video-cover-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-shell video {
    object-fit: contain;
    z-index: 1;
}

.video-cover {
    z-index: 3;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #000;
    color: white;
}

.video-cover.is-hidden {
    display: none;
}

.video-cover img {
    object-fit: cover;
}

.video-cover-shade {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.24), rgba(2, 6, 23, 0.82));
}

.big-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: white;
    font-size: 2.1rem;
    box-shadow: 0 22px 56px rgba(37, 99, 235, 0.45);
}

.player-caption {
    padding: 22px;
}

.detail-side {
    padding: 18px;
}

.detail-cover {
    width: 100%;
    border-radius: 18px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    margin-bottom: 18px;
}

.detail-facts {
    display: grid;
    gap: 12px;
}

.detail-facts div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-facts span {
    color: var(--subtle);
}

.detail-facts strong {
    color: white;
    text-align: right;
}

.detail-tags {
    margin-top: 16px;
}

.content-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.content-card {
    padding: 26px;
}

.content-card p {
    margin: 16px 0 0;
}

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

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

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

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
}

.footer-inner strong {
    display: block;
    margin-bottom: 6px;
    color: white;
    font-size: 1.1rem;
}

.footer-inner p {
    margin: 0;
}

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

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

@media (max-width: 1180px) {
    .movie-grid,
    .dense-grid,
    .ranking-grid,
    .category-movie-grid,
    .search-grid,
    .ranking-list-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .mobile-toggle {
        display: block;
    }

    .hero-slider {
        min-height: 680px;
    }

    .hero-content {
        bottom: 92px;
    }

    .search-panel,
    .detail-layout,
    .content-section,
    .detail-title-row {
        grid-template-columns: 1fr;
    }

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

    .detail-side {
        display: grid;
        grid-template-columns: 170px 1fr;
        gap: 18px;
    }

    .detail-cover {
        margin: 0;
    }
}

@media (max-width: 680px) {
    .site-header-inner {
        width: min(100% - 24px, 1240px);
        height: 64px;
    }

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

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

    .hero-slider {
        min-height: 620px;
    }

    .hero-content,
    .hero-dots {
        left: 16px;
        width: calc(100% - 32px);
    }

    .hero-content {
        bottom: 78px;
    }

    .hero-dots {
        bottom: 32px;
    }

    .section-block,
    .page-hero-content,
    .detail-hero-content,
    .footer-inner,
    .category-preview {
        width: min(100% - 24px, 1240px);
    }

    .search-panel {
        padding: 22px;
    }

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

    .category-grid,
    .large-category-grid,
    .movie-grid,
    .dense-grid,
    .ranking-grid,
    .category-movie-grid,
    .search-grid,
    .ranking-list-grid,
    .top-ranking-grid,
    .mini-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

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

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

    .movie-card h3 {
        font-size: 0.92rem;
    }

    .movie-card p {
        font-size: 0.82rem;
    }

    .detail-side {
        display: block;
    }

    .detail-cover {
        margin-bottom: 18px;
    }

    .big-play {
        width: 68px;
        height: 68px;
        font-size: 1.75rem;
    }
}
