:root {
    color-scheme: dark;
    --page-bg: #0f172a;
    --panel-bg: rgba(15, 23, 42, 0.82);
    --card-bg: #1e293b;
    --card-soft: #263449;
    --border: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --red: #dc2626;
    --red-deep: #991b1b;
    --orange: #ea580c;
    --orange-soft: #fed7aa;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
    --radius: 22px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 16% 12%, rgba(220, 38, 38, 0.18), transparent 34%),
        radial-gradient(circle at 85% 8%, rgba(234, 88, 12, 0.18), transparent 28%),
        linear-gradient(180deg, #0f172a 0%, #182235 48%, #0f172a 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.nav-shell {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding-left: 2px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    color: white;
    box-shadow: 0 16px 40px rgba(220, 38, 38, 0.35);
}

.brand-text {
    display: grid;
    gap: 2px;
}

.brand-text strong {
    font-size: 23px;
    letter-spacing: 0.02em;
}

.brand-text small {
    color: var(--soft);
    font-size: 12px;
}

.nav-panel {
    display: flex;
    align-items: center;
    gap: 22px;
    min-width: 0;
}

.nav-links,
.nav-categories {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link,
.nav-categories a {
    color: var(--muted);
    border-radius: 999px;
    padding: 9px 13px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-categories a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-categories {
    max-width: 420px;
}

.nav-categories a {
    font-size: 13px;
    padding: 7px 10px;
    background: rgba(255, 255, 255, 0.04);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

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

.hero-slider {
    position: relative;
    height: 640px;
    overflow: hidden;
    background: linear-gradient(90deg, #7f1d1d, #9a3412, #7f1d1d);
}

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

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

.hero-image,
.hero-image img,
.hero-overlay {
    position: absolute;
    inset: 0;
}

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

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.56) 44%, rgba(0, 0, 0, 0.18) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.96) 0%, transparent 34%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1220px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1220px;
}

.eyebrow {
    margin: 0 0 14px;
    color: #fecaca;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.06;
    letter-spacing: -0.045em;
    max-width: 860px;
}

.hero-line {
    max-width: 760px;
    margin: 24px 0 0;
    color: #e2e8f0;
    font-size: clamp(18px, 2.3vw, 25px);
    line-height: 1.65;
}

.hero-tags,
.hero-keywords,
.detail-meta,
.tag-row,
.line-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.hero-keywords span,
.detail-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: 999px;
    padding: 6px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
}

.hero-keywords {
    margin-top: 14px;
}

.hero-keywords span,
.tag-row span {
    color: var(--orange-soft);
    background: rgba(234, 88, 12, 0.14);
    border-color: rgba(251, 146, 60, 0.24);
}

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

.primary-btn,
.ghost-btn,
.section-more,
.line-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    border: 0;
    min-height: 48px;
    padding: 0 22px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #fff;
    font-weight: 800;
    font-size: 17px;
    background: linear-gradient(90deg, var(--red), var(--orange));
    box-shadow: 0 18px 45px rgba(220, 38, 38, 0.38);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.line-button:hover {
    transform: translateY(-2px);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(12px);
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
}

.hero-dots button.is-active {
    width: 34px;
    background: linear-gradient(90deg, var(--red), var(--orange));
}

.content-section {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 56px 0;
}

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

.section-head h2 {
    margin: 0 0 8px;
    font-size: clamp(28px, 3vw, 40px);
}

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

.section-more {
    min-height: 40px;
    color: #f87171;
    padding: 0 4px;
}

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

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

.movie-card a {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card a:hover {
    transform: translateY(-8px);
    border-color: rgba(248, 113, 113, 0.5);
    box-shadow: var(--shadow);
}

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

.poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease, opacity 0.25s ease;
}

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.82));
}

.category-pill,
.rank-badge,
.play-mark {
    position: absolute;
    z-index: 2;
}

.category-pill {
    top: 10px;
    left: 10px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    background: rgba(220, 38, 38, 0.92);
}

.rank-badge {
    top: 10px;
    right: 10px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--red), var(--orange));
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.3);
}

.play-mark {
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    padding-left: 3px;
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -44%) scale(0.92);
    color: var(--red);
    background: rgba(255, 255, 255, 0.92);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card a:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    display: grid;
    gap: 8px;
    padding: 13px;
}

