h1, h2, h3, .display {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.04em;
    font-weight: 400;
}

header {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 5vw;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(12, 10, 16, 0.75);
    border-bottom: 1px solid var(--line);
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(20px, 2vw + 10px, 28px);
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

.logo .reel {
    width: clamp(24px, 2vw + 4px, 32px);
    height: clamp(24px, 2vw + 4px, 32px);
    border-radius: 50%;
    background: conic-gradient(var(--gold) 0 25%, var(--crimson) 0 50%, var(--gold) 0 75%, var(--crimson) 0 100%);
    position: relative;
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.5);
    animation: spin 8s linear infinite;
}

.logo .reel::after {
    content: '';
    position: absolute;
    inset: 35%;
    background: var(--void);
    border-radius: 50%;
}

nav {
    display: flex;
    gap: clamp(15px, 2vw, 34px);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--cream-dim);
}

nav a {
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
    transition: color .25s;
    white-space: nowrap;
}

nav a:hover {
    color: var(--cream);
}

nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width .3s ease;
}

nav a:hover::after {
    width: 100%;
}

.header-right {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.5vw, 16px);
}

.hero h1 {
    font-size: clamp(36px, 6.5vw, 86px);
    line-height: 0.95;
    margin: 14px 0 18px;
    text-shadow: 0 0 40px rgba(168, 25, 46, 0.4);
}

.hero h1 span {
    color: var(--crimson-bright);
}

.hero p {
    max-width: 520px;
    color: var(--cream-dim);
    font-size: clamp(14px, 1.1vw, 16px);
    line-height: 1.6;
}

.btn-primary, .btn-ghost {
    padding: clamp(12px, 1.5vw, 16px) clamp(24px, 2.5vw, 34px);
    font-size: clamp(12px, 1vw, 14px);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 3px;
    white-space: nowrap;
    flex: 1 1 auto;
    text-align: center;
    max-width: max-content;
}

.btn-primary {
    background: linear-gradient(135deg, var(--crimson-bright), var(--crimson));
    color: var(--cream);
    border: none;
    box-shadow: 0 10px 30px -8px rgba(214, 31, 60, 0.6);
    transition: transform .25s ease, box-shadow .25s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px -8px rgba(214, 31, 60, 0.75);
}

.fy-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.fy_head h2 {
    font-size: clamp(24px, 3.5vw, 34px);
    margin: 0;
    line-height: 1;
}

.fy-sub {
    color: var(--cream-dim);
    font-size: 0.85rem;
}

.fy-row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 4px 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--crimson) transparent;
    -webkit-overflow-scrolling: touch;
}

.fy-row::-webkit-scrollbar {
    height: 4px;
}

.fy-row::-webkit-scrollbar-thumb {
    background: var(--crimson);
    border-radius: 4px;
}

.fy-card {
    flex: 0 0 auto;
    width: clamp(130px, 12vw, 170px);
    cursor: pointer;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.02);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.fy-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 18px 36px -10px rgba(0,0,0,0.75), 0 0 16px rgba(168,25,46,0.25);
    border-color: rgba(212,175,55,0.4);
}

.fy-poster {
    width: 100%;
    aspect-ratio: 2/3;
    background-size: cover;
    background-position: center;
    position: relative;
}

.fy-poster::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(12,10,16,0.95) 0%, transparent 55%);
}

.fy-rating {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    background: rgba(12,10,16,0.85);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-weight: 800;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.fy-body {
    padding: 10px 12px 12px;
    position: relative;
    z-index: 2;
    margin-top: -38px;
}

.fy-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 15px;
    letter-spacing: 0.03em;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--cream);
}

.fy-year {
    font-size: 11px;
    color: var(--cream-dim);
    letter-spacing: 0.04em;
}

.fy-skeleton {
    flex: 0 0 auto;
    width: clamp(130px, 12vw, 170px);
    aspect-ratio: 2/3;
    border-radius: 10px;
    background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.08) 50%,
    rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.fy-message {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 0 28px;
    color: var(--cream-dim);
    font-size: 0.9rem;
    grid-column: 1 / -1;
}

.fy-message-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-head h2 {
    font-size: clamp(28px, 4vw, 38px);
    margin: 0;
}

.section-head .sub {
    color: var(--cream-dim);
    font-size: 0.9rem;
}

.filmstrip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 4px 20px;
    scrollbar-width: thin;
    scrollbar-color: var(--crimson) transparent;
    -webkit-overflow-scrolling: touch;
}

.filmstrip::-webkit-scrollbar {
    height: 5px;
}

.filmstrip::-webkit-scrollbar-thumb {
    background: var(--crimson);
    border-radius: 4px;
}

.year-chip::before, .year-chip::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 6px;
    background-image: repeating-linear-gradient(var(--void) 0 4px, transparent 4px 8px);
    opacity: 0.3;
}

.year-chip::before {
    left: 0;
}

.year-chip::after {
    right: 0;
}

.card-img {
    height: clamp(220px, 22vw, 300px);
    background-size: cover;
    background-position: center;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
}

.card:hover .rating-badge {
    transform: scale(1.05);
}

.card-trailer-frame {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: #000;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.card-trailer-frame.show {
    opacity: 1;
}

.card-trailer-frame iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 0;
    pointer-events: none;
}

.card-trailer-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0,0,0,0.5), rgba(0,0,0,0.15));
    pointer-events: none;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 6, 10, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 16px;
}

.modal-overlay.open {
    display: flex;
}

.modal-overlay.open .modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: none;
    border: none;
    color: var(--cream-dim);
    font-size: 24px;
    line-height: 1;
    transition: color .2s;
    padding: 4px;
}

.modal-close:hover {
    color: var(--cream);
}

.modal h2 {
    font-size: clamp(24px, 3vw, 30px);
    margin: 0 0 6px;
}

.modal .lead {
    color: var(--cream-dim);
    font-size: 0.8rem;
    margin-bottom: 20px;
}

.vote-fab .fab-reel {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: conic-gradient(var(--void) 0 25%, rgba(12, 10, 16, 0.4) 0 50%, var(--void) 0 75%, rgba(12, 10, 16, 0.4) 0 100%);
    position: relative;
    flex-shrink: 0;
    animation: spin 6s linear infinite;
}

.vote-fab .fab-reel::after {
    content: '';
    position: absolute;
    inset: 32%;
    background: var(--gold);
    border-radius: 50%;
}

.vote-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 6, 10, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 120;
    padding: 16px;
}

