:root {
    --night-950: #050607;
    --night-900: #0d0f12;
    --night-850: #12151a;
    --night-800: #1a1d23;
    --night-700: #2b313a;
    --night-500: #6f7a8a;
    --night-300: #b8c0cc;
    --night-200: #d8dee8;
    --blood-800: #991b1b;
    --blood-700: #b91c1c;
    --blood-600: #e63946;
    --blood-500: #ff4d4d;
    --gold: #f5b84b;
    --shadow-glow: 0 0 24px rgba(255, 77, 77, 0.28);
    --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.28);
    --radius: 14px;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    color: #ffffff;
    background:
        radial-gradient(circle at 12% 4%, rgba(230, 57, 70, 0.18), transparent 26rem),
        radial-gradient(circle at 90% 10%, rgba(112, 42, 200, 0.14), transparent 24rem),
        var(--night-950);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.container {
    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.08);
    background: rgba(13, 15, 18, 0.94);
    backdrop-filter: blur(14px);
}

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

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

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

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

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

.nav-link,
.mobile-nav-link {
    border-radius: 10px;
    color: var(--night-300);
    transition: 0.25s ease;
}

.nav-link {
    padding: 9px 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: #ffffff;
    background: rgba(230, 57, 70, 0.92);
    box-shadow: 0 0 16px rgba(255, 77, 77, 0.18);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: var(--night-800);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #ffffff;
}

.mobile-nav {
    display: none;
    padding: 10px 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-nav.open {
    display: grid;
    gap: 8px;
}

.mobile-nav-link {
    padding: 12px 14px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s ease, visibility 0.9s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(5, 6, 7, 0.98), rgba(5, 6, 7, 0.52), rgba(5, 6, 7, 0.1)),
        linear-gradient(to right, rgba(5, 6, 7, 0.88), rgba(5, 6, 7, 0.25), rgba(5, 6, 7, 0.4));
}

.hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: clamp(58px, 9vw, 118px);
    z-index: 2;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(230, 57, 70, 0.88);
    box-shadow: var(--shadow-glow);
}

.hero-content h1 {
    max-width: 820px;
    margin: 18px 0 12px;
    font-size: clamp(38px, 7vw, 78px);
    line-height: 1.02;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.75);
}

.hero-content p {
    max-width: 760px;
    margin: 0 0 24px;
    color: var(--night-200);
    font-size: clamp(16px, 2.1vw, 21px);
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 10px;
    font-weight: 700;
    transition: 0.25s ease;
}

.btn-primary {
    background: var(--blood-600);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background: var(--blood-500);
    transform: translateY(-2px);
}

.btn-secondary,
.btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover,
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.18);
}

.hero-control {
    position: absolute;
    z-index: 3;
    top: 50%;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.48);
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

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

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

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

.section {
    padding: 58px 0;
}

.section + .section {
    padding-top: 14px;
}

.section-head {
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
}

.section-subtitle {
    margin: 6px 0 0;
    color: var(--night-300);
}

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

.movie-card,
.category-card,
.info-card,
.rank-row,
.detail-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    background: rgba(26, 29, 35, 0.94);
    box-shadow: var(--shadow-card);
}

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

.movie-card:hover {
    border-color: rgba(255, 77, 77, 0.38);
    box-shadow: 0 24px 42px rgba(0, 0, 0, 0.36), var(--shadow-glow);
    transform: translateY(-5px);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: var(--night-900);
}

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

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

.poster-wrap::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent 52%);
}

.play-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 50%;
    background: var(--blood-600);
    box-shadow: var(--shadow-glow);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: 0.25s ease;
}

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

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold), var(--blood-600));
    color: #111111;
    font-size: 15px;
    line-height: 34px;
    text-align: center;
}

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

.movie-title {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: #ffffff;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

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

.movie-meta,
.detail-meta,
.tag-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-meta span,
.detail-meta span,
.tag-list span {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--night-200);
    font-size: 13px;
    padding: 4px 9px;
}

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

