/* ===== MusikBot - panel w stylu Spotify ===== */
:root {
  --bg: #000;
  --surface: #121212;
  --elevated: #1f1f1f;
  --elevated-2: #2a2a2a;
  --hover: rgba(255, 255, 255, .08);
  --text: #fff;
  --muted: #b3b3b3;
  --subtle: #7a7a7a;
  --accent: #1ed760;
  --accent-dark: #1db954;
  --danger: #f15e6c;
  --radius: 8px;
  /* kolor z okładki aktualnego utworu (ustawiany przez app.js) */
  --dyn: 83 83 83;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
h1 { font-size: 30px; margin: 4px 0 18px; letter-spacing: -.02em; }
h2 { font-size: 21px; margin: 0; letter-spacing: -.01em; }
.label { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 0 8px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { color: var(--muted); text-align: center; padding: 40px 12px; margin: 0; }

svg.icon { width: 1.25em; height: 1.25em; fill: currentColor; flex-shrink: 0; display: block; }
i[data-icon] { display: inline-flex; font-style: normal; }

/* ===== Logowanie ===== */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(circle at 30% 20%, #1db95433, transparent 50%), #121212; }
.login-card { background: var(--elevated); padding: 40px 32px; border-radius: 16px; text-align: center; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.logo-big { font-size: 56px; }
.login-card h1 { margin: 8px 0 12px; }
.login-card p { color: var(--muted); }

/* ===== Układ ===== */
.app {
  height: 100vh; height: 100dvh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 8px; padding: 8px;
}

.sidebar {
  background: var(--surface); border-radius: var(--radius);
  display: flex; flex-direction: column; padding: 18px 10px 12px; min-height: 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; padding: 0 12px 18px; }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; display: block; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 6px;
  color: var(--muted); font-weight: 700; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); background: var(--elevated); }
.nav a svg { width: 24px; height: 24px; }
.nav-count { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; background: var(--elevated); min-width: 0; }
.who { min-width: 0; flex: 1; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--elevated-2); object-fit: cover; flex-shrink: 0; }
.badge { background: var(--accent); color: #000; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; }

.main {
  min-height: 0; overflow-y: auto; border-radius: var(--radius); padding: 24px 32px 48px;
  background:
    linear-gradient(180deg, rgb(var(--dyn) / .55) 0, rgb(var(--dyn) / .12) 260px, transparent 480px),
    var(--surface);
  transition: background .8s;
  scroll-behavior: smooth;
}
.main::-webkit-scrollbar { width: 12px; }
.main::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .2); border: 3px solid transparent; background-clip: padding-box; border-radius: 8px; }
.mobile-head { display: none; }
.banner { background: var(--danger); color: #000; font-weight: 700; padding: 10px 14px; border-radius: 8px; margin-bottom: 18px; }
.view { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 8px; }

/* ===== Przyciski ===== */
button { font: inherit; color: inherit; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: color .15s, transform .1s, background .15s;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.small { width: 34px; height: 34px; }
.icon-btn.small svg { width: 19px; height: 19px; }
.icon-btn:hover:not(:disabled) { color: var(--text); }
.icon-btn:active:not(:disabled) { transform: scale(.92); }
.icon-btn.on { color: var(--accent); }
.icon-btn.on::after { content: ""; position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.js-heart.on { color: var(--accent); }
.js-heart.on::after { display: none; }

.play-fab {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--text); color: #000; cursor: pointer; transition: transform .1s, background .15s;
}
.play-fab svg { width: 22px; height: 22px; }
.play-fab:hover:not(:disabled) { transform: scale(1.06); }
.play-fab.big { width: 64px; height: 64px; background: var(--accent); }
.play-fab.big svg { width: 30px; height: 30px; }
.hero .play-fab { width: 52px; height: 52px; background: var(--accent); }

.pill-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255, 255, 255, .3); background: transparent;
  color: var(--text); padding: 7px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; cursor: pointer;
  transition: border-color .15s, transform .1s, background .15s; white-space: nowrap;
}
.pill-btn svg { width: 18px; height: 18px; }
.pill-btn:hover:not(:disabled) { border-color: var(--text); transform: scale(1.03); }
.pill-btn.primary { background: var(--accent); color: #000; border-color: var(--accent); }
.pill-btn.danger:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); }
button:disabled, input:disabled, select:disabled { opacity: .35; cursor: not-allowed; }

