:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111c31;
    --line: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --blue: #2563eb;
    --blue-light: #60a5fa;
    --cyan: #67e8f9;
    --green: #4ade80;
    --gold: #facc15;
    --radius: 18px;
    --shadow: 0 24px 60px rgba(0, 0, 0, .35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: radial-gradient(circle at 20% 0%, rgba(37, 99, 235, .22), transparent 28%), var(--bg);
    color: var(--text);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.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, .96), rgba(30, 41, 59, .94), rgba(15, 23, 42, .96));
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(148, 163, 184, .16);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: white;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .35);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong,
.footer-logo {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--blue-light), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text em {
    margin-top: 3px;
    font-size: 12px;
    color: var(--muted);
    font-style: normal;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    font-size: 14px;
    color: #cbd5e1;
    transition: color .2s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--blue-light);
}

.top-search,
.mobile-search,
.large-search,
.local-filter {
    display: flex;
    gap: 10px;
    align-items: center;
}

.top-search input,
.mobile-search input,
.large-search input,
.local-filter input,
.local-filter select {
    min-width: 0;
    border: 1px solid #334155;
    border-radius: 14px;
    background: rgba(15, 23, 42, .9);
    color: var(--text);
    padding: 11px 14px;
    outline: none;
    transition: border .2s ease, box-shadow .2s ease;
}

.top-search input {
    width: 220px;
}

.top-search input:focus,
.mobile-search input:focus,
.large-search input:focus,
.local-filter input:focus,
.local-filter select:focus {
    border-color: var(--blue-light);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .18);
}

.top-search button,
.mobile-search button,
.large-search button,
.primary-btn {
    border: 0;
    border-radius: 14px;
    padding: 11px 18px;
    background: var(--blue);
    color: white;
    font-weight: 700;
    transition: transform .2s ease, background .2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.large-search button:hover,
.primary-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid #334155;
    border-radius: 12px;
    background: rgba(15, 23, 42, .8);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid #334155;
    padding: 16px;
    background: rgba(15, 23, 42, .98);
}

.mobile-panel.is-open {
    display: grid;
    gap: 12px;
}

.mobile-nav-link {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(30, 41, 59, .72);
    color: #dbeafe;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity .65s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, .92), rgba(2, 6, 23, .48), rgba(2, 6, 23, .18)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, .62) 42%, rgba(2, 6, 23, .18) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 680px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .95);
    color: white;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
}

.hero-content h1 {
    margin: 18px 0 14px;
    font-size: clamp(42px, 7vw, 74px);
    line-height: 1.03;
    letter-spacing: -.04em;
}

.hero-content p {
    margin: 0 0 22px;
    font-size: 18px;
    color: #d1d5db;
    max-width: 620px;
}

.hero-meta,
.detail-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
}

.hero-meta span,
.detail-meta span,
.detail-meta strong,
.movie-meta span {
    border-radius: 999px;
    background: rgba(15, 23, 42, .78);
    border: 1px solid rgba(148, 163, 184, .22);
    padding: 5px 10px;
    font-size: 13px;
}

.detail-meta strong {
    color: var(--gold);
}

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

.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 14px;
    padding: 11px 18px;
    background: rgba(15, 23, 42, .45);
    color: white;
    font-weight: 700;
    transition: background .2s ease, transform .2s ease;
}

.ghost-btn:hover {
    background: rgba(30, 41, 59, .92);
    transform: translateY(-1px);
}

.hero-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, .45);
    color: white;
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
    transition: background .2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, .72);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dot {
    width: 28px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .35);
    transition: width .2s ease, background .2s ease;
}

.hero-dot.is-active {
    width: 42px;
    background: var(--blue-light);
}

.page-main {
    padding: 34px 0 70px;
}

.search-panel,
.section-block,
.wide-panel,
.page-hero,
.detail-layout {
    margin-top: 48px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(260px, .8fr) minmax(280px, 1.2fr);
    gap: 28px;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(30, 41, 59, .76));
    padding: 28px;
    box-shadow: var(--shadow);
}

.search-panel h2,
.section-head h2,
.page-hero h1,
.detail-article h1,
.detail-article h2,
.side-card h2 {
    margin: 12px 0 0;
    line-height: 1.18;
}

.search-panel h2,
.section-head h2,
.page-hero h1 {
    font-size: clamp(28px, 4vw, 42px);
}

.large-search input {
    flex: 1;
    min-height: 48px;
}

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

.section-link {
    color: var(--blue-light);
    font-weight: 700;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, .88);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(96, 165, 250, .62);
    box-shadow: 0 26px 58px rgba(0, 0, 0, .36);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.1;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

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

.score-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 800;
}

.score-pill {
    right: 10px;
    background: rgba(250, 204, 21, .96);
    color: #1f2937;
}

.rank-badge {
    left: 10px;
    background: rgba(37, 99, 235, .96);
    color: white;
}

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

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

.movie-card h3 a:hover,
.ranking-info h2 a:hover,
.mini-links a:hover {
    color: var(--blue-light);
}

.movie-card p {
    margin: 0;
    min-height: 48px;
    color: var(--muted);
    font-size: 14px;
}

.movie-meta {
    gap: 6px;
}