.vote-overlay.open {
    display: flex;
}

.vote-modal::-webkit-scrollbar {
    width: 4px;
}

.vote-modal::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 4px;
}

.vote-overlay.open .vote-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.vote-modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: none;
    border: none;
    color: var(--cream-dim);
    font-size: 24px;
    line-height: 1;
    transition: color .2s;
    z-index: 5;
    padding: 4px;
}

.vote-modal-close:hover {
    color: var(--cream);
}

.vote-eyebrow {
    color: var(--gold);
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.vote-eyebrow::before {
    content: '';
    width: 26px;
    height: 1px;
    background: var(--gold);
}

.vote-modal h2 {
    font-size: clamp(24px, 3.5vw, 30px);
    margin: 0 0 6px;
}

.vote-modal .vote-instructions {
    color: var(--cream-dim);
    font-size: 0.8rem;
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 560px;
}

.vote-poster .vp-title {
    font-family: 'Bebas Neue';
    font-size: clamp(13px, 1.5vw, 16px);
    letter-spacing: 0.04em;
    background: rgba(12, 10, 16, 0.75);
    padding: 4px 8px;
    border-radius: 3px;
    border-left: 3px solid var(--gold);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.vote-poster.vp-done {
    filter: grayscale(0.5) brightness(0.6);
}

.vote-nav.vn-prev {
    left: 0;
}

.vote-nav.vn-next {
    right: 0;
}

.vote-current {
    text-align: center;
    margin-bottom: 16px;
}

.vote-current .vc-title {
    font-size: clamp(18px, 2.5vw, 22px);
    margin: 0 0 4px;
}

.vote-current .vc-meta {
    color: var(--cream-dim);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.details-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 6, 10, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.details-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.details-overlay.open .details-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.details-desc::-webkit-scrollbar {
    width: 4px;
}

.details-desc::-webkit-scrollbar-thumb {
    background: var(--crimson);
    border-radius: 2px;
}

.movie-modal-trailer-box {
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.movie-modal-watch-box {
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.trailer-lang-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.trailer-lang-tab {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    color: var(--cream-dim);
    cursor: pointer;
    transition: all 0.2s ease;
}

.trailer-lang-tab:hover {
    border-color: var(--gold);
    color: var(--cream);
}

.trailer-lang-tab.active {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
}

.trailer-lang-tab:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.trailer-lang-tab:disabled:hover {
    border-color: var(--line);
    color: var(--cream-dim);
}

.watch-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    border: 1px solid var(--gold);
    color: var(--gold);
    background: rgba(212, 175, 55, 0.06);
    text-decoration: none;
    transition: all 0.2s ease;
}

.watch-link:hover {
    background: rgba(212, 175, 55, 0.16);
    color: var(--cream);
}

.trailer-frame-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--line);
}

.trailer-frame-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.trailer-frame-wrap .trailer-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 12px;
}

.trailer-empty {
    color: var(--cream-dim);
    font-size: 0.85rem;
}

.star-row {
    display: flex;
    justify-content: center;
    gap: clamp(6px, 1.5vw, 12px);
    margin: 10px 0 24px;
}

.star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 2px;
}

.star svg {
    width: clamp(24px, 3.5vw, 36px);
    height: clamp(24px, 3.5vw, 36px);
    fill: rgba(243, 237, 226, 0.15);
    stroke: var(--cream-dim);
    stroke-width: 1px;
    transition: fill 0.25s ease, filter 0.25s ease, stroke 0.25s ease;
}

.star:hover {
    transform: scale(1.22) translateY(-2px);
}

.star:hover ~ .star svg {
    fill: rgba(243, 237, 226, 0.15);
}

.vote-stage {
    position: relative;
    height: 340px;
    margin: 20px 0;
    perspective: 1000px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}

.vote-ring {
    position: relative;
    width: 180px;
    height: 270px;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.vote-poster {
    position: absolute;
    inset: 0;
    width: 180px;
    height: 270px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-end;
    padding: 12px;
    backface-visibility: hidden;
    transition: filter 0.4s, box-shadow 0.4s;
    left: 0;
    top: 0;
    cursor: pointer;
}

.vote-poster.vp-done::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 12px;
    background: rgba(12, 4, 6, 0.75);
    color: #d4af37;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    inset: 0;
    backdrop-filter: blur(2px);
}

.vp-title {
    display: none;
}

.vote-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.2s;
    z-index: 10;
    cursor: pointer;
}

.vote-nav:hover {
    border-color: #a8192e;
    background: #a8192e;
}

.vote-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.vn-prev {
    left: 20px;
}

.vn-next {
    right: 20px;
}

.star.filled svg {
    fill: var(--gold);
    stroke: var(--gold-dim);
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.55));
}

.vote-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.vote-progress {
    text-align: center;
    font-size: 0.75rem;
    color: var(--cream-dim);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 14px;
}

@media (max-width: 880px) {
    nav {
        display: none;
    }

    header {
        padding: 0.8rem 4vw;
        gap: 8px;
    }

    .logo {
        font-size: clamp(18px, 4vw, 22px);
    }

    .header-right {
        gap: 8px;
    }

    .hero {
        grid-template-columns: 1fr;
        padding-top: clamp(20px, 5vw, 30px);
        padding-bottom: 40px;
        text-align: center;
    }

    .hero p {
        margin: 14px auto 24px;
    }

    .hero-cta {
        justify-content: center;
        gap: 12px;
    }

    .btn-primary, .btn-ghost {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 400px) {
    header {
        padding: 0.6rem 3vw;
    }

    .logo {
        font-size: 16px;
    }

    .lang-btn {
        padding: 4px 6px;
        font-size: 0.65rem;
    }
}

h1,h2,h3,.display,.brand-text {
    font-family: 'Bebas Neue',Impact,sans-serif;
    letter-spacing: .04em;
    font-weight: 400;
}

@media (max-width: 640px) {
    .hero {
        min-height: auto; /* let the flexible calc()-based height rule govern this — no hard floor */
    }
}

.rating {
    position: absolute;
    top: .75rem;
    right: .75rem;
    padding: .35rem .65rem;
    font-size: .75rem;
    color: var(--gold);
    background: rgba(0,0,0,.6);
    border-radius: 999px;
    backdrop-filter: blur(6px);
}

.meta {
    padding: 1rem;
}

.meta h3 {
    font-size: 1.25rem;
}

.meta p {
    margin-top: .25rem;
    font-size: .7rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--muted);
}

