:root {
    color-scheme: light;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --ink: #0f172a;
    --muted: #64748b;
    --line: rgba(15, 23, 42, 0.10);
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --emerald: #34d399;
    --emerald-deep: #059669;
    --cyan: #22d3ee;
    --amber: #f59e0b;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 38%, #f8fafc 100%);
    line-height: 1.65;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.24);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #04111d;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 10px 24px rgba(34, 211, 238, 0.26);
}

.brand-name {
    font-size: 1.2rem;
    background: linear-gradient(90deg, #6ee7b7, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    background: rgba(52, 211, 153, 0.16);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 10px;
    background: #ffffff;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

body.menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

body.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
}

body.menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-link {
    display: block;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.82);
    font-weight: 700;
}

.mobile-link:hover,
.mobile-link.active {
    color: var(--emerald);
}

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

.hero-slider {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    color: #ffffff;
    background: var(--slate-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.65s ease;
}

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

.hero-image {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 72% 28%, rgba(34, 211, 238, 0.28), transparent 36%), linear-gradient(135deg, #0f172a, #020617 62%);
}

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

.hero-image img.cover-image-empty {
    opacity: 0;
}

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.68) 46%, rgba(2, 6, 23, 0.15) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.52), transparent 52%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 86px 0 92px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 42px;
    align-items: center;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid rgba(52, 211, 153, 0.38);
    border-radius: 999px;
    color: #bbf7d0;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(10px);
    font-weight: 800;
}

.hero-copy h1,
.page-hero h1,
.detail-title h1 {
    margin: 18px 0 16px;
    font-size: clamp(2.3rem, 6vw, 5rem);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

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

.hero-copy p {
    margin: 0;
    max-width: 650px;
    color: rgba(226, 232, 240, 0.92);
    font-size: clamp(1rem, 1.8vw, 1.22rem);
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

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

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

.btn-primary {
    color: #03121d;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 18px 38px rgba(34, 211, 238, 0.28);
}

.btn-ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(12px);
}

.hero-panel {
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.52);
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.32);
    backdrop-filter: blur(18px);
}

.hero-panel h2 {
    margin: 0 0 14px;
    font-size: 1.15rem;
}

.hero-panel a {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-panel a + a {
    margin-top: 10px;
}

.hero-panel a:hover {
    background: rgba(52, 211, 153, 0.16);
    transform: translateX(3px);
}

.hero-panel img {
    width: 74px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 14px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

.hero-panel strong {
    display: block;
    line-height: 1.35;
}

.hero-panel span {
    display: block;
    margin-top: 4px;
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.86rem;
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 46px;
    background: linear-gradient(90deg, var(--emerald), var(--cyan));
}

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

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

.section-kicker {
    margin: 0 0 6px;
    color: var(--emerald-deep);
    font-weight: 900;
}

.section-head h2,
.page-hero h1,
.detail-section h2 {
    margin: 0;
    letter-spacing: -0.04em;
}

.section-head h2 {
    font-size: clamp(1.65rem, 3vw, 2.45rem);
}

.section-head p {
    max-width: 650px;
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(52, 211, 153, 0.42);
    box-shadow: var(--shadow);
}

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4.1;
    background: radial-gradient(circle at 30% 20%, rgba(52, 211, 153, 0.36), transparent 36%), linear-gradient(135deg, #1e293b, #020617);
}

.poster-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.2s ease;
}

.cover-image-empty {
    opacity: 0;
}

.movie-card:hover .poster-image {
    transform: scale(1.08);
}

.poster-shade {
    position: absolute;
    inset: auto 0 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent);
}

.score-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    color: #04111d;
    font-size: 0.82rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    box-shadow: 0 10px 22px rgba(245, 158, 11, 0.26);
}

.score-chip {
    right: 12px;
}

.rank-badge {
    left: 12px;
}

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

.movie-meta-line,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.86rem;
}

.movie-meta-line span,
.detail-meta span,
.rank-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--surface-soft);
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 1.06rem;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-content h3 a:hover {
    color: var(--emerald-deep);
}

.movie-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.93rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-list span {
    padding: 4px 8px;
    border-radius: 999px;
    color: #047857;
    background: rgba(52, 211, 153, 0.13);
    font-size: 0.78rem;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    min-height: 172px;
    overflow: hidden;
    padding: 22px;
    border-radius: var(--radius-lg);
    color: #ffffff;
    background: radial-gradient(circle at 82% 22%, rgba(34, 211, 238, 0.34), transparent 34%), linear-gradient(135deg, #0f172a, #1e293b 60%, #064e3b);
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.16);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.22);
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

.category-card p {
    margin: 0;
    color: rgba(226, 232, 240, 0.82);
    font-size: 0.92rem;
}

.category-card span {
    position: absolute;
    left: 22px;
    bottom: 18px;
    color: #bbf7d0;
    font-weight: 900;
}

