:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: rgba(15, 23, 42, 0.82);
    --panel-deep: #111827;
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --blue: #2563eb;
    --orange: #f97316;
    --green: #22c55e;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 18% 8%, rgba(34, 211, 238, 0.18), transparent 28rem),
        radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.14), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #08111f 42%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(2, 6, 23, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1220px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #001018;
    background: linear-gradient(135deg, var(--cyan), #67e8f9 46%, #38bdf8);
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.35);
    font-size: 14px;
}

.brand-text {
    font-size: 21px;
}

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

.nav-link,
.mobile-link {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 650;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #ecfeff;
    background: rgba(8, 145, 178, 0.24);
}

.nav-link:hover {
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--text);
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
    border-radius: 999px;
}

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

.mobile-menu.open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    display: block;
    padding: 12px 14px;
}

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

.hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: #020617;
}

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.9s ease;
    pointer-events: none;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 36%, rgba(2, 6, 23, 0.2) 72%, rgba(2, 6, 23, 0.88) 100%),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.3) 30%, rgba(2, 6, 23, 0.18) 100%),
        var(--hero-image),
        radial-gradient(circle at 65% 35%, rgba(34, 211, 238, 0.26), transparent 24rem),
        linear-gradient(135deg, #0f172a, #082f49);
    background-size: cover;
    background-position: center;
    filter: saturate(1.08);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(90deg, black, transparent 70%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1220px, calc(100% - 32px));
    min-height: 650px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 54px;
    padding: 70px 0 84px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 13px;
    border: 1px solid rgba(34, 211, 238, 0.34);
    border-radius: 999px;
    color: #67e8f9;
    background: rgba(8, 145, 178, 0.13);
    font-size: 13px;
    font-weight: 750;
}

.hero h1 {
    max-width: 780px;
    margin: 20px 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-desc {
    max-width: 760px;
    margin: 0 0 26px;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.meta-row,
.rank-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta span,
.detail-meta span,
.meta-row span,
.rank-meta span,
.stat-pill,
.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #dbeafe;
    font-size: 13px;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.btn-secondary,
.btn-ghost {
    color: var(--text);
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid var(--line);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
    transform: translateY(-2px);
}

.hero-side-card {
    min-height: 458px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 30px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.95)),
        var(--hero-image),
        linear-gradient(135deg, #0f172a, #083344);
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow);
}

.hero-side-overlay {
    min-height: inherit;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    background: linear-gradient(180deg, transparent 20%, rgba(2, 6, 23, 0.88) 100%);
}

.hero-side-overlay strong {
    display: block;
    margin-bottom: 8px;
    font-size: 22px;
}

.hero-side-overlay p {
    margin: 0;
    color: var(--soft);
}

.hero-control {
    position: absolute;
    z-index: 3;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: white;
    background: rgba(2, 6, 23, 0.54);
    backdrop-filter: blur(10px);
}

.hero-control:hover {
    background: rgba(8, 145, 178, 0.6);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 32px;
    background: var(--cyan);
}

.section {
    margin: 68px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 7px 0 0;
    color: var(--muted);
}

.section-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #67e8f9;
    font-weight: 750;
    white-space: nowrap;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.62));
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.20);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.48);
    box-shadow: 0 26px 60px rgba(8, 145, 178, 0.18);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 10%, rgba(34, 211, 238, 0.28), transparent 44%),
        linear-gradient(135deg, #111827, #0f172a 45%, #083344);
}

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

.movie-card:hover .poster-wrap img {
    transform: scale(1.06);
}

.poster-badge,
.poster-play {
    position: absolute;
    z-index: 2;
}

.poster-badge {
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ecfeff;
    background: rgba(8, 145, 178, 0.82);
    font-size: 12px;
    font-weight: 800;
}

.poster-play {
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #001018;
    background: rgba(103, 232, 249, 0.92);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

.card-body {
    padding: 16px;
}

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

.card-line {
    min-height: 50px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
}

.meta-row {
    gap: 7px;
    margin-bottom: 10px;
}

.meta-row span {
    padding: 4px 8px;
    font-size: 12px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-row span {
    padding: 4px 8px;
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.12);
    font-size: 12px;
}

.feature-panel,
.category-panel,
.filter-panel,
.detail-card,
.player-card,
.rank-list,
.year-panel {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.feature-panel {
    padding: 28px;
    background:
        radial-gradient(circle at 0 0, rgba(34, 211, 238, 0.14), transparent 28rem),
        linear-gradient(135deg, rgba(8, 47, 73, 0.82), rgba(15, 23, 42, 0.82));
}

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

.category-card {
    min-height: 148px;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 47, 73, 0.52));
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.42);
}