.char-overlay[data-side="left"]   .char-row {
    justify-content: flex-start;
}

.char-overlay[data-side="right"]  .char-row {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.char-overlay[data-side="center"] .char-row {
    justify-content: center;
}

.footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer .brand-text {
    font-size: 1.75rem;
    letter-spacing: .24em;
}

:root {
    --void: #0c0a10;
    --curtain: #1a1014;
    --crimson: #c8203a;
    --crimson-bright: #d61f3c;
    --gold: #d4af37;
    --gold-dim: #8a7228;
    --violet: #4b3a6e;
    --cream: #f3ede2;
    --cream-dim: #c9c0ae;
    --line: rgba(243, 237, 226, 0.1);
    --bg: #14090c;
    --bg-2: #0c0508;
    --card: #1c0e12;
    --burgundy: #2a0e14;
    --text: #f3ede2;
    --muted: #a89ba0;
    --border: rgba(243, 237, 226, 0.12);
    --crimson-glow: #ff2f4a;
    --grad-hero: radial-gradient(ellipse at top, rgba(200,32,58,.35), transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(120,20,35,.35), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
    --grad-card: linear-gradient(180deg, #22101580, #0f070a);
    --shadow-neon: 0 0 40px rgba(200, 32, 58, 0.55), 0 0 90px rgba(200, 32, 58, 0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: clamp(14px, 0.85vw + 10px, 20px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Manrope', system-ui, sans-serif;
    overflow-x: hidden;
    padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
    -webkit-font-smoothing: antialiased;
    animation: pageFadeIn 0.35s ease both;
}

@keyframes pageFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.search {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.72);
    transition: all 0.2s ease;
}

.search:hover {
    border-color: var(--gold-dim);
    background: rgba(212, 175, 55, 0.08);
    color: var(--gold);
}

.search svg {
    width: 18px;
    height: 18px;
}

::selection {
    background: var(--crimson);
    color: var(--cream);
}

h1, h2, h3, .display, .brand-text {
    font-family: 'Bebas Neue', Impact, sans-serif;
    letter-spacing: 0.04em;
    font-weight: 400;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
    font: inherit;
}

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

.neon {
    background: linear-gradient(100deg, var(--crimson-glow) 0%, var(--crimson) 55%, #ff5a6e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 22px rgba(200, 32, 58, 0.55), 0 0 46px rgba(200, 32, 58, 0.3);
}

.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 60;
    opacity: 0.07;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.nav {
    position: fixed;
    top: 0;
    inset-inline: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(12, 10, 16, 0.75);
    border-bottom: 1px solid var(--line);
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.brand-badge {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: var(--crimson);
    background: rgba(200, 32, 58, 0.15);
    box-shadow: inset 0 0 0 1px rgba(200, 32, 58, 0.4), var(--shadow-neon);
}

.brand-text {
    font-size: clamp(1.4rem, 2vw, 1.9rem);
    letter-spacing: 0.18em;
    color: #fff;
    text-transform: uppercase;
}

.nav-links {
    display: none;
    gap: clamp(15px, 2vw, 34px);
    font-size: 0.9rem;
    font-weight: 600;
}

.nav-links a {
    font-size: .8rem;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--cream-dim);
    transition: color 0.25s;
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--cream);
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.5vw, 16px);
}

.lang-switch {
    display: flex;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 3px;
    gap: 2px;
    background: rgba(255, 255, 255, 0.02);
}

.lang-btn {
    border: none;
    background: transparent;
    color: var(--cream-dim);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 6px clamp(8px, 1vw, 12px);
    border-radius: 16px;
    transition: all 0.25s ease;
}

.lang-btn:hover {
    color: var(--cream);
}

.lang-btn.active {
    background: var(--gold);
    color: var(--void);
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    transition: all 0.2s;
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.4rem;
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    border-radius: 3px;
}

.btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
}

.hero-ghost-btn {
    display: inline-flex;
}

.logout-btn {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--cream-dim);
    padding: clamp(6px, 0.9vw, 10px) clamp(10px, 1.4vw, 18px);
    border-radius: 2px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.logout-btn:hover {
    border-color: var(--crimson-bright);
    color: var(--crimson-bright);
}

/* --- user dropdown menu --- */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
}

#authBtn.has-menu {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

#authBtn.has-menu::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.user-menu.open #authBtn.has-menu::after {
    transform: rotate(180deg);
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 170px;
    background: var(--curtain, #1a1014);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px;
    box-shadow: 0 24px 48px -14px rgba(0, 0, 0, 0.7);
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 50;
}

.user-menu-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 24px;
    width: 12px;
    height: 12px;
    background: var(--curtain, #1a1014);
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
    transform: rotate(45deg);
}

.user-menu.open .user-menu-dropdown {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.user-menu-dropdown .logout-btn {
    display: flex;
    width: 100%;
    justify-content: center;
    border-color: transparent;
    background: transparent;
}

.user-menu-dropdown .logout-btn:hover {
    background: rgba(214, 31, 60, 0.1);
    border-color: var(--crimson-bright);
}

.hamburger {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    padding: 0.5rem;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: #fff;
    display: block;
}

.hamburger .short {
    width: 16px;
}

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s, visibility 0.5s;
}

.mobile-menu.open {
    opacity: 1;
    visibility: visible;
}

.mm-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
}

.mm-head button {
    color: #fff;
    font-size: 1.5rem;
}

.mm-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding-top: 4rem;
}

