:root {
    --night-950: #050607;
    --night-900: #0d0f12;
    --night-850: #12151b;
    --night-800: #1a1d23;
    --night-700: #212529;
    --night-500: #495057;
    --night-400: #6c757d;
    --night-300: #adb5bd;
    --night-200: #dee2e6;
    --blood-700: #b21f2d;
    --blood-600: #e63946;
    --blood-500: #ff4d4d;
    --gold-500: #f5c542;
    --white: #ffffff;
    --radius-lg: 22px;
    --radius-md: 16px;
    --shadow-glow: 0 0 24px rgba(255, 77, 77, 0.25);
    --shadow-card: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--night-200);
    background:
        radial-gradient(circle at 20% 0%, rgba(230, 57, 70, 0.12), transparent 32rem),
        radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.05), transparent 30rem),
        var(--night-900);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.is-locked {
    overflow: hidden;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(13, 15, 18, 0.92);
    backdrop-filter: blur(16px);
}

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

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

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

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

.nav-links a {
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--night-300);
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--white);
    background: rgba(230, 57, 70, 0.18);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
}

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

.hero-slider {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--night-950);
}

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

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

.hero-slide img,
.detail-backdrop {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #1a1d23, #0d0f12 45%, #3a1116);
}

.hero-mask,
.detail-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(5, 6, 7, 0.92), rgba(13, 15, 18, 0.55) 46%, rgba(13, 15, 18, 0.2)),
        linear-gradient(0deg, var(--night-900), rgba(13, 15, 18, 0.2) 45%, transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    height: 100%;
    padding-bottom: 112px;
}

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

.hero-eyebrow,
.page-hero span,
.section-heading span {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 6px 12px;
    border: 1px solid rgba(230, 57, 70, 0.38);
    border-radius: 999px;
    color: var(--blood-500);
    background: rgba(230, 57, 70, 0.12);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0 0 18px;
    color: var(--white);
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    text-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

.hero-copy h2 {
    font-size: clamp(30px, 4.6vw, 56px);
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    max-width: 780px;
    margin: 0 0 26px;
    color: var(--night-200);
    font-size: 18px;
    line-height: 1.75;
}

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

.btn-primary,
.btn-ghost,
.hero-search button,
.page-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 12px;
    color: var(--white);
    font-weight: 750;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary,
.hero-search button,
.page-search button {
    background: linear-gradient(135deg, var(--blood-600), var(--blood-700));
    box-shadow: var(--shadow-glow);
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(10px);
}

.btn-primary:hover,
.btn-ghost:hover,
.hero-search button:hover,
.page-search button:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-tags,
.detail-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.hero-tags a,
.hero-tags span,
.tag-row span,
.detail-tags a {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--night-200);
    background: rgba(255, 255, 255, 0.08);
    font-size: 12px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: var(--blood-600);
}

.hero-search {
    position: absolute;
    z-index: 6;
    right: max(24px, calc((100vw - 1280px) / 2 + 16px));
    bottom: 92px;
    display: flex;
    width: min(420px, calc(100% - 48px));
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(5, 6, 7, 0.68);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-card);
}

.hero-search input,
.page-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--white);
    background: transparent;
}

.hero-search input {
    padding: 0 14px;
}

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

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

.section-heading h2,
.content-card h2,
.site-footer h2 {
    margin: 0;
    color: var(--white);
    font-size: 30px;
    line-height: 1.2;
}

.section-heading > a,
.inner-heading > a,
.aside-more {
    color: var(--blood-500);
    font-weight: 700;
}

.movie-grid {
    display: grid;
    gap: 24px;
}

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

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

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

.movie-card {
    position: relative;
    display: flex;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(26, 29, 35, 0.98), rgba(13, 15, 18, 0.98));
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.24);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    flex-direction: column;
}

.movie-card:hover {
    border-color: rgba(230, 57, 70, 0.32);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    transform: translateY(-6px);
}

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

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #1a1d23, #391015);
}

.movie-card-horizontal .movie-cover {
    aspect-ratio: 16 / 10;
    height: 100%;
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.cover-shade,
.overview-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), transparent 54%);
}

.quality-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
}

.quality-badge {
    right: 10px;
    background: rgba(230, 57, 70, 0.92);
}

.rank-badge {
    left: 10px;
    background: rgba(0, 0, 0, 0.62);
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px;
}

.movie-meta-line,
.card-foot,
.detail-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--night-400);
    font-size: 13px;
}

.movie-meta-line a {
    color: var(--blood-500);
}

.movie-card h3 {
    margin: 10px 0 8px;
    color: var(--white);
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--blood-500);
}

.movie-card p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0;
    overflow: hidden;
    color: var(--night-300);
    font-size: 14px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-foot {
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
}

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