.vote-badge { position: absolute; top: -2px; right: -6px; background: var(--accent); color: #000; font-size: 10px; font-weight: 800;
  padding: 1px 5px; border-radius: 999px; }

.chips { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.chip { border: 0; background: var(--elevated-2); color: var(--text); padding: 7px 14px; border-radius: 999px; font-weight: 600; cursor: pointer; }
.chip.active { background: var(--text); color: #000; }

/* ===== Główna ===== */
.greeting { font-size: 32px; }
.hero {
  display: flex; gap: 24px; align-items: center; padding: 20px; border-radius: 12px; margin-bottom: 32px;
  background: linear-gradient(120deg, rgb(var(--dyn) / .7), rgb(var(--dyn) / .15));
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}
.hero-art { width: 160px; height: 160px; border-radius: 8px; object-fit: cover; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); background: var(--elevated-2); flex-shrink: 0; }
.hero-info { min-width: 0; }
.eyebrow { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.hero-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 28px; font-weight: 800; line-height: 1.15; margin: 6px 0; letter-spacing: -.02em; }
.hero-title:hover { text-decoration: underline; }
.hero-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; }

.shelf { margin-bottom: 32px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.card {
  position: relative; background: rgba(255, 255, 255, .04); padding: 12px; border-radius: 8px; cursor: pointer;
  transition: background .2s; min-width: 0; text-align: left; border: 0; color: inherit;
}
.card:hover { background: var(--elevated-2); }
.card-art { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--elevated-2); margin-bottom: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.card-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-play {
  position: absolute; right: 8px; bottom: 8px; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #000;
  display: grid; place-items: center; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
  box-shadow: 0 8px 16px rgba(0, 0, 0, .4);
}
.card-play { border: 0; cursor: pointer; }
.card-play svg { width: 24px; height: 24px; }
.card-play:hover { transform: scale(1.08) !important; background: #3be477; }
.card-play:disabled { display: none; }
.card-add {
  position: absolute; left: 8px; bottom: 8px; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, .7); color: #fff; display: grid; place-items: center;
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s, background .15s;
}
.card-add svg { width: 20px; height: 20px; }
.card-add:hover { background: rgba(0, 0, 0, .9); }
.card:hover .card-play, .card:focus-visible .card-play,
.card:hover .card-add, .card:focus-visible .card-add { opacity: 1; transform: none; }
.card-title { font-weight: 700; font-size: 14px; }
.card-sub { color: var(--muted); font-size: 13px; }
.card-plays { position: absolute; top: 18px; left: 18px; background: rgba(0, 0, 0, .7); font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; }

/* ===== Listy utworów ===== */
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid; grid-template-columns: 32px 44px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 6px 8px; border-radius: 6px; transition: background .15s;
}
.row:hover { background: var(--hover); }
.row.no-index { grid-template-columns: 44px minmax(0, 1fr) auto; }
.row .idx { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.row.playing .idx, .row.playing .row-title { color: var(--accent); }
.row-art { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; background: var(--elevated-2); }
.row-info { min-width: 0; }
.row-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-actions { display: flex; align-items: center; gap: 2px; }
.row-actions .icon-btn { width: 32px; height: 32px; opacity: 0; }
.row-actions .icon-btn svg { width: 18px; height: 18px; }
.row:hover .row-actions .icon-btn, .row-actions .icon-btn.on { opacity: 1; }
.row-actions .add-btn { opacity: 1; }
.row .time { margin-left: 6px; }
.row[draggable="true"] { cursor: grab; }
.row.dragging { opacity: .4; }
.row.drop-above { box-shadow: inset 0 2px 0 var(--accent); }
.row.drop-below { box-shadow: inset 0 -2px 0 var(--accent); }
.add-btn { border: 0; background: var(--accent); color: #000; font-weight: 800; font-size: 13px; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.add-btn:hover:not(:disabled) { transform: scale(1.04); }

/* ===== Szukaj ===== */
.search-box { display: flex; align-items: center; gap: 10px; background: var(--elevated-2); border-radius: 999px; padding: 0 18px;
  max-width: 560px; border: 2px solid transparent; transition: border-color .15s; }
.search-box:focus-within { border-color: var(--text); }
.search-box svg { color: var(--muted); }
.search-box input { flex: 1; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 16px; padding: 13px 0; min-width: 0; }

/* ===== Teraz gra + tekst ===== */
.now-layout { display: grid; grid-template-columns: minmax(220px, min(32%, 380px)) minmax(0, 1fr); gap: 40px; align-items: start; }
.lyrics { min-width: 0; }
/* Węższe okno: tekst pod okładką, żeby kolumna z tekstem nie była za wąska */
@media (max-width: 1150px) {
  .now-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .now-left { position: static; max-width: 420px; margin: 0 auto; width: 100%; }
}
.now-left { position: sticky; top: 0; }
.now-art { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; box-shadow: 0 16px 48px rgba(0, 0, 0, .55); background: var(--elevated-2); }
.now-meta { margin-top: 18px; }
.now-title-row { display: flex; align-items: center; gap: 10px; }
.ellipsis-wrap { min-width: 0; flex: 1; }
.now-title { font-size: 24px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.now-controls { margin-top: 18px; }
.now-controls .controls { justify-content: space-between; max-width: 420px; margin: 10px auto 0; gap: 4px; }
.now-volume { display: flex; align-items: center; gap: 10px; margin-top: 16px; color: var(--muted); }
.now-volume .volume { flex: 1; }

/* Pasek z przyciskami przesunięcia zostaje przyklejony u góry, gdy tekst się przewija */
.lyrics-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 22px 0 8px; padding: 10px 12px; border-radius: 10px;
  position: sticky; top: 0; z-index: 3;
  background: rgb(18 18 18 / .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.lyrics-head .label { margin: 0; }
.lyrics-sync { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.small-chip { padding: 4px 10px; font-size: 13px; }
.small-chip:hover { background: var(--text); color: #000; }
.lyrics-note { margin: 0 0 14px; }
.lyrics-body { overflow-wrap: anywhere; font-size: 26px; font-weight: 800; line-height: 1.35; letter-spacing: -.01em; }
.lyrics-body p { margin: 0 0 14px; }
.lyric-line { color: rgba(255, 255, 255, .35); cursor: default; transition: color .3s, transform .3s; transform-origin: left center; }
.lyric-line.past { color: rgba(255, 255, 255, .6); }
.lyric-line.active { color: var(--text); }
.lyrics-body.seekable .lyric-line { cursor: pointer; }
.lyrics-body.seekable .lyric-line:hover { color: rgba(255, 255, 255, .85); }
.lyrics-plain { white-space: pre-line; font-size: 20px; font-weight: 700; color: rgba(255, 255, 255, .85); }
.lyrics-source { font-size: 12px; color: var(--subtle); font-weight: 500; margin-top: 24px; }

/* ===== Playlisty ===== */
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.inline-form input, select {
  background: var(--elevated-2); color: var(--text); border: 1px solid transparent; border-radius: 6px; padding: 10px 12px; font: inherit; outline: none;
}
.inline-form input { flex: 1; min-width: 200px; max-width: 400px; }
.inline-form input:focus, select:focus { border-color: var(--text); }
.playlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
.playlist-card { display: flex; align-items: center; gap: 14px; background: rgba(255, 255, 255, .05); padding: 12px; border-radius: 8px; min-width: 0; }
.playlist-card:hover { background: var(--elevated-2); }
.playlist-cover { width: 56px; height: 56px; border-radius: 6px; display: grid; place-items: center; font-size: 26px; flex-shrink: 0;
  background: linear-gradient(135deg, #450af5, #8e8ee5); }
.playlist-cover.server { background: linear-gradient(135deg, #1db954, #0a5c2a); }
.playlist-info { min-width: 0; flex: 1; }
.playlist-info .row-title { font-size: 15px; }

.playlist-card { cursor: pointer; }

/* ===== Ulubione i widok playlisty ===== */
.collection-head { display: flex; align-items: flex-end; gap: 24px; margin: 4px 0 20px; }
.collection-cover {
  width: 200px; height: 200px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0;
  font-size: 80px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}
.fav-cover { background: linear-gradient(135deg, #450af5, #c4efd9); }
.fav-cover svg { width: 84px; height: 84px; color: #fff; }
.collection-info { min-width: 0; }
.collection-title { font-size: 56px; line-height: 1.05; margin: 6px 0 10px; letter-spacing: -.03em; overflow-wrap: anywhere; }
.collection-actions { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.filter-box { display: flex; align-items: center; gap: 8px; margin-left: auto; background: var(--elevated-2); border-radius: 6px; padding: 0 10px; color: var(--muted); }
.filter-box input { background: none; border: 0; outline: none; color: var(--text); font: inherit; padding: 8px 0; width: 180px; }
.back-btn { margin-bottom: 14px; }

/* ===== Okienko "Dodaj do playlisty" ===== */
.modal { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .7); display: grid; place-items: center; padding: 16px; animation: fade .15s ease; }
.modal-card { background: var(--elevated); border-radius: 12px; padding: 20px; width: min(440px, 100%); max-height: 85vh; overflow-y: auto; box-shadow: 0 24px 64px rgba(0, 0, 0, .6); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.picker-new { display: flex; gap: 8px; align-items: center; margin: 12px 0 4px; flex-wrap: wrap; }
.picker-new input:not([type="checkbox"]) { flex: 1; min-width: 140px; background: var(--elevated-2); color: var(--text); border: 1px solid transparent; border-radius: 6px; padding: 9px 12px; font: inherit; outline: none; }
.picker-new input:not([type="checkbox"]):focus { border-color: var(--text); }
.check { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--accent); }
.picker-list { display: flex; flex-direction: column; gap: 2px; }
.picker-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 6px; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; width: 100%; }
.picker-item:hover { background: var(--hover); }
.picker-item .playlist-cover { width: 40px; height: 40px; font-size: 18px; }
.picker-empty { color: var(--subtle); font-size: 13px; padding: 4px 8px; }

/* ===== Statystyki ===== */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 30px; }
.stat-card { background: rgba(255, 255, 255, .05); border-radius: 10px; padding: 16px; }
.stat-card .value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.stat-card.dj { background: linear-gradient(135deg, #b8860b55, #ffd70022); display: flex; align-items: center; gap: 12px; }
.stat-card.dj .avatar { width: 48px; height: 48px; }
.stats-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 32px; }
.stats-grid h2 { margin-bottom: 12px; }
.plays { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.people { list-style: none; margin: 0; padding: 0; }
.person { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 6px; }
.person:hover { background: var(--hover); }
.person .medal { width: 26px; text-align: center; font-size: 18px; }
.person .who { flex: 1; font-weight: 600; }

/* ===== Ustawienia ===== */
.settings-card { background: rgba(255, 255, 255, .05); border-radius: 10px; padding: 18px; margin-bottom: 14px; max-width: 640px; }
.settings-card h2 { font-size: 17px; margin-bottom: 4px; }
.settings-card select { width: 100%; max-width: 320px; margin-top: 6px; }
.radio { display: flex; gap: 10px; align-items: center; padding: 6px 0; cursor: pointer; }
.radio input { accent-color: var(--accent); width: 18px; height: 18px; }
.account { display: flex; align-items: center; gap: 12px; margin: 10px 0 14px; }
.account .avatar { width: 48px; height: 48px; }

/* ===== Odtwarzacz na dole ===== */
.player {
  grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: center; gap: 16px; padding: 8px 12px; height: 84px;
}
.player-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-art { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; background: var(--elevated-2); display: block; }
.player-meta { min-width: 0; }
.player-title { font-weight: 600; font-size: 14px; }
.player-meta:hover .player-title { text-decoration: underline; }
.player-center { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.controls { display: flex; align-items: center; gap: 14px; }
.progress { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 620px; }
.time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 38px; text-align: center; }
.bar { position: relative; flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .25); cursor: pointer; }
.bar::before { content: ""; position: absolute; inset: -8px 0; } /* łatwiej trafić palcem */
.bar.disabled { cursor: default; }
.bar-fill { height: 100%; width: 0; background: var(--text); border-radius: 2px; position: relative; }
.bar:hover:not(.disabled) .bar-fill { background: var(--accent); }
.bar:hover:not(.disabled) .bar-fill::after {
  content: ""; position: absolute; right: -6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--text);
}
.player-right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; color: var(--muted); }
.vol-icon svg { width: 20px; height: 20px; }
/* Suwak głośności w stylu Spotify */
.volume {
  --fill: 66%;
  -webkit-appearance: none; appearance: none; width: 110px; height: 4px; border-radius: 2px; cursor: pointer; margin: 0;
  background: linear-gradient(to right, var(--text) var(--fill), rgba(255, 255, 255, .25) var(--fill));
}
.volume:hover:not(:disabled) { background: linear-gradient(to right, var(--accent) var(--fill), rgba(255, 255, 255, .25) var(--fill)); }
.volume::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--text); opacity: 0; transition: opacity .15s; }
.volume:hover::-webkit-slider-thumb, .volume:focus-visible::-webkit-slider-thumb { opacity: 1; }
.volume::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--text); }
.volume::-moz-range-track { background: transparent; }
.tabbar { display: none; }


/* ===== Radio ===== */
.station-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.station {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 8px; border: 0; cursor: pointer; text-align: left;
  background: rgba(255, 255, 255, .05); color: var(--text); min-width: 0; transition: background .15s;
}
.station:hover { background: var(--elevated-2); }
.station > svg { width: 28px; height: 28px; color: var(--accent); opacity: 0; transition: opacity .15s; flex-shrink: 0; }
.station:hover > svg { opacity: 1; }
.station-logo {
  width: 52px; height: 52px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0;
  font-weight: 800; font-size: 16px; color: #fff; background: var(--station, #444);
}
.station-info { min-width: 0; flex: 1; }
.banner.info { background: #2e77d0; color: #fff; }

/* ===== Prośby ===== */
.requests-box { background: rgba(240, 178, 50, .08); border: 1px solid rgba(240, 178, 50, .35); border-radius: 10px; padding: 4px 12px 8px; margin-top: 12px; }
.nav-live { margin-left: auto; font-size: 10px; font-weight: 800; background: var(--danger); color: #000; padding: 1px 6px; border-radius: 999px; }

/* ===== Quiz ===== */
.quiz-card p { margin: 0 0 10px; }
.quiz-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin: 12px 0; }
.quiz-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.quiz-form select { min-width: 120px; }
.quiz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.quiz-round { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.quiz-timer { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .15); overflow: hidden; margin-bottom: 18px; }
.quiz-timer-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), #f0b232, var(--danger)); background-size: 300% 100%; transition: width .25s linear; }
.quiz-guess { display: flex; gap: 10px; }
.quiz-guess input {
  flex: 1; min-width: 0; background: var(--elevated-2); color: var(--text); border: 2px solid transparent; border-radius: 999px;
  padding: 14px 20px; font: inherit; font-size: 17px; outline: none;
}
.quiz-guess input:focus { border-color: var(--accent); }
.quiz-input-wrap { position: relative; flex: 1; min-width: 0; display: flex; }
.quiz-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 10; background: var(--elevated-2); border-radius: 12px;
  padding: 6px; box-shadow: 0 12px 32px rgba(0, 0, 0, .5); max-height: 280px; overflow-y: auto;
}
.quiz-suggest button {
  display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--text); padding: 10px 12px;
  border-radius: 8px; cursor: pointer; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.quiz-suggest button:hover, .quiz-suggest button.active { background: var(--hover); }
.quiz-suggest b { color: var(--accent); }
.quiz-guess input:disabled { opacity: .6; }
.quiz-feedback { min-height: 24px; font-weight: 700; margin: 12px 4px; }
.quiz-feedback.good { color: var(--accent); }
.quiz-feedback.bad { color: var(--danger); }
.quiz-reveal {
  display: flex; align-items: center; gap: 16px; padding: 14px; border-radius: 12px; margin-bottom: 14px;
  background: linear-gradient(120deg, rgba(30, 215, 96, .25), rgba(30, 215, 96, .05)); animation: fade .3s ease;
}
.quiz-reveal-art { width: 88px; height: 88px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.quiz-answer { font-size: 22px; font-weight: 800; }
.quiz-final { text-align: center; padding: 18px; border-radius: 12px; background: linear-gradient(135deg, #b8860b55, #ffd70022); margin-bottom: 10px; }
.person .points { font-weight: 800; color: var(--accent); }

/* ===== Podsumowanie miesiąca ===== */
.wrapped-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.wcard { border-radius: 16px; padding: 20px; min-height: 140px; position: relative; overflow: hidden; }
.wcard .big { font-size: 46px; font-weight: 900; letter-spacing: -.03em; line-height: 1; margin: 6px 0; }
.wcard .cap { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.wcard.hero { grid-column: 1 / -1; background: linear-gradient(135deg, #1ed760, #0b6e30 60%, #052e14); color: #fff; min-height: 180px; }
.wcard.hero .big { font-size: 64px; }
.wcard.c1 { background: linear-gradient(135deg, #450af5, #8e8ee5); }
.wcard.c2 { background: linear-gradient(135deg, #e8115b, #f59b23); }
.wcard.c3 { background: linear-gradient(135deg, #148a08, #1e3264); }
.wcard.c4 { background: linear-gradient(135deg, #8d67ab, #e1118c); }
.wcard.wide { grid-column: span 2; }
.wcard ol { margin: 10px 0 0; padding-left: 22px; font-weight: 700; }
.wcard ol li { margin: 4px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wcard .art { position: absolute; right: -10px; bottom: -10px; width: 120px; height: 120px; border-radius: 10px; object-fit: cover; opacity: .9; transform: rotate(8deg); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }

/* ===== Więcej (telefon) ===== */
.more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.more-tile { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 12px; background: var(--elevated); font-weight: 700; }
.more-tile svg { width: 28px; height: 28px; color: var(--accent); }

@media (max-width: 860px) {
  .wcard.wide { grid-column: auto; }
  .wcard.hero .big { font-size: 48px; }
  .quiz-round { font-size: 26px; }
  .station > svg { opacity: 1; }
}

/* ===== Powiadomienie ===== */
.toast {
  position: fixed; left: 50%; bottom: 104px; transform: translateX(-50%); max-width: calc(100% - 32px);
  background: #2e77d0; color: #fff; font-weight: 600; padding: 10px 18px; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5); z-index: 50; animation: fade .2s ease;
}
.toast.error { background: #c0392b; }

/* ===== Telefon ===== */
@media (max-width: 860px) {
  h1 { font-size: 26px; }
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto; gap: 0; padding: 0; }
  .sidebar, .desktop-only { display: none !important; }
  .main { border-radius: 0; padding: 12px 16px 24px; }
  .mobile-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
  .mobile-head .brand { padding: 0; font-size: 18px; }
  .mobile-head-links { display: flex; align-items: center; gap: 6px; }
  .collection-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .collection-cover { width: 140px; height: 140px; font-size: 56px; }
  .fav-cover svg { width: 60px; height: 60px; }
  .collection-title { font-size: 34px; }
  .filter-box { margin-left: 0; width: 100%; }
  .filter-box input { width: 100%; }
  .greeting { font-size: 24px; }

  .hero { gap: 14px; padding: 14px; }
  .hero-art { width: 96px; height: 96px; }
  .hero-title { font-size: 19px; }
  .hero-actions { margin-top: 10px; }
  .cards { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 140px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .card { scroll-snap-align: start; padding: 8px; }
  .card-play { opacity: 1; transform: none; width: 36px; height: 36px; }
  .card-add { opacity: 1; transform: none; width: 30px; height: 30px; }

  .row-actions .icon-btn { opacity: 1; }
  .row { gap: 10px; padding: 6px 4px; }
  .row .time { display: none; }

  .now-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .now-left { position: static; max-width: 420px; margin: 0 auto; width: 100%; }
  .lyrics-body { font-size: 22px; }
  .stats-grid { grid-template-columns: minmax(0, 1fr); }

  .player {
    margin: 0 8px; height: auto; padding: 6px 8px 8px; border-radius: 8px; gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto; position: relative;
    background: linear-gradient(90deg, rgb(var(--dyn) / .9), rgb(var(--dyn) / .6)), #282828;
  }
  .player-art { width: 42px; height: 42px; }
  .player-center { flex-direction: row; }
  .player-center .progress { position: absolute; left: 10px; right: 10px; bottom: 0; width: auto; max-width: none; }
  .player-center .progress .time { display: none; }
  .player-center .bar { height: 2px; }
  .player-center .bar-fill::after { display: none; }
  .controls { gap: 6px; }
  .player .play-fab { width: 36px; height: 36px; background: transparent; color: var(--text); }
  .player .play-fab svg { width: 26px; height: 26px; }

  .tabbar {
    display: flex; justify-content: space-around; padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    background: linear-gradient(transparent, rgba(0, 0, 0, .95) 30%);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); flex: 1; }
  .tabbar a svg { width: 24px; height: 24px; }
  .tabbar a.active { color: var(--text); }
  .toast { bottom: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