.mm-links a {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.mobile-menu.open .mm-links a {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.open .mm-links a:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-menu.open .mm-links a:nth-child(2) {
    transition-delay: 0.18s;
}

.mobile-menu.open .mm-links a:nth-child(3) {
    transition-delay: 0.26s;
}

.mobile-menu.open .mm-links a:nth-child(4) {
    transition-delay: 0.34s;
}

.mobile-menu.open .mm-links a:nth-child(5) {
    transition-delay: 0.5s;
}

.mm-cta {
    display: inline-flex !important;
    margin-top: 1rem;
    font-family: 'Manrope', sans-serif;
    font-size: 0.75rem !important;
}

.hero {
    position: relative;
    padding: 0 5vw;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(30px, 5vw, 80px);
    align-items: center;
    perspective: 1400px;
    /* NOTE: <header class="nav"> is actually position:fixed in real rendering —
       the .nav class selector (specificity 0,1,0) beats the `header` element
       selector (0,0,1) that sets position:sticky, regardless of source order.
       A fixed header takes NO space in the document flow, so hero must be the
       full viewport height; hero-content's own top padding is what reserves
       visual room for the floating header, not this height calc. */
    height: 100dvh;
    min-height: auto; /* no hard floor — content spacing below is vh-aware and will compress to fit */
    width: 100%;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* default: centered — safest on narrow/portrait screens, where cover's
       horizontal crop is much more severe and shifting right risks losing
       the main character entirely */
    object-position: center center;
}

@media (min-width: 900px) {
    .hero-video {
        /* wide/short viewports (tablet landscape and up): shift right so
           cover's crop reveals the second character instead of cutting
           them off at the right edge — tweak this % to taste */
        object-position: 68% center;
    }
}

@media (min-width: 1600px) {
    .hero-video {
        /* extra-wide viewports have more room, so we can push the
           visible frame even further right to show both characters fully */
        object-position: 78% center;
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 9, 12, 0.55), rgba(20, 9, 12, 0.35) 50%, var(--bg)),
    linear-gradient(90deg, rgba(10, 4, 6, 0.92), rgba(10, 4, 6, 0.55) 45%, transparent 72%),
    radial-gradient(ellipse 70% 70% at 68% 38%, transparent 45%, rgba(0, 0, 0, 0.55) 100%);
}

.hero-content {
    width: 100%;
    position: relative;
    z-index: 20;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.5rem, 8vh, 7rem) 1.5rem clamp(1rem, 4vh, 2rem);
    max-width: 1400px;
    margin: 0 auto;
}

.tagline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: clamp(0.6rem, 2.5vh, 1.75rem);
}

.hero-title {
    position: relative;
    color: #fff;
    text-transform: uppercase;
    line-height: 0.88;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.75), 0 2px 10px rgba(0, 0, 0, 0.65), 0 1px 2px rgba(0, 0, 0, 0.85);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.hero-title::before {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    margin-bottom: clamp(0.5rem, 1.5vh, 1.1rem);
    background: linear-gradient(90deg, var(--crimson-glow), var(--gold));
    box-shadow: 0 0 12px rgba(200, 32, 58, 0.7);
}

.hero-title span {
    display: block;
    font-size: clamp(2.2rem, min(8vw, 10vh), 7.4rem);
}

.hero-sub {
    margin-top: clamp(0.6rem, 2.5vh, 1.75rem);
    max-width: 28rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    line-height: 1.6;
}

.hero-sub b {
    color: #fff;
    font-weight: 600;
}

.hero-cta {
    display: flex;
    gap: 1.25rem;
    margin-top: clamp(0.8rem, 3vh, 2.25rem);
    flex-wrap: wrap;
    align-items: center;
}

.btn-neon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.6rem;
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #fff;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--crimson), #7a1220);
    box-shadow: var(--shadow-neon);
    transition: transform 0.25s, box-shadow 0.25s;
}

.btn-neon:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 60px rgba(200, 32, 58, 0.75), 0 0 110px rgba(200, 32, 58, 0.35);
}

.hero-stats {
    margin-top: clamp(0.8rem, 3vh, 2.5rem);
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

@media(min-width: 1024px) {
    .vault {
        padding-inline: 4rem;
    }

    .nav {
        padding: 1.25rem 4rem;
    }

    .hero-content {
        padding-inline: 4rem;
    }

    .hero-stats {
        margin-top: clamp(0.8rem, 3vh, 3.5rem);
        gap: clamp(1.5rem, 4vw, 4rem);
    }
}

.hero-stats b {
    display: block;
    color: #fff;
    font-weight: 700;
    letter-spacing: -.02em;
    font-size: clamp(1.75rem, 3.5vw, 3rem);
}

.hero-stats span {
    display: block;
    margin-top: 0.35rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
}

@keyframes fade-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.fade-up {
    opacity: 0;
    animation: fade-up 0.8s ease-out forwards;
}

.fade-up.d1 {
    animation-delay: 0.2s;
}

.fade-up.d2 {
    animation-delay: 0.4s;
}

.fade-up.d3 {
    animation-delay: 0.6s;
}

.fade-up.d4 {
    animation-delay: 0.8s;
}

.for-you-section {
    padding: clamp(30px, 5vw, 60px) 5vw 0;
    display: none;
}

.for-you-section.visible {
    display: block;
}

.fy-head, .section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.fy_en {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.fy_en::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--gold);
    flex-shrink: 0;
}

.fy_head h2, .section-head h2 {
    font-size: clamp(24px, 3.5vw, 38px);
    margin: 0;
    line-height: 1;
}

.fy-sub, .section-head .sub {
    color: var(--cream-dim);
    font-size: 0.85rem;
}

.fy-row, .filmstrip {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 4px 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--crimson) transparent;
    -webkit-overflow-scrolling: touch;
}

.fy-row::-webkit-scrollbar, .filmstrip::-webkit-scrollbar {
    height: 4px;
}

.fy-row::-webkit-scrollbar-thumb, .filmstrip::-webkit-scrollbar-thumb {
    background: var(--crimson);
    border-radius: 4px;
}

.fy-divider {
    border: none;
    border-top: 1px solid var(--line);
    margin: 0;
}

.reel-section {
    padding: clamp(30px, 5vw, 60px) 5vw 20px;
}

.year-chip {
    flex: 0 0 auto;
    position: relative;
    padding: clamp(10px, 1.2vw, 14px) clamp(16px, 1.8vw, 22px);
    border: 1px solid var(--line);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
    font-family: 'Bebas Neue';
    font-size: clamp(18px, 1.8vw, 22px);
    letter-spacing: 0.04em;
    color: var(--cream-dim);
    transition: all 0.25s ease;
}

.year-chip:hover {
    color: var(--cream);
    border-color: var(--gold-dim);
    transform: translateY(-3px);
}

.year-chip.active {
    background: linear-gradient(135deg, var(--crimson-bright), var(--crimson));
    color: var(--cream);
    border-color: transparent;
    box-shadow: 0 10px 24px -6px rgba(214, 31, 60, 0.5);
}

#recommendedChip {
    padding-inline: clamp(10px, 1.1vw, 14px);
    font-size: clamp(13px, 1.3vw, 16px);
    min-width: 64px; /* keeps the chip from collapsing while the loader is shown */
}

/* --------------------------------------------------------------------
   "Recommended for you" loading state
   --------------------------------------------------------------------
   While personalised recommendations are still being fetched, the chip's
   text is swapped (see the inline script at the bottom of index.html)
   for this small animated filmstrip: a perforated tape with a running
   light-sheen sweep, standing in for the plain "..." placeholder.
   Built entirely from the existing --void / --crimson / --gold palette
   so it reads as part of the same film-reel language as .year-chip.
-------------------------------------------------------------------- */
#recommendedChip.is-loading {
    pointer-events: none;
}

