/* =========================================================================
   Nova – webes zenevezérlő
   Letisztult, sötét felület: egy kiemelőszín, keretek helyett felületi
   színek, sok levegő. Inter betűtípus.
   ========================================================================= */

:root {
    /* Sötét keret (háttér + felső sáv egyben), benne világosabb panelek */
    --bg: #0a0a0a;
    --surface: #181818;
    --surface-2: #212121;
    --surface-3: #2a2a2a;
    --line: rgba(255, 255, 255, 0.07);
    --text: #fafafa;
    --text-2: #a3a3a3;
    --text-3: #737373;
    /* Monokróm: a kiemelés fehér, a nyugalmi állapot halványabb szürke */
    --accent: #ffffff;
    --accent-hover: #ffffff;
    --accent-soft: rgba(255, 255, 255, 0.08);
    --fill-idle: #c8c8c8;
    /* A borító domináns színe (app.js állítja); alapból a régi #171717 */
    --dom: 23, 23, 23;
    /* Aktív / rámutatott állapot: a borító világos színének halvány árnyalata (az oldal stílusához igazodva) */
    --hover-bg: color-mix(in srgb, var(--fill-idle) 12%, transparent);
    --danger: #f87171;
    --warn: #fbbf24;
    --radius-lg: 10px;
    --radius: 8px;
    --radius-sm: 6px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: clip; }

/* Keskeny, az oldal sötét stílusához illő görgetősáv */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.14); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.28); }
::-webkit-scrollbar-corner { background: transparent; }

/* Finom zajréteg a háttér-átmenet csíkozódása (sávosodás) ellen */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.02;
    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%' height='100%' filter='url(%23n)'/></svg>");
}

body {
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-feature-settings: 'cv11', 'ss01';
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background-color: #000;
    background-image: linear-gradient(180deg, rgb(var(--dom)) 0%, #000 calc(100% - 150px));
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
img { display: block; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

.muted { color: var(--text-2); }
.small { font-size: 0.85rem; }
.error-text { color: var(--danger); margin-top: 12px; }

/* ---------- Márka ---------- */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}
.brand-mark { width: 22px; height: 22px; color: var(--accent); }
.brand-lg { font-size: 1.5rem; gap: 10px; }
.brand-lg .brand-mark { width: 30px; height: 30px; }

/* ---------- Gombok ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s var(--ease), transform 0.15s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 20px; height: 20px; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: #e4e4e7; }
.btn-discord { background: #5865f2; color: #fff; height: 48px; padding: 0 24px; font-size: 1rem; }
.btn-discord:hover { background: #4752c4; }

.icon-btn {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    transition: background 0.15s var(--ease), color 0.15s var(--ease), transform 0.15s var(--ease);
}
.icon-btn svg { width: 20px; height: 20px; transition: transform 0.15s var(--ease); }
/* Rámutatáskor nincs háttér-doboz: az ikon kivilágosodik és kicsit megnő */
.icon-btn:hover:not(:disabled) { color: var(--text); }
.icon-btn:hover:not(:disabled) svg { transform: scale(1.08); }
.icon-btn:active:not(:disabled) svg { transform: scale(0.94); }
.icon-btn:disabled, .play-btn:disabled { opacity: 0.3; cursor: not-allowed; }
/* Nem engedélyezett, de kattintásra elmagyarázza, miért (pl. leállítás) */
.icon-btn.is-locked, .mini-btn.is-locked { opacity: 0.3; cursor: not-allowed; }
.icon-btn.is-locked:hover, .mini-btn.is-locked:hover { background: transparent; color: var(--text-2); }
.icon-btn.is-locked:hover svg, .mini-btn.is-locked:hover svg { transform: none; }
/* Kapcsoló gomb (rádió mód): az ikon mutatja az állapotot, bekapcsolva fehér */
.icon-btn.toggle[aria-pressed="true"] { color: var(--accent); background: transparent; }
.icon-btn.toggle[aria-pressed="true"]:hover:not(:disabled) { color: var(--accent-hover); }

.play-btn {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text);
    background: transparent;
    transition: transform 0.15s var(--ease), background 0.15s var(--ease);
}
.play-btn svg { width: 30px; height: 30px; transition: transform 0.15s var(--ease); }
.play-btn:hover:not(:disabled) svg { transform: scale(1.08); }
.play-btn:active:not(:disabled) svg { transform: scale(0.94); }

.text-btn {
    height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-2);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.text-btn:hover:not(:disabled) { color: var(--text); background: var(--hover-bg); }
.text-btn.danger:hover:not(:disabled) { color: var(--text); }
.text-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.vote-badge {
    position: absolute;
    top: 4px;
    right: -14px;
    padding: 0 5px;
    border-radius: 4px;
    background: var(--accent);
    color: var(--bg);
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 16px;
}

/* ---------- Bejelentkezés ---------- */
.login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
    background: radial-gradient(600px 400px at 50% 35%, rgba(255, 255, 255, 0.05), transparent 70%), var(--bg);
}
.login-card {
    width: 100%;
    max-width: 400px;
    text-align: center;
}
.login-card h1 {
    font-size: 1.75rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 28px 0 12px;
}
.login-card p { margin: 0 0 32px; }

