* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-panel: rgba(15, 23, 42, 0.82);
    --bg-card: rgba(15, 23, 42, 0.74);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(245, 158, 11, 0.34);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --amber: #f59e0b;
    --amber-light: #fcd34d;
    --cyan: #22d3ee;
    --blue: #60a5fa;
    --red: #fb7185;
    --green: #34d399;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
    --radius: 24px;
    --header-height: 72px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 30rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.no-scroll {
    overflow: hidden;
}

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(51, 65, 85, 0.7);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(1280px, calc(100% - 32px));
    height: var(--header-height);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-orb {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--amber-light);
    background: radial-gradient(circle, rgba(245, 158, 11, 0.26), rgba(245, 158, 11, 0.08));
    box-shadow: 0 0 32px rgba(245, 158, 11, 0.34);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-copy strong,
.footer-brand {
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fde68a, #fff7ed, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-copy small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.75rem;
}

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

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    color: var(--muted-2);
    font-weight: 650;
    transition: color 0.25s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 6px;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--amber);
    transition: width 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--amber-light);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.category-shortcut {
    color: #cbd5e1;
}

.header-search {
    width: min(330px, 28vw);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.48);
}

.header-search input,
.filter-input,
.filter-select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    outline: none;
    border-radius: 16px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.5);
}

.header-search input {
    min-width: 0;
    padding: 9px 12px;
    border: 0;
    background: transparent;
}

.header-search button,
.primary-btn,
.ghost-btn,
.play-overlay,
.filter-controls button {
    border: 0;
    cursor: pointer;
}

.header-search button,
.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(90deg, #f59e0b, #d97706);
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.header-search button:hover,
.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 44px rgba(245, 158, 11, 0.42);
}

.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 999px;
    color: var(--amber-light);
    background: rgba(245, 158, 11, 0.1);
    transition: background 0.25s ease, transform 0.25s ease;
}

.ghost-btn:hover {
    transform: translateY(-1px);
    background: rgba(245, 158, 11, 0.16);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.46);
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 8px 0 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.container,
.section,
.hero-content,
.footer-grid,
.footer-bottom,
.detail-shell,
.player-section,
.story-section,
.related-section,
.category-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    isolation: isolate;
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 6s ease;
}

.hero-slide.is-active img {
    transform: scale(1.1);
}

.hero-slide::before,
.hero-slide::after,
.detail-backdrop::before,
.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-slide::before,
.detail-backdrop::before {
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.82) 42%, rgba(2, 6, 23, 0.36) 100%);
}

.hero-slide::after,
.detail-backdrop::after {
    background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.72) 38%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 76px 0;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--amber-light);
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "★";
    color: var(--amber);
}

.hero h1,
.filter-panel h1,
.detail-info h1,
.simple-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(2.4rem, 6vw, 5.6rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.hero p,
.simple-hero p,
.filter-panel p,
.detail-info p {
    color: var(--muted-2);
    font-size: clamp(1rem, 2.4vw, 1.18rem);
}

.hero p {
    max-width: 660px;
    margin: 22px 0 28px;
}

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

.meta-pill,
.tag,
.type-pill,
.rank-badge,
.compact-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
}

.meta-pill {
    padding: 8px 14px;
    color: #fff;
    border: 1px solid rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.13);
}

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

.hero-dots {
    position: absolute;
    z-index: 4;
    left: max(16px, calc((100vw - 1280px) / 2));
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 36px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(203, 213, 225, 0.32);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--amber);
}

.hero-arrows {
    position: absolute;
    right: max(16px, calc((100vw - 1280px) / 2));
    bottom: 24px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.section {
    padding: 74px 0 22px;
}

.section-title {
    margin-bottom: 26px;
}

.section-title h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    line-height: 1.1;
}

.section-line {
    flex: 1;
    height: 1px;
    min-width: 80px;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.56), transparent);
}

.section-title a {
    color: var(--amber-light);
    font-weight: 750;
}

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

.movie-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 22px;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: 0 12px 42px rgba(0, 0, 0, 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: var(--line-strong);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(245, 158, 11, 0.12);
}

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

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

.movie-card:hover img,
.category-card:hover img,
.compact-card:hover img {
    transform: scale(1.08);
}

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 44%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.type-pill {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    color: #fef3c7;
    font-size: 0.75rem;
    border: 1px solid rgba(245, 158, 11, 0.26);
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(8px);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 34px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #e11d48);
    box-shadow: 0 12px 28px rgba(225, 29, 72, 0.28);
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
}

.card-body strong {
    display: -webkit-box;
    min-height: 3rem;
    overflow: hidden;
    color: #fff;
    font-size: 1rem;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta,
.card-line,
.compact-card small,
.category-card p {
    color: var(--muted);
    font-size: 0.88rem;
}

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

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

.category-card {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card:hover img {
    opacity: 0.6;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.18));
}

.category-card-content {
    position: absolute;
    z-index: 2;
    inset: auto 18px 18px;
}

