:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111c33;
    --panel-strong: #172554;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --brand: #38bdf8;
    --brand-strong: #2563eb;
    --brand-soft: rgba(56, 189, 248, 0.16);
    --gold: #facc15;
    --danger: #fb7185;
    --shadow: 0 26px 80px rgba(2, 6, 23, 0.48);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.22), transparent 32rem),
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.18), transparent 30rem),
        var(--bg);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

.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.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.28);
    backdrop-filter: blur(18px);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    color: white;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.4);
}

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

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

.nav a {
    position: relative;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav a:hover,
.nav a.active {
    color: #7dd3fc;
    transform: translateY(-1px);
}

.header-search {
    position: relative;
    width: min(290px, 30vw);
}

.header-search input,
.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(125, 211, 252, 0.22);
    border-radius: 999px;
    outline: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
    border-color: rgba(56, 189, 248, 0.78);
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.68);
}

.mobile-nav {
    display: none;
    padding: 0 0 18px;
}

.mobile-nav.is-open {
    display: grid;
    gap: 10px;
}

.mobile-nav a {
    padding: 12px 14px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 14px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 640px;
    padding: 68px 0 48px;
    background:
        linear-gradient(115deg, rgba(2, 6, 23, 0.96), rgba(30, 64, 175, 0.84) 48%, rgba(8, 47, 73, 0.92)),
        radial-gradient(circle at 78% 20%, rgba(56, 189, 248, 0.28), transparent 24rem);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(6px);
    pointer-events: none;
}

.hero::before {
    inset: -180px auto auto 8%;
    width: 420px;
    height: 420px;
    background: rgba(37, 99, 235, 0.2);
}

.hero::after {
    right: -120px;
    bottom: -180px;
    width: 460px;
    height: 460px;
    background: rgba(6, 182, 212, 0.18);
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
    align-items: center;
    gap: 44px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.14);
    border: 1px solid rgba(125, 211, 252, 0.2);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero h1,
.page-hero h1 {
    margin: 18px 0 16px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.07em;
}

.hero-title-gradient {
    background: linear-gradient(90deg, #ffffff, #bfdbfe 45%, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead,
.page-hero p {
    max-width: 760px;
    color: #cbd5e1;
    font-size: clamp(16px, 1.8vw, 20px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    color: white;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    border: 1px solid rgba(125, 211, 252, 0.28);
    border-radius: 999px;
    font-weight: 850;
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 22px 42px rgba(37, 99, 235, 0.36);
}

.btn.secondary {
    background: rgba(15, 23, 42, 0.68);
    color: #dbeafe;
    box-shadow: none;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 34px;
}

.metric {
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.48);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.metric strong {
    display: block;
    color: #f8fafc;
    font-size: 24px;
    line-height: 1.1;
}

.metric span {
    color: var(--muted);
    font-size: 13px;
}

.hero-stage {
    position: relative;
    min-height: 500px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.feature-card {
    position: relative;
    overflow: hidden;
    height: 500px;
    border: 1px solid rgba(125, 211, 252, 0.18);
    border-radius: 32px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.feature-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
    transition: transform 0.6s ease;
}

.feature-card:hover img {
    transform: scale(1.08);
}

.feature-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 30px;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.26) 34%, rgba(2, 6, 23, 0.95));
}

.feature-meta,
.card-meta,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.pill.brand {
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.18);
    border-color: rgba(125, 211, 252, 0.24);
}

.pill.gold {
    color: #fef3c7;
    background: rgba(250, 204, 21, 0.12);
    border-color: rgba(250, 204, 21, 0.22);
}

.feature-title {
    margin: 14px 0 8px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.08;
    font-weight: 900;
}

.feature-desc {
    color: #cbd5e1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-dots {
    position: absolute;
    left: 30px;
    bottom: 24px;
    z-index: 3;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 26px;
    height: 7px;
    padding: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.36);
}

.hero-dot.is-active {
    background: #38bdf8;
}

.section {
    padding: 56px 0;
}

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

.section-kicker {
    color: #7dd3fc;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.section h2,
.page-title {
    margin: 6px 0 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.section-subtitle {
    max-width: 680px;
    color: var(--muted);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    box-shadow: 0 12px 36px rgba(2, 6, 23, 0.26);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 24px 46px rgba(14, 165, 233, 0.16);
}

.poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: #0b1120;
}

.poster.wide {
    aspect-ratio: 16 / 9;
}

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

.movie-card:hover .poster img,
.rank-card:hover .poster img {
    transform: scale(1.08);
}

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

.play-float {
    position: absolute;
    inset: auto 12px 12px auto;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: white;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    border-radius: 999px;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.38);
}