/* ---------- Felső sáv ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 56px;
    padding: 0 16px;
    /* Átlátszó: a fejléc az oldal háttér-átmenetét és zajrétegét mutatja, így nincs eltérő színű sáv */
    background: transparent;
}
.guild-picker { position: relative; margin-right: auto; }
.guild-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 12px 0 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    max-width: 300px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.15s var(--ease);
}
.guild-button:hover { background: var(--hover-bg); }
.guild-button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guild-button .chev { width: 16px; height: 16px; flex: none; color: var(--text-3); }
.guild-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); object-fit: cover; flex: none; }
.guild-list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 260px;
    max-height: 60vh;
    overflow: auto;
    margin: 0;
    padding: 6px;
    list-style: none;
    border-radius: var(--radius);
    background: var(--surface-2);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--line);
}
.guild-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
}
.guild-list li:hover, .guild-list li[aria-selected="true"] { background: var(--hover-bg); }
.guild-list .guild-eq { margin-left: auto; flex: none; }

.user { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3); }
.user-name { font-weight: 500; font-size: 0.9rem; color: var(--text-2); }

/* ---------- Banner ---------- */
.banner {
    margin: 0 8px 8px;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    background: var(--surface-2);
    color: var(--text);
    font-size: 0.9rem;
}
.banner.warn { background: rgba(251, 191, 36, 0.1); color: #fde68a; }

/* ---------- Elrendezés ---------- */
.layout {
    display: grid;
    /* Közepes szélesség: balra a "Most szól", jobbra a várólista, alatta a füles panel */
    grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
    grid-template-areas:
        "np queue"
        "np extra";
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    padding: 0 8px 8px;
    flex: 1;
    min-height: 0;
}
.now-playing { grid-area: np; }
.side { grid-area: queue; }
.extra { grid-area: extra; }

/* Az oldal nem görgethető: a képernyő kitölti az ablakot, a tartalom a dobozokon belül görget */
#app-view:not([hidden]) {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
body:has(#app-view:not([hidden])) { overflow: hidden; height: 100%; }
.layout > .card { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.now-playing { overflow: hidden; }

/* Széles képernyő: három oszlop */
@media (min-width: 1280px) {
    .layout {
        grid-template-columns: minmax(320px, 380px) minmax(0, 1fr) minmax(300px, 360px);
        grid-template-areas: "np queue extra";
        grid-template-rows: auto;
    }
    /* .layout előtag: erősebb, mint a később következő .card { position: relative } */
    .layout .extra {
        align-self: stretch;
        height: auto;
    }
}
.card {
    position: relative;
    border-radius: var(--radius-lg);
    /* Alig észrevehető fehér tónus: az oldal átmenete átüt rajta */
    background: rgba(255, 255, 255, 0.02);
    /* Tömör, összefogott árnyék: nem terül szét a háttérre */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    padding: 24px;
    min-width: 0;
}
.section-title {
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
}
.count {
    margin-left: 6px;
    font-weight: 500;
    color: var(--text-3);
}

/* ---------- Most szól ---------- */
.now-playing {
    align-self: start;
    position: sticky;
    top: 56px;
    overflow: hidden;
    isolation: isolate;
}
/* Elmosott borítókép mint hangulatháttér */
.np-backdrop {
    display: none !important; /* a Most szól kártya külön elmosott borító-háttere kikapcsolva */
    position: absolute;
    inset: -40px;
    width: calc(100% + 80px);
    height: 60%;
    object-fit: cover;
    filter: blur(60px) saturate(1.4);
    opacity: 0.35;
    z-index: -1;
    pointer-events: none;
    transition: opacity 0.6s var(--ease);
}
.now-playing::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to bottom, transparent 0%, transparent 65%);
    pointer-events: none;
}
.np-heading { display: flex; align-items: center; gap: 10px; }
/* Kilépési visszaszámláló a fejléc jobb szélén */
.leave-pill {
    margin-left: auto;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}
.leave-pill span { font-variant-numeric: tabular-nums; }

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 12px;
}
.empty svg { width: 40px; height: 40px; color: var(--text-3); margin-bottom: 12px; }
.empty p { margin: 2px 0; }

