:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.72);
    --line: rgba(59, 130, 246, 0.24);
    --line-strong: rgba(96, 165, 250, 0.48);
    --text: #f8fafc;
    --muted: #94a3b8;
    --blue: #3b82f6;
    --cyan: #22d3ee;
    --gold: #f59e0b;
    --red: #f43f5e;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.24), transparent 34rem),
        radial-gradient(circle at 86% 9%, rgba(8, 145, 178, 0.18), transparent 32rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
}

body.nav-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.9), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(96, 165, 250, 0.22);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #22d3ee);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.logo-text {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.03em;
    background: linear-gradient(90deg, #60a5fa, #67e8f9);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    color: #dbeafe;
    font-size: 15px;
    font-weight: 650;
}

.main-nav a {
    position: relative;
    transition: color 0.25s ease;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #60a5fa, #22d3ee);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #93c5fd;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    transform: scaleX(1);
}

.header-search {
    position: relative;
    min-width: 240px;
    max-width: 320px;
    flex: 1 1 auto;
}

.header-search input,
.filter-input,
.filter-select {
    width: 100%;
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #e2e8f0;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.header-search input {
    padding: 10px 42px 10px 16px;
}

.header-search button {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #fff;
}

.header-search input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: rgba(96, 165, 250, 0.72);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
    background: rgba(15, 23, 42, 0.95);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
    color: #bfdbfe;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(96, 165, 250, 0.18);
    padding: 14px 0 18px;
}

.mobile-panel a {
    display: block;
    padding: 12px 0;
    color: #dbeafe;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.hero-slider {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border-bottom: 1px solid rgba(96, 165, 250, 0.18);
    background: #020617;
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::before,
.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-slide::before {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 45%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-slide::after {
    background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 46%, rgba(2, 6, 23, 0.38) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(650px, 100%);
    padding: 68px 0;
}

.hero-kicker,
.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(96, 165, 250, 0.34);
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.18);
    color: #93c5fd;
    font-size: 14px;
    font-weight: 750;
}

.hero-kicker {
    padding: 8px 15px;
    margin-bottom: 18px;
}

.pill {
    padding: 7px 12px;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.06em;
    text-shadow: 0 14px 48px rgba(0, 0, 0, 0.45);
}

.hero-copy p {
    margin: 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.85;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 28px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    color: #fff;
    box-shadow: 0 15px 36px rgba(37, 99, 235, 0.32);
}

.btn-ghost {
    border-color: rgba(96, 165, 250, 0.32);
    background: rgba(15, 23, 42, 0.6);
    color: #dbeafe;
}

.btn-ghost:hover {
    border-color: rgba(96, 165, 250, 0.72);
    background: rgba(30, 41, 59, 0.78);
}

.hero-thumbs {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 36px;
    z-index: 3;
    display: flex;
    gap: 12px;
}

.hero-dot {
    width: 72px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.42);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
    width: 106px;
    background: linear-gradient(90deg, #60a5fa, #22d3ee);
}

.page-main {
    padding: 42px 0 72px;
}

.section-block {
    margin: 0 0 54px;
}

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

.section-title h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.15;
    font-weight: 920;
    letter-spacing: -0.03em;
}

.section-title p,
.page-title p,
.category-intro,
.movie-intro {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: var(--bg-card);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(96, 165, 250, 0.62);
    box-shadow: 0 26px 70px rgba(37, 99, 235, 0.18);
}

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

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

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

.movie-card:hover .poster-wrap img {
    transform: scale(1.08);
    filter: saturate(1.1);
}

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 62%);
    opacity: 0.95;
}

.card-badge,
.card-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 850;
    color: #fff;
    backdrop-filter: blur(12px);
}

.card-badge {
    left: 10px;
    bottom: 10px;
    background: rgba(37, 99, 235, 0.82);
}

.card-year {
    right: 10px;
    top: 10px;
    background: rgba(2, 6, 23, 0.76);
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: linear-gradient(135deg, #f97316, #facc15);
    color: #1f2937;
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 9px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 850;
    color: #f8fafc;
}

.card-body p {
    margin: 0;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.65;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.card-meta span {
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(30, 41, 59, 0.8);
    color: #cbd5e1;
    font-size: 12px;
}

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

.category-card {
    min-height: 168px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid rgba(96, 165, 250, 0.22);
    border-radius: 24px;
    padding: 22px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(8, 145, 178, 0.08)),
        rgba(15, 23, 42, 0.7);
    box-shadow: var(--shadow);
    transition: transform 0.28s ease, border-color 0.28s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(96, 165, 250, 0.7);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.7;
    font-size: 14px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 160px;
    gap: 14px;
    margin: 26px 0 24px;
    padding: 16px;
    border: 1px solid rgba(96, 165, 250, 0.18);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.58);
}

