/* ==========================================================
   luxKino — карусель «Новинки» (исходная) + ленты жанров
   Подключать ПОСЛЕ lk-home.css
   ========================================================== */

/* ---------- КАРУСЕЛЬ «НОВИНКИ» (бесконечная, на всю ширину) ---------- */
.lk-new {
    --cw: min(90vw, 1200px);
    margin: 0 !important;
    position: relative;
    padding: 12px 0 0;
    font-family: var(--lk-font);
    color: var(--lk-text);
    overflow-x: clip;
}
.lk-new, .lk-new * { box-sizing: border-box; }
.lk-new a { color: inherit; text-decoration: none; }
.lk-new img { display: block; max-width: 100%; }
.lk-new-wrap { position: relative; margin: 0; width: 100%; }

/* без JS — обычная лента */
.lk-new-track {
    position: relative;
    display: flex;
    gap: 10px;
    padding: 0 calc((100% - var(--cw)) / 2);
    overflow-x: auto;
    scrollbar-width: none;
}
.lk-new-track::-webkit-scrollbar { display: none; }

/* с JS — карусель на transform */
.lk-new-wrap.is-js { overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.lk-new-wrap.is-js.is-drag { cursor: grabbing; }
.lk-new-wrap.is-js .lk-new-track { overflow: visible; padding: 0; will-change: transform; }

.lk-new-card {
    position: relative;
    flex: 0 0 var(--cw);
    aspect-ratio: 16 / 7;
    border-radius: 18px;
    overflow: hidden;
    background: var(--lk-surface-2);
    border: 1px solid var(--lk-line);
    opacity: .45;
    transition: opacity .4s ease, border-color .4s ease;
    contain: layout paint;
    -webkit-user-drag: none;
}
.lk-new-card.is-cur { opacity: 1; border-color: var(--lk-line-strong); }
.lk-new-card img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center 25%;
    -webkit-user-drag: none; pointer-events: none;
}
.lk-new-card::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
        linear-gradient(0deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.3) 38%, transparent 62%),
        linear-gradient(90deg, rgba(0,0,0,.4) 0%, transparent 45%);
}

.lk-new-tags {
    position: absolute; z-index: 2;
    top: clamp(10px, 1.6vw, 18px); left: clamp(12px, 2vw, 24px);
    display: flex; flex-wrap: wrap; gap: 6px;
    max-width: calc(100% - 24px);
}
.lk-new-tags span {
    padding: 4px 9px; border-radius: 6px;
    background: rgba(28, 28, 70, .9);
    color: #fff;
    font-size: clamp(10px, 1vw, 12px);
    font-weight: 700; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap;
}
.lk-new-tags .is-soon { background: #fff; color: #000; }

.lk-new-info {
    position: absolute; z-index: 2;
    left: clamp(12px, 2vw, 24px); right: clamp(12px, 2vw, 24px);
    bottom: clamp(10px, 1.8vw, 22px);
}
.lk-new-title {
    margin: 0 0 clamp(6px, 1vw, 10px);
    font-family: 'Unbounded', var(--lk-font-display);
    font-weight: 800;
    font-size: clamp(20px, 3.4vw, 44px);
    line-height: 1.05; letter-spacing: -.02em; text-transform: uppercase;
    text-shadow: 0 4px 24px rgba(0,0,0,.7);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lk-new-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
    font-size: clamp(12px, 1.4vw, 16px); font-weight: 500; color: #e6e6ea;
}
.lk-new-meta .sc { padding: 3px 7px; border-radius: 6px; background: #1f9d5c; color: #fff; font-weight: 800; font-size: .92em; line-height: 1.2; }
.lk-new-meta .sc.mid { background: #c8921a; }
.lk-new-meta .sc.bad { background: #c9483f; }

.lk-na {
    position: absolute; top: 50%; z-index: 5;
    width: 46px; height: 62px; margin-top: -31px;
    border: 0; border-radius: 12px;
    background: rgba(40, 40, 44, .8); color: #fff; cursor: pointer;
    display: none; align-items: center; justify-content: center;
    transition: background .2s, color .2s;
}
.lk-na svg { width: 22px; height: 22px; }
.lk-na:hover { background: #fff; color: #000; }
.lk-na--l { left: 14px; }
.lk-na--r { right: 14px; }
@media (hover: hover) and (min-width: 821px) { .lk-na { display: flex; } }

@media (max-width: 820px) {
    .lk-new { --cw: 92vw; padding-top: 8px; }
    .lk-new-card { aspect-ratio: 16 / 10; border-radius: 16px; }
    .lk-new-track { gap: 8px; }
}

/* ---------- ЖАНРЫ: лента плашек на всю ширину (Edge-to-Edge) ---------- */
#genres { margin-top: 20px; }
.lk-tilerail {
    position: relative;
    margin: 0 calc(var(--lk-pad) * -1);
}
.lk-tiles {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 4px var(--lk-pad);
    overflow-x: auto; overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-padding-inline: var(--lk-pad);
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}
.lk-tiles::-webkit-scrollbar { display: none; }

.lk-tile {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end; align-items: center;
    gap: 9px;
    width: auto; height: 48px;
    padding: 0 20px 0 14px;
    border-radius: 13px;
    border: 1px solid var(--lk-line);
    background: var(--lk-surface-2);
    color: var(--lk-text);
    scroll-snap-align: start;
    transition: background .2s, border-color .2s, transform .2s;
}
.lk-tile-name { font-size: 15px; font-weight: 600; white-space: nowrap; }
.lk-tile:hover {
    background: var(--lk-surface-3);
    border-color: var(--lk-line-strong);
    transform: translateY(-1px);
}
.lk-tile.is-active {
    background: var(--lk-grad);
    border-color: transparent;
    color: var(--lk-on-grad);
    box-shadow: 0 6px 20px var(--lk-accent-glow);
}

.lk-tile-ico {
    width: 24px; height: 24px; flex: 0 0 24px;
    display: flex; align-items: center; justify-content: center;
}
.lk-gi {
    width: 22px; height: 22px;
    fill: none; stroke: currentColor; stroke-width: 1.75;
    stroke-linecap: round; stroke-linejoin: round;
    color: #d4d4dc;
    transition: color .2s;
}
.lk-tile:hover .lk-gi { color: #fff; }
.lk-tile.is-active .lk-gi { color: var(--lk-on-grad); }

.lk-ga {
    position: absolute; top: 4px; z-index: 4;
    width: 42px; height: 48px;
    border: 1px solid var(--lk-line-strong); border-radius: 13px;
    background: var(--lk-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff; cursor: pointer;
    display: none; align-items: center; justify-content: center;
    transition: background .2s, color .2s, opacity .2s;
}
.lk-ga svg { width: 18px; height: 18px; }
.lk-ga:hover { background: #fff; color: #000; }
.lk-ga--l { left: calc(var(--lk-pad) * .5); }
.lk-ga--r { right: calc(var(--lk-pad) * .5); }
.lk-ga[disabled] { opacity: 0; pointer-events: none; }
@media (hover: hover) and (min-width: 821px) { .lk-ga { display: flex; } }

@media (max-width: 820px) {
    .lk-tile { height: 42px; padding: 0 14px 0 10px; border-radius: 11px; }
    .lk-tile-ico { width: 20px; height: 20px; flex-basis: 20px; }
    .lk-gi { width: 19px; height: 19px; }
    .lk-tile-name { font-size: 14px; }
}