.np { display: flex; flex-direction: column; gap: 20px; }
.np-art-wrap { position: relative; width: 100%; }
.np-art {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--surface-2);
    box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.6);
}
.live-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--danger);
    color: #fff;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
}
.np-meta { min-width: 0; }
.np-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}
.np-artist { margin: 4px 0 0; font-size: 0.95rem; }
.np-requester { margin: 10px 0 0; display: flex; align-items: center; gap: 6px; color: var(--text-3); }
.np-requester img { width: 18px; height: 18px; border-radius: 50%; }

/* Folyamatsáv: teljes szélesség, alatta a két szélén az idő */
.progress { display: flex; flex-direction: column; gap: 6px; }
.progress input[type="range"] { width: 100%; flex: none; }
.progress-times { display: flex; justify-content: space-between; }
.time {
    font-variant-numeric: tabular-nums;
    font-size: 0.72rem;
    color: var(--text-3);
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--fill-idle) 0%, var(--fill-idle) var(--fill, 0%), var(--surface-3) var(--fill, 0%));
    cursor: pointer;
    min-width: 0;
    transition: height 0.15s var(--ease);
}
input[type="range"]:hover:not(:disabled) {
    height: 6px;
    background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--fill, 0%), var(--surface-3) var(--fill, 0%));
}
input[type="range"]:disabled { cursor: default; opacity: 0.5; }
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    transition: opacity 0.15s var(--ease);
}
input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:focus-visible::-webkit-slider-thumb { opacity: 1; }
input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 50%;
    background: #fff;
}

/* Vezérlősor: szimmetrikus (2 – lejátszás – 2) */
.controls {
    display: grid;
    grid-template-columns: repeat(2, 48px) 60px repeat(2, 48px);
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: -4px auto 0;
}
.controls .icon-btn { width: 48px; height: 48px; color: var(--text-2); }
.controls .icon-btn svg { width: 26px; height: 26px; }
.controls .play-btn { width: 60px; height: 60px; }
.controls .play-btn svg { width: 38px; height: 38px; }

