:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.92);
    --panel-soft: rgba(30, 41, 59, 0.78);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #f97316;
    --accent-light: #fb923c;
    --accent-strong: #ef4444;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    --radius: 24px;
    --max: 1220px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

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

.header-inner {
    width: min(var(--max), calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-light), var(--accent-strong));
    color: #ffffff;
    box-shadow: 0 16px 40px rgba(249, 115, 22, 0.32);
}

.brand-text {
    font-size: 1.16rem;
    background: linear-gradient(90deg, #fed7aa, #ffffff, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

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

.site-nav a:hover {
    color: #ffffff;
    background: rgba(249, 115, 22, 0.16);
}

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

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

main {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
}

.hero-carousel {
    position: relative;
    min-height: 650px;
    margin: 28px 0 34px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 38px;
    align-items: center;
    padding: 72px;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.1) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.9) 0%, transparent 55%),
        var(--hero-image) center / cover no-repeat;
    filter: saturate(1.08);
}

.hero-slide.is-active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-copy,
.hero-poster {
    position: relative;
    z-index: 2;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent-light);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(2.4rem, 7vw, 5.3rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-line {
    max-width: 760px;
    margin: 24px 0 0;
    color: #ffedd5;
    font-size: clamp(1.08rem, 2.6vw, 1.48rem);
    font-weight: 800;
}

.hero-summary {
    max-width: 780px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.9;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.detail-meta a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border: 1px solid rgba(251, 146, 60, 0.24);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.56);
    color: #fed7aa;
    font-size: 0.84rem;
    font-weight: 700;
}

.hero-actions,
.detail-actions {
    margin-top: 34px;
}

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

.primary-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.28);
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.55);
    color: #ffffff;
}

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

.hero-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.66);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(15, 23, 42, 0.8));
}

.hero-poster span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff7ed;
    font-weight: 900;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.64);
    color: #ffffff;
    font-size: 2rem;
    transform: translateY(-50%);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    left: 72px;
    bottom: 34px;
    z-index: 6;
    display: flex;
    gap: 8px;
}

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

.hero-dot.is-active {
    background: var(--accent-light);
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 34px;
}

.stats-strip div,
.category-tile,
.content-card,
.filter-panel,
.movie-card,
.page-hero,
.detail-hero,
.player-frame {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.stats-strip div {
    padding: 22px;
    border-radius: 22px;
}

.stats-strip strong {
    display: block;
    color: #ffffff;
    font-size: clamp(1.8rem, 4vw, 3.1rem);
    line-height: 1;
}

.stats-strip span {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-weight: 700;
}

.section-block {
    margin: 54px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.65rem, 4vw, 2.6rem);
    letter-spacing: -0.04em;
}

.section-heading a {
    color: var(--accent-light);
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(251, 146, 60, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 24px 70px rgba(249, 115, 22, 0.12);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(15, 23, 42, 0.86));
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.78) 100%);
}

.card-play {
    position: absolute;
    left: 14px;
    bottom: 14px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.94);
    color: #ffffff;
    font-size: 0.88rem;
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 900;
}

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

.card-meta {
    color: var(--accent-light);
    font-size: 0.78rem;
    font-weight: 900;
}

.movie-card h3 {
    margin: 7px 0 8px;
    color: #ffffff;
    font-size: 1.02rem;
    font-weight: 900;
    line-height: 1.35;
}

.movie-card p {
    display: -webkit-box;
    min-height: 3.7em;
    margin: 0 0 12px;
    overflow: hidden;
    color: #cbd5e1;
    font-size: 0.88rem;
    line-height: 1.55;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tag-row {
    gap: 6px;
}

.tag-row span {
    min-height: 24px;
    padding: 3px 8px;
    color: #cbd5e1;
    font-size: 0.74rem;
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.8);
}

.large-tags span {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 0.88rem;
}

.filter-panel {
    margin-bottom: 22px;
    padding: 18px;
    border-radius: 22px;
}