.category-card {
    position: relative;
    min-height: 184px;
    padding: 20px;
    background:
        linear-gradient(135deg, rgba(230, 57, 70, 0.18), rgba(13, 15, 18, 0.92)),
        var(--night-800);
    transition: 0.25s ease;
}

.category-card:hover {
    border-color: rgba(255, 77, 77, 0.46);
    transform: translateY(-4px);
}

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

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

.category-thumbs {
    display: flex;
    margin-top: 18px;
}

.category-thumbs img {
    width: 42px;
    height: 62px;
    margin-right: -12px;
    border: 2px solid var(--night-800);
    border-radius: 8px;
    object-fit: cover;
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 46px;
    background:
        linear-gradient(135deg, rgba(230, 57, 70, 0.22), rgba(13, 15, 18, 0.2)),
        radial-gradient(circle at 70% 12%, rgba(255, 77, 77, 0.14), transparent 24rem);
}

.page-hero h1,
.detail-hero h1 {
    max-width: 920px;
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.12;
}

.page-hero p,
.detail-hero p {
    max-width: 850px;
    margin: 0;
    color: var(--night-200);
    font-size: 18px;
}

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

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px;
    gap: 12px;
    margin: 0 0 24px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    background: rgba(26, 29, 35, 0.88);
}

.filter-panel label {
    display: grid;
    gap: 6px;
    color: var(--night-300);
    font-size: 13px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: none;
    padding: 0 12px;
    color: #ffffff;
    background: var(--night-900);
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(255, 77, 77, 0.58);
    box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.16);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 64px 96px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px;
}

.rank-number {
    color: var(--gold);
    font-size: 28px;
    font-weight: 900;
    text-align: center;
}

.rank-row img {
    width: 96px;
    height: 136px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-row h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-row p {
    margin: 0 0 12px;
    color: var(--night-300);
}

.rank-score {
    display: grid;
    gap: 8px;
    justify-items: end;
    color: var(--night-200);
}

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

.player-box {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    background: #000000;
    box-shadow: var(--shadow-card);
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: #000000;
    cursor: pointer;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.56;
}

.player-cover::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.2));
}

.player-cover span {
    position: relative;
    z-index: 2;
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    border-radius: 50%;
    background: var(--blood-600);
    box-shadow: var(--shadow-glow);
    font-size: 30px;
    padding-left: 5px;
}

.player-cover.is-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.detail-card {
    padding: 22px;
}

.detail-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-card p {
    color: var(--night-200);
}

.detail-poster {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

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

.related-item {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    transition: 0.25s ease;
}

.related-item:hover {
    background: rgba(255, 77, 77, 0.13);
}

.related-item img {
    width: 74px;
    height: 104px;
    border-radius: 8px;
    object-fit: cover;
}

.related-item strong {
    display: block;
    margin-bottom: 5px;
}

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

.site-footer {
    margin-top: 56px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(5, 6, 7, 0.94);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    padding: 36px 0;
}

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

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

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

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

.footer-links a {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--night-200);
    padding: 7px 11px;
}

.footer-links a:hover {
    background: var(--blood-600);
    color: #ffffff;
}

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

.hidden-by-filter {
    display: none !important;
}

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

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

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

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

    .menu-toggle {
        display: block;
    }

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

    .hero-slider {
        min-height: 72vh;
    }

    .hero-control {
        display: none;
    }

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

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

    .rank-row {
        grid-template-columns: 48px 76px 1fr;
    }

    .rank-row img {
        width: 76px;
        height: 108px;
    }

    .rank-score {
        grid-column: 2 / 4;
        justify-items: start;
    }

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

@media (max-width: 480px) {
    .container {
        width: min(100% - 22px, 1280px);
    }

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

    .movie-card {
        display: grid;
        grid-template-columns: 116px 1fr;
    }

    .poster-wrap {
        aspect-ratio: auto;
        height: 168px;
    }

    .movie-title {
        min-height: auto;
    }
}
