:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-strong: rgba(15, 23, 42, 0.96);
    --line: rgba(96, 165, 250, 0.25);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --soft: #94a3b8;
    --blue: #38bdf8;
    --blue-deep: #1d4ed8;
    --amber: #fbbf24;
    --amber-deep: #d97706;
    --radius: 22px;
    --shadow: 0 24px 60px rgba(2, 6, 23, 0.48);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: radial-gradient(circle at 12% 8%, rgba(59, 130, 246, 0.22), transparent 32%), radial-gradient(circle at 88% 16%, rgba(251, 191, 36, 0.12), transparent 28%), linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: linear-gradient(to bottom, black, transparent 72%);
    z-index: -1;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 178px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber), #fde68a);
    box-shadow: 0 0 24px rgba(251, 191, 36, 0.34);
}

.brand-text strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: 0.04em;
}

.brand-text em {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-style: normal;
    color: #93c5fd;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

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

.nav-link {
    padding: 9px 10px;
    border-radius: 999px;
    color: #e2e8f0;
    font-size: 14px;
    transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #111827;
    background: linear-gradient(135deg, var(--amber), #fde68a);
    box-shadow: 0 10px 26px rgba(251, 191, 36, 0.2);
}

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

.mobile-nav {
    display: none;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

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

.mobile-nav a {
    padding: 11px 12px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(96, 165, 250, 0.18);
    color: #dbeafe;
}

main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 32px 20px 64px;
}

.hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    border-radius: 34px;
    border: 1px solid rgba(96, 165, 250, 0.22);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 64, 175, 0.72) 54%, rgba(2, 6, 23, 0.95));
    box-shadow: var(--shadow);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(8px);
    opacity: 0.78;
    pointer-events: none;
}

.hero::before {
    width: 310px;
    height: 310px;
    right: -80px;
    top: -90px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.32), transparent 70%);
}

.hero::after {
    width: 280px;
    height: 280px;
    left: -110px;
    bottom: -100px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.2), transparent 68%);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.66fr);
    gap: 34px;
    padding: 62px;
    opacity: 0;
    transform: translateY(16px) scale(1.01);
    pointer-events: none;
    transition: opacity 0.75s ease, transform 0.75s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    z-index: 2;
}

.hero-copy {
    position: relative;
    z-index: 3;
    align-self: center;
    max-width: 680px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 13px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.28);
    font-weight: 700;
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0 0 24px;
    max-width: 620px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 14px 35px rgba(2, 6, 23, 0.26);
    cursor: pointer;
    transition: 0.25s ease;
}

.btn.primary {
    color: #111827;
    background: linear-gradient(135deg, var(--amber), #fde68a);
    border-color: transparent;
}

.btn.blue {
    color: white;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    border-color: transparent;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(56, 189, 248, 0.22);
}

.hero-search {
    margin-top: 28px;
    display: flex;
    max-width: 560px;
    padding: 8px;
    border: 1px solid rgba(147, 197, 253, 0.28);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.52);
    backdrop-filter: blur(16px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: white;
    background: transparent;
    padding: 0 14px;
}

.hero-search input::placeholder {
    color: #94a3b8;
}

.hero-poster {
    position: relative;
    align-self: center;
    z-index: 3;
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 24px -18px -18px 24px;
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.32), rgba(251, 191, 36, 0.2));
    filter: blur(1px);
}

.hero-poster img {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.46);
}

.hero-poster .glass-card {
    position: absolute;
    left: -28px;
    bottom: 24px;
    max-width: 260px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(147, 197, 253, 0.24);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
}

.glass-card strong {
    display: block;
    margin-bottom: 6px;
    color: #fde68a;
}

.glass-card span {
    color: #bfdbfe;
    font-size: 13px;
    line-height: 1.6;
}

.hero-dots {
    position: absolute;
    left: 62px;
    bottom: 42px;
    z-index: 6;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
}

.hero-dot.active {
    width: 34px;
    background: var(--amber);
    border-color: var(--amber);
}

.section {
    margin-top: 46px;
}

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

.section-kicker {
    margin: 0 0 8px;
    color: #fcd34d;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.section h1,
.section h2,
.page-head h1 {
    margin: 0;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.2;
}

.section-desc,
.page-head p {
    max-width: 780px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.category-card {
    min-height: 170px;
    padding: 22px;
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(30, 64, 175, 0.42), rgba(15, 23, 42, 0.94));
    border: 1px solid rgba(96, 165, 250, 0.24);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.28);
    transition: 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 191, 36, 0.6);
}

.category-card b {
    display: block;
    font-size: 34px;
    margin-bottom: 14px;
}

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

.category-card p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.65;
    font-size: 14px;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(96, 165, 250, 0.18);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.24);
    transition: 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.48);
    box-shadow: 0 22px 50px rgba(2, 6, 23, 0.38);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.78), transparent 54%);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #111827;
    background: var(--amber);
    font-weight: 800;
    font-size: 12px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    width: 36px;
    height: 36px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f59e0b, #fde68a);
    color: #111827;
    font-size: 18px;
}

.card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.card-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.16);
    font-size: 12px;
}

.movie-card h2,
.wide-card h2 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h2 a:hover,
.wide-card h2 a:hover,
.text-link:hover {
    color: var(--amber);
}