/* Hangerő: rámutatáskor függőleges csúszka a némítás gomb felett */
.volume-control { position: relative; display: grid; place-items: center; }
.volume-pop {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 28px;
    padding: 10px 0;
    /* A kártyával azonos szín: nem látszik keretnek, de eltakarja a mögötte lévő folyamatsávot */
    border-radius: 4px;
    background: var(--surface);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 6px);
    transition: opacity 0.15s var(--ease), transform 0.15s var(--ease), visibility 0.15s;
}
/* Átlátszó "híd" a gomb és a csúszka között, hogy rámutatás közben ne tűnjön el */
.volume-pop::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 10px;
}
.volume-control:hover .volume-pop,
.volume-control:focus-within .volume-pop,
.volume-control.open .volume-pop {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}
.volume-control.disabled .volume-pop { display: none; }
/* Függőleges csúszka (alulról felfelé nő) */
.volume-pop input[type="range"] {
    flex: none;
    writing-mode: vertical-lr;
    direction: rtl;
    width: 6px;
    height: 120px;
    background: linear-gradient(to top, var(--fill-idle) 0%, var(--fill-idle) var(--fill, 0%), var(--surface-3) var(--fill, 0%));
}
.volume-pop input[type="range"]:hover:not(:disabled) {
    width: 6px;
    height: 120px;
    background: linear-gradient(to top, var(--accent) 0%, var(--accent) var(--fill, 0%), var(--surface-3) var(--fill, 0%));
}
.volume-pop input[type="range"]::-webkit-slider-thumb { opacity: 1; }

/* Alsó sor: a hangcsatorna neve */
.np-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.np-footer:has(.channel-line:empty) { display: none; }
.channel-line {
    margin: 0;
    min-width: 0;
    font-size: 0.8rem;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Hangszínszabályzó animáció ----------
   Ötletek: Uiverse.io, Praashoo7 („.loading / .load”) és bociKond / csozi („.greenline”). */
.eq {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
}
.eq span {
    width: 3px;
    height: 100%;
    border-radius: 2px;
    background: var(--accent);
    transform-origin: bottom;
    transform: scaleY(0.15);
    animation: eq-playing 1s ease-in-out infinite;
}
.eq span:nth-child(1) { animation-delay: 0.2s; }
.eq span:nth-child(2) { animation-delay: 0.5s; }
.eq span:nth-child(3) { animation-delay: 0.6s; }
.eq span:nth-child(4) { animation-delay: 0s; }
.eq span:nth-child(5) { animation-delay: 0.4s; }
.eq.is-paused span { animation: none; transform: scaleY(0.2); opacity: 0.5; }
.eq-sm { height: 12px; }
.eq-sm span { width: 2px; }

@keyframes eq-playing {
    0%   { transform: scaleY(0.1); }
    33%  { transform: scaleY(0.6); }
    66%  { transform: scaleY(0.9); }
    100% { transform: scaleY(0.1); }
}

/* ---------- Keresés ---------- */
.search {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    padding: 0 4px 0 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    margin-bottom: 28px;
    transition: background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.search:focus-within { background: rgba(255, 255, 255, 0.03); box-shadow: 0 0 0 2px var(--accent-soft), 0 2px 6px rgba(0, 0, 0, 0.5); }
.search svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
}
.search input::placeholder { color: var(--text-3); }
.search .btn { height: 40px; }

.results {
    margin: -12px 0 28px;
    padding: 8px;
    border-radius: var(--radius);
    background: var(--surface-2);
}
.results-head, .queue-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.results-head { padding: 8px 8px 0; }
.results-head .section-title, .queue-head .section-title { margin: 0; }
.results-head .section-title { font-size: 0.85rem; color: var(--text-2); }
.queue-head { margin-bottom: 8px; }
.queue-actions { display: flex; gap: 6px; }

/* ---------- Számlisták ---------- */
.track-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.track {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    transition: background 0.12s var(--ease);
    min-width: 0;
}
.track:hover { background: var(--hover-bg); }
.results .track:hover { background: var(--hover-bg); }
.track .idx { width: 20px; text-align: center; color: var(--text-3); font-size: 0.8rem; flex: none; font-variant-numeric: tabular-nums; }
.track .thumb { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; background: var(--surface-3); flex: none; }
.track .info { min-width: 0; flex: 1; }
.track .t-title { margin: 0; font-weight: 500; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .t-sub { margin: 1px 0 0; font-size: 0.8rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .t-dur { font-size: 0.8rem; color: var(--text-3); font-variant-numeric: tabular-nums; flex: none; }
.track .icon-btn { width: 32px; height: 32px; flex: none; }
.track .icon-btn svg { width: 16px; height: 16px; }
/* A törlés gomb csak rámutatáskor erős */
.queue .track .icon-btn { opacity: 0; }
.queue .track:hover .icon-btn, .queue .track .icon-btn:focus-visible { opacity: 1; }
.queue .track .icon-btn:disabled { display: none; }
.track .grip { color: var(--text-3); cursor: grab; width: 16px; height: 16px; flex: none; opacity: 0.5; }
.track:hover .grip { opacity: 1; }
.track.dragging { opacity: 0.35; }
.track.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.track.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }
/* A várólista kártya kitölti a sort, így az üres állapot függőlegesen is középre kerülhet */
.side { display: flex; flex-direction: column; }
.queue-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 320px;
    padding: 32px 16px;
}
.queue-empty-icon {
    width: 96px;
    height: 96px;
    color: var(--text-3);
    margin-bottom: 10px;
}
.queue-empty-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
}
.queue-empty-hint {
    margin: 8px 0 0;
    max-width: 320px;
    font-size: 0.9rem;
    color: var(--text-3);
}

