:root {
    color-scheme: dark;
    --bg: #070b14;
    --panel: rgba(15, 23, 42, 0.86);
    --panel-strong: #0f172a;
    --panel-soft: rgba(255, 255, 255, 0.08);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --line: rgba(148, 163, 184, 0.22);
    --orange: #f97316;
    --amber: #fbbf24;
    --cyan: #22d3ee;
    --emerald: #34d399;
    --rose: #fb7185;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 18% 0%, rgba(249, 115, 22, 0.18), transparent 32rem),
        radial-gradient(circle at 92% 12%, rgba(34, 211, 238, 0.12), transparent 30rem),
        linear-gradient(180deg, #0f172a 0%, #070b14 42%, #020617 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

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

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.32);
}

.brand-text,
.footer-brand {
    font-size: 22px;
    background: linear-gradient(90deg, #fb923c, #facc15);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link,
.mobile-link {
    color: #dbeafe;
    border-radius: 14px;
    transition: 0.25s ease;
}

.nav-link {
    padding: 10px 14px;
    font-weight: 700;
    font-size: 14px;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(249, 115, 22, 0.92);
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.24);
}

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

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

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

.mobile-link {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.08);
}

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

.hero {
    position: relative;
    overflow: hidden;
    min-height: 690px;
    display: grid;
    align-items: center;
    isolation: isolate;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.82)),
        radial-gradient(circle at 78% 42%, rgba(249, 115, 22, 0.35), transparent 24rem);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 52px 52px;
    mask-image: linear-gradient(to bottom, black, transparent 82%);
    z-index: -2;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    align-items: center;
    gap: 44px;
    min-height: 610px;
    padding: 64px 0;
}

.hero-slide.active {
    display: grid;
    animation: fadeUp 0.7s ease both;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 12px;
    color: #fed7aa;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(251, 146, 60, 0.35);
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.12);
}

.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero h1 span,
.gradient-text {
    display: block;
    background: linear-gradient(90deg, #fb923c, #facc15, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    max-width: 720px;
    margin: 0 0 28px;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-actions,
.action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.button,
.button-soft,
.ranking-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 18px;
    color: #fff;
    font-weight: 900;
    border-radius: 16px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.button {
    background: linear-gradient(90deg, #f97316, #ea580c);
    box-shadow: 0 14px 36px rgba(249, 115, 22, 0.32);
}

.button-soft {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.button:hover,
.button-soft:hover,
.ranking-action:hover {
    transform: translateY(-2px);
}

.hero-visual {
    position: relative;
    min-height: 470px;
}

.hero-poster-stack {
    position: absolute;
    inset: 0;
    border-radius: 34px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 30%, rgba(249, 115, 22, 0.25), transparent 20rem),
        linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(2, 6, 23, 0.95));
    box-shadow: var(--shadow);
}

.hero-poster-stack img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.86;
}

.hero-poster-stack::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(2, 6, 23, 0.82));
}

.hero-card-float {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 2;
    padding: 22px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(18px);
}

.hero-card-float h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

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

.stat-card {
    padding: 22px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.stat-card strong {
    display: block;
    font-size: 28px;
    color: #fff;
}

.stat-card span {
    color: #bfdbfe;
    font-size: 14px;
}

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

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

.hero-dot.active {
    width: 32px;
    background: linear-gradient(90deg, #f97316, #facc15);
}

.section {
    padding: 74px 0;
}

.section.alt {
    background: rgba(15, 23, 42, 0.42);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

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

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

.section-desc {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--soft);
}

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

.category-tile {
    min-height: 148px;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.78));
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 42px rgba(2, 6, 23, 0.24);
    transition: 0.25s ease;
}

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

.category-tile h2,
.category-tile h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 38px rgba(2, 6, 23, 0.26);
    transition: 0.25s ease;
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 30%, rgba(249, 115, 22, 0.2), transparent 13rem),
        linear-gradient(135deg, #111827, #020617);
}

.poster-frame img,
.ranking-cover img,
.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover img,
.ranking-row:hover img {
    transform: scale(1.05);
}

.img-missing {
    opacity: 0;
}

.poster-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(2, 6, 23, 0.72));
    pointer-events: none;
}

.poster-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(15, 23, 42, 0.74);
    backdrop-filter: blur(10px);
}