.category-card h3 {
    margin: 0 0 8px;
    font-size: 1.35rem;
}

.category-card p {
    margin: 0;
}

.ranking-band {
    margin-top: 54px;
    padding: 60px 0;
    background: rgba(15, 23, 42, 0.45);
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

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

.compact-card {
    display: grid;
    grid-template-columns: auto 76px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.4);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.compact-card:hover {
    transform: translateX(4px);
    border-color: var(--line-strong);
}

.compact-card img {
    width: 76px;
    height: 104px;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.compact-rank {
    width: 34px;
    height: 34px;
    color: #020617;
    background: var(--amber-light);
}

.compact-card span:not(.compact-rank) {
    min-width: 0;
}

.compact-card strong,
.compact-card small {
    display: block;
}

.compact-card strong {
    overflow: hidden;
    color: #fff;
    font-size: 1.02rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.simple-hero,
.filter-panel {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 76px 0 36px;
}

.simple-hero p,
.filter-panel p {
    max-width: 760px;
    margin: 16px 0 0;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: end;
    gap: 32px;
}

.filter-controls {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-panel);
    box-shadow: var(--shadow);
}

.filter-input,
.filter-select {
    padding: 13px 14px;
}

.filter-select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #fcd34d 50%), linear-gradient(135deg, #fcd34d 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.category-shell {
    padding: 24px 0 80px;
}

.detail-hero {
    position: relative;
    min-height: 62vh;
    overflow: hidden;
}

.detail-backdrop,
.detail-backdrop img {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.detail-shell {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    align-items: end;
    gap: 42px;
    min-height: 62vh;
    padding: 84px 0 60px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 28px;
    background: rgba(2, 6, 23, 0.8);
    box-shadow: var(--shadow);
}

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

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

.breadcrumb a {
    color: var(--amber-light);
}

.detail-info h1 {
    max-width: 900px;
}

.detail-info p {
    max-width: 860px;
    margin: 20px 0;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.tag {
    padding: 7px 11px;
    color: var(--muted-2);
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.64);
}

.player-section,
.story-section,
.related-section {
    padding: 60px 0 20px;
}

.panel {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--bg-panel);
    box-shadow: var(--shadow);
}

.player-title,
.story-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px;
    font-size: 1.8rem;
}

.player-title::before,
.story-title::before,
.section-title h2::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 28px;
    border-radius: 999px;
    background: var(--amber);
}

.video-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.58));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    padding-left: 6px;
    font-size: 2.25rem;
    background: linear-gradient(135deg, #f59e0b, #e11d48);
    box-shadow: 0 24px 64px rgba(245, 158, 11, 0.32);
}

.play-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.story-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    gap: 22px;
}

.story-card {
    padding: 28px;
}

.story-card p {
    margin: 0 0 16px;
    color: var(--muted-2);
}

.story-card p:last-child {
    margin-bottom: 0;
}

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

.fact-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.13);
}

.fact-row span:first-child {
    color: var(--muted);
}

.fact-row span:last-child {
    color: #fff;
    text-align: right;
}

.no-results {
    display: none;
    margin: 34px 0;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted-2);
    background: rgba(15, 23, 42, 0.55);
}

.no-results.is-visible {
    display: block;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.75), rgba(2, 6, 23, 0.95));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 36px;
    padding: 48px 0 30px;
}

.footer-brand span {
    margin-right: 8px;
}

.footer-about p,
.footer-links a,
.footer-bottom {
    color: var(--muted);
}

.footer-about p {
    max-width: 520px;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

[data-card].is-hidden {
    display: none;
}

@media (max-width: 1180px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

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

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

@media (max-width: 820px) {
    .hero,
    .hero-content {
        min-height: 76vh;
    }

    .hero-dots,
    .hero-arrows {
        display: none;
    }

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

    .home-category-grid,
    .category-grid,
    .compact-list,
    .footer-grid,
    .filter-panel,
    .story-grid,
    .detail-shell {
        grid-template-columns: 1fr;
    }

    .detail-shell {
        align-items: start;
        gap: 26px;
        padding-top: 42px;
    }

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

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

    .compact-card {
        grid-template-columns: auto 64px minmax(0, 1fr);
    }

    .compact-card img {
        width: 64px;
        height: 88px;
    }
}

@media (max-width: 520px) {
    .header-inner,
    .container,
    .section,
    .hero-content,
    .footer-grid,
    .footer-bottom,
    .detail-shell,
    .player-section,
    .story-section,
    .related-section,
    .category-shell,
    .simple-hero,
    .filter-panel {
        width: min(100% - 24px, 1280px);
    }

    .brand-copy small {
        display: none;
    }

    .mobile-nav.is-open {
        grid-template-columns: 1fr;
    }

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

    .card-body {
        padding: 12px;
    }

    .card-body strong {
        font-size: 0.92rem;
    }

    .card-line {
        display: none;
    }

    .hero-actions,
    .detail-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

    .story-card {
        padding: 20px;
    }
}
