:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --blue: #2563eb;
    --cyan: #22d3ee;
    --yellow: #facc15;
    --red: #ef4444;
    --radius: 22px;
    --shadow: 0 28px 70px rgba(2, 6, 23, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 0%, rgba(37, 99, 235, 0.28), transparent 34rem),
        radial-gradient(circle at 85% 8%, rgba(34, 211, 238, 0.16), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    backdrop-filter: blur(18px);
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.94));
    border-bottom: 1px solid var(--line);
}

.nav-shell {
    max-width: 1220px;
    height: 68px;
    padding: 0 22px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.35);
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link,
.nav-dropdown > button {
    border: 0;
    color: #cbd5e1;
    padding: 10px 15px;
    border-radius: 13px;
    background: transparent;
    cursor: pointer;
    transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-dropdown:hover > button {
    color: #fff;
    background: rgba(37, 99, 235, 0.82);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 210px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: 0.22s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-panel a {
    display: block;
    color: #cbd5e1;
    padding: 10px 12px;
    border-radius: 12px;
}

.dropdown-panel a:hover {
    color: #fff;
    background: rgba(30, 41, 59, 0.94);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 13px;
    background: rgba(30, 41, 59, 0.9);
    padding: 10px;
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #e2e8f0;
}

main {
    overflow: hidden;
}

.hero {
    max-width: 1360px;
    padding: 22px;
    margin: 0 auto;
}

.hero-stage {
    position: relative;
    height: min(74vh, 720px);
    min-height: 560px;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid var(--line);
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.03);
    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-bg,
.detail-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.28) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, transparent 52%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: end;
    gap: 42px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 72px 38px 70px;
}

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

.eyebrow,
.hero-kicker {
    margin: 0 0 10px;
    color: #67e8f9;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 5.6rem);
    line-height: 0.96;
    font-weight: 950;
    letter-spacing: -0.06em;
    text-shadow: 0 20px 42px rgba(0, 0, 0, 0.45);
}

.hero-summary,
.page-hero p,
.lead-text {
    color: #dbeafe;
    font-size: 1.08rem;
    line-height: 1.75;
    margin: 20px 0 0;
}

.hero-tags,
.tag-row,
.movie-meta,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

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

.hero-tags span,
.tag-row span,
.movie-meta span {
    color: #dbeafe;
    border: 1px solid rgba(147, 197, 253, 0.24);
    background: rgba(15, 23, 42, 0.56);
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 0.82rem;
}

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

.primary-btn,
.ghost-btn,
.section-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 800;
    transition: 0.22s ease;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--blue), #0891b2);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.35);
}

.primary-btn:hover,
.section-action:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.ghost-btn {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.64);
    border: 1px solid var(--line);
}

.hero-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.58);
}

.hero-poster img,
.poster-wrap img,
.compact-card img,
.ranking-poster img,
.detail-poster img,
.category-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-dots {
    position: absolute;
    right: 34px;
    bottom: 28px;
    display: flex;
    gap: 9px;
    z-index: 5;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.58);
    cursor: pointer;
    transition: 0.2s ease;
}

.hero-dots button.is-active {
    width: 32px;
    background: #60a5fa;
}

.category-strip,
.content-section,
.split-section,
.category-overview,
.filter-panel,
.ranking-list-page,
.detail-content,
.player-section {
    max-width: 1220px;
    margin: 0 auto;
    padding: 26px 22px;
}

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

.category-strip a,
.category-card > a,
.story-card,
.info-card,
.filter-panel,
.rank-panel,
.spotlight-panel,
.ranking-card {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.52));
    border-radius: var(--radius);
    box-shadow: 0 18px 46px rgba(2, 6, 23, 0.24);
}

.category-strip a {
    display: block;
    padding: 18px;
    min-height: 118px;
    transition: 0.22s ease;
}

.category-strip a:hover,
.movie-card:hover,
.compact-card:hover,
.category-card > a:hover,
.ranking-card:hover {
    transform: translateY(-4px);
    border-color: rgba(96, 165, 250, 0.45);
}