.poster-year {
    right: 12px;
    bottom: 12px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    background: linear-gradient(135deg, #f97316, #facc15);
    color: #111827;
}

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

.movie-card h2,
.ranking-content h2,
.detail-text h1 {
    margin: 0;
    line-height: 1.24;
}

.movie-card h2 {
    font-size: 19px;
}

.movie-card p,
.ranking-content p,
.detail-text p,
.info-card p {
    color: var(--soft);
}

.movie-card p {
    min-height: 48px;
    margin: 10px 0 14px;
    font-size: 14px;
}

.movie-meta-line,
.card-tags,
.meta-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.movie-meta-line {
    margin-bottom: 10px;
    color: #93c5fd;
    font-size: 13px;
    font-weight: 700;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.13);
    border: 1px solid rgba(251, 146, 60, 0.23);
    font-size: 12px;
    font-weight: 800;
}

.filter-panel {
    margin: 28px 0;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 12px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--line);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    color: #fff;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    background: rgba(2, 6, 23, 0.62);
    outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(251, 146, 60, 0.72);
}

.breadcrumb {
    padding: 28px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: #fbbf24;
}

.detail-hero {
    padding: 36px 0 70px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(290px, 0.7fr);
    gap: 30px;
    align-items: start;
}

.player-card,
.detail-panel,
.info-card {
    overflow: hidden;
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: var(--shadow);
}

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

.player-shell video {
    width: 100%;
    height: 100%;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.5));
    border: 0;
    cursor: pointer;
}

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

.play-icon {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, #f97316, #facc15);
    box-shadow: 0 18px 48px rgba(249, 115, 22, 0.36);
    font-size: 34px;
    padding-left: 5px;
}

.player-titlebar {
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: var(--soft);
    border-top: 1px solid var(--line);
}

.detail-panel {
    padding: 26px;
}

.detail-text h1 {
    font-size: clamp(34px, 5vw, 58px);
    letter-spacing: -0.05em;
}

.detail-text .lead {
    margin: 18px 0;
    font-size: 19px;
    color: #dbeafe;
}

.detail-cover {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 24px;
    background:
        radial-gradient(circle at 50% 25%, rgba(249, 115, 22, 0.24), transparent 13rem),
        linear-gradient(135deg, #111827, #020617);
}

.info-card {
    padding: 24px;
    margin-bottom: 20px;
}

.info-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.info-card p {
    margin: 0;
}

.meta-list {
    margin: 18px 0;
}

.meta-list span {
    padding: 7px 10px;
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.24);
    font-weight: 800;
    font-size: 13px;
}

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

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

.ranking-row {
    display: grid;
    grid-template-columns: 86px 54px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.84);
    border: 1px solid rgba(148, 163, 184, 0.18);
    transition: 0.25s ease;
}

.ranking-row:hover {
    border-color: rgba(251, 146, 60, 0.5);
    transform: translateY(-2px);
}

.ranking-cover {
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #020617);
}

.ranking-number {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #111827;
    font-weight: 1000;
    background: linear-gradient(135deg, #f97316, #facc15);
}

.ranking-content h2 {
    font-size: 22px;
}

.ranking-content p {
    margin: 8px 0;
}

.ranking-action {
    min-height: 42px;
    padding: 10px 14px;
    background: rgba(249, 115, 22, 0.16);
    border-color: rgba(251, 146, 60, 0.3);
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), #020617);
    border-top: 1px solid var(--line);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 0.8fr;
    gap: 34px;
}

.footer-inner h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

.footer-inner p {
    max-width: 420px;
    color: #94a3b8;
}

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

.footer-links a {
    color: #cbd5e1;
}

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

.footer-bottom {
    padding: 18px;
    text-align: center;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

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

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-visual {
        min-height: 430px;
    }

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

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

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .container,
    .header-inner,
    .mobile-nav,
    .footer-inner {
        width: min(100% - 24px, 1180px);
    }

    .hero {
        min-height: auto;
    }

    .hero-slide {
        min-height: 0;
        padding: 44px 0 76px;
        gap: 28px;
    }

    .hero-stats,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: 360px;
    }

    .section {
        padding: 50px 0;
    }

    .section-head {
        display: block;
    }

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

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

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

    .ranking-number,
    .ranking-action {
        display: none;
    }

    .player-titlebar {
        display: block;
    }
}
