:root {
    --night-950: #050607;
    --night-930: #090b0f;
    --night-900: #0d0f12;
    --night-850: #13171d;
    --night-800: #1a1d23;
    --night-760: #20242c;
    --night-700: #252a33;
    --night-500: #768194;
    --night-400: #a5adba;
    --night-300: #d4d9e2;
    --blood-800: #9d0208;
    --blood-700: #b80d17;
    --blood-600: #e63946;
    --blood-500: #ff4d4d;
    --gold: #ffd166;
    --white: #ffffff;
    --radius: 18px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --glow: 0 0 30px rgba(255, 77, 77, 0.26);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--night-300);
    background:
        radial-gradient(circle at top left, rgba(230, 57, 70, 0.16), transparent 34rem),
        radial-gradient(circle at 82% 8%, rgba(72, 101, 129, 0.32), transparent 32rem),
        var(--night-950);
    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;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13, 15, 18, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--blood-600), var(--blood-800));
    box-shadow: var(--glow);
}

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

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

.nav-links a {
    padding: 10px 16px;
    border-radius: 12px;
    color: var(--night-400);
    transition: 0.25s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.nav-toggle {
    width: 44px;
    height: 44px;
    border: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    display: block;
    background: var(--white);
    border-radius: 999px;
}

.hero {
    position: relative;
    min-height: 74vh;
    overflow: hidden;
    background: var(--night-900);
}

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

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 6, 7, 0.95) 0%, rgba(5, 6, 7, 0.74) 42%, rgba(5, 6, 7, 0.25) 100%),
        linear-gradient(0deg, var(--night-950) 0%, rgba(5, 6, 7, 0.18) 58%, rgba(5, 6, 7, 0.62) 100%),
        var(--hero-image) center / cover no-repeat;
    filter: saturate(1.05);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 74vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 380px;
    align-items: center;
    gap: 48px;
    padding: 72px 0 84px;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--blood-500);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 14px 0 18px;
    max-width: 820px;
    color: var(--white);
    font-size: clamp(40px, 7vw, 82px);
    line-height: 1.02;
    letter-spacing: -0.06em;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.42);
}

.hero p {
    max-width: 720px;
    margin: 0 0 28px;
    color: var(--night-300);
    font-size: 18px;
}

.hero-actions,
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 14px;
    font-weight: 700;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--blood-600), var(--blood-800));
    box-shadow: var(--glow);
}

.btn-secondary {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-ghost {
    color: var(--night-300);
    background: rgba(255, 255, 255, 0.07);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
    transform: translateY(-2px);
}

.hero-poster-card {
    position: relative;
    padding: 12px;
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: var(--shadow);
}

.hero-poster-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 20px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--night-800), var(--night-700));
}

.hero-card-info {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 28px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(5, 6, 7, 0.76);
    backdrop-filter: blur(14px);
}

.hero-card-info strong {
    display: block;
    color: var(--white);
    font-size: 18px;
}

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

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

.hero-dot.is-active {
    width: 64px;
    background: var(--blood-500);
}

.page-hero {
    padding: 72px 0 48px;
    background:
        linear-gradient(135deg, rgba(230, 57, 70, 0.12), rgba(72, 101, 129, 0.16)),
        var(--night-900);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.page-hero h1 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: var(--night-400);
}

.section-block {
    padding: 56px 0;
}

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

.section-heading h2 {
    margin: 0;
    color: var(--white);
    font-size: clamp(26px, 3.2vw, 38px);
    line-height: 1.12;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--night-500);
}

.section-more {
    flex: 0 0 auto;
    color: var(--blood-500);
    font-weight: 700;
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

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

.movie-card,
.category-card,
.info-panel,
.detail-card,
.search-panel {
    background: rgba(26, 29, 35, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.movie-card,
.category-card {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover,
.category-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 77, 77, 0.36);
    box-shadow: var(--glow);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, var(--night-800), var(--night-700));
}

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

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

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 6px 11px;
    color: var(--white);
    background: rgba(230, 57, 70, 0.92);
    font-size: 13px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    color: var(--night-950);
    background: var(--gold);
}

.movie-card-body {
    padding: 16px;
}

.movie-title {
    display: block;
    color: var(--white);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
    transition: color 0.25s ease;
}

.movie-title:hover {
    color: var(--blood-500);
}

