:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111827;
    --card: rgba(15, 23, 42, 0.78);
    --card-solid: #172033;
    --line: rgba(148, 163, 184, 0.22);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --muted-soft: #94a3b8;
    --brand: #2563eb;
    --brand-light: #60a5fa;
    --brand-warm: #f97316;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.24), transparent 32rem), linear-gradient(180deg, #0b1120 0%, #111827 48%, #0f172a 100%);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(22px);
    background: rgba(15, 23, 42, 0.82);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 74px;
}

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

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.35);
}

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

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a,
.nav-dropdown > button {
    border: 0;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.nav-dropdown:hover > button {
    color: #fff;
    background: rgba(96, 165, 250, 0.18);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    display: grid;
    min-width: 190px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu a {
    border-radius: 12px;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    cursor: pointer;
}

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

.hero-slider {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    background: #020617;
}

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

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 44%, rgba(15, 23, 42, 0.16) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.2), #0f172a 94%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.58fr);
    align-items: center;
    gap: 54px;
    min-height: 720px;
    padding: 84px 0 110px;
}

.eyebrow,
.section-title span,
.section-heading span,
.rank-head span,
.category-overview-card span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--brand-light);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-copy h2 {
    margin: 20px 0 12px;
    font-size: clamp(26px, 4vw, 44px);
    line-height: 1.12;
}

.hero-copy p,
.page-hero p,
.section-title p,
.category-overview-card p {
    color: var(--muted);
    font-size: 17px;
    max-width: 760px;
}

.hero-tags,
.tag-row,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
    font-size: 12px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.34);
}

.btn-secondary {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-poster {
    position: relative;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 18px -18px -18px 18px;
    z-index: -1;
    border-radius: inherit;
    background: rgba(37, 99, 235, 0.28);
    filter: blur(6px);
}

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

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transform: translateX(-50%);
}

.hero-dots,
.hero-arrows {
    display: flex;
    gap: 10px;
}

.hero-dot,
.hero-arrows button {
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.hero-dot {
    width: 34px;
    height: 6px;
    padding: 0;
    border-radius: 999px;
}

.hero-dot.active {
    background: #fff;
}

.hero-arrows button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
}

.section-block {
    padding: 74px 0;
}

.soft-bg {
    background: rgba(15, 23, 42, 0.56);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.split-layout {
    display: grid;
    grid-template-columns: 0.42fr 1fr;
    gap: 40px;
    align-items: start;
}

.section-title h2,
.section-heading h2,
.rank-head h2,
.story-card h2,
.info-panel h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--card);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
}

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

.category-tile:hover img {
    opacity: 0.45;
    transform: scale(1.08);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.92));
}

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 2;
}

.category-tile span {
    display: block;
    margin-top: 64px;
    font-size: 23px;
    font-weight: 900;
}

.category-tile p {
    margin: 8px 0 0;
    color: var(--muted);
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 34px;
    align-items: start;
}

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

.section-heading a,
.text-link {
    color: var(--brand-light);
    font-weight: 800;
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(96, 165, 250, 0.58);
    box-shadow: 0 24px 70px rgba(37, 99, 235, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 2.85;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    min-width: 42px;
    min-height: 30px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(249, 115, 22, 0.92);
    font-size: 13px;
    font-weight: 900;
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--muted-soft);
    font-size: 12px;
}

.card-meta span + span::before {
    content: "·";
    margin-right: 6px;
    color: rgba(148, 163, 184, 0.6);
}

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

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

.movie-card p {
    display: -webkit-box;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card .tag-row {
    margin-top: auto;
}

.movie-card .tag-row span {
    min-height: 24px;
    font-size: 11px;
}

.compact-card p {
    -webkit-line-clamp: 2;
}

.rank-panel,
.info-panel,
.story-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.rank-panel {
    padding: 20px;
}

.sticky-rank {
    position: sticky;
    top: 98px;
}

.rank-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.rank-item {
    display: grid;
    grid-template-columns: 38px 54px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: rgba(96, 165, 250, 0.15);
    transform: translateX(4px);
}

.rank-num {
    color: var(--brand-light);
    font-weight: 900;
}

.rank-item img {
    width: 54px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-text {
    min-width: 0;
}

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

.rank-text em {
    color: var(--muted-soft);
    font-size: 12px;
    font-style: normal;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 92px 0 64px;
    background:
        radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.32), transparent 30rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.78));
    border-bottom: 1px solid var(--line);
}

.page-hero-inner {
    position: relative;
    z-index: 2;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 150px 150px 150px;
    gap: 12px;
    margin-top: 28px;
}

.filter-bar input,
.filter-bar select {
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    padding: 0 14px;
    outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--brand-light);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.12);
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 22px;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

.category-cover-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-cover-stack img {
    width: 100%;
    aspect-ratio: 1 / 1.28;
    border-radius: 14px;
    object-fit: cover;
}

.category-overview-card h2 {
    margin: 0;
    font-size: 28px;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

.detail-bg,
.detail-overlay {
    position: absolute;
    inset: 0;
}

.detail-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.36;
    filter: blur(8px) saturate(1.1);
    transform: scale(1.06);
}

.detail-overlay {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.78)), linear-gradient(180deg, transparent 0%, #0f172a 100%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 46px 0 72px;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 42px;
    align-items: center;
}

.detail-poster {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

.detail-copy {
    max-width: 780px;
}

.detail-one-line {
    margin: 18px 0;
    color: var(--muted);
    font-size: 20px;
}

.detail-meta,
.detail-tags {
    margin-bottom: 18px;
}

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

.detail-main {
    display: grid;
    gap: 22px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: #020617;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.player-frame video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.3), rgba(2, 6, 23, 0.3));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-light));
    box-shadow: 0 18px 48px rgba(37, 99, 235, 0.38);
    font-size: 34px;
    text-indent: 5px;
}

.player-frame.playing .player-start {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.story-card,
.info-panel {
    padding: 24px;
}

.story-card p {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.info-panel dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 12px 16px;
    margin: 18px 0 0;
}

.info-panel dt {
    color: var(--muted-soft);
}

.info-panel dd {
    margin: 0;
    color: #fff;
}

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

.site-footer {
    padding: 36px 0;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.8);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-inner p {
    margin: 8px 0 0;
    color: var(--muted-soft);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

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

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

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

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

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

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

    .rank-panel,
    .sticky-rank {
        position: static;
    }
}

@media (max-width: 860px) {
    .header-inner {
        min-height: 66px;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 78px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

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

    .nav-dropdown > button {
        width: 100%;
        text-align: left;
    }

    .dropdown-menu {
        position: static;
        display: grid;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        margin-top: 8px;
        box-shadow: none;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 50px;
    }

    .hero-poster {
        width: min(280px, 72vw);
        justify-self: center;
        transform: rotate(0deg);
    }

    .hero-controls {
        align-items: flex-end;
    }

    .hero-arrows {
        display: none;
    }

    .category-grid,
    .overview-grid,
    .category-overview-card,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(320px, 72vw);
    }

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

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

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

    .section-block {
        padding: 52px 0;
    }

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

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

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

    .movie-card p {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    .category-tile {
        min-height: 160px;
    }

    .category-cover-stack {
        grid-template-columns: repeat(4, 1fr);
    }

    .detail-copy h1,
    .page-hero h1,
    .hero-copy h1 {
        font-size: 34px;
    }

    .detail-one-line,
    .hero-copy p,
    .page-hero p {
        font-size: 15px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}
