:root {
    color-scheme: dark;
    --color-page: #020617;
    --color-panel: #0f172a;
    --color-panel-soft: #111827;
    --color-border: rgba(148, 163, 184, 0.18);
    --color-text: #f8fafc;
    --color-muted: #94a3b8;
    --color-dim: #64748b;
    --color-red: #dc2626;
    --color-red-light: #f97316;
    --shadow-card: 0 24px 60px rgba(0, 0, 0, 0.42);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(220, 38, 38, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.12), transparent 28rem),
        var(--color-page);
    color: var(--color-text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    background: rgba(3, 7, 18, 0.82);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    backdrop-filter: blur(18px);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
    background: rgba(3, 7, 18, 0.96);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.38);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    color: white;
    font-size: 18px;
    line-height: 1;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--color-red), var(--color-red-light));
    box-shadow: 0 12px 32px rgba(220, 38, 38, 0.35);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-name {
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #ef4444, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-subtitle {
    color: var(--color-muted);
    font-size: 12px;
}

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

.nav-link {
    padding: 10px 14px;
    border-radius: 12px;
    color: #cbd5e1;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: white;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.92), rgba(249, 115, 22, 0.82));
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.92);
    color: white;
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow-card);
}

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

.mobile-nav-link {
    padding: 12px 14px;
    border-radius: 12px;
    color: #d1d5db;
    background: rgba(2, 6, 23, 0.42);
}

.mobile-nav-link.is-active {
    color: white;
    background: linear-gradient(135deg, var(--color-red), var(--color-red-light));
}

.page-main {
    padding-top: 76px;
}

.hero {
    position: relative;
    min-height: min(760px, calc(100vh - 20px));
    overflow: hidden;
    background: #030712;
}

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

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

.hero-image,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #111827, #450a0a);
}

.hero-overlay,
.detail-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.26) 100%),
        linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
    position: relative;
    height: min(760px, calc(100vh - 20px));
    min-height: 560px;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 720px;
    padding: 80px 0 110px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fb923c;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-title-block h1,
.page-hero h1,
.detail-intro h1 {
    margin: 16px 0;
    font-size: clamp(36px, 7vw, 72px);
    line-height: 1.03;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero-lead {
    max-width: 660px;
    margin: 0 0 16px;
    color: #e2e8f0;
    font-size: clamp(20px, 3vw, 30px);
    line-height: 1.45;
    font-weight: 800;
}

.hero-summary {
    max-width: 680px;
    margin: 0 0 26px;
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border: 1px solid rgba(248, 113, 113, 0.24);
    border-radius: 999px;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.26);
    font-size: 12px;
    font-weight: 800;
}

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

.primary-button,
.ghost-button,
.search-form button,
.filter-panel button,
.back-to-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border: 0;
    border-radius: 14px;
    color: white;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-form button,
.filter-panel button,
.back-to-top {
    background: linear-gradient(135deg, var(--color-red), var(--color-red-light));
    box-shadow: 0 16px 38px rgba(220, 38, 38, 0.3);
}

.ghost-button {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.primary-button:hover,
.ghost-button:hover,
.search-form button:hover,
.filter-panel button:hover,
.back-to-top:hover {
    transform: translateY(-2px);
}

.hero-controls {
    position: absolute;
    right: 0;
    bottom: 34px;
    left: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-arrow,
.hero-dot {
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: white;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(14px);
    cursor: pointer;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 28px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.hero-dot.is-active {
    width: 32px;
    background: linear-gradient(135deg, var(--color-red), var(--color-red-light));
}

.search-band,
.content-section,
.filter-panel,
.text-panel,
.side-panel,
.player-card,
.category-tile a {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.74);
    box-shadow: var(--shadow-card);
}

.search-band {
    margin: 34px 0;
    padding: 28px;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 24px;
    align-items: center;
}

.search-band h2,
.content-section h2,
.side-panel h2,
.text-panel h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 950;
    letter-spacing: -0.03em;
}

.search-band p,
.section-head p,
.page-title-block p,
.page-hero p,
.text-panel p,
.side-panel p,
.detail-intro p {
    color: var(--color-muted);
    line-height: 1.8;
}

.search-form {
    display: flex;
    gap: 12px;
}

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

.content-section {
    margin: 34px 0;
    padding: 26px;
}

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

.section-more {
    color: #f87171;
    font-weight: 900;
}

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

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

.movie-card {
    min-width: 0;
}

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.92);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-link:hover {
    transform: translateY(-5px);
    border-color: rgba(248, 113, 113, 0.8);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.35);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #450a0a);
}

.poster-wrap img,
.compact-card img,
.ranking-row img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, transparent 52%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.movie-type {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    color: white;
    background: rgba(220, 38, 38, 0.92);
    font-size: 12px;
    font-weight: 900;
}

