:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-soft: #111c31;
    --panel-lift: #18233a;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --orange: #f97316;
    --orange-strong: #ea580c;
    --red: #dc2626;
    --amber: #f59e0b;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 22px;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.28);
    color: #ffffff;
    font-size: 20px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-title {
    font-size: 20px;
}

.brand-subtitle {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

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

.nav-links a {
    padding: 10px 14px;
    border-radius: 12px;
    color: #cbd5e1;
    font-size: 14px;
    transition: color 0.2s ease, background 0.2s ease;
}

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
    cursor: pointer;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 22px;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 42px 0 36px;
}

.hero-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(248, 250, 252, 0.12);
    border-radius: 34px;
    min-height: 560px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(127, 29, 29, 0.36));
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    filter: saturate(1.1) contrast(1.05);
}

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.25) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0));
}

.hero-content {
    position: relative;
    z-index: 1;
    min-height: 560px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
    gap: 34px;
    align-items: center;
    padding: 58px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(251, 146, 60, 0.24);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
}

.hero h1,
.page-hero h1,
.detail-title {
    margin: 0;
    line-height: 1.12;
    letter-spacing: -0.03em;
    font-size: clamp(34px, 5vw, 62px);
}

.hero-desc {
    max-width: 720px;
    margin: 20px 0 0;
    color: #cbd5e1;
    font-size: 18px;
}

.hero-meta,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    padding: 6px 11px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.58);
    font-size: 13px;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border: 0;
    border-radius: 14px;
    padding: 11px 17px;
    color: #ffffff;
    background: rgba(30, 41, 59, 0.92);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: rgba(51, 65, 85, 0.96);
}

.btn-primary {
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 16px 34px rgba(249, 115, 22, 0.26);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #fb923c, #ef4444);
}

.hero-poster {
    position: relative;
    justify-self: end;
    width: min(360px, 100%);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transform: rotate(2deg);
}

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

.hero-poster-caption {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    border-radius: 18px;
    padding: 14px;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(14px);
}

.hero-dots {
    position: absolute;
    left: 58px;
    bottom: 34px;
    z-index: 3;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

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

.section {
    padding: 38px 0;
}

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

.section-kicker {
    margin: 0 0 8px;
    color: var(--orange);
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 13px;
}

.section-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}

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

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

.category-card {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.22), transparent 9rem),
        var(--panel);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(249, 115, 22, 0.42);
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.3), transparent 9rem),
        var(--panel-lift);
}

.category-card h3 {
    margin: 0;
    font-size: 21px;
}

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

.filters {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) repeat(2, minmax(150px, 210px));
    gap: 12px;
    margin: 18px 0 24px;
}

.filters input,
.filters select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
    background: rgba(15, 23, 42, 0.92);
    color: #ffffff;
    padding: 0 14px;
}

.filters input:focus,
.filters select:focus {
    border-color: rgba(249, 115, 22, 0.65);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.86);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(249, 115, 22, 0.42);
    background: rgba(24, 35, 58, 0.96);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
}

.poster {
    position: relative;
    overflow: hidden;
    background: #0b1120;
}

.poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    border-radius: 999px;
    padding: 4px 9px;
    color: #ffffff;
    background: rgba(249, 115, 22, 0.92);
    font-size: 12px;
    font-weight: 700;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    flex: 1;
}

.card-title {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
}

.card-text {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: auto;
}

.mini-tag {
    border-radius: 999px;
    padding: 3px 7px;
    color: #cbd5e1;
    background: rgba(30, 41, 59, 0.95);
    font-size: 12px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 80px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.84);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    border-color: rgba(249, 115, 22, 0.4);
    background: rgba(24, 35, 58, 0.96);
}

.rank-num {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(249, 115, 22, 0.16);
    color: #fed7aa;
    font-weight: 800;
}

.rank-thumb {
    width: 80px;
    height: 108px;
    border-radius: 14px;
    overflow: hidden;
    background: #0b1120;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-title {
    margin: 0 0 5px;
    font-size: 17px;
}

.rank-desc {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.heat {
    color: #fed7aa;
    font-weight: 800;
    white-space: nowrap;
}

.page-hero {
    padding: 46px 0 20px;
}

.page-hero-card {
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 38px;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(220, 38, 38, 0.08)),
        rgba(15, 23, 42, 0.88);
    box-shadow: var(--shadow);
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) minmax(280px, 0.58fr);
    gap: 28px;
    padding: 34px 0 50px;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    background:
        radial-gradient(circle, rgba(249, 115, 22, 0.24), transparent 18rem),
        rgba(2, 6, 23, 0.34);
    cursor: pointer;
    z-index: 4;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-ring {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 18px 44px rgba(249, 115, 22, 0.35);
    font-size: 28px;
}

.player-error {
    min-height: 24px;
    margin-top: 10px;
    color: #fecaca;
}

.detail-card,
.side-card,
.text-panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.86);
    padding: 22px;
}

.detail-card + .detail-card,
.text-panel + .text-panel {
    margin-top: 18px;
}

.detail-card h2,
.side-card h2,
.text-panel h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.detail-card p,
.text-panel p {
    color: #cbd5e1;
    margin: 0;
}

.side-poster {
    overflow: hidden;
    border-radius: 20px;
    margin-bottom: 18px;
}

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

.info-list {
    display: grid;
    gap: 10px;
    color: #cbd5e1;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    padding-bottom: 8px;
}

.info-list span:first-child {
    color: var(--muted);
}

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

.related-card {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.86);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    border-color: rgba(249, 115, 22, 0.4);
}

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

.related-card strong {
    display: block;
    padding: 10px;
    font-size: 14px;
    line-height: 1.35;
}

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

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

.site-footer {
    margin-top: 36px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(2, 6, 23, 0.72);
}

.footer-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px 22px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: var(--muted);
    font-size: 14px;
}

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

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

[hidden] {
    display: none !important;
}

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

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

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

    .hero-poster {
        justify-self: start;
        width: 300px;
    }

    .rank-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 74px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(2, 6, 23, 0.96);
        box-shadow: var(--shadow);
    }

    .nav-links.is-open {
        display: flex;
    }

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

    .hero-shell,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        padding: 34px 24px 74px;
    }

    .hero-dots {
        left: 24px;
        bottom: 24px;
    }

    .filters {
        grid-template-columns: 1fr;
    }

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

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

    .rank-item {
        grid-template-columns: 42px 62px minmax(0, 1fr);
    }

    .rank-item .heat {
        grid-column: 3;
    }

    .rank-thumb {
        width: 62px;
        height: 86px;
    }
}

@media (max-width: 520px) {
    .container,
    .nav-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand-subtitle {
        display: none;
    }

    .brand-title {
        font-size: 18px;
    }

    .hero {
        padding-top: 24px;
    }

    .hero-shell,
    .page-hero-card {
        border-radius: 24px;
    }

    .hero h1,
    .page-hero h1,
    .detail-title {
        font-size: 31px;
    }

    .hero-desc {
        font-size: 16px;
    }

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