.chip-reel-loader {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(58px, 6vw, 80px);
    height: 14px;
    overflow: hidden;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--gold-dim), var(--crimson), var(--gold-dim));
    background-size: 240% 100%;
    animation: reelLoaderFlow 1.6s linear infinite;
}

.chip-reel-track {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: clamp(4px, 0.9vw, 7px);
}

.chip-reel-hole {
    width: 5px;
    height: 5px;
    border-radius: 1px;
    background: var(--void);
    opacity: 0.4;
    animation: reelHolePulse 1.1s ease-in-out infinite;
}

.chip-reel-hole:nth-child(1) { animation-delay: 0s; }
.chip-reel-hole:nth-child(2) { animation-delay: .08s; }
.chip-reel-hole:nth-child(3) { animation-delay: .16s; }
.chip-reel-hole:nth-child(4) { animation-delay: .24s; }
.chip-reel-hole:nth-child(5) { animation-delay: .32s; }
.chip-reel-hole:nth-child(6) { animation-delay: .4s; }

.chip-reel-sheen {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .4) 45%, transparent 65%);
    transform: translateX(-130%);
    animation: reelSheenSweep 1.6s ease-in-out infinite;
}

@keyframes reelLoaderFlow {
    to { background-position: -240% 0; }
}

@keyframes reelHolePulse {
    0%, 100% { opacity: .35; transform: scaleY(.65); }
    50%      { opacity: 1;   transform: scaleY(1); }
}

@keyframes reelSheenSweep {
    0%   { transform: translateX(-130%); }
    100% { transform: translateX(230%); }
}

@media (prefers-reduced-motion: reduce) {
    .chip-reel-loader,
    .chip-reel-sheen,
    .chip-reel-hole {
        animation: none;
    }
}

/* --------------------------------------------------------------------
   "Топ фильмов" grid loading state
   --------------------------------------------------------------------
   Whatever populates #grid briefly writes a plain "..." placeholder into
   it while fetching. The inline script at the bottom of index.html swaps
   that placeholder for this projector-style loader instead: two spinning
   reel discs above a running perforated filmstrip, built from the same
   --void / --crimson / --gold palette as the rest of the page.
-------------------------------------------------------------------- */
#grid.is-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(240px, 30vw, 340px);
}

.reel-grid-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.reel-grid-discs {
    display: flex;
    gap: clamp(28px, 4vw, 48px);
}

.reel-disc {
    position: relative;
    width: clamp(44px, 5vw, 62px);
    height: clamp(44px, 5vw, 62px);
    border-radius: 50%;
    border: 3px solid var(--line);
    border-top-color: var(--gold);
    border-right-color: var(--crimson);
    animation: reelDiscSpin 1.1s linear infinite;
}

.reel-disc::after {
    content: '';
    position: absolute;
    inset: 32%;
    border-radius: 50%;
    background: var(--crimson);
    box-shadow: 0 0 12px rgba(200, 32, 58, .6);
}

.reel-disc:nth-child(2) {
    animation-duration: 1.4s;
    animation-direction: reverse;
}

.reel-grid-strip {
    position: relative;
    width: clamp(140px, 16vw, 200px);
    height: 16px;
    border-radius: 4px;
    overflow: hidden;
    background: linear-gradient(90deg, var(--gold-dim), var(--crimson), var(--gold-dim));
    background-size: 240% 100%;
    animation: reelLoaderFlow 1.6s linear infinite;
}

.reel-grid-strip::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(90deg, var(--void) 0 6px, transparent 6px 14px);
    opacity: .55;
}

@keyframes reelDiscSpin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .reel-disc,
    .reel-grid-strip {
        animation: none;
    }
}

.vault {
    max-width: 1400px;
    margin: 0 auto;
    padding: 6rem 1.5rem;
}

@media(min-width: 640px) {
    .grid {
        grid-template-columns: repeat(3,minmax(0,1fr));
        gap: 1.75rem;
    }

    .nav {
        padding: 1.25rem 2.5rem;
    }

    .hero-content {
        padding-inline: 2.5rem;
    }

    .tagline {
        font-size: 0.875rem;
    }

    .vault {
        padding-inline: 2.5rem;
    }
}

.vault-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 3rem;
}

.eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--crimson-glow);
}

.vault-head h2 {
    margin-top: 0.75rem;
    font-size: clamp(2.5rem, 4vw, 3.75rem);
}

.vault-note {
    display: none;
    max-width: 24rem;
    font-size: 0.85rem;
    color: var(--muted);
}

@media(min-width: 768px) {
    .footer {
        flex-direction: row;
        justify-content: space-between;
        padding-inline: 4rem;
    }

    .nav-links {
        display: flex;
    }

    .btn-ghost {
        display: inline-flex;
    }

    .hamburger {
        display: none;
    }

    .vault-note {
        display: block;
    }
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(160px, 15vw, 230px), 1fr));
    gap: clamp(16px, 2.5vw, 28px);
    padding: 10px 5vw clamp(40px, 7vw, 80px);
    perspective: 1200px;
}

.grid-pagination {
    display: none;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 2vw, 24px);
    padding: 0 5vw clamp(50px, 8vw, 90px);
}

.grid-pagination.show {
    display: flex;
}

.grid-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    color: var(--cream);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.25s ease;
}

.grid-page-btn:hover:not(:disabled) {
    border-color: var(--gold-dim);
    background: linear-gradient(135deg, var(--crimson-bright), var(--crimson));
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -6px rgba(214, 31, 60, 0.5);
}

.grid-page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.grid-page-info {
    font-family: 'Bebas Neue';
    font-size: clamp(16px, 1.6vw, 20px);
    letter-spacing: 0.06em;
    color: var(--cream-dim);
    min-width: 64px;
    text-align: center;
}

.card {
    background: var(--grad-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.card:hover {
    border-color: rgba(200, 32, 58, 0.6);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8), 0 0 20px rgba(168, 25, 46, 0.3);
}

.card-img, .poster {
    height: clamp(220px, 22vw, 300px);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.card-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(12, 10, 16, 0.95), transparent 60%);
    z-index: 2;
    pointer-events: none;
}

.card-img::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 0;
}

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

.card-img.trailer-active::before {
    opacity: 0;
    transition: opacity 0.25s ease;
}

