/* =========================================================
   relive.wtf — стили
   Цвета вайба (--c1/--c2/--c3/--fl) и пульс (--beat, --bass)
   выставляет app.js каждый кадр. Формат: "r g b".
   ========================================================= */

:root {
    --c1: 214 74 160;          /* основной акцент — тёмно-розовый */
    --c2: 139 92 246;          /* второй — фиолетовый */
    --c3: 24 8 30;             /* глубокий фон */
    --fl: 255 200 230;         /* цвет вспышки */
    --beat: 0;
    --bass: 0;

    --bg: #07050a;
    --text: #f6f1f8;
    --muted: rgb(236 226 242 / .58);
    --line: rgb(255 255 255 / .085);
    --tile: rgb(255 255 255 / .035);

    --r-card: 26px;
    --r-tile: 18px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --spring: cubic-bezier(.34, 1.56, .64, 1);

    --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;
    --lyric: "Nunito", "Manrope", system-ui, sans-serif;   /* мягкий округлый шрифт для лирики */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}
body.is-locked { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { display: block; fill: currentColor; }
:focus-visible { outline: 2px solid rgb(var(--c1) / .9); outline-offset: 3px; border-radius: 8px; }

/* =========================================================
   ФОН
   ========================================================= */

.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

.bg-gl {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 1.6s var(--ease);
}
.has-gl .bg-gl { opacity: 1; }

/* запасной фон, если WebGL недоступен */
.bg-fallback { position: absolute; inset: -20%; filter: blur(70px); opacity: .75; }
.has-gl .bg-fallback { display: none; }
.blob { position: absolute; border-radius: 50%; mix-blend-mode: screen; }
.b1 { width: 60vmax; height: 60vmax; left: -5%; top: 10%; background: rgb(var(--c1) / .55); animation: drift1 26s ease-in-out infinite alternate; }
.b2 { width: 55vmax; height: 55vmax; right: -10%; top: -15%; background: rgb(var(--c2) / .45); animation: drift2 31s ease-in-out infinite alternate; }
.b3 { width: 50vmax; height: 50vmax; left: 30%; bottom: -25%; background: rgb(var(--c1) / .35); animation: drift3 37s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(18vw, -10vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-22vw, 14vh) scale(.9); } }
@keyframes drift3 { to { transform: translate(-12vw, -18vh) scale(1.2); } }

.bg-fx { position: absolute; inset: 0; width: 100%; height: 100%; }


.grain {
    position: absolute; inset: -50%;
    opacity: .07;
    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='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    animation: grain 1s steps(6) infinite;
}
@keyframes grain {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-3%, 2%); }
    40% { transform: translate(2%, -4%); }
    60% { transform: translate(-4%, -1%); }
    80% { transform: translate(3%, 3%); }
    100% { transform: translate(0, 0); }
}

.vignette {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 120% 90% at 50% 50%, transparent 45%, rgb(0 0 0 / .72) 100%);
}

/* =========================================================
   ЭКРАН ВХОДА
   ========================================================= */

/* Вход — плавный fade:
   кот с надписью растворяются, затем чёрный экран медленно тает,
   а карточка проявляется из темноты. Только opacity/transform — дёшево. */
.enter {
    position: fixed; inset: 0; z-index: 50;
    display: grid; place-items: center;
    background: #050307;
    cursor: pointer;
    transition: opacity 1.4s cubic-bezier(.4, 0, .2, 1) .35s, visibility 0s 1.8s;
}
.enter.out { opacity: 0; visibility: hidden; pointer-events: none; }

.enter-inner {
    position: relative;
    display: grid; justify-items: center; gap: 20px;
    transition: opacity .6s ease, transform 1s var(--ease);
}
.enter.out .enter-inner { opacity: 0; transform: scale(.97); }

