:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #07111f;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(14, 165, 233, 0.22);
    --line-strong: rgba(14, 165, 233, 0.42);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --dim: #64748b;
    --sky: #38bdf8;
    --cyan: #22d3ee;
    --amber: #f59e0b;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(2, 132, 199, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 16% 8%, rgba(14, 165, 233, 0.14), transparent 32rem),
        radial-gradient(circle at 88% 18%, rgba(34, 211, 238, 0.1), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.9));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 48px rgba(3, 105, 161, 0.2);
    backdrop-filter: blur(16px);
}

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

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

.logo span:last-child,
.footer-logo {
    font-size: 21px;
    background: linear-gradient(90deg, var(--sky), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, #0284c7, #22d3ee);
    box-shadow: 0 0 22px rgba(56, 189, 248, 0.38);
}

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

.desktop-nav > a,
.nav-drop > a {
    color: #cbd5e1;
    font-size: 15px;
    transition: color 0.2s ease;
}

.desktop-nav > a:hover,
.nav-drop:hover > a,
.desktop-nav .is-active,
.nav-drop .is-active {
    color: var(--sky);
}

.nav-drop {
    position: relative;
    padding: 22px 0;
}

.drop-panel {
    position: absolute;
    top: 62px;
    left: -18px;
    width: 180px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: 0.2s ease;
}

.nav-drop:hover .drop-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.drop-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: #cbd5e1;
    font-size: 14px;
}

.drop-panel a:hover {
    background: rgba(14, 165, 233, 0.14);
    color: var(--sky);
}

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

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

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

.header-search input:focus,
.page-filter input:focus,
.page-filter select:focus,
.big-search input:focus {
    border-color: rgba(56, 189, 248, 0.82);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.header-search button,
.big-search button,
.page-filter button {
    padding: 10px 16px;
    border-radius: 999px;
    color: white;
    background: linear-gradient(90deg, #0284c7, #06b6d4);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--line);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #cbd5e1;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    padding: 18px 24px 24px;
    background: rgba(15, 23, 42, 0.98);
    border-top: 1px solid var(--line);
}

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

.mobile-panel form {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.mobile-panel input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(2, 6, 23, 0.86);
}

.mobile-panel button {
    border-radius: 999px;
    padding: 0 16px;
    color: white;
    background: linear-gradient(90deg, #0284c7, #06b6d4);
}

.mobile-panel.is-open {
    display: block;
}

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

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.86) 38%, rgba(2, 6, 23, 0.16) 78%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 44%);
}

.hero-content {
    position: absolute;
    inset: 0;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding-top: 72px;
    max-width: 1280px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    color: #bae6fd;
    border: 1px solid rgba(56, 189, 248, 0.34);
    background: rgba(8, 47, 73, 0.46);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    letter-spacing: 0.04em;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 18px 0 14px;
    max-width: 760px;
    color: white;
    font-size: clamp(38px, 6vw, 78px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 24px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.tag-row,
.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-row span,
.quick-links a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(10px);
    font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
    padding: 12px 24px;
    color: white;
    background: linear-gradient(90deg, #0284c7, #22d3ee);
    box-shadow: 0 16px 42px rgba(14, 165, 233, 0.28);
}

.ghost-btn,
.section-more {
    padding: 12px 20px;
    color: #dbeafe;
    border: 1px solid var(--line-strong);
    background: rgba(15, 23, 42, 0.6);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 42px rgba(14, 165, 233, 0.22);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: white;
    background: rgba(2, 6, 23, 0.62);
    border: 1px solid var(--line);
    backdrop-filter: blur(12px);
    font-size: 40px;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 32px;
    height: 5px;
    padding: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.34);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: linear-gradient(90deg, var(--sky), var(--cyan));
}

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

.section {
    padding: 70px 0;
}

.section-raised {
    margin-top: -72px;
    position: relative;
    z-index: 4;
}

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

.section-head.compact {
    margin-bottom: 18px;
}

.section-head h2,
.feature-panel h2,
.content-card h2 {
    margin: 10px 0 0;
    color: white;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

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

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(14, 165, 233, 0.15);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.52));
    box-shadow: 0 16px 44px rgba(2, 6, 23, 0.28);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.52);
    box-shadow: 0 22px 64px rgba(14, 165, 233, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.88);
}

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

.movie-card:hover img {
    transform: scale(1.05);
}

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

.score-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    color: white;
    font-weight: 800;
    font-size: 13px;
    backdrop-filter: blur(12px);
}

.score-pill {
    right: 10px;
    bottom: 10px;
    background: rgba(245, 158, 11, 0.9);
}

.rank-badge {
    left: 10px;
    top: 10px;
    background: linear-gradient(135deg, #0284c7, #22d3ee);
}

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

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--dim);
    font-size: 12px;
}

