:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-solid: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --muted: #94a3b8;
    --text: #f8fafc;
    --text-soft: #cbd5e1;
    --amber: #f59e0b;
    --amber-hover: #d97706;
    --amber-soft: rgba(245, 158, 11, 0.14);
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.16), transparent 28rem),
        radial-gradient(circle at 90% 12%, rgba(59, 130, 246, 0.12), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

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

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), #f97316);
    box-shadow: 0 16px 40px rgba(245, 158, 11, 0.25);
    font-size: 14px;
}

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

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

.nav-link,
.mobile-link {
    color: var(--text-soft);
    border-radius: 12px;
    transition: 0.2s ease;
}

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #fbbf24;
    background: var(--amber-soft);
}

.menu-button {
    width: 42px;
    height: 42px;
    display: none;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

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

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

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

.hero {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    display: grid;
    align-items: end;
}

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.86) 28%, rgba(15, 23, 42, 0.34) 74%, rgba(15, 23, 42, 0.72) 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.25) 64%);
}

.hero-inner {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 120px 0 88px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.6fr);
    gap: 36px;
    align-items: end;
}

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

.eyebrow,
.poster-badge,
.rank-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.26);
    backdrop-filter: blur(12px);
}

.eyebrow {
    padding: 7px 12px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: #ffffff;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.hero h1 {
    font-size: clamp(42px, 7vw, 76px);
}

.hero p {
    max-width: 680px;
    margin: 18px 0 0;
    color: var(--text-soft);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.78;
}

.hero-meta,
.detail-meta,
.card-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-meta span,
.detail-meta span,
.card-meta-row span {
    padding: 7px 11px;
    color: var(--text-soft);
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 13px;
}

.hero-actions,
.section-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.btn-primary,
.btn-ghost,
.filter-panel button,
.player-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 14px;
    font-weight: 800;
    transition: 0.2s ease;
    cursor: pointer;
}

.btn-primary,
.player-start {
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), #f97316);
    box-shadow: 0 18px 48px rgba(245, 158, 11, 0.25);
}

.btn-primary {
    min-height: 48px;
    padding: 0 22px;
}

.btn-primary:hover,
.player-start:hover {
    transform: translateY(-2px) scale(1.01);
    background: linear-gradient(135deg, #fbbf24, var(--amber-hover));
}

.btn-ghost {
    min-height: 48px;
    padding: 0 20px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid var(--line);
}

.btn-ghost:hover {
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.12);
}

.hero-side {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.68);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-side h2 {
    margin: 0 0 16px;
    font-size: 19px;
}

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

.mini-card {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    align-items: center;
}

.mini-card img {
    width: 76px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: #111827;
}

.mini-card h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.35;
}

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

.section,
.page-hero,
.detail-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.section {
    padding: 54px 0;
}

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

.section-header h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.02em;
}

.section-header p,
.page-hero p,
.empty-message {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

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

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 18px;
    background: #111827;
    border: 1px solid var(--line);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
}

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 66%);
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-wrap img,
.wide-card:hover img,
.category-tile:hover img {
    transform: scale(1.08);
}

.movie-card:hover .poster-wrap::after {
    opacity: 1;
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.92);
    transform: translate(-50%, -50%) scale(0.82);
    opacity: 0;
    transition: 0.24s ease;
}

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

.movie-card-body {
    padding-top: 13px;
}

.movie-card h2,
.wide-card h2,
.rank-row h2 {
    margin: 0;
    font-size: 17px;
    line-height: 1.45;
}

.movie-card a:hover,
.wide-card a:hover,
.rank-row a:hover,
.mini-card:hover h3 {
    color: #fbbf24;
}

.movie-meta {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.movie-desc {
    margin: 9px 0 0;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.chip-row span,
.detail-tags span {
    padding: 5px 9px;
    border-radius: 999px;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.18);
    font-size: 12px;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

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

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.18));
}

.category-tile-body {
    position: relative;
    z-index: 1;
    height: 100%;
    padding: 22px;
    display: grid;
    align-content: end;
}

