:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --card: rgba(15, 23, 42, 0.82);
    --card-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(34, 211, 238, 0.3);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #38bdf8;
    --pink: #f472b6;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    --radius: 24px;
}

* {
    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;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 34rem),
        radial-gradient(circle at 80% 10%, rgba(56, 189, 248, 0.12), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
    color: var(--text);
    line-height: 1.6;
}

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

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

button,
input {
    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: rgba(2, 6, 23, 0.86);
    backdrop-filter: blur(20px);
}

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

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

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

.brand-text {
    font-size: 1.28rem;
    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: 8px;
}

.nav-link,
.mobile-link {
    border-radius: 999px;
    color: var(--soft);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.1);
}

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

.header-search {
    margin-left: auto;
}

.header-search input,
.mobile-search input,
.big-search input {
    min-width: 250px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.84);
    color: var(--text);
    outline: 0;
    padding: 11px 14px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.header-search button,
.mobile-search button,
.big-search button,
.filter-bar button,
.hero-controls button {
    border: 0;
    cursor: pointer;
}

.header-search button,
.mobile-search button,
.big-search button {
    border-radius: 14px;
    padding: 11px 16px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #020617;
    font-weight: 800;
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.86);
    padding: 10px;
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: var(--text);
}

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

.mobile-menu.is-open {
    display: block;
}

.mobile-menu nav,
.mobile-cats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.mobile-link,
.mobile-cats a {
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--line);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: -5%;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: saturate(1.05) contrast(1.08);
    transform: scale(1.03);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.16) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0) 42%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding: 130px 0 110px;
}

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

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(2.25rem, 6vw, 5rem);
    line-height: 1.06;
    letter-spacing: -0.055em;
}

.hero-summary,
.page-hero p,
.section-copy p,
.lead-text {
    max-width: 760px;
    color: var(--soft);
    font-size: 1.08rem;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 999px;
    padding: 5px 10px;
    color: #bae6fd;
    background: rgba(14, 116, 144, 0.18);
    font-size: 0.82rem;
}

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

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

.btn:hover {
    transform: translateY(-2px);
}

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

.btn-ghost {
    border: 1px solid rgba(226, 232, 240, 0.24);
    background: rgba(15, 23, 42, 0.66);
    color: var(--text);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(-50%);
}

.hero-controls > button {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--text);
    font-size: 2rem;
}

.hero-dots {
    display: flex;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(14px);
}

.hero-dots button {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    background: rgba(226, 232, 240, 0.42);
}

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

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

.section-glow {
    position: relative;
    background: linear-gradient(135deg, rgba(8, 47, 73, 0.42), rgba(15, 23, 42, 0.14));
    border-block: 1px solid var(--line);
}

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

.section-heading h2,
.section-copy h2,
.prose-card h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3.4vw, 2.9rem);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-more {
    color: var(--cyan);
    font-weight: 800;
}

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

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

.movie-card {
    min-width: 0;
}

.movie-card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card-link:hover {
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

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

.poster-frame img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.movie-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
}

.movie-meta {
    color: var(--cyan);
    font-size: 0.78rem;
    font-weight: 800;
}

.movie-body h3,
.movie-body h4 {
    margin: 0;
    color: var(--text);
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-line {
    display: -webkit-box;
    min-height: 3.1em;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.92rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row {
    margin-top: auto;
}

.tag-row span {
    min-height: 25px;
    padding: 3px 8px;
    font-size: 0.72rem;
}

.horizontal-strip {
    display: grid;
    grid-auto-columns: minmax(230px, 1fr);
    grid-auto-flow: column;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scroll-snap-type: x mandatory;
}

.horizontal-strip .movie-card {
    scroll-snap-align: start;
}

.split-layout {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 42px;
    align-items: center;
}

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

.category-card,
.collection-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.74);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card {
    display: grid;
    min-height: 142px;
    gap: 8px;
    padding: 18px;
}

.category-card:hover,
.collection-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-4px);
}

.category-card span,
.collection-index {
    color: var(--cyan);
    font-size: 0.82rem;
    font-weight: 900;
}

.category-card strong,
.collection-card h2 {
    font-size: 1.2rem;
}

