:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: #0f172a;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --yellow: #facc15;
    --shadow: 0 28px 80px rgba(2, 6, 23, 0.55);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 18% 8%, rgba(34, 211, 238, 0.18), transparent 26rem),
        radial-gradient(circle at 82% 14%, rgba(59, 130, 246, 0.16), transparent 28rem),
        var(--bg);
    color: var(--text);
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 21px;
    white-space: nowrap;
    background: linear-gradient(90deg, var(--cyan), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #06111d;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 34px rgba(34, 211, 238, 0.35);
    font-size: 14px;
}

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

.site-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--soft);
    transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover {
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.08);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(340px, 30vw);
}

.header-search input,
.large-search input,
.card-filter-input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.54);
    color: var(--text);
    outline: none;
    padding: 12px 16px;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.large-search input:focus,
.card-filter-input:focus {
    border-color: rgba(34, 211, 238, 0.8);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.13);
    background: rgba(15, 23, 42, 0.92);
}

.header-search button,
.large-search button,
.filter-toolbar button {
    border: 0;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    padding: 12px 18px;
    font-weight: 700;
    white-space: nowrap;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
}

.menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--soft);
    border-radius: 999px;
}

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

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.52;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.22)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.38) 42%, rgba(2, 6, 23, 0.1));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 680px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1180px;
}

.hero-kicker,
.detail-kicker,
.page-hero span,
.section-heading span,
.index-entry span,
.rank-head span {
    display: inline-flex;
    align-items: center;
    color: var(--cyan);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 780px;
    margin: 18px 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 28px;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

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

.hero-meta span,
.hero-meta a,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.58);
    padding: 8px 13px;
    color: var(--soft);
}

.hero-meta span:first-child,
.detail-meta span:first-child {
    color: var(--yellow);
}

.hero-actions,
.quick-links,
.detail-tags,
.mini-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.primary-button,
.ghost-button,
.panel-link,
.filter-toolbar a,
.quick-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 14px;
    padding: 0 20px;
    font-weight: 800;
    transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: white;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 42px rgba(34, 211, 238, 0.22);
}

.ghost-button,
.panel-link,
.filter-toolbar a,
.quick-links a {
    border: 1px solid rgba(148, 163, 184, 0.24);
    color: var(--soft);
    background: rgba(15, 23, 42, 0.62);
}

.primary-button:hover,
.ghost-button:hover,
.panel-link:hover,
.filter-toolbar a:hover,
.quick-links a:hover {
    transform: translateY(-2px);
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.3);
}

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

.hero-arrow {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.68);
    color: var(--text);
    font-size: 32px;
    line-height: 1;
    pointer-events: auto;
}

.quick-search-panel {
    position: relative;
    z-index: 5;
    margin-top: -56px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.large-search {
    display: flex;
    gap: 12px;
}

.quick-links {
    margin-top: 16px;
}

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

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

.section-heading h2,
.rank-head h2,
.index-entry h2,
.page-hero h1 {
    margin: 8px 0 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.section-heading p,
.index-entry p,
.page-hero p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.66);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.28);
    transition: transform 0.22s ease, border 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.52);
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

.poster-frame {
    position: relative;
    aspect-ratio: 16 / 22;
    margin: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

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

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

.card-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    border: 1px solid rgba(34, 211, 238, 0.35);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.66);
    color: var(--cyan);
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 800;
}

.card-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #06111d;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 34px rgba(34, 211, 238, 0.28);
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
}

.movie-card h3 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 19px;
    line-height: 1.28;
}

.movie-card p {
    min-height: 48px;
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mini-tags span,
.detail-tags span {
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.1);
    color: #a5f3fc;
    padding: 6px 10px;
    font-size: 13px;
}

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

.movie-card-compact h3 {
    font-size: 17px;
}

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

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

.category-tile {
    position: relative;
    min-height: 188px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.7);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.28);
}

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

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

.category-tile span,
.category-tile strong {
    position: relative;
    z-index: 2;
}

.category-tile span {
    color: white;
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    margin-top: 8px;
    color: var(--soft);
    font-size: 14px;
    line-height: 1.6;
}

.category-tile:hover img {
    transform: scale(1.08);
    opacity: 0.46;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
}

.rank-panel,
.ranking-side,
.story-card,
.index-entry {
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.68);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.26);
}