.movie-meta span {
    padding: 3px 7px;
    font-size: 12px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span {
    border-radius: 999px;
    background: rgba(37, 99, 235, .13);
    color: #bfdbfe;
    padding: 4px 9px;
    font-size: 12px;
}

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

.category-card,
.category-overview-card {
    min-height: 136px;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(15, 23, 42, .94), rgba(30, 41, 59, .74));
    padding: 20px;
    transition: transform .2s ease, border-color .2s ease;
}

.category-card:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    border-color: rgba(96, 165, 250, .55);
}

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

.category-card span,
.category-overview-card span,
.page-hero p,
.detail-one-line,
.footer-grid p {
    color: var(--muted);
}

.wide-panel {
    padding: 54px 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, .92), rgba(2, 6, 23, .98));
    border-top: 1px solid rgba(148, 163, 184, .1);
    border-bottom: 1px solid rgba(148, 163, 184, .1);
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(280px, .8fr) minmax(320px, 1.2fr);
    gap: 36px;
    align-items: center;
}

.split-layout h2 {
    margin: 12px 0 12px;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.08;
}

.split-layout p {
    color: #cbd5e1;
    margin-bottom: 22px;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: auto 58px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 16px;
    background: rgba(15, 23, 42, .78);
    padding: 10px;
    transition: background .2s ease, border-color .2s ease;
}

.rank-item:hover {
    background: rgba(30, 41, 59, .9);
    border-color: rgba(96, 165, 250, .5);
}

.rank-item img {
    width: 58px;
    height: 78px;
    object-fit: cover;
    border-radius: 10px;
}

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

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

.small-rank {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(37, 99, 235, .92);
    font-weight: 800;
}

.small-hero {
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, .28), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(30, 41, 59, .62));
    padding: clamp(28px, 5vw, 54px);
    box-shadow: var(--shadow);
}

.local-filter {
    margin-top: 24px;
    align-items: stretch;
}

.local-filter input {
    flex: 1;
}

.local-filter select {
    width: 160px;
}

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

.compact-card .movie-card-body {
    padding: 13px;
}

.compact-card h3 {
    font-size: 16px;
}

.ranking-list {
    display: grid;
    gap: 14px;
    margin-top: 34px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 58px 90px minmax(0, 1fr) 80px;
    gap: 18px;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 18px;
    background: rgba(15, 23, 42, .84);
    padding: 14px;
}

.ranking-num {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: rgba(37, 99, 235, .92);
    font-weight: 900;
}

.ranking-poster img {
    width: 90px;
    height: 118px;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-info h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

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

.ranking-score {
    color: var(--gold);
    font-size: 28px;
    text-align: right;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
}

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

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

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

.video-player,
.play-layer,
.play-layer img {
    width: 100%;
    height: 100%;
}

.video-player {
    object-fit: contain;
    background: #000;
}

.play-layer {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: #000;
    color: white;
    cursor: pointer;
}

.play-layer img {
    object-fit: cover;
    opacity: .58;
}

.play-layer.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
}

.play-circle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(37, 99, 235, .94);
    box-shadow: 0 22px 55px rgba(37, 99, 235, .35);
    font-size: 34px;
    transform: translate(-50%, -50%);
}

.detail-article {
    margin-top: 26px;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 24px;
    background: rgba(15, 23, 42, .82);
    padding: clamp(22px, 4vw, 34px);
}

.detail-article h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.detail-one-line {
    font-size: 18px;
    margin: 16px 0 18px;
}

.detail-tags {
    margin: 18px 0 24px;
}

.detail-article h2 {
    margin-top: 26px;
    font-size: 24px;
}

.detail-article p {
    color: #d1d5db;
}

.detail-side {
    position: sticky;
    top: 98px;
    display: grid;
    gap: 18px;
}

.detail-poster {
    width: 100%;
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.side-card {
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 20px;
    background: rgba(15, 23, 42, .86);
    padding: 18px;
}

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

.tight-list .rank-item .small-rank {
    display: none;
}

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

.mini-links {
    display: grid;
    gap: 7px;
    margin-top: 14px;
}

.mini-links a {
    color: #bfdbfe;
    font-size: 14px;
}

.empty-state {
    display: none;
    margin: 24px 0;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 18px;
    background: rgba(15, 23, 42, .85);
    padding: 24px;
    text-align: center;
    color: var(--muted);
}

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

.site-footer {
    margin-top: 80px;
    border-top: 1px solid rgba(148, 163, 184, .14);
    background: rgba(2, 6, 23, .98);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 36px 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, .1);
    padding: 16px;
    color: var(--muted);
    text-align: center;
}

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

    .menu-toggle {
        display: inline-flex;
    }

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

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

    .detail-layout,
    .split-layout,
    .search-panel {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
    }
}

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

    .hero-section {
        min-height: 640px;
        height: 76vh;
    }

    .hero-content {
        padding-right: 54px;
    }

    .hero-arrow {
        width: 40px;
        height: 40px;
        font-size: 28px;
    }

    .hero-prev {
        left: 10px;
    }

    .hero-next {
        right: 10px;
    }

    .large-search,
    .local-filter,
    .footer-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .local-filter select {
        width: 100%;
    }

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

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

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

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

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

    .ranking-score {
        grid-column: 3;
        text-align: left;
        font-size: 20px;
    }

    .ranking-poster img {
        width: 74px;
        height: 98px;
    }
}

@media (max-width: 460px) {
    .brand-text strong {
        font-size: 17px;
    }

    .brand-text em {
        display: none;
    }

    .movie-grid,
    .page-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-content p {
        font-size: 16px;
    }

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