:root {
    color-scheme: dark;
    --page-bg: #020617;
    --panel-bg: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.92);
    --panel-soft: rgba(30, 41, 59, 0.62);
    --line: rgba(14, 116, 144, 0.24);
    --line-bright: rgba(56, 189, 248, 0.48);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --faint: #64748b;
    --brand: #38bdf8;
    --brand-deep: #0891b2;
    --gold: #f59e0b;
    --radius: 22px;
    --shadow: 0 26px 60px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 34rem),
        radial-gradient(circle at 85% 10%, rgba(245, 158, 11, 0.12), transparent 28rem),
        var(--page-bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    border-bottom: 1px solid rgba(14, 116, 144, 0.18);
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(18px);
}

.site-header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}

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

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), #22d3ee);
    color: #ffffff;
    box-shadow: 0 14px 32px rgba(56, 189, 248, 0.28);
    font-size: 13px;
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--muted);
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
    color: #ffffff;
    background: rgba(14, 165, 233, 0.18);
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.78);
    color: var(--text);
    border-radius: 999px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 210px;
    padding: 10px 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--line-bright);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.08);
}

.header-search button,
.mobile-search button,
.filter-panel button {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    padding: 10px 16px;
    box-shadow: 0 12px 28px rgba(8, 145, 178, 0.22);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: #e2e8f0;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.94);
}

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

.page-main {
    padding-top: 72px;
}

.hero {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.97) 0%, rgba(2, 6, 23, 0.82) 42%, rgba(2, 6, 23, 0.28) 72%, rgba(2, 6, 23, 0.72) 100%),
        var(--poster),
        radial-gradient(circle at 70% 40%, rgba(14, 165, 233, 0.28), transparent 30rem),
        #0f172a;
    background-size: cover;
    background-position: center;
}

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

.hero-content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 720px;
    transform: translateY(24px);
}

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

.hero-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.66);
    color: #bae6fd;
    padding: 7px 12px;
    font-size: 13px;
    backdrop-filter: blur(12px);
}

.hero h1 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 650px;
    margin: 0 0 22px;
    color: #cbd5e1;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.8;
}

.hero-tags,
.detail-tags,
.mini-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.detail-tags span,
.mini-tags span {
    display: inline-flex;
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 999px;
    background: rgba(8, 47, 73, 0.42);
    color: #7dd3fc;
    padding: 6px 10px;
    font-size: 12px;
}

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

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), #22d3ee);
    box-shadow: 0 18px 42px rgba(8, 145, 178, 0.34);
}

.button-secondary {
    color: #e0f2fe;
    border: 1px solid rgba(56, 189, 248, 0.32);
    background: rgba(15, 23, 42, 0.68);
}

.button-primary:hover,
.button-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 42px rgba(8, 145, 178, 0.28);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 52px;
    height: 52px;
    transform: translateY(-50%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.58);
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    backdrop-filter: blur(12px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(15, 23, 42, 0.9);
    transform: translateY(-50%) scale(1.06);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 18px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.86);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 42px;
    background: var(--brand);
}

.content-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 72px;
}

.home-sections {
    display: grid;
    gap: 54px;
}

.content-section,
.highlight-panel,
.text-panel {
    position: relative;
}

.highlight-panel,
.text-panel {
    border: 1px solid rgba(14, 116, 144, 0.18);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.44));
    box-shadow: var(--shadow);
    padding: 28px;
}

.highlight-panel.wide {
    padding: 18px;
}

.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title span {
    color: var(--gold);
    font-size: 20px;
}

.section-title h2 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(22px, 3vw, 30px);
    letter-spacing: -0.02em;
}

.section-more {
    color: #38bdf8;
    font-size: 14px;
}

.section-more:hover {
    color: #7dd3fc;
}

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

.movie-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    border: 1px solid rgba(14, 116, 144, 0.2);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, border 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.52);
    box-shadow: 0 24px 48px rgba(8, 145, 178, 0.18);
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.92)),
        var(--poster),
        linear-gradient(135deg, rgba(14, 165, 233, 0.38), rgba(30, 41, 59, 0.92));
    background-size: cover;
    background-position: center;
}

.poster-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 36%, rgba(2, 6, 23, 0.72));
    opacity: 0.74;
    transition: opacity 0.24s ease;
}

.movie-card:hover .poster-frame::after {
    opacity: 0.9;
}

.poster-glow {
    position: absolute;
    inset: auto 18px 18px 18px;
    height: 24%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.26), transparent 70%);
    z-index: 1;
}

.play-badge {
    position: absolute;
    inset: 50% auto auto 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    transform: translate(-50%, -50%) scale(0.84);
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.78);
    color: #ffffff;
    opacity: 0;
    box-shadow: 0 18px 36px rgba(14, 165, 233, 0.28);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .play-badge {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.year-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 3;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.72);
    color: #cbd5e1;
    padding: 5px 9px;
    font-size: 12px;
    backdrop-filter: blur(10px);
}

.card-body {
    display: grid;
    gap: 8px;
    padding: 15px;
}

.card-body strong {
    color: #f8fafc;
    font-size: 16px;
    line-height: 1.35;
    min-height: 42px;
}

.card-body small {
    color: var(--faint);
    font-style: normal;
}

