:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --amber: #f59e0b;
    --amber-soft: rgba(245, 158, 11, 0.18);
    --orange: #fb923c;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 32rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 28rem),
        linear-gradient(135deg, #020617 0%, #0f172a 45%, #111827 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

main {
    padding-top: 92px;
}

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

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.86));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
}

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

.brand-mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: #111827;
    font-weight: 900;
    background: linear-gradient(135deg, #facc15, #f59e0b 55%, #fb923c);
    box-shadow: 0 0 32px rgba(245, 158, 11, 0.38);
}

.brand-copy {
    display: grid;
    line-height: 1.2;
}

.brand-copy strong,
.footer-brand {
    font-size: 21px;
    font-weight: 900;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fcd34d, #f59e0b, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-copy small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

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

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

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

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.16);
}

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

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-link {
    display: block;
    padding: 12px 14px;
    font-weight: 700;
}

.hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 650px;
    margin: 34px auto 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: rgba(15, 23, 42, 0.6);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 36px;
    align-items: center;
    padding: clamp(28px, 5vw, 72px);
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.7s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.72), rgba(120, 53, 15, 0.38));
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto -10% -28% 38%;
    z-index: -1;
    height: 300px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.32), transparent 65%);
    filter: blur(22px);
}

.hero-copy {
    max-width: 650px;
}

.eyebrow {
    margin: 0 0 12px;
    color: #fcd34d;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 74px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 620px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: clamp(16px, 2vw, 20px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid rgba(245, 158, 11, 0.36);
    border-radius: 999px;
    color: #111827;
    font-weight: 900;
    background: linear-gradient(135deg, #fde68a, #f59e0b 60%, #fb923c);
    box-shadow: 0 12px 34px rgba(245, 158, 11, 0.26);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.34);
}

.btn.secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--line);
    box-shadow: none;
}

.hero-visual {
    position: relative;
    align-self: stretch;
    min-height: 430px;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
}

.hero-visual::before {
    content: "";
    position: absolute;
    inset: 18px -18px -18px 18px;
    z-index: -1;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.5), rgba(59, 130, 246, 0.18));
    filter: blur(10px);
}

.hero-card {
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: min(320px, calc(100% - 36px));
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(18px);
}

.hero-card strong {
    display: block;
    margin-bottom: 6px;
    font-size: 18px;
}

.hero-card span {
    color: var(--soft);
    font-size: 13px;
}

.hero-dots {
    position: absolute;
    left: clamp(28px, 5vw, 72px);
    bottom: 28px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 32px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    transition: 0.3s ease;
}

.hero-dot.is-active {
    width: 58px;
    background: #f59e0b;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 64px 0 48px;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 18% 10%, rgba(245, 158, 11, 0.2), transparent 28rem),
        radial-gradient(circle at 78% 0%, rgba(56, 189, 248, 0.14), transparent 24rem);
}

.page-hero p,
.detail-line {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--soft);
    font-size: 18px;
}

.section {
    padding: 58px 0 0;
}

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

.section-head.compact {
    align-items: center;
}

.section-head h2,
.detail-text h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.1;
}

.text-link {
    color: #fcd34d;
    font-weight: 800;
}

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

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

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(30, 41, 59, 0.82);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

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

.movie-card:hover .card-poster img {
    transform: scale(1.08);
    filter: saturate(1.12);
}

.score-badge,
.play-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
}

.score-badge {
    top: 12px;
    right: 12px;
    min-width: 48px;
    height: 30px;
    color: #111827;
    background: #fcd34d;
}

.play-badge {
    left: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    color: #fff;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(12px);
}

.card-body {
    padding: 18px;
}

.card-meta,
.rank-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.card-meta span,
.rank-meta span,
.detail-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.11);
}

.movie-card h3 {
    margin: 12px 0 8px;
    color: var(--text);
    font-size: 18px;
    line-height: 1.3;
}

.movie-card p {
    min-height: 50px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-list span {
    display: inline-flex;
    padding: 5px 9px;
    border: 1px solid rgba(245, 158, 11, 0.26);
    border-radius: 999px;
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.09);
    font-size: 12px;
}

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

.category-card,
.glass-panel,
.filter-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.2);
}

.category-card {
    padding: 24px;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.42);
}

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

.category-card p {
    margin: 0 0 18px;
    color: var(--muted);
}

.category-samples {
    display: flex;
    gap: 8px;
    margin-top: 18px;
}

.category-samples img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 70px 104px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.58);
    transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.38);
    background: rgba(30, 41, 59, 0.76);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: #111827;
    font-size: 20px;
    font-weight: 950;
    background: linear-gradient(135deg, #fcd34d, #f59e0b);
}

.rank-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
}

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

.rank-copy h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-copy p {
    margin: 0 0 10px;
    color: var(--muted);
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 12px;
    padding: 16px;
    margin-bottom: 28px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.58);
    outline: none;
    padding: 0 14px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(245, 158, 11, 0.56);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.empty-state {
    display: none;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    background: rgba(15, 23, 42, 0.62);
}

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

.detail-hero {
    min-height: 540px;
    display: flex;
    align-items: center;
}

.detail-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-position: center;
    background-size: cover;
    filter: blur(18px) saturate(1.15);
    transform: scale(1.06);
    opacity: 0.46;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.74), rgba(2, 6, 23, 0.96));
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs a {
    color: #fcd34d;
}

.detail-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 36px;
    align-items: center;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-meta {
    margin-top: 22px;
}

.detail-tags {
    margin-top: 20px;
}

.player-section {
    padding-top: 52px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 30px;
    background: #000;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

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

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.48);
}

.player-button {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: clamp(72px, 10vw, 112px);
    height: clamp(72px, 10vw, 112px);
    padding-left: 6px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    color: #111827;
    font-size: clamp(28px, 4vw, 44px);
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    box-shadow: 0 24px 64px rgba(245, 158, 11, 0.38);
}

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

.glass-panel {
    padding: 26px;
}

.glass-panel h2 {
    margin-bottom: 14px;
}

.glass-panel p {
    margin: 0;
    color: var(--soft);
}

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

.site-footer {
    margin-top: 72px;
    padding: 46px 0 26px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.38);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
}

.footer-grid p {
    color: var(--muted);
}

.footer-grid h3 {
    margin: 0 0 14px;
}

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

.footer-links a {
    color: var(--muted);
}

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

.footer-bottom {
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: #64748b;
    font-size: 13px;
}

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

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

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

    .hero,
    .detail-hero {
        min-height: auto;
    }

    .hero-slide {
        position: relative;
        display: none;
        grid-template-columns: 1fr;
        padding: 34px 24px 82px;
    }

    .hero-slide.is-active {
        display: grid;
    }

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

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

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

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

    .detail-layout {
        grid-template-columns: 190px 1fr;
    }
}

@media (max-width: 640px) {
    main {
        padding-top: 82px;
    }

    .brand-copy small {
        display: none;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    .hero {
        width: min(100% - 20px, 1180px);
        border-radius: 24px;
        margin-top: 18px;
    }

    .hero h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
        letter-spacing: -0.03em;
    }

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

    .hero-card {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
    }

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

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

    .rank-item {
        grid-template-columns: 48px 86px 1fr;
        gap: 12px;
    }

    .rank-number {
        width: 42px;
        height: 42px;
        font-size: 16px;
        border-radius: 14px;
    }

    .rank-copy p {
        display: none;
    }

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

    .detail-poster {
        max-width: 220px;
    }

    .player-shell {
        border-radius: 20px;
    }
}