.page-hero {
    color: #ffffff;
    background: radial-gradient(circle at 82% 18%, rgba(34, 211, 238, 0.28), transparent 36%), linear-gradient(135deg, #020617 0%, #0f172a 58%, #064e3b 100%);
    padding: 78px 0 60px;
}

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

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: rgba(226, 232, 240, 0.88);
    font-size: 1.1rem;
}

.filter-panel {
    margin: 26px 0 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 900;
}

.search-box input,
.filter-panel select {
    width: 100%;
    height: 46px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 14px;
    padding: 0 14px;
    color: var(--ink);
    background: #ffffff;
    outline: none;
}

.search-box input:focus,
.filter-panel select:focus {
    border-color: rgba(52, 211, 153, 0.75);
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

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

.empty-state {
    display: none;
    margin: 26px 0;
    padding: 26px;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    border-radius: var(--radius-lg);
    color: var(--muted);
    text-align: center;
    background: #ffffff;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 64px 88px 1fr 72px;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.rank-index {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #03121d;
    font-weight: 900;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

.rank-thumb {
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #1e293b, #020617);
}

.rank-thumb img {
    width: 88px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.rank-content h3 {
    margin: 0 0 6px;
    font-size: 1.08rem;
}

.rank-content p {
    margin: 0 0 8px;
    color: var(--muted);
}

.rank-row strong {
    justify-self: end;
    color: var(--amber);
    font-size: 1.35rem;
}

.detail-hero {
    color: #ffffff;
    background: radial-gradient(circle at 74% 18%, rgba(34, 211, 238, 0.26), transparent 34%), linear-gradient(135deg, #020617, #0f172a 60%, #052e2b);
}

.detail-hero-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: radial-gradient(circle at 35% 24%, rgba(52, 211, 153, 0.32), transparent 36%), linear-gradient(135deg, #1e293b, #020617);
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.32);
}

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

.detail-title h1 {
    font-size: clamp(2rem, 4vw, 4.2rem);
}

.detail-title p {
    max-width: 780px;
    color: rgba(226, 232, 240, 0.9);
    font-size: 1.08rem;
}

.detail-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 74px;
    height: 74px;
    border-radius: 24px;
    color: #04111d;
    font-size: 1.55rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.28);
}

.detail-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 54px auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
}

.detail-section {
    margin-bottom: 28px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 14px 42px rgba(15, 23, 42, 0.07);
}

.detail-section h2 {
    margin-bottom: 14px;
    font-size: 1.45rem;
}

.detail-section p {
    margin: 0 0 12px;
    color: #334155;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #000000;
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.22);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: radial-gradient(circle at center, rgba(52, 211, 153, 0.28), transparent 32%), linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.25));
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-start span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 22px;
    border-radius: 999px;
    color: #03121d;
    font-weight: 900;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.26);
}

.player-shell.is-playing .player-start {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.side-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: 0 14px 42px rgba(15, 23, 42, 0.07);
}

.side-card + .side-card {
    margin-top: 18px;
}

.side-card h2,
.side-card h3 {
    margin: 0 0 14px;
}

.side-link {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.18s ease;
}

.side-link:hover {
    background: var(--surface-soft);
}

.side-link img {
    width: 58px;
    aspect-ratio: 1;
    border-radius: 12px;
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b, #020617);
}

.side-link strong {
    display: block;
    line-height: 1.35;
}

.side-link span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.82rem;
}

.site-footer {
    margin-top: 70px;
    color: rgba(226, 232, 240, 0.82);
    background: linear-gradient(135deg, #020617, #0f172a 60%, #020617);
}

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

.footer-main {
    max-width: 680px;
}

.footer-brand {
    color: #ffffff;
    font-size: 1.24rem;
}

.footer-main p {
    margin: 12px 0 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin: 24px 0;
}

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

.footer-copy {
    margin: 0;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    color: rgba(226, 232, 240, 0.62);
}

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

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

    .hero-content,
    .detail-hero-inner,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        max-width: 620px;
    }
}

@media (max-width: 760px) {
    .site-nav {
        height: 62px;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

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

    .hero-slider {
        min-height: 78vh;
    }

    .hero-content {
        padding: 58px 0 80px;
    }

    .hero-panel {
        display: none;
    }

    .section-head {
        display: block;
    }

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

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

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

    .rank-row strong {
        display: none;
    }

    .rank-thumb img {
        width: 68px;
    }

    .detail-hero-inner {
        padding: 34px 0;
    }

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

    .detail-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .movie-grid,
    .movie-grid.wide,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .brand-name {
        font-size: 1.02rem;
    }

    .hero-actions,
    .section-actions,
    .detail-actions {
        display: grid;
    }

    .btn {
        width: 100%;
    }
}