.category-strip strong,
.category-card h2 {
    display: block;
    color: #fff;
    margin-bottom: 8px;
    font-size: 1.04rem;
}

.category-strip span,
.category-card p,
.section-head p,
.movie-card-body p,
.ranking-card p,
.story-card p,
.site-footer p {
    color: var(--muted);
    line-height: 1.7;
}

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

.section-head.compact {
    align-items: center;
}

.section-head h2,
.story-card h2,
.info-card h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2.4vw, 2.35rem);
    letter-spacing: -0.04em;
}

.section-head p {
    max-width: 680px;
    margin: 8px 0 0;
}

.section-action {
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.16);
    border: 1px solid rgba(96, 165, 250, 0.24);
    white-space: nowrap;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
    transition: 0.22s ease;
}

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent);
}

.score-badge,
.play-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 900;
    font-size: 0.78rem;
}

.score-badge {
    left: 10px;
    top: 10px;
    color: #111827;
    background: var(--yellow);
    padding: 5px 8px;
}

.play-badge {
    right: 10px;
    bottom: 10px;
    color: #fff;
    background: rgba(37, 99, 235, 0.86);
    padding: 6px 10px;
}

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

.movie-title,
.ranking-title {
    display: block;
    color: #fff;
    font-weight: 850;
    line-height: 1.35;
}

.movie-title:hover,
.ranking-title:hover {
    color: #93c5fd;
}

.movie-card-body p {
    min-height: 50px;
    margin: 8px 0 12px;
    font-size: 0.88rem;
}

.movie-meta {
    gap: 6px;
}

.movie-meta span {
    color: #cbd5e1;
    padding: 4px 8px;
    font-size: 0.74rem;
}

.tag-row {
    margin-top: 10px;
    gap: 6px;
}

.tag-row span {
    color: #93c5fd;
    padding: 4px 8px;
    font-size: 0.72rem;
}

.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.rank-panel,
.spotlight-panel {
    padding: 22px;
}

.rank-list {
    display: grid;
    gap: 10px;
}

.rank-row {
    display: grid;
    grid-template-columns: 42px 58px 1fr 48px;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.36);
    transition: 0.22s ease;
}

.rank-row:hover {
    background: rgba(30, 41, 59, 0.85);
}

.rank-num {
    color: #60a5fa;
    font-weight: 900;
    font-size: 1.08rem;
}

.rank-row img {
    width: 58px;
    height: 78px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-info strong,
.rank-info em {
    display: block;
}

.rank-info strong {
    color: #fff;
}

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

.rank-row b {
    color: var(--yellow);
    text-align: right;
}

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

.compact-card {
    position: relative;
    min-height: 138px;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: #0f172a;
    transition: 0.22s ease;
}

.compact-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 64%);
}

.compact-card span,
.compact-card em {
    position: absolute;
    z-index: 1;
    left: 11px;
    right: 11px;
}

.compact-card span {
    bottom: 12px;
    font-weight: 800;
}

.compact-card em {
    top: 10px;
    color: #111827;
    background: var(--yellow);
    width: max-content;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 900;
}

.page-hero {
    max-width: 1220px;
    margin: 0 auto;
    padding: 62px 22px 28px;
}

.small-hero > div {
    position: relative;
    overflow: hidden;
    min-height: 230px;
    padding: 48px;
    border-radius: 28px;
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at 90% 20%, rgba(34, 211, 238, 0.2), transparent 22rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.72));
    box-shadow: var(--shadow);
}

.small-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4.2rem);
}

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

.category-card > a {
    display: block;
    padding: 24px;
    min-height: 320px;
    transition: 0.22s ease;
}

.category-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    margin-bottom: 16px;
}

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

.category-preview .compact-card {
    min-height: 160px;
}

.filter-panel {
    display: flex;
    gap: 14px;
    align-items: end;
    margin-top: 22px;
    padding: 18px 22px;
}

