:root {
    color-scheme: dark;
    --page-bg: #050816;
    --panel-bg: rgba(15, 23, 42, 0.86);
    --panel-strong: #101827;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-soft: #cbd5e1;
    --line: rgba(148, 163, 184, 0.18);
    --brand: #ef4444;
    --brand-strong: #dc2626;
    --brand-warm: #f97316;
    --brand-soft: rgba(239, 68, 68, 0.16);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(239, 68, 68, 0.18), transparent 32rem),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.14), transparent 28rem),
        linear-gradient(180deg, #050816 0%, #0f172a 48%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(2, 6, 23, 0.82);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.logo-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-warm));
    box-shadow: 0 14px 30px rgba(239, 68, 68, 0.34);
}

.logo-text {
    background: linear-gradient(135deg, #ff6565, #fb923c 70%, #facc15);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--text-soft);
    font-size: 15px;
}

.nav-links a {
    position: relative;
    padding: 8px 4px;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: #fb7185;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text-main);
    background: rgba(15, 23, 42, 0.7);
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.94);
}

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

.mobile-panel a {
    display: block;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 14px 0;
    color: var(--text-soft);
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

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

.hero {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    border-bottom: 1px solid var(--line);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.85s ease;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.1);
    transform: scale(1.04);
}

.hero-backdrop::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 38%, rgba(2, 6, 23, 0.22) 100%),
        linear-gradient(0deg, #050816 0%, transparent 38%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 420px);
    gap: 40px;
    align-items: center;
    padding: 96px 0 112px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    color: #fecaca;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(248, 113, 113, 0.28);
    border-radius: 999px;
}

.hero h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(42px, 8vw, 82px);
    line-height: 0.96;
    letter-spacing: -0.07em;
}

.hero-line {
    max-width: 720px;
    margin: 22px 0 0;
    color: var(--text-soft);
    font-size: clamp(17px, 2.3vw, 22px);
    line-height: 1.75;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(30, 41, 59, 0.86);
}

.btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--brand-strong), var(--brand-warm));
    box-shadow: 0 16px 38px rgba(239, 68, 68, 0.32);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: var(--shadow);
    background: rgba(15, 23, 42, 0.72);
}

.hero-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-poster::after {
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    content: "";
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), transparent);
}

.hero-poster-info {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 2;
}

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

.tag-pill,
.filter-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    color: #fecaca;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(248, 113, 113, 0.2);
    font-size: 12px;
}

.filter-chip {
    cursor: pointer;
    color: var(--text-soft);
    background: rgba(15, 23, 42, 0.8);
}

.filter-chip.is-active,
.filter-chip:hover {
    color: #ffffff;
    border-color: rgba(248, 113, 113, 0.55);
    background: var(--brand-soft);
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
}

.hero-dot.is-active {
    width: 34px;
    background: linear-gradient(135deg, var(--brand), var(--brand-warm));
}

.section {
    padding: 72px 0 0;
}

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

.eyebrow {
    margin: 0 0 8px;
    color: #fb7185;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.04em;
}

.section-desc {
    max-width: 680px;
    margin: 10px 0 0;
    color: var(--text-muted);
    line-height: 1.8;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

.search-input {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    outline: none;
    padding: 0 18px;
    color: var(--text-main);
    background: rgba(2, 6, 23, 0.72);
}

.search-input:focus {
    border-color: rgba(248, 113, 113, 0.72);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(248, 113, 113, 0.38);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.28), rgba(249, 115, 22, 0.18));
}

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

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

.play-badge,
.poster-rank {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.92);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.play-badge {
    right: 12px;
    bottom: 12px;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 700;
}

.poster-rank {
    left: 12px;
    top: 12px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

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

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.42;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-title:hover {
    color: #fb7185;
}

.movie-meta {
    margin: 9px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.movie-line {
    display: -webkit-box;
    overflow: hidden;
    min-height: 62px;
    margin: 0 0 14px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.55;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background:
        linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(249, 115, 22, 0.1)),
        rgba(15, 23, 42, 0.84);
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.24);
}

.category-card::after {
    position: absolute;
    right: -50px;
    bottom: -60px;
    width: 150px;
    height: 150px;
    content: "";
    border-radius: 999px;
    background: rgba(248, 113, 113, 0.15);
}

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

.category-card p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.8;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 64px 88px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.78);
}

.ranking-number {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--brand-warm));
}

.ranking-cover {
    width: 88px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 850;
}

.ranking-line {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.detail-hero::before {
    position: absolute;
    inset: 0;
    content: "";
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.86) 46%, rgba(2, 6, 23, 0.62) 100%),
        linear-gradient(0deg, #050816 0%, transparent 46%);
}

.detail-wrap {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 60px;
}

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

.breadcrumb a:hover {
    color: #fb7185;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 32px;
    align-items: center;
}

.player-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-lg);
    background: #000000;
    box-shadow: var(--shadow);
}

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

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

.player-curtain {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18)),
        rgba(2, 6, 23, 0.36);
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-orb {
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    margin: 0 auto 14px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 36px;
    background: linear-gradient(135deg, var(--brand), var(--brand-warm));
    box-shadow: 0 22px 48px rgba(239, 68, 68, 0.42);
}

.detail-info h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.detail-lead {
    margin: 20px 0 0;
    color: var(--text-soft);
    font-size: 18px;
    line-height: 1.85;
}

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

.meta-badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 8px 12px;
    color: var(--text-soft);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--line);
}

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

.article-panel,
.side-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.22);
}

.article-panel {
    padding: 30px;
}

.article-panel h2,
.side-panel h2 {
    margin: 0 0 18px;
    font-size: 26px;
}

.article-panel p {
    margin: 0 0 18px;
    color: var(--text-soft);
    font-size: 16px;
    line-height: 1.9;
}

.side-panel {
    padding: 20px;
}

.side-link {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.side-link:last-child {
    border-bottom: 0;
}

.side-link img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
}

.side-link strong {
    display: block;
    margin-bottom: 6px;
    color: #ffffff;
    line-height: 1.35;
}

.side-link span {
    color: var(--text-muted);
    font-size: 13px;
}

.site-footer {
    margin-top: 78px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(2, 6, 23, 0.96));
}

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

.footer-title {
    margin: 0 0 12px;
    color: #ffffff;
    font-weight: 850;
}

.footer-text,
.footer-list a,
.copyright {
    color: var(--text-muted);
    line-height: 1.8;
}

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

.footer-list a:hover {
    color: #fb7185;
}

.copyright {
    padding: 18px 0 26px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    text-align: center;
    font-size: 13px;
}

.empty-state {
    display: none;
    padding: 28px;
    color: var(--text-muted);
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.72);
}

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

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

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

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

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero {
        min-height: 760px;
    }

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

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

    .hero-poster {
        max-width: 360px;
    }

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

    .filter-row {
        justify-content: flex-start;
    }

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

    .ranking-item {
        grid-template-columns: 44px 70px minmax(0, 1fr);
    }

    .ranking-item .btn {
        grid-column: 3;
        width: fit-content;
    }
}

@media (max-width: 560px) {
    .nav-wrap,
    .container,
    .detail-wrap,
    .hero-content {
        width: min(100% - 24px, 1180px);
    }

    .logo {
        font-size: 20px;
    }

    .logo-mark {
        width: 34px;
        height: 34px;
        border-radius: 12px;
    }

    .hero {
        min-height: 720px;
    }

    .hero h1 {
        font-size: 42px;
    }

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

    .section-head {
        display: block;
    }

    .article-panel {
        padding: 22px;
    }
}