/* Ha alatta ott az ajánló, az üres állapot kompaktabb */
.side.has-recs .queue-empty { flex: none; min-height: 0; padding: 20px 16px 28px; }
.side.has-recs .queue-empty-icon { width: 56px; height: 56px; margin-bottom: 6px; }
.side.has-recs .queue-empty-title { font-size: 1.05rem; }

/* ---------- Ajánló ---------- */
.recs {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}
.recs-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.recs-titles { min-width: 0; }
.recs-head .section-title { margin: 0; }
.recs-seed {
    margin: 2px 0 0;
    font-size: 0.8rem;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.recs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    column-gap: 8px;
}
.recs-status { margin: 16px 0 4px; font-size: 0.85rem; color: var(--text-3); text-align: center; }
.recs .track .icon-btn:disabled { opacity: 0.35; }

/* Érintőképernyőn nincs rámutatás: a gombok mindig látszanak */
@media (hover: none) {
    .queue .track .icon-btn { opacity: 1; }
    .track .grip { opacity: 1; }
}

/* ---------- Füles panel: Dalszöveg / Előzmények / Hallgatók ---------- */
.extra { display: flex; flex-direction: column; min-height: 0; }
.tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 16px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.tab {
    flex: 1;
    height: 34px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-2);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--hover-bg); color: var(--text); }
.tab .count { margin-left: 4px; }
.tab-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; }
.panel-empty { margin: auto; padding: 32px 12px; text-align: center; color: var(--text-3); font-size: 0.9rem; }