.filter-panel label {
    flex: 1;
    display: grid;
    gap: 8px;
    color: #cbd5e1;
    font-weight: 700;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    color: #fff;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 15px;
    outline: none;
    background: rgba(2, 6, 23, 0.54);
    padding: 13px 15px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

.ranking-list-page {
    display: grid;
    gap: 14px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 94px 1fr;
    gap: 18px;
    padding: 14px;
    transition: 0.22s ease;
}

.ranking-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    background: #0f172a;
}

.ranking-poster span {
    position: absolute;
    left: 8px;
    top: 8px;
    display: grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    color: #111827;
    background: var(--yellow);
    border-radius: 999px;
    font-weight: 900;
}

.detail-hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.34;
    filter: blur(2px);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.64)),
        linear-gradient(0deg, #020617, transparent 48%);
}

.detail-layout {
    position: relative;
    z-index: 1;
    max-width: 1220px;
    margin: 0 auto;
    padding: 68px 22px 52px;
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 46px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #0f172a;
    box-shadow: var(--shadow);
}

.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    color: #93c5fd;
    margin-bottom: 20px;
}

.lead-text {
    max-width: 780px;
    color: #dbeafe;
}

.player-section {
    padding-top: 0;
}

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

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 0;
    cursor: pointer;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.28), rgba(2, 6, 23, 0.74));
    transition: 0.24s ease;
}

.play-cover:hover {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.38), rgba(2, 6, 23, 0.62));
}

.play-circle {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    color: #fff;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.4);
}

.video-shell.is-playing .play-cover {
    opacity: 0;
    pointer-events: none;
}

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

.story-card,
.info-card {
    padding: 24px;
}

.story-card p {
    margin: 14px 0 0;
    color: #d1d5db;
}

.info-card ul {
    list-style: none;
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 16px 0 0;
}

.info-card li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.info-card span {
    color: var(--muted);
}

.info-card strong {
    color: #fff;
    text-align: right;
}

.related-section {
    padding-top: 10px;
}

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

.footer-grid {
    max-width: 1220px;
    margin: 0 auto;
    padding: 44px 22px;
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 1fr;
    gap: 28px;
}

.site-footer h3 {
    margin: 0 0 12px;
}

.site-footer a {
    display: block;
    color: #cbd5e1;
    margin: 8px 0;
}

.site-footer a:hover {
    color: #93c5fd;
}

.footer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-tags a {
    margin: 0;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.8);
}

.copyright {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 22px 26px;
    color: #64748b;
    font-size: 0.9rem;
}

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

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

    .hero-content {
        grid-template-columns: minmax(0, 1fr) 280px;
    }

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

@media (max-width: 860px) {
    .mobile-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        left: 14px;
        right: 14px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

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

    .nav-dropdown {
        display: none;
    }

    .hero-stage {
        min-height: 680px;
        height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-items: end;
        padding: 46px 22px 70px;
    }

    .hero-poster {
        width: min(260px, 66vw);
        order: -1;
    }

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

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

    .detail-poster {
        width: min(320px, 76vw);
    }

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

    .filter-panel {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 580px) {
    .nav-shell {
        padding: 0 14px;
    }

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

    .hero,
    .category-strip,
    .content-section,
    .split-section,
    .category-overview,
    .filter-panel,
    .ranking-list-page,
    .detail-content,
    .player-section,
    .page-hero {
        padding-left: 14px;
        padding-right: 14px;
    }

    .hero-stage,
    .small-hero > div,
    .video-shell {
        border-radius: 22px;
    }

    .small-hero > div {
        padding: 30px 22px;
    }

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

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

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

    .movie-card-body p {
        display: none;
    }

    .ranking-card {
        grid-template-columns: 76px 1fr;
    }

    .rank-row {
        grid-template-columns: 34px 48px 1fr 40px;
        gap: 8px;
    }

    .rank-row img {
        width: 48px;
        height: 68px;
    }
}