.filter-input,
.filter-select {
    height: 46px;
    padding: 0 16px;
}

.filter-select {
    border-radius: 14px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 24px;
    color: #93c5fd;
    font-size: 14px;
}

.breadcrumb span {
    color: #64748b;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background:
        radial-gradient(circle at center, rgba(37, 99, 235, 0.26), transparent 22rem),
        linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.34));
}

.play-overlay.hidden {
    display: none;
}

.play-icon {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #22d3ee);
    box-shadow: 0 18px 44px rgba(37, 99, 235, 0.42);
    font-size: 32px;
    padding-left: 5px;
}

.play-text {
    font-size: 18px;
    font-weight: 900;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.detail-card,
.side-card {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.7);
    box-shadow: var(--shadow);
}

.detail-card {
    margin-top: 22px;
    padding: 26px;
}

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 50px);
    line-height: 1.15;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 22px;
}

.detail-meta span,
.tag {
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(37, 99, 235, 0.16);
    border: 1px solid rgba(96, 165, 250, 0.22);
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 750;
}

.detail-card h2,
.side-card h2 {
    margin: 28px 0 12px;
    font-size: 24px;
    font-weight: 900;
}

.detail-card p {
    color: #cbd5e1;
    line-height: 1.92;
    margin: 0 0 16px;
}

.side-card {
    padding: 18px;
}

.side-poster {
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 16 / 9;
    margin-bottom: 16px;
}

.side-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-list {
    display: grid;
    gap: 12px;
}

.related-item {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.1);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.related-item:hover {
    transform: translateX(3px);
    border-color: rgba(96, 165, 250, 0.55);
}

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

.related-item strong {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
}

.related-item span {
    color: #94a3b8;
    font-size: 12px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px 120px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.15);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.rank-row:hover {
    transform: translateY(-3px);
    border-color: rgba(96, 165, 250, 0.58);
}

.rank-num {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #f97316, #facc15);
    color: #172033;
    font-weight: 950;
}

.rank-row img {
    width: 120px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
}

.rank-info strong {
    display: block;
    font-size: 18px;
    margin-bottom: 7px;
}

.rank-info span,
.rank-extra {
    color: #94a3b8;
    font-size: 14px;
}

.tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.empty-state {
    display: none;
    padding: 28px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(96, 165, 250, 0.18);
    color: #cbd5e1;
}

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

.site-footer {
    border-top: 1px solid rgba(96, 165, 250, 0.18);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(2, 6, 23, 0.95));
    padding: 44px 0;
    color: #94a3b8;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 26px;
}

.footer-grid h3 {
    margin: 0 0 12px;
    color: #e2e8f0;
    font-size: 16px;
}

.footer-grid p,
.footer-grid a {
    color: #94a3b8;
    line-height: 1.8;
    font-size: 14px;
}

.footer-grid a {
    display: block;
    margin: 6px 0;
}

.footer-bottom {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 13px;
}

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

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

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

@media (max-width: 860px) {
    .header-inner {
        height: 64px;
    }

    .main-nav,
    .header-search {
        display: none;
    }

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

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

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

    .hero-copy {
        padding: 76px 0 96px;
    }

    .hero-thumbs {
        left: 16px;
        right: 16px;
        bottom: 24px;
    }

    .hero-dot {
        flex: 1;
        width: auto;
    }

    .hero-dot.is-active {
        width: auto;
    }

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

    .filter-panel {
        grid-template-columns: 1fr;
    }

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

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

    .logo-text {
        font-size: 20px;
    }

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

    .hero-copy p {
        font-size: 16px;
    }

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

    .rank-row {
        grid-template-columns: 42px 88px 1fr;
    }

    .rank-extra {
        display: none;
    }

    .rank-row img {
        width: 88px;
    }

    .related-item {
        grid-template-columns: 86px 1fr;
    }

    .related-item img {
        width: 86px;
    }

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