.movie-meta,
.score-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    color: var(--night-500);
    font-size: 13px;
    margin: 8px 0;
}

.movie-card-body p {
    margin: 0;
    color: var(--night-400);
    font-size: 14px;
}

.score-line {
    justify-content: space-between;
    margin: 14px 0 0;
    color: var(--blood-500);
    font-weight: 700;
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
}

.movie-card-horizontal .poster-link img {
    height: 100%;
    aspect-ratio: auto;
}

.movie-card-horizontal .movie-card-body {
    padding: 22px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 0;
}

.tag,
.small-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: var(--night-300);
    background: rgba(230, 57, 70, 0.16);
    border: 1px solid rgba(230, 57, 70, 0.25);
}

.tag {
    padding: 7px 12px;
    font-size: 14px;
}

.small-tag {
    padding: 4px 9px;
    font-size: 12px;
}

.category-card {
    padding: 24px;
    min-height: 196px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.category-card h2,
.category-card h3 {
    margin: 0 0 12px;
    color: var(--white);
    font-size: 24px;
}

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

.category-card span {
    color: var(--blood-500);
    font-weight: 800;
}

.search-panel {
    padding: 22px;
    margin-bottom: 26px;
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px 180px;
    gap: 12px;
}

.search-form input,
.search-form select {
    width: 100%;
    min-height: 48px;
    color: var(--white);
    background: var(--night-900);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 13px;
    padding: 0 14px;
    outline: none;
}

.search-form input:focus,
.search-form select:focus {
    border-color: rgba(255, 77, 77, 0.75);
    box-shadow: var(--glow);
}

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

.detail-card,
.info-panel {
    padding: 24px;
}

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

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

.detail-title {
    margin: 0 0 16px;
    color: var(--white);
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.1;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 0;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--night-300);
}

.player-box {
    position: relative;
    overflow: hidden;
    margin-top: 26px;
    border-radius: 22px;
    background: var(--night-900);
    box-shadow: var(--shadow);
}

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

.player-veil {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    background:
        linear-gradient(0deg, rgba(5, 6, 7, 0.62), rgba(5, 6, 7, 0.16)),
        var(--poster-image) center / cover no-repeat;
    cursor: pointer;
}

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

.player-button {
    width: 96px;
    height: 96px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--blood-600), var(--blood-800));
    box-shadow: var(--glow);
    cursor: pointer;
    font-size: 30px;
}

.content-block {
    margin-top: 26px;
}

.content-block h2,
.info-panel h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 24px;
}

.content-block p,
.info-panel p {
    margin: 0 0 16px;
    color: var(--night-300);
}

.side-cover {
    overflow: hidden;
    border-radius: 20px;
    margin-bottom: 18px;
    background: var(--night-900);
}

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

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

.related-item {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.related-item img {
    width: 118px;
    height: 74px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--night-900);
}

.related-item strong {
    display: block;
    color: var(--white);
    line-height: 1.35;
}

.related-item span {
    color: var(--night-500);
    font-size: 13px;
}

.site-footer {
    margin-top: 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(13, 15, 18, 0.9);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    padding: 42px 0;
}

.footer-brand {
    margin-bottom: 14px;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: var(--white);
    font-size: 18px;
}

.site-footer p {
    color: var(--night-500);
    margin: 0;
}

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

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

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

.footer-copy {
    padding: 18px 0;
    text-align: center;
    color: var(--night-500);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.empty-state {
    display: none;
    padding: 34px;
    border-radius: var(--radius);
    color: var(--night-400);
    background: rgba(255, 255, 255, 0.06);
    text-align: center;
}

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

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

    .hero-poster-card {
        max-width: 420px;
    }
}

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 74px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 18px;
        background: rgba(13, 15, 18, 0.96);
        border: 1px solid rgba(255, 255, 255, 0.09);
        box-shadow: var(--shadow);
    }

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

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

    .hero-content {
        padding-top: 46px;
        gap: 28px;
    }

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

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

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

@media (max-width: 560px) {
    .container-custom {
        width: min(100% - 24px, 1280px);
    }

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

    .hero h1 {
        font-size: 38px;
    }

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

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

    .movie-card-horizontal,
    .related-item {
        grid-template-columns: 1fr;
    }

    .related-item img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .player-button {
        width: 76px;
        height: 76px;
    }
}