.movie-card h3 {
    margin: 8px 0 8px;
    color: white;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--sky);
}

.movie-card p {
    min-height: 48px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    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: 18px;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.42s ease;
}

.category-tile:hover img {
    transform: scale(1.06);
}

.category-tile-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.18));
}

.category-tile strong,
.category-tile em {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 2;
}

.category-tile strong {
    bottom: 64px;
    color: white;
    font-size: 24px;
}

.category-tile em {
    bottom: 22px;
    color: #cbd5e1;
    font-style: normal;
    font-size: 14px;
    line-height: 1.5;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
    gap: 28px;
    align-items: start;
}

.feature-panel,
.content-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 28px;
    background:
        linear-gradient(135deg, rgba(14, 165, 233, 0.14), transparent 38%),
        rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.feature-panel p,
.content-card p,
.page-hero p,
.detail-info .lead {
    color: #cbd5e1;
    line-height: 1.85;
}

.big-search {
    display: flex;
    gap: 10px;
    margin: 24px 0 18px;
}

.big-search input {
    flex: 1;
    padding: 13px 16px;
}

.page-shell {
    padding-top: 104px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 300px;
    padding: 48px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(14, 165, 233, 0.18), transparent 40%),
        radial-gradient(circle at 88% 22%, rgba(34, 211, 238, 0.16), transparent 20rem),
        rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin-bottom: 12px;
}

.small-hero {
    min-height: 260px;
}

.flush-top {
    padding-top: 34px;
}

.page-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 12px;
    width: min(760px, 100%);
    margin-top: 26px;
}

.page-filter.wide {
    grid-template-columns: minmax(0, 1fr) 180px 160px;
}

.page-filter input,
.page-filter select {
    width: 100%;
    padding: 14px 16px;
}

.empty-state {
    display: none;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-align: center;
    color: var(--muted);
    background: var(--panel);
}

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

.detail-page {
    padding-top: 96px;
}

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

.breadcrumb a:hover {
    color: var(--sky);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.18), transparent 28rem),
        rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--line);
    aspect-ratio: 2 / 3;
    background: rgba(2, 6, 23, 0.55);
}

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

.detail-info h1 {
    font-size: clamp(36px, 5vw, 68px);
}

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

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(2, 6, 23, 0.36);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.tag-row.large {
    margin-bottom: 26px;
}

.player-section {
    padding-bottom: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: black;
    box-shadow: 0 24px 70px rgba(14, 165, 233, 0.2);
    aspect-ratio: 16 / 9;
}

.player-shell video,
.player-cover,
.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-shell video {
    z-index: 1;
    background: black;
    object-fit: contain;
}

.player-cover {
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: white;
    background: rgba(2, 6, 23, 0.72);
    cursor: pointer;
}

.player-cover img {
    object-fit: cover;
    opacity: 0.48;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.24), rgba(2, 6, 23, 0.68));
}

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

.play-orb {
    position: relative;
    z-index: 4;
    width: 92px;
    height: 92px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    background: linear-gradient(135deg, #0284c7, #22d3ee);
    box-shadow: 0 0 60px rgba(56, 189, 248, 0.48);
    font-size: 38px;
    padding-left: 6px;
}

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding-top: 34px;
}

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

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.72);
}

.footer-grid {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 38px 0;
    display: grid;
    grid-template-columns: 1.5fr 0.7fr 0.7fr;
    gap: 30px;
}

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

.footer-grid strong,
.footer-grid a {
    display: block;
}

.footer-grid strong {
    margin-bottom: 12px;
    color: white;
}

.footer-grid a:not(.footer-logo) {
    margin-top: 9px;
    color: var(--muted);
}

.footer-grid a:hover {
    color: var(--sky);
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: var(--dim);
    border-top: 1px solid rgba(14, 165, 233, 0.12);
    text-align: center;
    font-size: 14px;
}

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

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

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

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

    .menu-toggle {
        display: block;
    }

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

    .hero-content {
        padding-top: 96px;
        padding-bottom: 80px;
    }

    .hero-arrow {
        display: none;
    }

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

    .two-column,
    .detail-hero,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .page-filter,
    .page-filter.wide {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .nav-wrap,
    .section,
    .page-shell,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 24px, 1280px);
    }

    .logo span:last-child {
        font-size: 18px;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 36px;
    }

    .hero p,
    .page-hero p,
    .detail-info .lead {
        font-size: 15px;
    }

    .section {
        padding: 42px 0;
    }

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

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

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

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

    .movie-card h3 {
        font-size: 15px;
    }

    .movie-card p {
        font-size: 12px;
    }

    .page-hero,
    .detail-hero,
    .feature-panel,
    .content-card {
        padding: 22px;
        border-radius: 24px;
    }

    .play-orb {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