.card-img.trailer-active::after {
    opacity: 0.15;
}

.card-img.trailer-active .rating-badge {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.rating-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 4;
    background: rgba(12, 10, 16, 0.75);
    border: 1px solid var(--gold);
    color: var(--gold);
    font-weight: 800;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.3s ease;
}

.card-body {
    padding: 12px 14px 16px;
    position: relative;
    z-index: 2;
    margin-top: -40px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-body h3 {
    font-size: clamp(18px, 1.5vw, 22px);
    margin: 0 0 4px;
    letter-spacing: 0.03em;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.card:hover .card-body h3 {
    color: var(--gold);
}

.card-body .meta {
    font-size: 0.75rem;
    color: var(--cream-dim);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: auto;
}

.genre-row {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.genre-pill {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 20px;
    border: 1px solid var(--line);
    color: var(--cream-dim);
    transition: all 0.3s ease;
}

.card:hover .genre-pill {
    border-color: rgba(243, 237, 226, 0.2);
    color: var(--cream);
    background: rgba(255, 255, 255, 0.03);
}

.about {
    padding: clamp(40px, 6vw, 80px) 5vw;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(calc(50% - 30px), 1fr));
}

@media(min-width: 1025px) {
    .about {
        grid-template-columns: repeat(4, 1fr);
    }
}

.about-item {
    padding: 10px;
}

.about-item .num {
    font-family: 'Bebas Neue';
    font-size: clamp(38px, 4vw, 50px);
    color: var(--gold-dim);
    line-height: 1;
}

.about-item h3 {
    font-size: clamp(20px, 2vw, 24px);
    margin: 8px 0;
}

.about-item p {
    color: var(--cream-dim);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

footer {
    padding: clamp(30px, 4vw, 50px) 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--cream-dim);
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 16px;
    border-top: 1px solid var(--border);
}

@media(max-width: 600px) {
    .about {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    footer {
        flex-direction: column;
        text-align: center;
    }
}

.copy {
    font-size: 0.7rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--muted);
}

.modal-overlay, .vote-overlay, .details-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 6, 10, 0.75);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 16px;
}

.modal-overlay.open, .vote-overlay.open, .details-overlay.open {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.modal, .vote-modal, .details-modal {
    width: 100%;
    background: linear-gradient(160deg, var(--curtain), #150d11);
    border: 1px solid var(--border);
    border-radius: 12px;
    position: relative;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(212, 175, 55, 0.06);
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

.modal-overlay.open .modal, .vote-overlay.open .vote-modal, .details-overlay.open .details-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(160deg, var(--curtain), #150d11);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: clamp(24px, 4vw, 36px) clamp(20px, 3vw, 32px);
    position: relative;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(212, 175, 55, 0.06);
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .35s;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}

.vote-modal {
    width: 100%;
    max-width: 720px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: linear-gradient(160deg, var(--curtain), #150d11);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: clamp(20px, 4vw, 30px);
    position: relative;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(212, 175, 55, 0.06);
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .35s;
    scrollbar-width: thin;
}

.details-modal {
    position: relative;
    width: 100%;
    max-width: 800px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: rgba(26, 16, 20, 0.75);
    backdrop-filter: blur(28px) saturate(170%);
    -webkit-backdrop-filter: blur(28px) saturate(170%);
    border: 1px solid rgba(243, 237, 226, 0.08);
    border-radius: 16px;
    padding: clamp(30px, 5vw, 54px) clamp(20px, 4vw, 36px);
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.85), inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 0 40px rgba(168, 25, 46, 0.1);
    transform: scale(0.92) translateY(24px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.25, 1), opacity 0.4s ease;
}

.modal-close, .vote-modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    color: var(--cream-dim);
    font-size: 24px;
    line-height: 1;
    padding: 4px;
    z-index: 10;
}

.modal-close:hover, .vote-modal-close:hover {
    color: var(--cream);
}

.tabs {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    padding: 5px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.tab-btn {
    flex: 1;
    padding: 10px 0;
    border: none;
    background: transparent;
    color: var(--cream-dim);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 6px;
    transition: all 0.25s;
}

.tab-btn.active {
    background: var(--crimson);
    color: var(--cream);
    box-shadow: 0 6px 16px -4px rgba(168, 25, 46, 0.6);
}

.pane {
    display: none;
}

.pane.active {
    display: block;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--cream-dim);
    margin-bottom: 7px;
}

.field input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--cream);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.25s, background 0.25s;
}

.field input:focus {
    border-color: var(--gold-dim);
    background: rgba(255, 255, 255, 0.06);
}

.submit-btn {
    width: 100%;
    margin-top: 6px;
    background: linear-gradient(135deg, var(--crimson-bright), var(--crimson));
    color: var(--cream);
    border: none;
    padding: 14px;
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: transform .2s, box-shadow .2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -8px rgba(214, 31, 60, 0.6);
}

.fine {
    font-size: 11px;
    color: var(--cream-dim);
    text-align: center;
    margin-top: 18px;
    line-height: 1.4;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--cream-dim);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

.google-btn-wrap {
    display: flex;
    justify-content: center;
    min-height: 42px;
    border-radius: 6px;
    overflow: hidden;
}

.fine a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.vote-fab {
    position: fixed;
    right: clamp(16px, 3vw, 28px);
    bottom: clamp(16px, 3vw, 28px);
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dim));
    color: var(--void);
    border: none;
    padding: 12px 20px 12px 14px;
    border-radius: 40px;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 14px 34px -10px rgba(212, 175, 55, 0.55);
    animation: fabPulse 3.2s ease-in-out infinite;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.vote-fab:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 20px 40px -10px rgba(212, 175, 55, 0.7);
}

.fab-reel {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: conic-gradient(var(--void) 0 25%, rgba(12, 10, 16, 0.4) 0 50%, var(--void) 0 75%, rgba(12, 10, 16, 0.4) 0 100%);
    position: relative;
    animation: spin 6s linear infinite;
}

.fab-reel::after {
    content: '';
    position: absolute;
    inset: 32%;
    background: var(--gold);
    border-radius: 50%;
}

@keyframes fabPulse { 0%, 100% { box-shadow: 0 14px 34px -10px rgba(212, 175, 55, 0.55); } 50% { box-shadow: 0 14px 34px -6px rgba(212, 175, 55, 0.85), 0 0 0 6px rgba(212, 175, 55, 0.08); } }

@keyframes spin { to { transform: rotate(360deg); } }