.category-card em,
.collection-card p {
    color: var(--muted);
    font-style: normal;
}

.rank-panel {
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 34px;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: var(--shadow);
}

.rank-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

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

.mini-rank-card {
    display: grid;
    grid-template-columns: auto 64px 1fr;
    align-items: center;
    gap: 12px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 10px;
    background: rgba(2, 6, 23, 0.42);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.mini-rank-card:hover {
    border-color: var(--line-strong);
    transform: translateX(3px);
}

.rank-num {
    width: 32px;
    color: var(--cyan);
    font-weight: 900;
}

.mini-cover {
    display: block;
    overflow: hidden;
    border-radius: 13px;
    aspect-ratio: 2 / 3;
    background: rgba(15, 23, 42, 0.82);
}

.mini-cover img {
    height: 100%;
    object-fit: cover;
}

.mini-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.mini-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-copy em {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.82rem;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 80px 0 54px;
}

.compact-hero {
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.14), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.88));
}

.filter-bar {
    margin-top: 24px;
}

.filter-bar button {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 14px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--soft);
}

.filter-bar button.is-active,
.filter-bar button:hover {
    border-color: var(--line-strong);
    color: #020617;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.collection-card {
    overflow: hidden;
}

.collection-card > a {
    display: block;
    padding: 22px;
}

.collection-card h2 {
    margin: 8px 0;
}

.sample-links {
    display: grid;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding: 16px 22px 22px;
}

.sample-links a {
    overflow: hidden;
    color: var(--soft);
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.big-search {
    max-width: 680px;
    margin-top: 24px;
}

.big-search input {
    flex: 1;
    min-width: 0;
}

.detail-hero {
    background:
        radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 32rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.2));
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 28px;
    color: var(--muted);
}

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

.detail-grid {
    display: grid;
    grid-template-columns: minmax(220px, 330px) 1fr;
    gap: 44px;
    align-items: center;
}

.detail-poster {
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-copy {
    max-width: 760px;
}

.detail-meta {
    margin: 22px 0;
}

.player-panel {
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 26px;
    background: rgba(15, 23, 42, 0.66);
    box-shadow: var(--shadow);
}

.video-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 26px;
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.34), rgba(2, 6, 23, 0.74));
    opacity: 1;
    transition: opacity 0.24s ease;
}

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

.play-button {
    display: grid;
    width: clamp(76px, 10vw, 106px);
    height: clamp(76px, 10vw, 106px);
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    color: #020617;
    cursor: pointer;
    box-shadow: 0 24px 60px rgba(34, 211, 238, 0.28);
}

.play-button span {
    margin-left: 6px;
    font-size: 2.1rem;
}

.prose-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: clamp(24px, 5vw, 44px);
    background: rgba(15, 23, 42, 0.66);
}

.prose-card p {
    color: var(--soft);
    font-size: 1.04rem;
}

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

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

.footer-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 28px;
    align-items: start;
}

.footer-brand {
    color: var(--cyan);
    font-size: 1.2rem;
}

.site-footer p {
    margin: 10px 0 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    justify-content: end;
}

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

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

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

@media (max-width: 1060px) {
    .card-grid,
    .related-grid,
    .rank-grid-wide {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .split-layout,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

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

    .hero-content {
        padding-top: 96px;
    }

    .hero-slide::before {
        background:
            linear-gradient(180deg, rgba(2, 6, 23, 0.78) 0%, rgba(2, 6, 23, 0.94) 74%),
            linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0) 42%);
    }

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

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

    .hero-slider {
        min-height: 78vh;
    }

    .hero-content h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: clamp(2rem, 12vw, 3.4rem);
    }

    .card-grid,
    .feature-grid,
    .related-grid,
    .rank-grid,
    .rank-grid-wide,
    .category-grid,
    .collection-grid {
        grid-template-columns: 1fr;
    }

    .mobile-menu nav,
    .mobile-cats {
        grid-template-columns: 1fr;
    }

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

    .rank-panel,
    .player-panel {
        padding: 16px;
        border-radius: 24px;
    }

    .mini-rank-card {
        grid-template-columns: auto 56px 1fr;
    }

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

    .big-search input,
    .mobile-search input {
        width: 100%;
    }
}