.search-field {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 12px;
}

.search-field input,
.filter-row select {
    min-height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.68);
    color: #ffffff;
    outline: none;
}

.search-field input {
    padding: 0 16px;
}

.search-field button {
    padding: 0 16px;
    border: 0;
    border-radius: 14px;
    background: rgba(249, 115, 22, 0.16);
    color: #fed7aa;
    font-weight: 900;
}

.filter-row select {
    flex: 1 1 180px;
    padding: 0 12px;
}

.filter-count {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.empty-state {
    padding: 34px;
    border: 1px dashed rgba(251, 146, 60, 0.34);
    border-radius: 22px;
    color: #fed7aa;
    text-align: center;
}

.page-hero {
    margin: 30px 0 40px;
    padding: 56px;
    border-radius: 30px;
    background:
        radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.3), transparent 24rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.78));
}

.small-hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.4rem);
}

.small-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 1.05rem;
    line-height: 1.8;
}

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

.category-tile {
    min-height: 150px;
    padding: 22px;
    border-radius: 22px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    border-color: rgba(251, 146, 60, 0.55);
    transform: translateY(-4px);
}

.category-tile strong {
    display: block;
    color: #ffffff;
    font-size: 1.22rem;
}

.category-tile span {
    display: block;
    margin: 8px 0 12px;
    color: var(--accent-light);
    font-weight: 900;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 18px;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumb a {
    color: #fed7aa;
}

.detail-hero {
    position: relative;
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 36px;
    overflow: hidden;
    padding: 44px;
    border-radius: 30px;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.74)),
        var(--detail-bg) center / cover no-repeat;
    filter: blur(10px) saturate(1.2);
    transform: scale(1.05);
    opacity: 0.8;
}

.detail-poster,
.detail-copy {
    position: relative;
    z-index: 1;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.44);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(15, 23, 42, 0.86));
}

.detail-line {
    max-width: 840px;
    margin: 22px 0 18px;
    color: #ffedd5;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.7;
}

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

.player-section {
    margin: 52px 0;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 22px 50px rgba(249, 115, 22, 0.34);
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 16px;
    margin: 0;
    color: #fed7aa;
    font-size: 0.9rem;
}

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

.content-card {
    padding: 24px;
    border-radius: 22px;
}

.content-card h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 1.24rem;
}

.content-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.9;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.76);
}

.footer-grid {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
}

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

.footer-grid a {
    display: block;
    margin: 8px 0;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 1rem;
}

.footer-brand {
    margin-bottom: 14px;
}

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

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 300px;
        padding: 56px;
    }
}

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

    .site-nav {
        position: absolute;
        top: 72px;
        right: 16px;
        display: none;
        width: min(260px, calc(100vw - 32px));
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(2, 6, 23, 0.96);
        box-shadow: var(--shadow);
    }

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

    .hero-carousel {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 40px 28px 70px;
    }

    .hero-poster {
        width: min(240px, 68vw);
    }

    .hero-dots {
        left: 28px;
    }

    .stats-strip,
    .category-grid,
    .detail-text,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    .detail-hero {
        grid-template-columns: 240px minmax(0, 1fr);
        padding: 30px;
    }
}

@media (max-width: 640px) {
    main,
    .header-inner,
    .footer-grid {
        width: min(100% - 22px, var(--max));
    }

    .hero-carousel {
        min-height: 720px;
        margin-top: 18px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 30px 20px 64px;
    }

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

    .stats-strip,
    .category-grid,
    .detail-text,
    .footer-grid,
    .detail-hero {
        grid-template-columns: 1fr;
    }

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

    .page-hero {
        padding: 34px 22px;
        border-radius: 24px;
    }

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

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

    .detail-hero {
        padding: 22px;
    }

    .detail-poster {
        width: min(260px, 76vw);
    }

    .play-circle {
        width: 64px;
        height: 64px;
    }
}