.char-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
}

.char-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.char-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 5, 8, 0.9);
    backdrop-filter: blur(12px);
}

.char-shock {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 60vmin;
    height: 60vmin;
    border-radius: 50%;
    border: 2px solid rgba(200, 32, 58, 0.7);
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0;
}

.char-overlay.open .char-shock {
    animation: shock 1.1s ease-out forwards;
}

@keyframes shock { 0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0.9; } 100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; } }

.char-row {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: flex-end;
    gap: 2rem;
    padding: 2rem 1.5rem;
    justify-content: center;
}

.char-info {
    max-width: 28rem;
    padding-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.char-info h3 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 0.95;
}

.char-meta {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
}

.char-line {
    font-style: italic;
    font-size: 1.1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--crimson);
}

.char-img {
    height: 70vh;
    max-height: 820px;
    width: auto;
    filter: drop-shadow(0 0 40px rgba(200, 32, 58, 0.45));
    transform: translateY(80px) scale(0.85);
    opacity: 0;
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s;
    user-select: none;
}

.char-overlay.open .char-img {
    transform: translateY(0) scale(1);
    opacity: 1;
    animation: idle 4s ease-in-out infinite 1s;
}

@keyframes idle { 0%, 100% { transform: translateY(0) rotate(-0.5deg); } 50% { transform: translateY(-10px) rotate(0.5deg); } }

.close-x {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    backdrop-filter: blur(6px);
    transition: all 0.2s;
    z-index: 60;
}

.close-x:hover {
    border-color: var(--crimson);
    color: var(--crimson-glow);
}

.movie-modal-content {
    display: grid;
    grid-template-columns: minmax(180px, 240px) 1fr;
    gap: clamp(20px, 4vw, 32px);
    align-items: start;
}

.details-poster {
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

.movie-modal-right {
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 2vw, 20px);
}

.details-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(28px, 4.5vw, 42px);
    letter-spacing: 0.04em;
    margin: 0;
    line-height: 1.1;
    color: var(--cream);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.movie-modal-badges {
    display: flex;
    gap: 8px 12px;
    flex-wrap: wrap;
    align-items: center;
}

.details-badge {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
}

.details-badge.rating {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212, 175, 55, 0.04);
}

.details-badge.genre {
    border-color: var(--cream-dim);
    color: var(--cream);
}

.details-badge.year {
    border-color: var(--crimson-bright);
    color: var(--crimson-bright);
    background: rgba(214, 31, 60, 0.04);
}

.movie-modal-desc-box {
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.details-desc-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(18px, 2vw, 20px);
    letter-spacing: 0.06em;
    color: var(--gold);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.details-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--cream-dim);
    margin: 0;
    max-height: clamp(150px, 25vh, 250px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--crimson) transparent;
}

.toast {
    position: fixed;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--curtain);
    border: 1px solid var(--gold-dim);
    color: var(--cream);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 200;
    box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.6);
    width: calc(100% - 32px);
    max-width: max-content;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* =====================================================================
   MOBILE FIXES — Header / Hero / Vote FAB / Hero stats.
   Mobile-only overrides (max-width media queries), desktop untouched.
   Goals: no horizontal overflow, no clipped "250+" stats block, a
   compact Vote FAB that respects safe-area and never covers content,
   a header row that always fits on one line.
   ===================================================================== */
@media (max-width: 767px) {
    /* --- Header: tighten spacing so brand + lang + hamburger + search
       always share one row without wrapping or overflowing --- */
    .nav {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
    }

    .nav-right {
        gap: clamp(6px, 2vw, 10px);
    }

    .brand-text {
        font-size: clamp(1.05rem, 4.5vw, 1.4rem);
    }

    .lang-btn {
        padding: 5px 7px;
        font-size: 0.68rem;
    }

    .search {
        width: 36px;
        height: 36px;
    }

    .search svg {
        width: 16px;
        height: 16px;
    }

    .hamburger {
        padding: 0.35rem;
    }

    /* --- Hero: was a hard height:100dvh + overflow:hidden, which is
       exactly what clipped the "250+" stats row on short phone
       viewports. Switch to min-height so the section can grow to fit
       its content instead of cutting it off, and drop the height by
       roughly 12% so there's breathing room before the fold. --- */
    .hero {
        height: auto;
        min-height: 88dvh;
        overflow: visible;
    }

    .hero-content {
        height: auto;
        min-height: 100%;
        /* reserve room so the fixed Vote FAB never sits on top of the
           stats row or the CTA buttons */
        padding-bottom: calc(84px + env(safe-area-inset-bottom));
    }

    .hero-sub {
        max-width: 100%;
    }

    /* --- H1: the localized string is "Лучшее кино,<br>год
       <span>за годом</span>" and .hero-title span is display:block,
       which forces "год" and "за годом" onto two separate lines (3
       lines total). Undo the forced block just on mobile so the text
       after <br> flows as one natural line: "год за годом". Desktop
       keeps the original 3-line treatment untouched. --- */
    .hero-title span {
        display: inline;
    }

    /* --- Tighten the gap between the "TMDB" eyebrow label and H1
       just on mobile/tablet; desktop keeps the original clamp(). --- */
    .tagline {
        margin-bottom: clamp(0.35rem, 1.5vh, 0.9rem);
    }

    /* --- CTA: comfortable, non-overflowing touch targets; secondary
       button naturally stays below thanks to source order --- */
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .btn-neon,
    .hero-ghost-btn {
        width: 90%;
        max-width: 360px;
        margin: 0 auto;
        justify-content: center;
    }

    /* --- Stats: smaller gap so all three items wrap cleanly instead
       of pushing the last one toward the Vote FAB --- */
    .hero-stats {
        gap: 1rem 1.75rem;
    }

    /* --- Vote FAB: compact, safe-area aware, fixed sane size instead
       of hugging its (previously oversized) content --- */
    .vote-fab {
        right: 12px;
        bottom: calc(14px + env(safe-area-inset-bottom));
        width: clamp(160px, 46vw, 190px);
        height: clamp(50px, 12vw, 58px);
        padding: 0 16px;
        gap: 8px;
        font-size: 0.72rem;
        justify-content: center;
    }

    .fab-reel {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }
}

/* --- Logged-in username: #authBtn.has-menu is an ID+class selector,
   so it beats the mobile .btn-ghost{display:none} rule on specificity
   alone and stays visible at any width once a user is logged in. A
   long username (e.g. BOHDAN_ILCHENKA) can then overflow the one-line
   header on small phones. Collapse it into a compact circular
   profile-menu trigger instead of touching logo/lang/hamburger/search
   sizing. Tapping it still opens the exact same dropdown as before —
   no JS or markup changes. --- */
