:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: #111827;
    --panel-strong: #1e293b;
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --muted-soft: #94a3b8;
    --cyan: #22d3ee;
    --blue: #2563eb;
    --orange: #fb923c;
    --green: #22c55e;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    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 10% 0%, rgba(37, 99, 235, 0.24), transparent 28%), radial-gradient(circle at 92% 8%, rgba(34, 211, 238, 0.18), transparent 24%), linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
    color: var(--text);
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.94), rgba(15, 23, 42, 0.96));
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

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

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

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: linear-gradient(135deg, #60a5fa, #22d3ee);
    color: #fff;
    box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

.brand-text {
    font-size: 20px;
    background: linear-gradient(90deg, #60a5fa, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
}

.nav-links a {
    font-size: 14px;
    color: var(--muted);
    white-space: nowrap;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    color: #fff;
    transform: translateY(-1px);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--line);
}

.nav-search input,
.page-filter input {
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
}

.nav-search input {
    width: 220px;
    padding: 8px 8px 8px 14px;
}

.nav-search button,
.page-filter button {
    border: 0;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    border: 0;
    color: #fff;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
}

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

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

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

.hero-image {
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.54) 46%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 720px;
    z-index: 2;
}

.hero-kicker {
    display: inline-flex;
    width: max-content;
    align-items: center;
    padding: 8px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.95), rgba(34, 211, 238, 0.9));
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-intro h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-intro p {
    max-width: 720px;
    color: var(--muted);
    font-size: clamp(16px, 2vw, 22px);
    line-height: 1.75;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 999px;
    padding: 0 24px;
    font-weight: 800;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    color: #fff;
    box-shadow: 0 20px 44px rgba(37, 99, 235, 0.28);
}

.ghost-button {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(15, 23, 42, 0.42);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.48);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.content-section {
    padding: 64px 0;
}

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

.section-header span {
    color: var(--cyan);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.section-header h2 {
    margin: 8px 0 10px;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.15;
}

.section-header p {
    margin: 0;
    color: var(--muted-soft);
}

.section-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cyan);
    font-weight: 800;
}

.gradient-panel {
    padding: 42px;
    border: 1px solid rgba(34, 211, 238, 0.18);
    border-radius: 28px;
    background: linear-gradient(90deg, rgba(30, 64, 175, 0.22), rgba(8, 145, 178, 0.16));
    box-shadow: var(--shadow);
}

.movie-grid {
    display: grid;
    gap: 24px;
}

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

.movie-card,
.category-tile,
.category-overview-card,
.horizontal-card,
.ranking-row,
.detail-main,
.detail-side,
.compact-card {
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.2);
}

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(30, 41, 59, 0.92);
}

.poster-link,
.compact-poster,
.horizontal-poster,
.ranking-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.poster-link {
    aspect-ratio: 16 / 10;
}

.poster-link img,
.compact-poster img,
.horizontal-poster img,
.ranking-thumb img,
.detail-cover img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.34s ease;
}

.movie-card:hover img,
.compact-card:hover img,
.horizontal-card:hover img {
    transform: scale(1.06);
}

.poster-year,
.poster-type {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.poster-year {
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.72);
}

.poster-type {
    top: 12px;
    left: 12px;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.poster-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 42px;
    opacity: 0;
    background: rgba(0, 0, 0, 0.38);
    transition: opacity 0.2s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
}

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

.movie-card h3,
.compact-card h3,
.horizontal-card h3,
.ranking-info h2 {
    margin: 0;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.compact-card h3 a:hover,
.horizontal-card h3 a:hover,
.ranking-info h2 a:hover {
    color: var(--cyan);
}

.movie-meta,
.movie-desc,
.horizontal-card p,
.compact-card p,
.ranking-info p,
.detail-main p,
.category-overview-card p,
.category-tile strong {
    color: var(--muted-soft);
    line-height: 1.7;
}

.movie-desc {
    display: -webkit-box;
    min-height: 54px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-list span {
    border: 1px solid rgba(34, 211, 238, 0.28);
    border-radius: 999px;
    padding: 4px 9px;
    color: #bae6fd;
    background: rgba(8, 47, 73, 0.45);
    font-size: 12px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
}

.compact-poster {
    aspect-ratio: 16 / 10;
    border-radius: 14px;
}

.compact-poster span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.26);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.compact-card:hover .compact-poster span {
    opacity: 1;
}

.rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(290px, 340px);
    gap: 22px;
    overflow-x: auto;
    padding: 6px 4px 18px;
    scroll-snap-type: x proximity;
}

.wide-card {
    scroll-snap-align: start;
}

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

