:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: #0f172a;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.22);
    --blue: #2563eb;
    --cyan: #22d3ee;
    --glow: rgba(37, 99, 235, 0.34);
    --radius: 18px;
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 5%, rgba(37, 99, 235, 0.25), transparent 32rem),
        radial-gradient(circle at 85% 15%, rgba(34, 211, 238, 0.16), transparent 28rem),
        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;
}

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: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.94), rgba(15, 23, 42, 0.96));
    box-shadow: 0 12px 40px rgba(2, 6, 23, 0.42);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.nav-wrap {
    width: min(1280px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

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

.brand-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #eff6ff;
    background: linear-gradient(135deg, #2563eb, #22d3ee);
    box-shadow: 0 0 22px var(--glow);
    font-size: 0.9rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.nav-links a {
    padding: 8px 0;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: #ffffff;
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 8px 12px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

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

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

.mobile-menu a {
    padding: 10px 12px;
    border-radius: 12px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.06);
}

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

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

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

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.88);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.28);
    font-size: 0.92rem;
    font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 18px 0 16px;
    color: #ffffff;
    font-size: clamp(2.5rem, 6vw, 5.6rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 620px;
    color: #dbeafe;
    font-size: clamp(1rem, 1.9vw, 1.35rem);
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hero-meta span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after {
    content: "";
    width: 1px;
    height: 16px;
    margin-left: 10px;
    background: rgba(203, 213, 225, 0.36);
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 13px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 20px 42px rgba(37, 99, 235, 0.38);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: none;
}

.hero-control {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.48);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-control:hover {
    background: rgba(37, 99, 235, 0.8);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 38px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

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

.section,
.page-hero,
.detail-wrap {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.section {
    padding: 62px 0 0;
}

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

.section-kicker {
    color: #38bdf8;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.section h2,
.page-hero h1,
.detail-section h2 {
    margin: 6px 0 0;
    color: #ffffff;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.15;
}

.section-desc,
.page-hero p {
    max-width: 720px;
    color: var(--muted);
    margin: 10px 0 0;
}

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

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

.movie-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.24);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-link:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(96, 165, 250, 0.58);
    box-shadow: var(--shadow);
}

.poster-box {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0f172a;
}

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

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

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

.year-badge,
.play-dot {
    position: absolute;
    z-index: 2;
}

.year-badge {
    top: 12px;
    left: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.76);
    font-size: 0.8rem;
    font-weight: 800;
}

.play-dot {
    right: 12px;
    bottom: 12px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.88);
    box-shadow: 0 0 24px rgba(37, 99, 235, 0.48);
}

.card-body {
    padding: 15px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 1.05rem;
    line-height: 1.3;
}

.card-body p {
    margin: 0 0 12px;
    min-height: 3.1em;
    color: #94a3b8;
    font-size: 0.92rem;
    overflow: hidden;
}

.card-meta {
    gap: 8px;
    font-size: 0.84rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 8px;
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.13);
    border: 1px solid rgba(14, 165, 233, 0.2);
    font-size: 0.76rem;
}

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

.category-card {
    position: relative;
    min-height: 168px;
    padding: 22px;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.74), rgba(15, 23, 42, 0.92));
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.24);
}

.category-card::before {
    content: "";
    position: absolute;
    inset: auto -30px -52px auto;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(34, 211, 238, 0.18);
    filter: blur(4px);
}

.category-card h3 {
    position: relative;
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 1.25rem;
}

.category-card p {
    position: relative;
    margin: 0 0 20px;
    color: #cbd5e1;
    font-size: 0.92rem;
}

.category-card span {
    position: relative;
    color: #67e8f9;
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 160px;
    gap: 12px;
    margin: 24px 0;
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.22);
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    outline: 0;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.72);
    padding: 0 12px;
}

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

.page-hero {
    padding: 54px 0 16px;
}

.page-hero h1 {
    max-width: 920px;
}

.ranking-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ranking-item a {
    display: grid;
    grid-template-columns: 58px 96px minmax(160px, 1fr) minmax(260px, 1.3fr) 210px;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.76);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-item a:hover {
    transform: translateX(4px);
    border-color: rgba(96, 165, 250, 0.58);
}

.rank-number {
    color: #60a5fa;
    font-size: 1.3rem;
    font-weight: 900;
    text-align: center;
}

.ranking-item img {
    width: 96px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
}

.rank-title {
    color: #ffffff;
    font-weight: 800;
}

.rank-desc,
.rank-meta {
    color: #94a3b8;
    font-size: 0.9rem;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: #020617;
}

.detail-hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.26;
}

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

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72));
}

.detail-wrap {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 38px;
    padding: 52px 0;
    align-items: center;
}

.detail-title h1 {
    margin-top: 12px;
}

.detail-title p {
    color: #cbd5e1;
    font-size: 1.1rem;
}

.detail-cover {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

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

.player-section {
    width: min(1280px, calc(100% - 32px));
    margin: 44px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
    gap: 24px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(96, 165, 250, 0.24);
    background: #000000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.36));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-prompt {
    display: grid;
    justify-items: center;
    gap: 12px;
}

.player-prompt span {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #22d3ee);
    box-shadow: 0 0 38px rgba(37, 99, 235, 0.55);
    font-size: 1.5rem;
}

.player-prompt strong {
    font-size: 1.1rem;
}

.detail-panel,
.detail-section {
    padding: 24px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 18px 46px rgba(2, 6, 23, 0.22);
}

.detail-panel h2,
.detail-section h2 {
    margin-top: 0;
}

.detail-panel p,
.detail-section p {
    color: #cbd5e1;
}

.detail-content-grid {
    width: min(1280px, calc(100% - 32px));
    margin: 24px auto 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

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

.compact-card {
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.78);
}

.compact-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.compact-card span {
    display: block;
    padding: 10px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
}

.no-results {
    display: none;
    margin: 22px 0 0;
    padding: 22px;
    border-radius: 16px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

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

.site-footer {
    margin-top: 72px;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 58, 138, 0.78), rgba(15, 23, 42, 0.98));
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 0.9fr;
    gap: 36px;
    padding: 42px 0 28px;
}

.footer-brand p,
.footer-links a {
    color: #94a3b8;
}

.footer-links {
    display: grid;
    gap: 8px;
    align-content: start;
}

.footer-links strong {
    color: #ffffff;
    margin-bottom: 6px;
}

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

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    font-size: 0.92rem;
    text-align: center;
}

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

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

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

    .ranking-item a {
        grid-template-columns: 50px 90px minmax(120px, 1fr);
    }

    .rank-desc,
    .rank-meta {
        display: none;
    }
}

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

    .menu-toggle {
        display: inline-flex;
    }

    .hero {
        height: 640px;
        min-height: 640px;
    }

    .hero-control {
        display: none;
    }

    .filter-panel,
    .player-section,
    .detail-content-grid,
    .detail-wrap,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        order: -1;
    }

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

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

@media (max-width: 560px) {
    .nav-wrap,
    .mobile-menu,
    .section,
    .page-hero,
    .detail-wrap,
    .player-section,
    .detail-content-grid,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 22px, 1280px);
    }

    .hero-content {
        width: min(100% - 22px, 1280px);
    }

    .hero h1,
    .page-hero h1,
    .detail-title h1 {
        font-size: 2.3rem;
    }

    .movie-grid,
    .category-grid,
    .related-strip {
        grid-template-columns: 1fr;
    }

    .ranking-item a {
        grid-template-columns: 44px 78px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-number {
        font-size: 1rem;
    }
}
