:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(17, 24, 39, 0.94);
    --line: rgba(168, 85, 247, 0.22);
    --line-soft: rgba(255, 255, 255, 0.1);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --purple: #a855f7;
    --pink: #ec4899;
    --cyan: #22d3ee;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(168, 85, 247, 0.24), transparent 34rem),
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.18), transparent 32rem),
        linear-gradient(135deg, #020617 0%, #111827 48%, #030712 100%);
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(88, 28, 135, 0.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.36);
}

.logo-text,
.footer-logo {
    background: linear-gradient(90deg, #c084fc, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

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

.nav-link {
    padding: 10px 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.header-search,
.mobile-search,
.wide-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.wide-search input,
.filter-bar input {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: 16px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
    width: 230px;
    padding: 10px 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.filter-bar input:focus {
    border-color: rgba(216, 180, 254, 0.9);
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.14);
    background: rgba(255, 255, 255, 0.14);
}

.header-search button,
.mobile-search button,
.wide-search button,
.primary-btn,
.ghost-btn,
.text-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.header-search button,
.mobile-search button,
.wide-search button,
.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    box-shadow: 0 18px 40px rgba(168, 85, 247, 0.26);
}

.header-search button,
.mobile-search button {
    padding: 10px 14px;
}

.header-search button:hover,
.mobile-search button:hover,
.wide-search button:hover,
.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(236, 72, 153, 0.28);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #e5e7eb;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    padding: 12px 24px 24px;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
}

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

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

.mobile-search {
    margin-top: 16px;
}

.mobile-search input {
    width: 100%;
    padding: 12px 14px;
}

.hero-slider {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    isolation: isolate;
}

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

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.2) 100%),
        linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 620px;
    margin: 0 auto;
    padding: 72px 24px;
    display: flex;
    align-items: center;
}

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

.eyebrow {
    margin: 0 0 12px;
    color: #c084fc;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 74px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-desc {
    max-width: 620px;
    margin: 24px 0 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.filter-chips button {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    padding: 7px 12px;
    font-size: 13px;
}

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

.primary-btn,
.ghost-btn {
    min-height: 48px;
    padding: 0 22px;
    font-weight: 800;
}

.ghost-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
}

.ghost-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(216, 180, 254, 0.8);
    background: rgba(168, 85, 247, 0.24);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 6;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    color: #fff;
    background: rgba(2, 6, 23, 0.48);
    cursor: pointer;
    backdrop-filter: blur(12px);
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(168, 85, 247, 0.36);
    transform: translateY(-50%) scale(1.04);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: linear-gradient(90deg, var(--purple), var(--pink));
}

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px;
}

.feature-search {
    padding-top: 34px;
}

.search-panel,
.page-hero,
.story-card,
.player-card,
.ranking-card,
.category-overview-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 24px;
    align-items: center;
    padding: 28px;
}

.search-panel h2,
.section-heading h2,
.story-card h2,
.ranking-card h2,
.category-overview-content h2 {
    margin: 0;
    font-size: clamp(24px, 4vw, 38px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.search-panel p,
.section-heading p,
.category-tile p,
.story-card p,
.page-hero p,
.category-overview-content p,
.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

.wide-search input {
    flex: 1;
    min-width: 0;
    padding: 15px 16px;
}

.wide-search button {
    min-height: 52px;
    padding: 0 22px;
    font-weight: 800;
}

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

.section-heading p:last-child {
    margin: 10px 0 0;
}

.section-more,
.text-btn {
    color: #f0abfc;
    font-weight: 800;
}

.section-more:hover,
.text-btn:hover {
    color: #fff;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(168, 85, 247, 0.18);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(216, 180, 254, 0.62);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #581c87);
}

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

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

.poster-link::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.76));
}

.year-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    backdrop-filter: blur(10px);
}

.year-pill {
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.62);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #c084fc;
    font-size: 12px;
    font-weight: 700;
}

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

.card-body h2 {
    margin: 10px 0 8px;
    color: #fff;
    font-size: 18px;
    line-height: 1.25;
    font-weight: 900;
}

.card-body h2 a:hover {
    color: #d8b4fe;
}

