:root {
    color-scheme: dark;
    --bg: #05070c;
    --bg-soft: #0d1220;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(17, 24, 39, 0.96);
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #22d3ee;
    --accent-2: #a855f7;
    --gold: #facc15;
    --radius: 24px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.20), transparent 30rem),
        radial-gradient(circle at 85% 10%, rgba(168, 85, 247, 0.18), transparent 32rem),
        linear-gradient(180deg, #05070c 0%, #0b1020 44%, #05070c 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(5, 7, 12, 0.78);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 72px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #001018;
    box-shadow: 0 14px 34px rgba(34, 211, 238, 0.22);
}

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

.nav-links a {
    padding: 10px 13px;
    border-radius: 999px;
    color: #dbeafe;
    font-size: 14px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.12);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

.nav-search input {
    width: 180px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    padding: 7px 8px;
}

.nav-search button,
.mobile-toggle,
.play-button,
.primary-button,
.ghost-button,
.filter-button {
    border: 0;
    color: #031018;
    background: linear-gradient(135deg, var(--accent), #67e8f9);
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.nav-search button {
    padding: 7px 14px;
}

.nav-search button:hover,
.mobile-toggle:hover,
.play-button:hover,
.primary-button:hover,
.ghost-button:hover,
.filter-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(34, 211, 238, 0.22);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.mobile-panel {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.96);
}

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

.mobile-panel a:last-child {
    border-bottom: 0;
}

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

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

.hero {
    position: relative;
    min-height: 640px;
    padding: 58px 0 34px;
    overflow: hidden;
}

.hero-shell {
    position: relative;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 34px;
    overflow: hidden;
    min-height: 560px;
    background: #020617;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.72fr);
    gap: 32px;
    padding: 54px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.015);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
    filter: saturate(1.2) contrast(1.05);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.76) 45%, rgba(2, 6, 23, 0.30) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.20), rgba(2, 6, 23, 0.90));
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
    align-self: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, 0.25);
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.12);
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.page-title h1,
.detail-title h1 {
    margin: 0;
    font-weight: 950;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero h1 {
    max-width: 760px;
    font-size: clamp(42px, 7vw, 86px);
}

.hero p {
    max-width: 720px;
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.9;
}

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

.hero-meta {
    margin-top: 22px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
    font-weight: 700;
}

.badge.hot {
    color: #0f172a;
    background: linear-gradient(135deg, var(--gold), #fb7185);
    border-color: transparent;
}

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

.primary-button,
.ghost-button,
.play-button,
.filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
}

.ghost-button {
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.80);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.hero-poster {
    max-width: 380px;
    justify-self: end;
}

.hero-poster a {
    display: block;
    transform: rotate(2deg);
    transition: transform 0.25s ease;
}

.hero-poster a:hover {
    transform: rotate(0deg) translateY(-4px);
}

.hero-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(168, 85, 247, 0.20));
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 54px;
    bottom: 36px;
    display: flex;
    gap: 10px;
}

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

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

.section {
    margin: 58px 0;
}

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

.section-title,
.page-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 950;
    letter-spacing: -0.03em;
}

.section-desc,
.page-title p {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

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

.movie-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 56px rgba(0, 0, 0, 0.23);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.38);
    box-shadow: 0 26px 72px rgba(0, 0, 0, 0.36);
}

.card-poster {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(168, 85, 247, 0.20));
}

.card-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.card-rank {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #020617;
    background: linear-gradient(135deg, #facc15, #fb7185);
    font-weight: 950;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

.card-score {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #020617;
    background: rgba(250, 204, 21, 0.92);
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.card-title {
    margin: 0;
    color: #f8fafc;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
}

.card-title a {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-text {
    margin: 0;
    color: #aab7ca;
    line-height: 1.7;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.card-meta {
    margin-top: auto;
    color: #93c5fd;
    font-size: 12px;
}

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

.category-card {
    min-height: 180px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 55%),
        rgba(15, 23, 42, 0.74);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 950;
}

.category-card p {
    margin: 12px 0 0;
    color: #aab7ca;
    line-height: 1.8;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 82px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    color: #020617;
    background: linear-gradient(135deg, var(--gold), #fb7185);
    font-weight: 950;
}

.rank-row img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(168, 85, 247, 0.20));
}

.rank-row h2,
.rank-row h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 900;
}

.rank-row p {
    margin: 0;
    color: #aab7ca;
    line-height: 1.6;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 160px auto;
    gap: 12px;
    margin: 0 0 24px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.16);
    outline: 0;
    border-radius: 16px;
    color: #f8fafc;
    background: rgba(2, 6, 23, 0.78);
    padding: 12px 14px;
}

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 34px 0 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.70);
    color: #e2e8f0;
    font-weight: 800;
}

.pagination .is-current {
    color: #020617;
    border-color: transparent;
    background: var(--accent);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 28px 0 18px;
    color: #93c5fd;
    font-size: 14px;
}

.breadcrumbs span {
    color: #64748b;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) 360px;
    gap: 28px;
    align-items: start;
}

.player-card,
.detail-side,
.content-card {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.76);
    box-shadow: 0 22px 66px rgba(0, 0, 0, 0.30);
    overflow: hidden;
}

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

.player-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.78));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    min-height: 56px;
    padding: 0 28px;
    font-size: 18px;
}

.detail-title {
    padding: 24px;
}

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

.detail-meta {
    margin-top: 16px;
}

.detail-side {
    padding: 18px;
}

.detail-side img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(168, 85, 247, 0.20));
}

.detail-actions {
    margin-top: 16px;
}

.content-card {
    margin-top: 26px;
    padding: 26px;
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 950;
}

.content-card p {
    margin: 0 0 16px;
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.95;
}

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

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 16px;
}

.tag-cloud a,
.tag-cloud span {
    padding: 7px 11px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(30, 41, 59, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.15);
    font-size: 13px;
}

.search-empty {
    display: none;
    padding: 34px;
    text-align: center;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
}

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

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

.footer-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: #94a3b8;
}

.footer-shell strong {
    color: #e2e8f0;
}

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

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 38px;
    }

    .hero-poster {
        display: none;
    }

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

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

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

    .detail-side {
        display: none;
    }
}

@media (max-width: 720px) {
    .page,
    .nav-shell,
    .mobile-panel,
    .footer-shell {
        width: min(100% - 22px, 1240px);
    }

    .logo {
        font-size: 17px;
    }

    .hero {
        min-height: 560px;
        padding-top: 28px;
    }

    .hero-shell {
        min-height: 520px;
        border-radius: 26px;
    }

    .hero-slide {
        padding: 26px;
    }

    .hero p {
        font-size: 15px;
    }

    .hero-dots {
        left: 26px;
        bottom: 24px;
    }

    .section-head,
    .page-title,
    .footer-shell {
        display: block;
    }

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

    .card-body {
        padding: 13px;
    }

    .card-title {
        font-size: 16px;
    }

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

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

    .rank-row .ghost-button {
        grid-column: 2 / -1;
    }

    .content-card {
        padding: 20px;
    }
}

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

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