.category-tile h2 {
    margin: 0;
    font-size: 24px;
}

.category-tile p {
    margin: 10px 0 0;
    color: var(--text-soft);
    line-height: 1.65;
}

.page-hero {
    padding: 66px 0 26px;
}

.page-hero-inner {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.78)),
        rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.filter-panel {
    margin: 28px 0 30px;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px 110px;
    gap: 14px;
    align-items: end;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
}

.filter-panel label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 750;
}

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

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

.filter-panel button {
    min-height: 46px;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.filter-panel button:hover {
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.42);
}

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

.wide-card,
.rank-row {
    display: grid;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
}

.wide-card {
    grid-template-columns: 118px 1fr;
    padding: 14px;
}

.wide-cover {
    overflow: hidden;
    border-radius: 14px;
    background: #111827;
}

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

.wide-body p {
    margin: 8px 0 0;
    color: var(--text-soft);
    line-height: 1.7;
}

.text-link {
    display: inline-flex;
    margin-top: 12px;
    color: #fbbf24;
    font-weight: 800;
}

.rank-row {
    grid-template-columns: 70px 96px 1fr auto;
    align-items: center;
    padding: 13px;
}

.rank-number {
    color: #fbbf24;
    font-size: 26px;
    font-weight: 900;
    text-align: center;
}

.rank-row img {
    width: 96px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 13px;
    background: #111827;
}

.rank-row p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.rank-badge {
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.detail-hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.28;
}

.detail-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px) saturate(1.1);
    transform: scale(1.03);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.82));
}

.detail-shell {
    position: relative;
    z-index: 1;
    padding: 54px 0 46px;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-cover {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    background: #111827;
}

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

.detail-title h1 {
    font-size: clamp(38px, 6vw, 68px);
}

.detail-title p {
    margin: 18px 0 0;
    color: var(--text-soft);
    line-height: 1.85;
    font-size: 18px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.player-section {
    width: min(1100px, calc(100% - 32px));
    margin: 44px auto 0;
}

.movie-player {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.22s ease;
}

.player-start {
    min-height: 56px;
    padding: 0 26px;
    border: 0;
    font-size: 17px;
}

.movie-player.is-playing .player-overlay {
    opacity: 0;
    pointer-events: none;
}

.content-panel {
    width: min(1100px, calc(100% - 32px));
    margin: 28px auto 0;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
}

.content-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-panel p {
    margin: 0 0 18px;
    color: var(--text-soft);
    line-height: 1.9;
}

.related-section {
    width: min(1280px, calc(100% - 32px));
    margin: 30px auto 58px;
}

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

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 28px;
}

.footer-main p,
.footer-column a,
.copyright {
    color: var(--muted);
}

.footer-main p {
    max-width: 560px;
    line-height: 1.75;
}

.footer-column h2 {
    margin: 0 0 14px;
    font-size: 16px;
}

.footer-column ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 9px;
}

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

[hidden] {
    display: none !important;
}

.empty-message {
    display: none;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
}

.empty-message.show {
    display: block;
}

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

    .menu-button {
        display: block;
    }

    .mobile-nav.open {
        display: grid;
    }

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

    .hero-side {
        display: none;
    }

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

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

    .rank-row {
        grid-template-columns: 52px 86px 1fr;
    }

    .rank-badge {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

@media (max-width: 680px) {
    .hero {
        min-height: 520px;
    }

    .hero-inner {
        padding: 86px 0 58px;
    }

    .hero-actions,
    .section-actions {
        align-items: stretch;
        flex-direction: column;
    }

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

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

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

    .wide-card {
        grid-template-columns: 88px 1fr;
    }

    .detail-cover {
        max-width: 260px;
    }

    .content-panel {
        padding: 22px;
    }

    .rank-row {
        grid-template-columns: 42px 72px 1fr;
        gap: 12px;
    }

    .rank-row img {
        width: 72px;
    }

    .rank-number {
        font-size: 22px;
    }
}

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

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