.rank-panel,
.ranking-side {
    position: sticky;
    top: 92px;
    padding: 22px;
}

.rank-head {
    margin-bottom: 18px;
}

.rank-item {
    display: grid;
    grid-template-columns: 40px 52px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-number {
    color: var(--cyan);
    font-weight: 900;
    font-size: 20px;
}

.rank-item img {
    width: 52px;
    height: 68px;
    object-fit: cover;
    border-radius: 12px;
    background: #0f172a;
}

.rank-copy {
    min-width: 0;
}

.rank-copy strong,
.rank-copy em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-copy strong {
    color: white;
}

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

.rank-score {
    color: var(--yellow);
    font-weight: 900;
}

.panel-link {
    width: 100%;
    margin-top: 18px;
}

.index-entry {
    margin-bottom: 72px;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 96px 0 62px;
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(59, 130, 246, 0.08)),
        rgba(15, 23, 42, 0.38);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.page-hero:before {
    content: "";
    position: absolute;
    inset: -120px 12% auto auto;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.18);
    filter: blur(34px);
}

.page-hero .shell {
    position: relative;
    z-index: 1;
}

.filter-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.filter-toolbar-wide .card-filter-input {
    max-width: 540px;
}

.empty-state {
    display: none;
    margin: 26px 0 0;
    color: var(--muted);
}

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

.rankings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 32px;
    padding-bottom: 72px;
}

.rank-list-large {
    border: 1px solid rgba(148, 163, 184, 0.17);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.62);
    padding: 12px 24px;
}

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

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
    filter: blur(1px);
}

.detail-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.24)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.28));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 34px 0 70px;
}

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

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

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

.detail-poster {
    margin: 0;
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: var(--shadow);
    background: #0f172a;
}

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

.detail-info h1 {
    margin: 16px 0;
    font-size: clamp(38px, 6vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.detail-info p {
    max-width: 820px;
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: 20px;
    line-height: 1.75;
}

.player-section {
    margin-top: -86px;
    position: relative;
    z-index: 5;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.2);
    aspect-ratio: 16 / 9;
}

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

.player-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.22), rgba(2, 6, 23, 0.62));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-layer span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #06111d;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-size: 34px;
    box-shadow: 0 20px 54px rgba(34, 211, 238, 0.35);
}

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

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    padding-top: 42px;
}

.story-card {
    padding: 28px;
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.story-card p {
    margin: 0;
    color: var(--soft);
    line-height: 1.9;
}

.meta-card {
    grid-column: 1 / -1;
}

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

.meta-card div {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    padding: 16px;
    background: rgba(2, 6, 23, 0.34);
}

.meta-card dt {
    color: var(--muted);
    margin-bottom: 6px;
}

.meta-card dd {
    margin: 0;
    color: var(--text);
    font-weight: 700;
}

.site-footer {
    margin-top: 78px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.66);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    padding: 40px 0;
    align-items: center;
}

.footer-brand {
    margin-bottom: 14px;
}

.site-footer p {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

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

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

@media (max-width: 1080px) {
    .movie-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .rank-panel,
    .ranking-side {
        position: static;
    }
}

@media (max-width: 860px) {
    .header-shell {
        flex-wrap: wrap;
        padding: 12px 0;
    }

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

    .site-nav {
        order: 5;
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        margin: 0;
        padding-top: 8px;
    }

    .site-nav.is-open {
        display: flex;
    }

    .header-search {
        order: 4;
        width: 100%;
    }

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

    .large-search,
    .filter-toolbar,
    .index-entry {
        flex-direction: column;
        align-items: stretch;
    }

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

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

    .detail-content,
    .meta-card dl {
        grid-template-columns: 1fr;
    }

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

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

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

    .category-grid,
    .category-grid-large {
        grid-template-columns: 1fr;
    }

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

    .movie-card h3 {
        font-size: 16px;
    }

    .movie-card p,
    .mini-tags {
        display: none;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-controls {
        bottom: 18px;
    }

    .hero-arrow {
        width: 40px;
        height: 40px;
    }

    .quick-search-panel {
        margin-top: -34px;
        padding: 18px;
    }

    .section-block {
        padding-top: 54px;
    }

    .page-hero {
        padding: 70px 0 44px;
    }
}