/* Dalszöveg: időzített soroknál az aktuális sor kiemelve, a többi halvány */
.lyrics {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 4px 40%;
    scroll-behavior: smooth;
    mask-image: linear-gradient(to bottom, transparent 0, #000 24px, #000 calc(100% - 48px), transparent 100%);
}
.lyrics:empty { display: none; }
.lyric-line {
    margin: 0 0 14px;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--text-3);
    transition: color 0.25s var(--ease), opacity 0.25s var(--ease);
    cursor: default;
}
.lyric-line.is-past { color: #565656; }
.lyric-line.is-active { color: var(--text); }
.lyric-line.is-gap { min-height: 1em; }
.lyrics.is-plain .lyric-line { color: var(--text-2); font-size: 1rem; font-weight: 500; margin-bottom: 6px; }
.lyrics-source { margin: 10px 0 0; font-size: 0.72rem; color: var(--text-3); }
.lyrics-source a { color: var(--text-2); }

/* Hallgatók */
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.person { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--radius-sm); }
.person:hover { background: var(--hover-bg); }
.person img { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); flex: none; }
.person-name { flex: 1; min-width: 0; font-weight: 500; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.tag {
    padding: 1px 7px;
    border-radius: 4px;
    background: var(--surface-3);
    color: var(--text-2);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}
.tag-strong { background: var(--text); color: var(--bg); }

/* Közepes nézetben a panel ne legyen végtelen hosszú */
@media (max-width: 1279px) {
    .extra .tab-panel { max-height: 460px; }
    .lyrics { padding-bottom: 30%; }
}

/* ---------- Mini lejátszó ----------
   Felépítés: Uiverse.io, bociKond – „Spotify music card” (csozi, www.csozi.hu). */
.mini-player {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 40;
    width: min(340px, calc(100% - 32px));
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-radius: var(--radius-lg);
    background: rgba(33, 33, 33, 0.94);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px var(--line);
    animation: mini-in 0.25s var(--ease);
}
@keyframes mini-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.mini-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mini-icon {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    background: var(--surface-3);
}
.eq-mini { height: 18px; gap: 1px; }
.eq-mini span { width: 2px; background: var(--accent); }
.mini-meta { min-width: 0; }
.mini-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mini-artist {
    margin: 1px 0 0;
    font-size: 0.78rem;
    color: var(--text-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mini-controls { display: flex; align-items: center; justify-content: space-between; }
.mini-center { display: flex; align-items: center; gap: 4px; }
.mini-btn {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.mini-btn svg { width: 18px; height: 18px; transition: transform 0.15s var(--ease); }
.mini-btn:hover:not(:disabled) { color: var(--text); }
.mini-btn:hover:not(:disabled) svg { transform: scale(1.08); }
.mini-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.mini-play { color: var(--text); }
.mini-play svg { width: 24px; height: 24px; }
.mini-play:hover:not(:disabled) { color: var(--text); }

.mini-time { display: flex; align-items: center; gap: 10px; }
.time-pill {
    flex: none;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-3);
    min-width: 32px;
    text-align: center;
}
.mini-bar {
    position: relative;
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--surface-3);
    cursor: pointer;
}
.mini-bar.disabled { cursor: default; }
.mini-elapsed { width: 0%; height: 100%; border-radius: 2px; background: var(--fill-idle); }
.mini-bar:hover:not(.disabled) .mini-elapsed { background: var(--accent); }

body.has-mini .footer { padding-bottom: 190px; }
body.has-mini .toast { bottom: 190px; }

/* ---------- Értesítés ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    padding: 10px 18px;
    border-radius: 8px;
    background: var(--text);
    color: var(--bg);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    z-index: 50;
    animation: toast-in 0.2s var(--ease);
}
.toast.error { background: var(--danger); color: #1c0606; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

.footer { text-align: center; padding: 12px 16px 14px; color: var(--text-3); font-size: 0.8rem; }

/* ---------- Reszponzív ---------- */
@media (max-width: 900px) {
    /* Telefonon az oldal görgethető: a dobozok a tartalmuk szerinti magasságot kapják, nem a képernyőhöz nyomódnak */
    #app-view:not([hidden]) { height: auto; min-height: 100vh; overflow: visible; display: block; }
    body:has(#app-view:not([hidden])) { overflow: auto; height: auto; }
    .layout { flex: none; }
    .layout > .card { overflow: visible; min-height: auto; }
    .layout { grid-template-columns: 1fr; grid-template-areas: "np" "queue" "extra"; grid-template-rows: auto; padding: 0 8px 8px; gap: 8px; min-height: 0; }
    /* relative (nem static), hogy az elmosott háttérkép a kártyán belül maradjon */
    .now-playing { position: relative; top: auto; }
    .topbar { padding: 0 12px; gap: 10px; height: 56px; }
    .user-name { display: none; }
    .banner { margin: 0 8px 8px; }
    .guild-button { max-width: 200px; }
}
@media (max-width: 520px) {
    .card { padding: 18px; border-radius: var(--radius); }
    .brand span { display: none; }
    .track { gap: 10px; padding: 8px 6px; }
    .track .idx { display: none; }
    .search { padding-left: 14px; }
    .mini-player { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    .eq span { animation: none; transform: scaleY(0.5); }
}