.card-body em {
    display: -webkit-box;
    min-height: 40px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    font-style: normal;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body.compact strong {
    min-height: auto;
}

.movie-rail {
    display: grid;
    grid-auto-columns: 230px;
    grid-auto-flow: column;
    gap: 18px;
    overflow-x: auto;
    padding: 2px 0 18px;
    scrollbar-width: thin;
    scrollbar-color: rgba(14, 165, 233, 0.7) rgba(15, 23, 42, 0.6);
}

.rail-item {
    min-width: 0;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 48px 70px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(14, 116, 144, 0.16);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.36);
    padding: 12px;
    transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.46);
    background: rgba(15, 23, 42, 0.68);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 14px 28px rgba(245, 158, 11, 0.22);
}

.rank-thumb {
    display: block;
    width: 70px;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    background:
        linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.84)),
        var(--poster),
        linear-gradient(135deg, rgba(14, 165, 233, 0.36), rgba(15, 23, 42, 0.9));
    background-size: cover;
    background-position: center;
}

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

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

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

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

.rank-score {
    color: var(--gold);
    font-weight: 800;
}

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

.category-grid.large {
    margin-bottom: 54px;
}

.category-card {
    min-height: 172px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    border: 1px solid rgba(14, 116, 144, 0.22);
    border-radius: 22px;
    overflow: hidden;
    padding: 22px;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.92)),
        var(--poster),
        linear-gradient(135deg, rgba(14, 165, 233, 0.3), rgba(15, 23, 42, 0.92));
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, border 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.52);
}

.category-card span {
    color: #ffffff;
    font-weight: 800;
    font-size: 24px;
}

.category-card strong {
    color: #bae6fd;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
}

.sub-hero {
    min-height: 310px;
    display: flex;
    align-items: flex-end;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 16% 24%, rgba(14, 165, 233, 0.28), transparent 28rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.96));
}

.sub-hero > div {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 46px;
}

.sub-hero span {
    display: inline-flex;
    margin-bottom: 14px;
    color: #7dd3fc;
    font-weight: 700;
}

.sub-hero h1 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: clamp(34px, 6vw, 60px);
    letter-spacing: -0.04em;
}

.sub-hero p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
    font-size: 17px;
}

.filter-panel {
    position: sticky;
    top: 86px;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 160px auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 26px;
    border: 1px solid rgba(14, 116, 144, 0.2);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.72);
    padding: 14px;
    backdrop-filter: blur(18px);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
}

.filter-panel button {
    min-height: 44px;
}

.empty-state {
    display: none;
    margin-bottom: 22px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.66);
    color: var(--muted);
    padding: 20px;
    text-align: center;
}

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

.is-filtered-out {
    display: none;
}

.watch-hero {
    position: relative;
    min-height: 720px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.84), rgba(2, 6, 23, 0.78)),
        var(--poster),
        radial-gradient(circle at 80% 30%, rgba(14, 165, 233, 0.28), transparent 28rem),
        #020617;
    background-size: cover;
    background-position: center;
}

.watch-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 32px;
    align-items: center;
}

.player-card,
.detail-panel {
    border: 1px solid rgba(14, 116, 144, 0.24);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.player-card {
    padding: 14px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #000000;
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.58));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), #22d3ee);
    box-shadow: 0 24px 60px rgba(14, 165, 233, 0.38);
    font-size: 34px;
    padding-left: 5px;
}

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

.detail-panel {
    padding: 28px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 14px;
}

.breadcrumb a:hover {
    color: #38bdf8;
}

.detail-panel h1 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.one-line {
    margin: 0 0 20px;
    color: #cbd5e1;
    line-height: 1.8;
}

.detail-content {
    display: grid;
    gap: 34px;
}

.text-panel h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 24px;
}

.text-panel p {
    margin: 0;
    color: #cbd5e1;
    line-height: 2;
    font-size: 16px;
}

.site-footer {
    border-top: 1px solid rgba(14, 116, 144, 0.2);
    background: rgba(2, 6, 23, 0.88);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
    padding: 42px 0 30px;
}

.footer-inner p {
    max-width: 420px;
    color: var(--muted);
    line-height: 1.8;
}

.footer-inner h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 16px;
}

.footer-links {
    display: grid;
    gap: 9px;
}

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    border-top: 1px solid rgba(14, 116, 144, 0.16);
    padding: 20px 0 28px;
    color: var(--faint);
    text-align: center;
    font-size: 13px;
}

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

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

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

    .rank-list {
        grid-template-columns: 1fr;
    }

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

    .watch-grid {
        grid-template-columns: 1fr;
        padding: 42px 0;
    }
}

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

    .page-main {
        padding-top: 64px;
    }

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

    .hero-slide {
        padding: 70px 0 96px;
    }

    .hero-arrow {
        display: none;
    }

    .content-wrap {
        width: min(100% - 24px, 1180px);
        padding-top: 32px;
    }

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

    .movie-rail {
        grid-auto-columns: 178px;
    }

    .card-body {
        padding: 12px;
    }

    .card-body strong {
        font-size: 14px;
    }

    .rank-row {
        grid-template-columns: 42px 58px minmax(0, 1fr);
    }

    .rank-score {
        display: none;
    }

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

    .filter-panel {
        position: relative;
        top: auto;
        grid-template-columns: 1fr;
    }

    .watch-hero {
        min-height: auto;
        padding: 26px 0;
    }

    .detail-panel,
    .highlight-panel,
    .text-panel {
        padding: 20px;
    }

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

@media (max-width: 460px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }

    .hero-meta span,
    .detail-meta span {
        font-size: 12px;
    }

    .player-overlay span {
        width: 74px;
        height: 74px;
        font-size: 28px;
    }
}