.enter-cat {
    position: relative; width: 96px; height: 96px;
    border-radius: 50%; overflow: hidden;
    box-shadow: 0 0 0 1px rgb(255 255 255 / .06);
}
.enter-cat img { width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.enter-cat .eye { --s: 1.2; animation: blink 4s ease-in-out infinite; }
@keyframes blink { 0%, 92%, 100% { opacity: .9; } 95% { opacity: .1; } }

.enter-text {
    font-family: var(--mono); font-weight: 500;
    font-size: 14px; letter-spacing: .14em;
    color: rgb(255 255 255 / .82);
    text-shadow: 0 0 18px rgb(var(--c1) / .7);
    white-space: pre;
}

/* глаза кота — светятся на бит */
.eye {
    --s: 1;
    position: absolute;
    width: 9%; height: 9%;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(calc(var(--s) + var(--beat) * .9));
    background: radial-gradient(circle, rgb(255 255 255 / 1) 0 22%, rgb(var(--fl) / .9) 35%, rgb(var(--c1) / .5) 55%, transparent 72%);
    mix-blend-mode: screen;
    opacity: calc(.25 + var(--beat) * .9);
    pointer-events: none;
}
.eye.l { left: 48.6%; top: 35.6%; }
.eye.r { left: 57.5%; top: 36.2%; }

/* =========================================================
   СЦЕНА И КАРТОЧКА
   ========================================================= */

.stage {
    position: relative; z-index: 2;
    min-height: 100vh; min-height: 100dvh;
    display: grid; place-items: center;
    padding: max(28px, env(safe-area-inset-top)) 14px max(28px, env(safe-area-inset-bottom));
    perspective: 1200px;
}

.card {
    position: relative;
    width: min(460px, 100%);
    border-radius: var(--r-card);
    background:
        linear-gradient(180deg, rgb(255 255 255 / .05), rgb(255 255 255 / .015) 40%, rgb(var(--c3) / .25)),
        rgb(10 6 14 / .38);
    border: 1px solid var(--line);
    box-shadow:
        0 30px 80px -20px rgb(0 0 0 / .85),
        0 0 40px -10px rgb(var(--c1) / .18),
        inset 0 1px 0 rgb(255 255 255 / .07);
    backdrop-filter: blur(22px) saturate(1.3);
    -webkit-backdrop-filter: blur(22px) saturate(1.3);
    padding-bottom: 18px;
    transform-style: preserve-3d;
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    opacity: 0;
    translate: 0 26px;
    scale: .96;
    transition: opacity 1.1s var(--ease), translate 1.3s var(--ease), scale 1.3s var(--ease);
    will-change: transform;
}
.is-in .card { opacity: 1; translate: 0 0; scale: 1; }

/* блик за курсором + подсветка края */
.card::before, .card::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    opacity: var(--hover, 0);
    transition: opacity .5s var(--ease);
}
.card::before {
    background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgb(255 255 255 / .06), transparent 65%);
    z-index: 0;
}
.card::after {
    padding: 1.5px;
    background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgb(var(--fl) / .9), rgb(var(--c1) / .5) 25%, transparent 60%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    z-index: 5;
}

/* ступенчатое появление блоков */
.reveal {
    opacity: 0; translate: 0 12px;
    transition: opacity .8s var(--ease), translate .9s var(--ease);
    transition-delay: calc(.35s + var(--i) * .08s);
}
.is-in .reveal { opacity: 1; translate: 0 0; }

/* =========================================================
   БАННЕР
   ========================================================= */

.banner {
    position: relative;
    height: 150px;
    margin: 8px 8px 0;
    border-radius: calc(var(--r-card) - 8px);
    overflow: hidden;
    -webkit-mask: radial-gradient(circle 66px at 50% calc(100% + 8px), transparent 98%, #000 100%);
            mask: radial-gradient(circle 66px at 50% calc(100% + 8px), transparent 98%, #000 100%);
    isolation: isolate;
}
.banner-img {
    position: absolute; inset: -30%;
    background: url("../img/banner.webp") center / cover;
    animation: banner-flow 22s ease-in-out infinite alternate;
    filter: hue-rotate(var(--hue, 0deg)) saturate(1.15) brightness(calc(.95 + var(--beat) * .35));
}
@keyframes banner-flow {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(-6%, 4%) scale(1.12) rotate(3deg); }
    100% { transform: translate(5%, -3%) scale(1.06) rotate(-2deg); }
}
.banner-tint {
    position: absolute; inset: 0;
    background:
        radial-gradient(70% 120% at 15% 0%, rgb(var(--c2) / .45), transparent 70%),
        radial-gradient(60% 120% at 90% 100%, rgb(var(--c1) / .45), transparent 70%),
        linear-gradient(180deg, transparent 40%, rgb(7 5 10 / .55));
    mix-blend-mode: color;
    opacity: .85;
    transition: background 1s;
}
.banner-shine {
    position: absolute; inset: -40% auto -40% -40%;
    width: 30%;
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / .22), transparent);
    transform: skewX(-18deg);
    animation: shine 6.5s ease-in-out infinite;
}
@keyframes shine { 0%, 35% { left: -40%; } 75%, 100% { left: 130%; } }