.category-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
}

.category-card span,
.category-card p {
    color: var(--muted);
    font-size: 13px;
}

.category-card p {
    margin: 10px 0 0;
}

.page-hero {
    position: relative;
    margin: 38px 0 42px;
    padding: clamp(32px, 6vw, 64px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.22), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(8, 47, 73, 0.72));
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 900px;
    margin: 18px 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 860px;
    margin: 0;
    color: #cbd5e1;
    font-size: 17px;
}

.breadcrumb {
    margin: 28px 0 18px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: #67e8f9;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 0.6fr));
    gap: 12px;
    margin-bottom: 28px;
    padding: 18px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.68);
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(34, 211, 238, 0.7);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.rank-list {
    overflow: hidden;
}

.rank-item {
    display: grid;
    grid-template-columns: 78px 92px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.rank-item:last-child {
    border-bottom: 0;
}

.rank-num {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #001018;
    background: linear-gradient(135deg, #67e8f9, #22d3ee);
    font-weight: 900;
    font-size: 20px;
}

.rank-cover {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: linear-gradient(135deg, #0f172a, #083344);
}

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

.rank-info h2,
.rank-info h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

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

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

.player-card {
    overflow: hidden;
}

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

.player-box video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.65)),
        var(--poster-image),
        linear-gradient(135deg, #0f172a, #083344);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button {
    width: 84px;
    height: 84px;
    border: 0;
    border-radius: 999px;
    color: #001018;
    background: linear-gradient(135deg, #67e8f9, #22d3ee);
    box-shadow: 0 22px 60px rgba(34, 211, 238, 0.38);
    font-size: 30px;
}

.player-title {
    padding: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.player-title h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.16;
}

.player-title p {
    margin: 0;
    color: var(--soft);
}

.detail-card {
    padding: 24px;
}

.detail-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-card p {
    margin: 0 0 16px;
    color: var(--soft);
}

.detail-card p:last-child {
    margin-bottom: 0;
}

.side-poster {
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(135deg, #0f172a, #083344);
}

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

.sidebar-stack {
    display: grid;
    gap: 18px;
}

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

.stat-box {
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.42);
}

.stat-box strong {
    display: block;
    font-size: 22px;
}

.stat-box span {
    color: var(--muted);
    font-size: 12px;
}

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

.year-panel {
    padding: 22px;
    margin-bottom: 18px;
}

.year-panel h3 {
    margin: 0 0 18px;
    font-size: 24px;
}

.empty-tip {
    display: none;
    padding: 30px;
    border: 1px dashed rgba(148, 163, 184, 0.32);
    border-radius: 22px;
    color: var(--muted);
    text-align: center;
}

.empty-tip.show {
    display: block;
}

@media (max-width: 1100px) {
    .nav-links {
        display: none;
    }

    .menu-button {
        display: block;
    }

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

    .hero-side-card {
        display: none;
    }

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

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

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

@media (max-width: 760px) {
    .header-inner,
    .main-wrap,
    .hero-content,
    .mobile-menu {
        width: min(100% - 22px, 1220px);
    }

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

    .hero-control {
        display: none;
    }

    .hero-actions,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

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

    .rank-item {
        grid-template-columns: 48px 72px minmax(0, 1fr);
    }

    .rank-action {
        grid-column: 3;
    }

    .rank-num {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 16px;
    }

    .card-body {
        padding: 13px;
    }

    .card-line {
        display: none;
    }

    .page-hero {
        border-radius: 24px;
    }
}

@media (max-width: 480px) {
    .brand-text {
        font-size: 18px;
    }

    .movie-grid,
    .movie-grid.compact-grid,
    .movie-grid.list-grid,
    .related-grid,
    .category-strip,
    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .rank-cover {
        display: none;
    }

    .rank-action {
        grid-column: 2;
    }
}