.category-tile {
    min-height: 180px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-md);
    background:
        linear-gradient(135deg, rgba(230, 57, 70, 0.16), transparent 48%),
        var(--night-800);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    border-color: rgba(230, 57, 70, 0.36);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

.category-tile span,
.category-tile strong {
    display: block;
    color: var(--white);
}

.category-tile span {
    font-size: 20px;
    font-weight: 800;
}

.category-tile strong {
    margin: 12px 0;
    color: var(--blood-500);
    font-size: 32px;
}

.category-tile p {
    margin: 0;
    color: var(--night-300);
    font-size: 14px;
    line-height: 1.65;
}

.feature-list {
    display: grid;
    gap: 18px;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 16% 4%, rgba(230, 57, 70, 0.22), transparent 34rem),
        linear-gradient(135deg, var(--night-950), var(--night-800));
}

.compact-hero {
    padding: 86px 0 70px;
}

.small-actions {
    margin-top: 12px;
}

.page-search {
    display: flex;
    width: min(720px, 100%);
    min-height: 58px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(5, 6, 7, 0.45);
}

.page-search input {
    padding: 0 14px;
}

.category-overview-card {
    position: relative;
    min-height: 260px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--night-800);
}

.category-overview-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.category-overview-card div {
    position: absolute;
    z-index: 2;
    inset: auto 0 0;
    padding: 20px;
}

.category-overview-card h2 {
    margin: 8px 0;
    color: var(--white);
}

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

.category-overview-card p {
    margin: 0;
    color: var(--night-200);
    font-size: 14px;
    line-height: 1.6;
}

.detail-hero {
    min-height: 620px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    filter: blur(1px);
    transform: scale(1.02);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    align-items: end;
    min-height: 620px;
    gap: 40px;
    padding: 110px 0 64px;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-lg);
    background: var(--night-800);
    box-shadow: var(--shadow-card);
}

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

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

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    padding: 50px 0 90px;
}

.detail-main {
    display: grid;
    gap: 24px;
}

.content-card {
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-lg);
    background: rgba(26, 29, 35, 0.78);
    box-shadow: 0 18px 58px rgba(0, 0, 0, 0.2);
    padding: 24px;
}

.content-card p {
    margin: 14px 0 0;
    color: var(--night-200);
    line-height: 1.9;
}

.inner-heading {
    margin-bottom: 18px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #000000;
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--white);
    background:
        radial-gradient(circle, rgba(230, 57, 70, 0.18), rgba(0, 0, 0, 0.52)),
        rgba(0, 0, 0, 0.34);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover span {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    margin-bottom: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blood-600), var(--blood-700));
    box-shadow: var(--shadow-glow);
    font-size: 30px;
}

.player-cover strong {
    font-size: 18px;
}

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

.detail-aside {
    min-width: 0;
}

.sticky-card {
    position: sticky;
    top: 92px;
}

.side-rank-list {
    display: grid;
    gap: 12px;
    margin: 18px 0;
    padding: 0;
    list-style: none;
}

.side-rank-list a {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.side-rank-list span {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 8px;
    color: var(--white);
    background: var(--blood-600);
    font-size: 12px;
    font-weight: 800;
}

.side-rank-list strong {
    overflow: hidden;
    color: var(--white);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.side-rank-list em {
    color: var(--gold-500);
    font-style: normal;
    font-size: 12px;
}

.site-footer {
    margin-top: 78px;
    padding: 46px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: var(--night-950);
}

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

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

.site-footer p {
    max-width: 620px;
    color: var(--night-300);
    line-height: 1.75;
}

.site-footer h2 {
    margin-bottom: 18px;
    font-size: 18px;
}

.site-footer ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--night-300);
}

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

.animate-slide-up {
    animation: slideUp 0.7s ease both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

    .sticky-card {
        position: static;
    }
}

@media (max-width: 900px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        inset: 68px 16px auto;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 18px;
        background: rgba(13, 15, 18, 0.98);
        box-shadow: var(--shadow-card);
    }

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

    .hero-slider {
        min-height: 680px;
    }

    .hero-content {
        padding-bottom: 170px;
    }

    .hero-search {
        right: 24px;
        bottom: 72px;
    }

    .hero-arrow {
        display: none;
    }

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

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

    .detail-poster {
        width: min(260px, 80vw);
    }
}

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

    .brand {
        font-size: 18px;
    }

    .hero-slider {
        min-height: 720px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 36px;
    }

    .hero-copy h2 {
        font-size: 30px;
    }

    .hero-copy p,
    .page-hero p,
    .detail-copy p {
        font-size: 16px;
    }

    .hero-search,
    .page-search {
        flex-direction: column;
        gap: 8px;
    }

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

    .movie-grid-5,
    .movie-grid-4,
    .movie-grid-3,
    .category-tile-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

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

    .content-card {
        padding: 18px;
    }
}