@media (max-width: 430px) {
    #authBtn.has-menu {
        width: 30px;
        height: 30px;
        padding: 0;
        gap: 0;
        justify-content: center;
        border-radius: 50%;
        font-size: 0;
        flex-shrink: 0;
    }

    #authBtn.has-menu::before {
        content: "";
        display: block;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: currentColor;
        opacity: 0.9;
    }

    #authBtn.has-menu::after {
        display: none;
    }

    .user-menu-dropdown {
        right: -6px;
    }
}

/* --- Tablet (768–1023px): same TMDB-label/H1 gap tightening as
   mobile. Desktop (≥1024px, where .hero-content switches to its
   padding-inline:4rem layout) is untouched. --- */
@media (min-width: 768px) and (max-width: 1023px) {
    .tagline {
        margin-bottom: clamp(0.5rem, 1.8vh, 1.1rem);
    }
}

/* --- Extra-narrow phones (down to 320px, QVGA): squeeze the header
   further so it never overflows even at the smallest widths --- */
@media (max-width: 379px) {
    .nav {
        padding: 0.6rem 0.75rem;
        gap: 0.4rem;
    }

    .brand-badge {
        width: 30px;
        height: 30px;
    }

    .brand {
        gap: 0.5rem;
    }

    .brand-text {
        font-size: clamp(0.95rem, 4vw, 1.2rem);
    }

    .nav-right {
        gap: clamp(4px, 1.5vw, 8px);
    }

    .lang-switch {
        padding: 2px;
    }

    .lang-btn {
        padding: 4px 6px;
        font-size: 0.62rem;
    }

    .search {
        width: 32px;
        height: 32px;
    }

    .hamburger {
        padding: 0.25rem;
        gap: 4px;
    }
}

/* =====================================================================
   RESPONSIVE LADDER — from the smallest phones (QVGA, 320px) up to
   16K commercial displays (15360px), per the device resolution table.
   ===================================================================== */

/* --- Phones: absolute minimum (QVGA and similarly tiny screens) --- */
@media (max-width: 359px) {
    .details-desc {
        text-align: justify;
        font-size: 0.82rem;
    }

    .movie-modal-content {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .details-poster {
        max-width: 140px;
        margin: 0 auto;
    }

    .details-title {
        text-align: center;
        font-size: clamp(22px, 7vw, 28px);
    }

    .movie-modal-badges {
        justify-content: center;
        gap: 6px 8px;
    }

    .details-badge {
        font-size: 10px;
        padding: 4px 9px;
    }

    .toast {
        font-size: 0.75rem;
        padding: 10px 14px;
    }
}

/* --- Small / standard phones (360px–480px) --- */
@media (min-width: 360px) and (max-width: 480px) {
    .details-desc {
        text-align: justify;
    }

    .movie-modal-content {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .details-poster {
        max-width: 160px;
        margin: 0 auto;
    }

    .details-title {
        text-align: center;
    }

    .movie-modal-badges {
        justify-content: center;
    }
}

/* --- Large phones / small tablets (481px–768px) --- */
@media (min-width: 481px) and (max-width: 768px) {
    .details-desc {
        text-align: justify;
    }

    .movie-modal-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .details-poster {
        max-width: 180px;
        margin: 0 auto;
    }

    .details-title {
        text-align: center;
    }

    .movie-modal-badges {
        justify-content: center;
    }
}

/* --- VGA baseline monitors (640×480) and FWVGA phones in landscape (854px): 640px–768px --- */
@media (min-width: 640px) and (max-width: 768px) {
    .fy-card, .fy-skeleton {
        width: clamp(120px, 14vw, 150px);
    }

    .card-img {
        height: clamp(200px, 26vw, 260px);
    }
}


@media (min-width: 769px) and (max-width: 1024px) {
    .movie-modal-content {
        grid-template-columns: minmax(160px, 200px) 1fr;
        gap: 24px;
    }

    .details-poster {
        max-width: 100%;
    }
}

@media (min-width: 1025px) and (max-width: 1919px) {
    .grid, header, .reel-section, .about, footer, .promo-banner, .nav {
        max-width: 1440px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 1920px) and (min-height: 1080px) {
    .grid, header, .reel-section, .about, footer, .promo-banner {
        max-width: 1600px;
        margin-left: auto;
        margin-right: auto;
    }

    .grid, .nav, .reel-section, .about, footer {
        max-width: 1600px;
        margin-left: auto;
        margin-right: auto;
    }
}


@media (min-width: 2560px) {
    .grid, header, .reel-section, .about, footer, .promo-banner, .nav {
        max-width: 1900px;
        margin-left: auto;
        margin-right: auto;
    }

    body {
        font-size: 1.05rem;
    }
}


@media (min-width: 2560px) and (min-aspect-ratio: 2/1) {
    .grid, header, .reel-section, .about, footer, .promo-banner, .nav {
        max-width: 92vw;
    }

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

@media (min-width: 3840px) {
    .grid, header, .reel-section, .about, footer, .promo-banner, .nav {
        max-width: 2400px;
        margin-left: auto;
        margin-right: auto;
    }

    body {
        font-size: 1.15rem;
    }
}


@media (min-width: 5120px) {
    .grid, header, .reel-section, .about, footer, .promo-banner, .nav {
        max-width: 3000px;
        margin-left: auto;
        margin-right: auto;
    }

    body {
        font-size: 1.3rem;
    }
}


@media (min-width: 6016px) {
    .grid, header, .reel-section, .about, footer, .promo-banner, .nav {
        max-width: 3600px;
        margin-left: auto;
        margin-right: auto;
    }

    body {
        font-size: 1.45rem;
    }
}


@media (min-width: 7680px) {
    .grid, header, .reel-section, .about, footer, .promo-banner, .nav {
        max-width: 4600px;
        margin-left: auto;
        margin-right: auto;
    }

    body {
        font-size: 1.6rem;
    }
}

@media (min-width: 15360px) {
    .grid, header, .reel-section, .about, footer, .promo-banner, .nav {
        max-width: 9200px;
        margin-left: auto;
        margin-right: auto;
    }

    body {
        font-size: 2rem;
    }
}


@media (max-height: 576px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding-top: 12px;
        padding-bottom: 16px;
    }

    .char-img {
        height: 55vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}