.rating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 4px 8px;
    color: #fef3c7;
    background: rgba(2, 6, 23, 0.72);
    border: 1px solid rgba(250, 204, 21, 0.18);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 9px;
    padding: 14px;
}

.card-title {
    margin: 0;
    color: white;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 900;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 156px;
    padding: 22px;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.72), rgba(8, 47, 73, 0.58));
    border: 1px solid rgba(125, 211, 252, 0.18);
    border-radius: 24px;
    box-shadow: 0 16px 42px rgba(2, 6, 23, 0.2);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    right: -44px;
    bottom: -44px;
    width: 126px;
    height: 126px;
    background: rgba(125, 211, 252, 0.12);
    border-radius: 999px;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(125, 211, 252, 0.48);
}

.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 8px;
    font-size: 21px;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #cbd5e1;
    font-size: 14px;
}

.category-count {
    position: relative;
    z-index: 1;
    display: inline-flex;
    margin-top: 16px;
    color: #bae6fd;
    font-size: 13px;
    font-weight: 900;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 72px 120px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-card:hover {
    transform: translateX(4px);
    border-color: rgba(56, 189, 248, 0.42);
}

.rank-no {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: white;
    background: linear-gradient(135deg, #1d4ed8, #0e7490);
    border-radius: 18px;
    font-size: 18px;
    font-weight: 900;
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-hero {
    padding: 58px 0 36px;
    background:
        linear-gradient(120deg, rgba(30, 64, 175, 0.34), rgba(2, 6, 23, 0.32)),
        radial-gradient(circle at 72% 22%, rgba(56, 189, 248, 0.16), transparent 24rem);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 14px;
    margin: 24px 0;
    padding: 18px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
}

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

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 46px 0;
    background: linear-gradient(130deg, rgba(2, 6, 23, 0.95), rgba(30, 64, 175, 0.72), rgba(8, 47, 73, 0.84));
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--detail-cover);
    background-size: cover;
    background-position: center;
    opacity: 0.16;
    filter: blur(6px);
    transform: scale(1.04);
}

.detail-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, 0.2);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

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

.detail-content h1 {
    margin: 12px 0 16px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.detail-content p {
    color: #dbeafe;
    font-size: 18px;
}

.player-wrap {
    margin-top: 28px;
    overflow: hidden;
    background: #020617;
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.player-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.player-poster {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    background-position: center;
    background-size: cover;
    cursor: pointer;
}

.player-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.78));
}

.player-poster.is-hidden {
    display: none;
}

.player-button {
    position: relative;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    color: white;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    border-radius: 999px;
    box-shadow: 0 22px 54px rgba(37, 99, 235, 0.4);
}

.player-button svg {
    margin-left: 6px;
}

.content-panel {
    padding: 26px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
}

.content-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-panel p {
    margin: 0;
    color: #cbd5e1;
    font-size: 16px;
}

.content-panel p + p {
    margin-top: 16px;
}

.detail-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.side-panel {
    position: sticky;
    top: 92px;
    padding: 20px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
}

.side-panel h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

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

.side-item {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.side-item:hover {
    background: rgba(56, 189, 248, 0.08);
}

.side-item img {
    width: 62px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.side-item strong {
    display: block;
    color: #f8fafc;
    line-height: 1.35;
}

.side-item span {
    color: var(--muted);
    font-size: 13px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.pagination-note {
    margin-top: 22px;
    color: var(--muted);
    font-size: 14px;
}

.site-footer {
    margin-top: 42px;
    padding: 42px 0;
    background: #020617;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.footer-title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 900;
}

.footer-text,
.footer-list a,
.footer-bottom {
    color: var(--muted);
    font-size: 14px;
}

.footer-list {
    display: grid;
    gap: 8px;
}

.footer-list a:hover {
    color: #7dd3fc;
}

.footer-bottom {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

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

    .hero-grid,
    .detail-main {
        grid-template-columns: 1fr;
    }

    .hero-stage {
        min-height: 460px;
    }
}

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

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

    .hero {
        min-height: auto;
        padding: 42px 0 34px;
    }

    .hero-grid,
    .detail-grid,
    .footer-grid,
    .search-panel {
        grid-template-columns: 1fr;
    }

    .feature-card {
        height: 420px;
    }

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

    .rank-card {
        grid-template-columns: 46px 86px minmax(0, 1fr);
    }

    .rank-card .btn {
        grid-column: 1 / -1;
    }

    .section-header,
    .footer-bottom {
        align-items: start;
        flex-direction: column;
    }

    .side-panel {
        position: static;
    }
}

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

    .logo {
        font-size: 20px;
    }

    .hero h1,
    .page-hero h1,
    .detail-content h1 {
        letter-spacing: -0.04em;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .feature-card {
        height: 360px;
        border-radius: 24px;
    }

    .feature-overlay {
        padding: 22px;
    }

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

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