.card-body p {
    min-height: 46px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.tag-row span {
    padding: 5px 9px;
    color: #e9d5ff;
    background: rgba(168, 85, 247, 0.18);
    border-color: rgba(168, 85, 247, 0.22);
}

.two-column-zone {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.ranking-card {
    position: sticky;
    top: 92px;
    padding: 24px;
}

.small-heading {
    align-items: center;
    margin-bottom: 16px;
}

.ranking-list,
.rank-table {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ranking-list li,
.rank-row {
    display: grid;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ranking-list li {
    grid-template-columns: 42px 1fr auto;
    padding: 13px 0;
}

.ranking-list span,
.rank-number {
    color: #f0abfc;
    font-weight: 900;
}

.ranking-list em,
.rank-row span:not(.rank-number) {
    color: var(--subtle);
    font-style: normal;
}

.ranking-list a:hover,
.rank-title:hover {
    color: #d8b4fe;
}

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

.category-tile {
    min-height: 160px;
    padding: 22px;
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(15, 23, 42, 0.88));
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(216, 180, 254, 0.7);
}

.category-tile span {
    display: block;
    margin-bottom: 12px;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.page-hero {
    max-width: 1280px;
    margin: 34px auto 0;
    padding: 48px;
    overflow: hidden;
    background:
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.22), transparent 34rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(88, 28, 135, 0.32));
}

.compact-hero h1 {
    max-width: 880px;
}

.compact-hero p:last-child {
    max-width: 760px;
    margin: 18px 0 0;
    font-size: 18px;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-bar input {
    width: min(420px, 100%);
    padding: 14px 16px;
}

.filter-chips button {
    padding: 9px 12px;
    cursor: pointer;
}

.filter-chips button:hover,
.filter-chips button.is-active {
    background: rgba(168, 85, 247, 0.34);
    border-color: rgba(216, 180, 254, 0.7);
}

.strong-filter {
    position: sticky;
    top: 86px;
    z-index: 8;
    backdrop-filter: blur(18px);
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    overflow: hidden;
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 260px;
}

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

.category-overview-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    isolation: isolate;
}

.detail-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(18px) saturate(1.2);
    transform: scale(1.08);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.55)),
        linear-gradient(0deg, #020617, transparent 50%);
}

.detail-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 38px 24px 64px;
}

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

.breadcrumb a:hover {
    color: #d8b4fe;
}

.detail-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
    margin-top: 34px;
}

.detail-poster {
    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: 2 / 3;
    object-fit: cover;
}

.detail-one-line {
    max-width: 820px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta,
.detail-tags {
    margin-top: 18px;
}

.detail-info .primary-btn {
    margin-top: 28px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 28px;
    align-items: start;
}

.player-card {
    padding: 12px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    gap: 12px;
    padding: 24px;
    color: #fff;
    border: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.36));
    cursor: pointer;
}

.player-overlay.is-hidden {
    display: none;
}

.play-symbol {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    box-shadow: 0 20px 60px rgba(168, 85, 247, 0.44);
    font-size: 30px;
}

.player-overlay strong {
    max-width: 80%;
    font-size: 22px;
    text-align: center;
}

.story-card {
    padding: 28px;
}

.story-card h2 + p {
    margin-top: 12px;
}

.story-card h2:not(:first-child) {
    margin-top: 30px;
}

.rank-table {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-row {
    grid-template-columns: 64px minmax(220px, 1fr) 140px 90px minmax(160px, 220px);
    min-height: 62px;
    padding: 12px 18px;
}

.rank-row:last-child,
.ranking-list li:last-child {
    border-bottom: 0;
}

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

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 44px 24px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 34px;
}

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

.footer-links {
    display: grid;
    gap: 10px;
    color: var(--muted);
}

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px 30px;
    color: var(--subtle);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

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

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

    .two-column-zone,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .ranking-card {
        position: static;
    }
}

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

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

    body.menu-open .mobile-panel {
        display: block;
    }

    .hero-slider,
    .hero-content {
        min-height: 560px;
    }

    .hero-content {
        padding: 72px 20px 88px;
    }

    .hero-arrow {
        display: none;
    }

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

    .movie-grid,
    .compact-grid,
    .slim-grid,
    .top-three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .section-heading,
    .filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-bar input {
        width: 100%;
    }

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

    .rank-row {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .rank-row span:not(.rank-number) {
        display: none;
    }
}

@media (max-width: 560px) {
    .header-inner {
        height: 64px;
        padding: 0 16px;
    }

    .site-logo {
        font-size: 18px;
    }

    .logo-mark {
        width: 32px;
        height: 32px;
    }

    .content-section {
        padding: 40px 16px;
    }

    .page-hero {
        margin: 18px 16px 0;
        padding: 30px 22px;
    }

    .movie-grid,
    .compact-grid,
    .slim-grid,
    .top-three,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .card-body p {
        min-height: auto;
    }

    .wide-search,
    .mobile-search {
        flex-direction: column;
        align-items: stretch;
    }

    .wide-search button,
    .mobile-search button {
        width: 100%;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        letter-spacing: -0.035em;
    }

    .detail-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }
}