.play-hover {
    position: absolute;
    right: 12px;
    bottom: 12px;
    left: 12px;
    display: flex;
    justify-content: center;
    padding: 9px 10px;
    border-radius: 12px;
    color: white;
    background: rgba(220, 38, 38, 0.88);
    font-size: 13px;
    font-weight: 900;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card-link:hover .play-hover {
    opacity: 1;
    transform: translateY(0);
}

.movie-card-body {
    display: flex;
    min-height: 168px;
    flex-direction: column;
    gap: 9px;
    padding: 13px;
}

.movie-card-body strong {
    color: white;
    font-size: 15px;
    line-height: 1.35;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta-line,
.movie-one-line {
    color: var(--color-muted);
    font-size: 12px;
}

.movie-one-line {
    line-height: 1.55;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row {
    margin-top: auto;
    gap: 6px;
}

.tag-row span {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 11px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #450a0a);
}

.small-hero {
    padding: 94px 0 58px;
}

.page-hero h1 {
    max-width: 880px;
}

.page-hero p {
    max-width: 760px;
    font-size: 18px;
}

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

.category-tile a {
    position: relative;
    display: block;
    min-height: 310px;
    overflow: hidden;
    padding: 30px;
}

.category-glow {
    position: absolute;
    right: -80px;
    bottom: -90px;
    width: 240px;
    height: 240px;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.28);
    filter: blur(18px);
}

.category-label {
    color: #fb923c;
    font-weight: 950;
}

.category-tile h2 {
    position: relative;
    margin: 14px 0 10px;
    font-size: 30px;
    font-weight: 950;
}

.category-tile p,
.category-tile li {
    position: relative;
    color: var(--color-muted);
    line-height: 1.7;
}

.category-tile ul {
    position: relative;
    margin: 18px 0;
    padding-left: 18px;
}

.category-tile strong {
    position: relative;
    color: #f87171;
}

.category-page,
.search-page,
.ranking-page {
    padding: 34px 0 58px;
}

.page-title-block {
    margin-bottom: 28px;
}

.page-title-block h1 {
    max-width: 900px;
    margin-bottom: 10px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr auto;
    gap: 14px;
    align-items: end;
    margin: 0 0 26px;
    padding: 18px;
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 800;
}

.empty-state {
    display: none;
    margin: 32px 0;
    color: #fca5a5;
    text-align: center;
}

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

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

.ranking-row a {
    display: grid;
    grid-template-columns: 58px 74px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.78);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-row a:hover {
    transform: translateX(4px);
    border-color: rgba(248, 113, 113, 0.74);
}

.rank-number {
    color: #fb923c;
    font-size: 26px;
    font-weight: 950;
    text-align: center;
}

.ranking-row img {
    width: 74px;
    height: 102px;
    border-radius: 12px;
    background: linear-gradient(135deg, #111827, #450a0a);
}

.ranking-info {
    display: grid;
    gap: 7px;
}

.ranking-info strong {
    font-size: 18px;
}

.ranking-info small,
.ranking-info em {
    color: var(--color-muted);
    font-style: normal;
    line-height: 1.55;
}

.ranking-play {
    padding: 8px 14px;
    border-radius: 999px;
    color: white;
    background: rgba(220, 38, 38, 0.86);
    font-weight: 900;
}

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

.detail-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    min-height: 620px;
    padding: 72px 0;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    background: linear-gradient(135deg, #111827, #450a0a);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.detail-intro h1 {
    max-width: 920px;
}

.detail-intro p {
    max-width: 830px;
    font-size: 19px;
}

.detail-meta {
    margin: 20px 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    padding: 38px 0 64px;
}

.detail-main,
.detail-side {
    display: grid;
    align-content: start;
    gap: 22px;
}

.player-card {
    padding: 12px;
    border-radius: 24px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    background: black;
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: black;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-content: center;
    gap: 14px;
    border: 0;
    color: white;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.72));
    cursor: pointer;
}

.player-overlay.hidden {
    display: none;
}

.play-circle {
    width: 76px;
    height: 76px;
    display: inline-grid;
    place-items: center;
    margin: 0 auto;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-red), var(--color-red-light));
    box-shadow: 0 20px 50px rgba(220, 38, 38, 0.35);
    font-size: 32px;
}

.text-panel,
.side-panel {
    padding: 24px;
}

.text-panel p {
    margin: 14px 0 0;
    font-size: 16px;
}

.side-panel dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px 14px;
    margin: 16px 0 0;
}

.side-panel dt {
    color: var(--color-dim);
}

.side-panel dd {
    margin: 0;
    color: #e2e8f0;
}

.related-grid {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.compact-card {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.42);
}

.compact-card img {
    width: 64px;
    height: 90px;
    border-radius: 10px;
    background: linear-gradient(135deg, #111827, #450a0a);
}

.compact-card span {
    display: grid;
    gap: 6px;
}

.compact-card strong {
    line-height: 1.4;
}

.compact-card small {
    color: var(--color-muted);
    line-height: 1.5;
}

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

.prev-next a {
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.18);
}

.prose-page {
    padding: 38px 0 64px;
}

.large-text {
    max-width: 860px;
    margin: 0 auto;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.56), #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
    gap: 28px;
    padding: 44px 0 30px;
}

.site-footer h3 {
    margin: 0 0 14px;
    font-size: 18px;
}

.site-footer p,
.site-footer li,
.footer-bottom {
    color: var(--color-muted);
    line-height: 1.8;
}

.site-footer ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a:hover {
    color: #fca5a5;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 0 34px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 14px;
}

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

    .desktop-nav {
        gap: 2px;
    }

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

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

    .mobile-menu-button {
        display: block;
    }

    .search-band,
    .filter-panel,
    .detail-layout,
    .detail-hero-inner,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: 220px;
    }

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

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

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

    .brand-subtitle {
        display: none;
    }

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

    .hero-copy {
        padding-top: 58px;
    }

    .hero-summary {
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
    }

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

    .content-section,
    .search-band,
    .text-panel,
    .side-panel {
        padding: 18px;
    }

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

    .search-form {
        flex-direction: column;
    }

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

    .ranking-play {
        display: none;
    }

    .ranking-row img {
        width: 60px;
        height: 84px;
    }

    .detail-hero,
    .detail-hero-inner {
        min-height: auto;
    }

    .detail-hero-inner {
        padding: 44px 0 34px;
    }

    .detail-poster {
        width: 170px;
    }

    .detail-layout {
        padding-top: 24px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}