.category-tile,
.category-overview-card {
    border-radius: 22px;
    padding: 20px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-title,
.category-overview-main {
    display: grid;
    gap: 10px;
}

.category-title span,
.category-overview-main span {
    color: var(--cyan);
    font-size: 13px;
    font-weight: 900;
}

.category-title strong,
.category-overview-main h2 {
    margin: 0;
    font-size: 20px;
    color: #fff;
}

.category-mini-links {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.category-mini-links a {
    color: var(--muted);
    font-size: 14px;
}

.category-mini-links a:hover {
    color: var(--cyan);
}

.masonry-list {
    columns: 3 280px;
    column-gap: 22px;
}

.horizontal-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    break-inside: avoid;
    margin-bottom: 22px;
    padding: 14px;
    border-radius: 20px;
}

.horizontal-poster {
    aspect-ratio: 16 / 10;
    border-radius: 16px;
}

.horizontal-card span {
    color: var(--cyan);
    font-size: 13px;
    font-weight: 800;
}

.page-hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 18% 22%, rgba(34, 211, 238, 0.18), transparent 30%), linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.7));
}

.compact-page-hero {
    padding: 78px 0 60px;
}

.page-filter {
    display: flex;
    width: min(680px, 100%);
    gap: 10px;
    padding: 8px;
    margin-top: 28px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.56);
}

.page-filter input {
    flex: 1;
    padding: 10px 14px;
}

.empty-state {
    margin-top: 30px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 20px;
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.72);
}

.ranking-list {
    display: grid;
    gap: 14px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.ranking-row {
    display: grid;
    grid-template-columns: 58px 112px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 12px 18px 12px 10px;
    border-radius: 18px;
}

.ranking-num {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.ranking-thumb {
    aspect-ratio: 16 / 10;
    border-radius: 14px;
}

.ranking-score {
    color: #fde68a;
    white-space: nowrap;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 64px 0;
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.24;
    filter: blur(12px);
    transform: scale(1.08);
}

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

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.78));
}

.detail-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 36px;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: var(--shadow);
    background: #0f172a;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: var(--muted-soft);
    font-size: 14px;
}

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

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

.detail-meta span {
    border-radius: 999px;
    padding: 7px 13px;
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
}

.detail-tags {
    margin-bottom: 28px;
}

.player-stage {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

.player-stage video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 420px;
    background: #000;
    object-fit: contain;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 16px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle at 50% 45%, rgba(34, 211, 238, 0.22), rgba(0, 0, 0, 0.55) 42%, rgba(0, 0, 0, 0.76));
    cursor: pointer;
}

.player-stage.is-playing .player-cover {
    display: none;
}

.play-circle {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-size: 34px;
    box-shadow: 0 20px 50px rgba(34, 211, 238, 0.28);
}

.player-cover strong {
    font-size: 22px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
    gap: 28px;
}

.detail-main,
.detail-side {
    border-radius: 24px;
    padding: 28px;
}

.detail-main h2,
.detail-side h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.detail-main p {
    margin: 0 0 24px;
    font-size: 17px;
}

.side-list {
    grid-template-columns: 1fr;
}

.site-footer {
    margin-top: 48px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.92));
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 32px;
    padding: 48px 0;
}

.site-footer h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.site-footer p,
.footer-links a {
    color: var(--muted-soft);
    line-height: 1.8;
}

.footer-links {
    display: grid;
    gap: 8px;
}

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

.footer-bottom {
    padding: 18px;
    color: var(--muted-soft);
    text-align: center;
    border-top: 1px solid var(--line);
}

[hidden] {
    display: none !important;
}

@media (max-width: 1100px) {
    .four-col {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .nav-search input {
        width: 160px;
    }
}

@media (max-width: 860px) {
    .nav-shell {
        height: auto;
        min-height: 68px;
        flex-wrap: wrap;
        padding: 14px 0;
    }

    .menu-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .nav-links {
        display: none;
        order: 3;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.96);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        padding: 10px 6px;
    }

    .nav-search {
        order: 4;
        width: 100%;
    }

    .nav-search input {
        width: 100%;
        flex: 1;
    }

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

    .hero-content {
        padding-top: 40px;
    }

    .hero-arrow {
        display: none;
    }

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

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

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

    .ranking-row {
        grid-template-columns: 42px 88px 1fr;
    }

    .ranking-score {
        grid-column: 3;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1200px);
    }

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

    .hero {
        height: 600px;
        min-height: 600px;
    }

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

    .hero p,
    .page-hero p,
    .detail-intro p {
        font-size: 16px;
    }

    .hero-actions,
    .page-filter {
        flex-direction: column;
        align-items: stretch;
        border-radius: 24px;
    }

    .four-col,
    .compact-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .gradient-panel {
        padding: 26px;
    }

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

    .compact-card,
    .horizontal-card {
        grid-template-columns: 1fr;
    }

    .ranking-row {
        grid-template-columns: 38px 1fr;
    }

    .ranking-thumb {
        display: none;
    }

    .ranking-score {
        grid-column: 2;
    }

    .player-stage,
    .player-stage video {
        min-height: 240px;
    }
}