.chip {
    position: absolute; top: 10px; z-index: 3;
    display: flex; align-items: center; gap: 6px;
    height: 28px; padding: 0 10px;
    border-radius: 999px;
    font-size: 12px; font-weight: 700; letter-spacing: .02em;
    color: rgb(255 255 255 / .82);
    background: rgb(8 4 12 / .42);
    border: 1px solid rgb(255 255 255 / .1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: color .3s, background .3s, transform .4s var(--spring);
}
.chip svg { width: 14px; height: 14px; }
.views { right: 10px; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .chip:hover { transform: translateY(-1px) scale(1.04); color: #fff; background: rgb(8 4 12 / .6); } }
.chip:active { transform: scale(.94); }

/* =========================================================
   АВАТАР
   ========================================================= */

.avatar-wrap {
    position: relative;
    width: 124px; height: 124px;
    margin: -64px auto 0;
    z-index: 4;
    display: grid; place-items: center;
}
.avatar-ring {
    position: absolute; inset: 0;
    border-radius: 50%;
    background: conic-gradient(from var(--spin, 0deg), rgb(var(--c1)), rgb(var(--c2)), rgb(var(--fl)), rgb(var(--c1)));
    -webkit-mask: radial-gradient(circle, transparent 57px, #000 58px);
            mask: radial-gradient(circle, transparent 57px, #000 58px);
    transform: scale(calc(1 + var(--bass) * .07));
    filter: drop-shadow(0 0 calc(6px + var(--bass) * 18px) rgb(var(--c1) / .9));
    opacity: calc(.75 + var(--bass) * .25);
}
.avatar-clip {
    position: relative;
    width: 108px; height: 108px;
    border-radius: 50%;
    overflow: hidden;
    background: #120a14;
    box-shadow: 0 0 0 4px rgb(7 5 10 / .9);
}
.avatar { width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.02 + var(--beat) * .03)); }

.status-dot {
    position: absolute; right: 12px; bottom: 12px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #80848e;
    border: 4px solid #0b070e;
    z-index: 2;
    transition: background .4s;
}
.status-dot[data-s="online"] { background: #23a55a; box-shadow: 0 0 10px #23a55a; }
.status-dot[data-s="idle"] { background: #f0b232; }
.status-dot[data-s="dnd"] { background: #f23f43; }

/* =========================================================
   ИМЯ И СТАТУС
   ========================================================= */

.name {
    position: relative;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 10px;
    font-family: var(--mono);
    font-size: 30px; font-weight: 800;
    letter-spacing: .02em;
    line-height: 1.1;
}
.name-text {
    position: relative;
    color: #fff;
    text-shadow: 0 0 14px rgb(var(--c1) / .9), 0 0 38px rgb(var(--c2) / .55);
}
.name-text::before, .name-text::after {
    content: attr(data-text);
    position: absolute; inset: 0;
    pointer-events: none;
    opacity: var(--glitch, 0);
}
.name-text::before { color: rgb(var(--c1)); transform: translate(calc(var(--glitch, 0) * -4px), 0); clip-path: inset(var(--g1, 10%) 0 var(--g2, 50%) 0); }
.name-text::after { color: rgb(var(--c2)); transform: translate(calc(var(--glitch, 0) * 4px), 0); clip-path: inset(var(--g2, 50%) 0 var(--g1, 10%) 0); }
.name-star {
    width: 16px; height: 16px;
    color: rgb(var(--fl));
    filter: drop-shadow(0 0 8px rgb(var(--c1)));
    animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle { 50% { transform: rotate(90deg) scale(.75); opacity: .7; } }

.bio {
    height: 20px;
    margin-top: 6px;
    display: flex; justify-content: center; align-items: center;
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: .06em;
    color: var(--muted);
}
.caret {
    width: 7px; height: 15px; margin-left: 3px;
    background: rgb(var(--c1));
    box-shadow: 0 0 8px rgb(var(--c1));
    animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* =========================================================
   ПЛИТКИ
   ========================================================= */

.tile {
    position: relative;
    margin: 14px 16px 0;
    border-radius: var(--r-tile);
    background: var(--tile);
    border: 1px solid var(--line);
    z-index: 1;
}
.tile::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    padding: 1.4px;
    background: radial-gradient(170px circle at var(--mx, 50%) var(--my, 50%), rgb(var(--fl) / .85), rgb(var(--c1) / .35) 30%, transparent 65%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: var(--glow, 0);
    z-index: 3;
}

/* ---------- DISCORD ---------- */

.discord {
    display: flex; align-items: center; gap: 12px;
    margin-top: 18px;
    padding: 12px 14px;
}
.dc-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.dc-info { min-width: 0; flex: 1; text-align: left; }
.dc-name { font-size: 15px; font-weight: 800; }
.dc-sub { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-size: 12px; color: var(--muted); min-width: 0; }
.dc-user { flex: none; }
.dc-activity { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgb(var(--fl) / .85); }
.dc-activity:not(:empty)::before { content: "· "; color: var(--muted); }
.dc-add {
    flex: none;
    height: 34px; padding: 0 14px;
    display: grid; place-items: center;
    border-radius: 11px;
    font-size: 12px; font-weight: 800;
    border: 1px solid rgb(255 255 255 / .16);
    transition: background .35s, color .35s, box-shadow .35s, transform .4s var(--spring);
}
@media (hover: hover) { .dc-add:hover { background: #fff; color: #0b070e; box-shadow: 0 0 22px rgb(var(--c1) / .7); } }
.dc-add:active { transform: scale(.94); }

/* ---------- PLAYER ---------- */

.player { padding: 14px 14px 10px; overflow: hidden; }

.player-bg {
    position: absolute; inset: -40%;
    background: center / cover;
    filter: blur(40px) saturate(1.6) brightness(.55);
    opacity: .5;
    transform: scale(calc(1 + var(--bass) * .06));
    transition: background-image .8s, opacity .8s;
    z-index: -1;
}
.player-bg::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgb(10 6 14 / .3), rgb(10 6 14 / .65));
}

.p-top { display: flex; align-items: center; gap: 13px; touch-action: pan-y; }

.p-cover {
    position: relative; flex: none;
    width: 64px; height: 64px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgb(0 0 0 / .45);   /* без подсветки на бит — только пульс размером */
    transition: transform .05s ease-out;
}
.p-cover img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s, transform .6s var(--ease); }
.p-cover.swap img { opacity: 0; transform: scale(.85) rotate(-6deg); }
@media (hover: hover) { .p-cover:hover img { transform: scale(1.08); } }

.p-meta { min-width: 0; flex: 1; display: grid; gap: 1px; text-align: left; }

.mood {
    justify-self: start;
    font-family: var(--mono);
    font-size: 10px; font-weight: 500;
    letter-spacing: .14em; text-transform: uppercase;
    color: rgb(var(--fl));
    padding: 2px 7px;
    border-radius: 6px;
    background: rgb(var(--c1) / .16);
    border: 1px solid rgb(var(--c1) / .3);
    margin-bottom: 3px;
}

.p-title {
    display: block; overflow: hidden;
    font-size: 16px; font-weight: 800;
    white-space: nowrap;
    -webkit-mask: linear-gradient(90deg, #000 85%, transparent);
            mask: linear-gradient(90deg, #000 85%, transparent);
}
.p-title:not(.marquee) { -webkit-mask: none; mask: none; text-overflow: ellipsis; }
.p-title-inner { display: inline-block; }
.p-title.marquee .p-title-inner { animation: marquee var(--mq-t, 10s) linear infinite; padding-right: 40px; }
@keyframes marquee { 0%, 15% { transform: translateX(0); } 85%, 100% { transform: translateX(var(--mq, -50%)); } }
@media (hover: hover) { .p-title:hover { text-decoration: underline; text-decoration-color: rgb(var(--c1)); text-underline-offset: 3px; } }

.p-artists { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-artists a { transition: color .25s; }
@media (hover: hover) { .p-artists a:hover { color: #fff; text-decoration: underline; } }

.icon-btn {
    position: relative;
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 12px;
    color: rgb(255 255 255 / .62);
    transition: color .25s, background .25s, transform .35s var(--spring);
}
.icon-btn svg { width: 20px; height: 20px; }
@media (hover: hover) { .icon-btn:hover { color: #fff; background: rgb(255 255 255 / .06); } }
.icon-btn:active { transform: scale(.88); }
.icon-btn[aria-pressed="true"], .icon-btn[aria-expanded="true"] { color: rgb(var(--fl)); }
.icon-btn[aria-pressed="true"]::after, .icon-btn[aria-expanded="true"]::after {
    content: ""; position: absolute; bottom: 3px; left: 50%;
    width: 4px; height: 4px; margin-left: -2px; border-radius: 50%;
    background: rgb(var(--c1)); box-shadow: 0 0 6px rgb(var(--c1));
}
.queue-btn { flex: none; align-self: flex-start; }
.icon-btn .one { position: absolute; top: 6px; right: 6px; font-size: 9px; font-weight: 800; display: none; }
#btn-repeat[aria-pressed="true"] .one { display: block; }

.viz { display: block; width: 100%; height: 34px; margin-top: 10px; }

.seek {
    display: flex; align-items: center; gap: 10px;
    margin-top: 2px;
    font-size: 11px; font-weight: 600;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.time { width: 34px; flex: none; }
.time:first-child { text-align: right; }
.seek-bar {
    position: relative; flex: 1;
    height: 22px;
    cursor: pointer;
    touch-action: none;
}
.seek-bar::before, .seek-buf, .seek-fill {
    content: ""; position: absolute; left: 0; top: 50%;
    height: 5px; margin-top: -2.5px;
    border-radius: 9px;
}
.seek-bar::before { right: 0; background: rgb(255 255 255 / .1); }
.seek-buf { background: rgb(255 255 255 / .12); width: 0; }
.seek-fill {
    width: 0;
    background: linear-gradient(90deg, rgb(var(--c2)), rgb(var(--c1)), rgb(var(--fl)));
    box-shadow: 0 0 calc(8px + var(--beat) * 14px) rgb(var(--c1) / .8);
}
.seek-thumb {
    position: absolute; top: 50%; left: 0;
    width: 14px; height: 14px; margin: -7px 0 0 -7px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgb(var(--c1) / .3), 0 0 14px rgb(var(--c1));
    transform: scale(0);
    transition: transform .3s var(--spring);
}
.seek-bar:hover .seek-thumb, .seek-bar.drag .seek-thumb, .is-touch .seek-thumb { transform: scale(1); }
.seek-bar.drag .seek-thumb { transform: scale(1.25); }

.controls {
    display: flex; align-items: center; justify-content: space-between;
    padding: 2px 6px 0;
}
.play-btn {
    width: 56px; height: 56px;
    display: grid; place-items: center;
    border-radius: 50%;
    color: #0b070e;
    background: #fff;
    box-shadow: 0 0 0 calc(var(--bass) * 7px) rgb(var(--c1) / .25), 0 0 calc(18px + var(--bass) * 28px) rgb(var(--c1) / .55);
    transition: transform .4s var(--spring);
}
.play-btn svg { width: 24px; height: 24px; }
.play-btn .i-pause, .is-playing .play-btn .i-play { display: none; }
.is-playing .play-btn .i-pause { display: block; }
@media (hover: hover) { .play-btn:hover { transform: scale(1.06); } }
.play-btn:active { transform: scale(.9); }

.volume { display: flex; align-items: center; gap: 4px; padding: 0 4px; margin-top: 2px; }
.vol-btn { width: 34px; height: 34px; }
.vol-btn svg { width: 18px; height: 18px; }
.vol-btn .i-mute, .is-muted .vol-btn .i-vol { display: none; }
.is-muted .vol-btn .i-mute { display: block; }
.vol-bar { position: relative; flex: 1; height: 22px; cursor: pointer; touch-action: none; }
.vol-bar::before, .vol-fill { content: ""; position: absolute; left: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 9px; }
.vol-bar::before { right: 0; background: rgb(255 255 255 / .1); }
.vol-fill { width: 35%; background: rgb(255 255 255 / .85); box-shadow: 0 0 8px rgb(var(--c1) / .6); }

/* ---------- ОЧЕРЕДЬ ---------- */

.queue {
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows .55s var(--ease);
}
.queue.open { grid-template-rows: 1fr; }
.queue-list { overflow: hidden; list-style: none; min-height: 0; }
.queue.open .queue-list { padding-top: 8px; border-top: 1px solid var(--line); margin-top: 8px; }
.q-item {
    display: flex; align-items: center; gap: 11px;
    padding: 7px 8px;
    border-radius: 12px;
    cursor: pointer;
    opacity: 0; translate: 0 6px;
    transition: background .25s, opacity .4s var(--ease), translate .4s var(--ease);
}
.queue.open .q-item { opacity: 1; translate: 0 0; transition-delay: 0s, calc(var(--n) * .04s), calc(var(--n) * .04s); }
@media (hover: hover) { .q-item:hover { background: rgb(255 255 255 / .05); } }
.q-item:active { background: rgb(255 255 255 / .08); }
.q-item img { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; flex: none; }
.q-txt { min-width: 0; flex: 1; text-align: left; }
.q-t { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-a { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-mood { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: rgb(255 255 255 / .35); flex: none; }
.q-item.cur { background: rgb(var(--c1) / .14); }
.q-item.cur .q-t { color: rgb(var(--fl)); }
.q-eq { display: none; gap: 2px; align-items: flex-end; height: 14px; flex: none; }
.q-item.cur .q-eq { display: flex; }
.q-item.cur .q-mood { display: none; }
.q-eq i { width: 3px; background: rgb(var(--c1)); border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.q-eq i:nth-child(2) { animation-delay: -.3s; }
.q-eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }
body:not(.is-playing) .q-eq i { animation-play-state: paused; }

/* =========================================================
   СОЦСЕТИ
   ========================================================= */

.socials {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    margin: 14px 16px 0;
}
.social {
    position: relative;
    height: 54px;
    display: flex; align-items: center; justify-content: center; gap: 9px;
    border-radius: 16px;
    background: var(--tile);
    border: 1px solid var(--line);
    font-size: 13px; font-weight: 700;
    color: rgb(255 255 255 / .78);
    overflow: hidden;
    isolation: isolate;
    transition: color .35s, border-color .35s, transform .45s var(--spring);
}
.social svg { width: 21px; height: 21px; flex: none; transition: transform .45s var(--spring), filter .35s; }
.social::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgb(var(--c1) / .35), transparent 70%);
    opacity: 0; transition: opacity .35s;
}
.social::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    padding: 1.4px;
    background: radial-gradient(90px circle at var(--mx, 50%) var(--my, 50%), rgb(var(--fl) / .95), rgb(var(--c1) / .4) 35%, transparent 70%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: var(--glow, 0);
}
@media (hover: hover) {
    .social:hover { color: #fff; transform: translateY(-2px); }
    .social:hover::before { opacity: 1; }
    .social:hover svg { transform: scale(1.15) rotate(-6deg); filter: drop-shadow(0 0 8px rgb(var(--c1))); }
}
.social:active { transform: scale(.95); }

.foot {
    display: flex; justify-content: center; align-items: center; gap: 8px;
    margin-top: 16px;
    font-family: var(--mono);
    font-size: 11px; letter-spacing: .08em;
    color: rgb(255 255 255 / .32);
}
.foot i { font-style: normal; color: rgb(var(--c1)); text-shadow: 0 0 8px rgb(var(--c1)); }
.foot b { font-weight: 500; color: rgb(255 255 255 / .55); font-variant-numeric: tabular-nums; }

/* =========================================================
   ЛИРИКА
   ========================================================= */

.ly-side {
    position: fixed; top: 50%; z-index: 1;
    width: clamp(200px, calc(50vw - 230px - 90px), 360px);
    height: 280px;
    margin-top: -140px;
    pointer-events: none;
    display: none;
}
.ly-left { right: calc(50% + 230px + 52px); text-align: right; }
.ly-right { left: calc(50% + 230px + 52px); text-align: left; }
@media (min-width: 1100px) { .is-in.has-lyrics .ly-side { display: block; } }

.ly-line {
    position: absolute; left: 0; right: 0; top: 50%;
    font-family: var(--lyric);
    font-size: 26px; font-weight: 600; line-height: 1.3;
    letter-spacing: .005em;
    text-wrap: balance;
    translate: 0 -50%;
    transition:
        opacity 1.2s cubic-bezier(.33, 1, .68, 1), transform 1.4s cubic-bezier(.33, 1, .68, 1), filter 1.2s cubic-bezier(.33, 1, .68, 1);
    will-change: transform, opacity, filter;
}
.ly-line.next { opacity: .1; transform: translateY(64px) scale(.92); filter: blur(4px); }
.ly-line.cur  { opacity: .82; transform: translateY(0) scale(calc(1 + var(--beat, 0) * .012)); filter: none; }
.ly-line.past { opacity: 0; transform: translateY(-70px) scale(.95); filter: blur(8px); }
.ly-left .ly-line { transform-origin: right center; }
.ly-right .ly-line { transform-origin: left center; }

/* обычные слова — мягкие и приглушённые */
.ly-line .w {
    display: inline-block;
    color: rgb(255 255 255 / .3);
    text-shadow: 0 1px 14px rgb(0 0 0 / .45);
    transition: color .8s var(--ease), text-shadow 1s var(--ease), transform .8s var(--ease);
}
.ly-line.cur .w { color: rgb(255 255 255 / .4); }
.ly-line .w.on {
    color: rgb(255 255 255 / calc(.66 + var(--a) * .2));
    text-shadow: 0 1px 14px rgb(0 0 0 / .45), 0 0 16px rgb(var(--c2) / .3);
}
/* акценты — на сильных долях: ярко, в цвете вайба */
/* шрифт и жирность у всех слов одинаковые — акценты выделяются только цветом и свечением */
.ly-line .w { font-weight: inherit; }
.ly-line .w.acc.on {
    color: rgb(var(--fl));
    text-shadow:
        0 0 calc(8px + var(--a) * 16px) rgb(var(--c1) / .85),
        0 0 calc(24px + var(--a) * 30px) rgb(var(--c2) / .45);
    transform: translateY(-1px) scale(calc(1 + var(--a) * .05));
}
.ly-line .w.gl.on { animation: ly-glitch .32s steps(2, end) 2; }
@keyframes ly-glitch {
    0% { text-shadow: -2px 0 rgb(var(--c1)), 2px 0 rgb(var(--c2)); transform: translateX(-1px); }
    50% { text-shadow: 2px 0 rgb(var(--c1)), -2px 0 rgb(var(--c2)); transform: translateX(1px); }
}

/* проигрыш без слов */
.ly-break { display: flex; gap: 7px; }
.ly-left .ly-break { justify-content: flex-end; }
.ly-break i {
    width: 7px; height: 7px; border-radius: 50%;
    background: rgb(var(--c1) / .7);
    box-shadow: 0 0 10px rgb(var(--c1));
    animation: ly-dot 1.4s ease-in-out infinite;
}
.ly-break i:nth-child(2) { animation-delay: .18s; }
.ly-break i:nth-child(3) { animation-delay: .36s; }
@keyframes ly-dot { 0%, 100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1); } }

/* узкие экраны — полоска внутри карточки */
.ly-strip {
    position: relative;
    height: 0;
    margin: 0 16px;
    overflow: hidden;
    text-align: center;
    transition: height .6s var(--ease), margin .6s var(--ease);
    -webkit-mask: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
            mask: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
}
@media (max-width: 1099.98px) { .is-in.has-lyrics .ly-strip { height: 78px; margin-top: 10px; } }
.ly-strip .ly-line { font-size: 16px; font-weight: 600; padding: 0 6px; }
.ly-strip .ly-line.next { transform: translateY(28px) scale(.93); }
.ly-strip .ly-line.past { transform: translateY(-30px) scale(.95); }
.ly-strip .ly-break { justify-content: center; }

/* =========================================================
   ТЕЛЕФОНЫ
   ========================================================= */

@media (max-width: 480px) {
    .stage { place-items: start center; padding-top: max(18px, env(safe-area-inset-top)); padding-left: 10px; padding-right: 10px; }
    .card { --r-card: 24px; }
    .banner { height: 132px; }
    .tile { margin-left: 12px; margin-right: 12px; }
    .socials { margin-left: 12px; margin-right: 12px; gap: 8px; }
    .social { flex-direction: column; gap: 4px; height: 62px; font-size: 11.5px; }
    .name { font-size: 28px; }
    .icon-btn { width: 44px; height: 44px; }
    .play-btn { width: 60px; height: 60px; }
    .controls { padding: 4px 0 0; }
    .volume { display: none; }        /* на телефоне громкость — кнопками */
    .q-item { padding: 9px 8px; }
}

/* если экран высокий — карточку по центру и на телефоне */
@media (max-width: 480px) and (min-height: 860px) {
    .stage { place-items: center; }
}

@media (prefers-reduced-motion: reduce) {
    .banner-img, .banner-shine, .grain, .blob, .name-star, .enter-cat .eye { animation: none; }
    .card { transform: none; }
}