.card-body strong {
    overflow: hidden;
    display: -webkit-box;
    min-height: 43px;
    font-size: 15px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-line {
    overflow: hidden;
    display: -webkit-box;
    color: var(--soft);
    font-size: 13px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta {
    color: #fca5a5;
    font-size: 12px;
}

.tag-row {
    gap: 6px;
}

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

.movie-card.compact a {
    display: grid;
    grid-template-columns: 86px 1fr;
    min-height: 132px;
}

.movie-card.compact .poster-wrap {
    aspect-ratio: auto;
    height: 100%;
}

.movie-card.compact .card-body strong {
    min-height: 0;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    align-items: start;
}

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

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

.compact-head {
    margin-bottom: 18px;
}

.compact-head h2 {
    font-size: 26px;
}

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

.category-card,
.overview-card a {
    position: relative;
    display: block;
    min-height: 190px;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--card-bg);
    box-shadow: 0 15px 42px rgba(0, 0, 0, 0.22);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transition: transform 0.45s ease;
}

.category-card:hover img {
    transform: scale(1.08);
}

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

.category-card span {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 2;
    display: grid;
    gap: 6px;
}

.category-card strong,
.overview-copy strong {
    font-size: 22px;
}

.category-card small,
.overview-copy small {
    color: var(--muted);
    line-height: 1.6;
}

.page-hero {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 76px 0 28px;
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 20px;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--border);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.2);
}

.search-box {
    display: grid;
    gap: 9px;
}

.search-box span {
    color: var(--orange-soft);
    font-weight: 700;
}

.search-box input {
    width: 100%;
    min-height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 0 18px;
    color: #fff;
    outline: 0;
    background: rgba(255, 255, 255, 0.08);
}

.search-box input:focus {
    border-color: rgba(248, 113, 113, 0.66);
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.12);
}

.filter-chips {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.filter-chip {
    min-height: 36px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 0 14px;
    cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
    color: #fff;
    border-color: rgba(248, 113, 113, 0.48);
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.82), rgba(234, 88, 12, 0.82));
}

.empty-state {
    display: none;
    padding: 36px;
    border-radius: var(--radius);
    text-align: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
}

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

.overview-card a {
    min-height: 250px;
    padding: 18px;
}

.overview-covers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    height: 142px;
    margin-bottom: 16px;
}

.overview-covers img {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    object-fit: cover;
}

.overview-copy {
    display: grid;
    gap: 6px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 600px;
    background: #0f172a;
}

.detail-bg,
.detail-bg img,
.detail-hero::after {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.28;
    filter: blur(4px);
    transform: scale(1.04);
}

.detail-hero::after {
    content: "";
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.66), rgba(15, 23, 42, 0.3)),
        linear-gradient(0deg, #0f172a, transparent 38%);
}

.detail-inner {
    position: relative;
    z-index: 2;
    width: min(1220px, calc(100% - 32px));
    min-height: 600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 54px 0;
}

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

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

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: var(--soft);
}

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

.detail-line {
    max-width: 850px;
    color: #e2e8f0;
    font-size: 20px;
    line-height: 1.75;
}

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

.player-panel {
    overflow: hidden;
    border-radius: 28px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.78);
    box-shadow: var(--shadow);
}

.video-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.site-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 0;
    color: #fff;
    cursor: pointer;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.82)),
        radial-gradient(circle at 50% 42%, rgba(220, 38, 38, 0.24), transparent 34%);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.big-play {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    padding-left: 6px;
    border-radius: 999px;
    color: #fff;
    font-size: 34px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 20px 60px rgba(220, 38, 38, 0.48);
}

.player-overlay strong {
    font-size: 24px;
}

.player-overlay small {
    color: var(--muted);
}

.line-list {
    padding: 18px;
}

.line-button {
    min-height: 40px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
}

.line-button.active {
    color: #fff;
    background: linear-gradient(90deg, var(--red), var(--orange));
}

.detail-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.story-card {
    padding: 28px;
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid var(--border);
    box-shadow: 0 15px 42px rgba(0, 0, 0, 0.2);
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

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

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.78);
}

.footer-inner {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
}

.footer-inner strong {
    color: #fff;
    font-size: 20px;
}

.footer-inner p {
    margin: 10px 0 0;
    max-width: 640px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: center;
}

.footer-links a:hover {
    color: #fff;
}

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

    .split-section {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

@media (max-width: 940px) {
    .menu-toggle {
        display: block;
    }

    .nav-panel {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 86px;
        display: none;
        padding: 18px;
        border: 1px solid var(--border);
        border-radius: 20px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

    .nav-panel.is-open {
        display: grid;
    }

    .nav-links,
    .nav-categories {
        align-items: stretch;
    }

    .nav-link,
    .nav-categories a {
        display: inline-flex;
    }

    .hero-slider {
        height: 620px;
    }

    .hero-control {
        display: none;
    }

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

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

    .detail-inner {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 26px;
    }

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

@media (max-width: 720px) {
    .brand-text strong {
        font-size: 18px;
    }

    .hero-slider {
        height: 590px;
    }

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

    .hero-line,
    .detail-line {
        font-size: 17px;
    }

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

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

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

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

    .movie-card.compact a {
        grid-template-columns: 82px 1fr;
    }

    .detail-inner {
        grid-template-columns: 1fr;
        align-items: end;
        padding-top: 34px;
    }

    .detail-cover {
        width: 190px;
    }

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

@media (max-width: 420px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        width: 100%;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }
}