.movie-card p {
    margin: 0 0 12px;
    color: #cbd5e1;
    line-height: 1.65;
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    padding: 4px 8px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.7);
    font-size: 12px;
}

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

.wide-card {
    display: grid;
    grid-template-columns: 155px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(96, 165, 250, 0.2);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.24);
}

.wide-poster {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #0f172a;
}

.wide-poster img {
    width: 100%;
    height: 100%;
    min-height: 210px;
    object-fit: cover;
}

.wide-rank {
    position: absolute;
    left: 10px;
    top: 10px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #111827;
    background: linear-gradient(135deg, #f59e0b, #fde68a);
    font-weight: 900;
}

.wide-content {
    padding: 8px 8px 8px 0;
}

.wide-content p {
    margin: 0 0 14px;
    color: #cbd5e1;
    line-height: 1.75;
}

.text-link {
    display: inline-flex;
    margin-top: 14px;
    color: #93c5fd;
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 190px 190px;
    gap: 14px;
    margin: 22px 0 26px;
    padding: 16px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(96, 165, 250, 0.22);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 700;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 46px;
    border: 1px solid rgba(147, 197, 253, 0.24);
    border-radius: 16px;
    outline: 0;
    color: white;
    background: rgba(2, 6, 23, 0.6);
    padding: 0 14px;
}

.filter-panel option {
    background: #0f172a;
}

.page-hero {
    padding: 42px;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.58), rgba(15, 23, 42, 0.96));
    border: 1px solid rgba(96, 165, 250, 0.22);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 54px);
    line-height: 1.15;
}

.page-hero p {
    margin: 0;
    max-width: 820px;
    color: #dbeafe;
    line-height: 1.85;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #93c5fd;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--amber);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
    align-items: start;
}

.player-panel,
.detail-card,
.side-panel {
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(96, 165, 250, 0.22);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.28);
}

.player-panel {
    overflow: hidden;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    z-index: 4;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.76), rgba(30, 64, 175, 0.36));
}

.player-cover span {
    position: relative;
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #111827;
    background: linear-gradient(135deg, #f59e0b, #fde68a);
    box-shadow: 0 0 0 16px rgba(251, 191, 36, 0.14), 0 22px 50px rgba(0, 0, 0, 0.35);
    font-size: 34px;
}

.player-cover.hidden {
    display: none;
}

.player-caption {
    padding: 20px 22px;
}

.player-caption h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.15;
}

.player-caption p {
    margin: 0;
    color: #dbeafe;
    line-height: 1.8;
}

.detail-card {
    margin-top: 24px;
    padding: 24px;
}

.detail-card h2,
.side-panel h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-card p {
    color: #dbeafe;
    line-height: 2;
}

.info-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.info-table div {
    padding: 12px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.34);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.info-table b {
    display: block;
    margin-bottom: 5px;
    color: #93c5fd;
    font-size: 13px;
}

.info-table span {
    color: #f8fafc;
}

.side-panel {
    padding: 18px;
}

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

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

.related-list {
    display: grid;
    gap: 12px;
}

.related-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.36);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.related-item:hover {
    border-color: rgba(251, 191, 36, 0.48);
}

.related-item img {
    width: 76px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.related-item strong {
    display: block;
    margin-bottom: 6px;
    line-height: 1.35;
}

.related-item span {
    color: #93c5fd;
    font-size: 13px;
}

.site-footer {
    border-top: 1px solid rgba(96, 165, 250, 0.22);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), #020617);
}

.footer-grid {
    max-width: 1240px;
    margin: 0 auto;
    padding: 46px 20px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr 0.8fr;
    gap: 28px;
}

.footer-grid h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.footer-grid p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.8;
}

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

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

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

.footer-bottom {
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 20px 28px;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.empty-result {
    display: none;
    margin-top: 16px;
    padding: 22px;
    border-radius: 18px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(96, 165, 250, 0.2);
}

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

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

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

    .hero-slide {
        grid-template-columns: 1fr 300px;
        padding: 48px;
    }

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

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

@media (max-width: 860px) {
    main {
        padding: 24px 14px 48px;
    }

    .hero {
        min-height: 820px;
        border-radius: 26px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 34px 24px 78px;
        gap: 22px;
    }

    .hero-poster {
        max-width: 310px;
        margin: 0 auto;
    }

    .hero-poster .glass-card {
        left: 12px;
        right: 12px;
        bottom: 16px;
        max-width: none;
    }

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

    .hero-search {
        flex-direction: column;
        border-radius: 20px;
    }

    .hero-search input {
        height: 42px;
    }

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

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

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

    .wide-card {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .wide-poster img {
        min-height: 160px;
    }

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

@media (max-width: 560px) {
    .nav-wrap {
        height: 62px;
        padding: 0 14px;
    }

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

    .mobile-nav {
        grid-template-columns: 1fr;
        padding-left: 14px;
        padding-right: 14px;
    }

    .hero {
        min-height: 780px;
    }

    .hero h1,
    .hero h2 {
        font-size: 34px;
    }

    .hero p {
        font-size: 15px;
    }

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

    .wide-card,
    .related-item {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .info-table,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .detail-card {
        padding: 22px;
    }
}
