:root {
    color-scheme: dark;
    --page-bg: #0f172a;
    --panel-bg: rgba(15, 23, 42, 0.76);
    --panel-border: rgba(255, 255, 255, 0.13);
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --text-soft: #94a3b8;
    --brand: #ef4444;
    --brand-strong: #dc2626;
    --blue: #60a5fa;
    --gold: #f59e0b;
    --radius-xl: 24px;
    --shadow-card: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 18% 12%, rgba(239, 68, 68, 0.22), transparent 30%),
        radial-gradient(circle at 82% 2%, rgba(96, 165, 250, 0.18), transparent 28%),
        linear-gradient(180deg, #111827 0%, #0f172a 44%, #020617 100%);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

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

body.nav-open {
    overflow: hidden;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(20px);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
}

.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #ef4444, #f97316 52%, #facc15);
    color: #ffffff;
    box-shadow: 0 14px 38px rgba(239, 68, 68, 0.32);
}

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

.nav-links a,
.mobile-panel a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a {
    padding: 10px 16px;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    position: fixed;
    inset: 72px 0 auto 0;
    z-index: 40;
    padding: 16px;
    background: rgba(15, 23, 42, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
}

.mobile-panel a {
    display: block;
    padding: 14px 16px;
    margin-bottom: 8px;
}

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

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    isolation: isolate;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    filter: saturate(1.05) contrast(1.05);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.12) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 1) 0%, rgba(15, 23, 42, 0.2) 44%, rgba(15, 23, 42, 0.42) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 72vh;
    display: flex;
    align-items: center;
    padding: 88px 0 72px;
}

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

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    color: #fecaca;
    background: rgba(239, 68, 68, 0.16);
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 18px 0 18px;
    font-size: clamp(42px, 7vw, 88px);
    line-height: 0.96;
    letter-spacing: -0.05em;
    text-shadow: 0 6px 24px rgba(0, 0, 0, 0.48);
}

.hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.76;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.46);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 30px;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 700;
}

.hero-actions,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
}

.btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 18px 40px rgba(239, 68, 68, 0.36);
}

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

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 34px;
    background: #ffffff;
}

.search-panel {
    position: relative;
    z-index: 5;
    margin-top: -32px;
}

.search-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-xl);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(18px);
}

.search-input {
    width: 100%;
    min-height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    outline: none;
    padding: 0 18px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    font-size: 16px;
}

.search-input:focus {
    border-color: rgba(96, 165, 250, 0.72);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.12);
}

.main-content {
    flex: 1;
}

.section {
    padding: 68px 0;
}

.section.tight {
    padding-top: 36px;
}

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

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

.section-desc {
    margin: 10px 0 0;
    color: var(--text-muted);
    line-height: 1.8;
    max-width: 780px;
}

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

.movie-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px;
    color: inherit;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.26);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(255, 255, 255, 0.11);
}

.poster {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
}

.poster.wide {
    aspect-ratio: 16 / 9;
}

.poster img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

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

.card-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(239, 68, 68, 0.88);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    left: auto;
    right: 12px;
    background: rgba(245, 158, 11, 0.92);
}

.card-body {
    padding: 14px;
}

.card-title {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.35;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-soft);
    font-size: 12px;
}

.card-desc {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-card {
    display: block;
    min-height: 178px;
    padding: 22px;
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    color: #ffffff;
    text-decoration: none;
    background:
        linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(96, 165, 250, 0.12)),
        rgba(255, 255, 255, 0.07);
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.26);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.24);
}

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

.category-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.page-hero {
    padding: 74px 0 34px;
}

.page-hero h1 {
    margin: 16px 0 12px;
    max-width: 980px;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 850px;
    margin: 0;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--text-soft);
    font-size: 14px;
}

.breadcrumb a {
    color: #bfdbfe;
    text-decoration: none;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.8fr);
    gap: 28px;
    align-items: start;
}

.detail-card,
.side-card,
.info-card {
    border: 1px solid var(--panel-border);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.075);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(18px);
}

.detail-card {
    overflow: hidden;
}

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

.player-box video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.62));
    cursor: pointer;
}

.player-box.is-playing .play-layer {
    display: none;
}

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.92);
    box-shadow: 0 20px 42px rgba(239, 68, 68, 0.4);
    font-size: 32px;
}

.play-title {
    font-size: 18px;
    font-weight: 800;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.detail-body {
    padding: 26px;
}

.detail-body h2,
.side-card h2,
.info-card h2 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 24px;
}

.detail-body p,
.info-card p {
    color: var(--text-muted);
    line-height: 1.9;
}

.meta-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 26px;
}

.meta-item {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.meta-label {
    display: block;
    color: var(--text-soft);
    font-size: 12px;
    margin-bottom: 6px;
}

.meta-value {
    color: #ffffff;
    font-weight: 800;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 0;
}

.tag {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(96, 165, 250, 0.16);
    border: 1px solid rgba(96, 165, 250, 0.22);
    font-size: 13px;
}

.side-card,
.info-card {
    padding: 22px;
}

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

.side-link {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.side-link img {
    width: 86px;
    height: 112px;
    border-radius: 14px;
    object-fit: cover;
}

.side-link strong {
    display: block;
    color: #ffffff;
    margin-bottom: 6px;
}

.side-link span {
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.5;
}

.site-footer {
    margin-top: 72px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(2, 6, 23, 0.58);
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 24px;
    padding: 36px 0;
    color: var(--text-soft);
}

.footer-inner h2,
.footer-inner h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

.footer-inner p {
    margin: 0;
    line-height: 1.8;
}

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

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

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

[data-filter-item].is-hidden {
    display: none;
}

.empty-state {
    display: none;
    padding: 28px;
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.07);
    text-align: center;
}

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

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

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

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

@media (max-width: 760px) {
    .header-inner {
        height: 64px;
    }

    .nav-links {
        display: none;
    }

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

    .mobile-panel {
        inset: 64px 0 auto 0;
    }

    .hero,
    .hero-content {
        min-height: 650px;
    }

    .hero-content {
        padding-top: 70px;
    }

    .hero-slide::after {
        background: linear-gradient(0deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.76) 58%, rgba(15, 23, 42, 0.35) 100%);
    }

    .search-card {
        grid-template-columns: 1fr;
    }

    .section-head {
        display: block;
    }

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

    .category-grid,
    .footer-inner,
    .meta-list {
        grid-template-columns: 1fr;
    }

    .detail-body {
        padding: 18px;
    }
}
