/* ============================================
   ВОЛНА — музыкальный плеер
   Тёмная тема · Glassmorphism · Аурора-фон
   ============================================ */

:root {
  --bg: #0a0614;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f3effc;
  --text-dim: rgba(235, 228, 250, 0.55);
  --a1: #a855f7;
  --a2: #ec4899;
  --a3: #22d3ee;
  --grad: linear-gradient(120deg, var(--a1), var(--a2));
  --radius: 18px;
  --pb-h: 92px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Аурора-фон ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.aurora i {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
  will-change: transform;
}
.aurora i:nth-child(1) {
  width: 55vw; height: 55vw; left: -15vw; top: -20vw;
  background: radial-gradient(circle at 30% 30%, rgba(124, 58, 237, 0.55), transparent 65%);
  animation: float1 46s ease-in-out infinite alternate;
}
.aurora i:nth-child(2) {
  width: 45vw; height: 45vw; right: -12vw; top: 10vh;
  background: radial-gradient(circle at 60% 40%, rgba(236, 72, 153, 0.4), transparent 65%);
  animation: float2 38s ease-in-out infinite alternate;
}
.aurora i:nth-child(3) {
  width: 40vw; height: 40vw; left: 25vw; bottom: -25vh;
  background: radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.28), transparent 65%);
  animation: float3 52s ease-in-out infinite alternate;
}
@keyframes float1 { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(8vw, 6vh, 0) scale(1.15); } }
@keyframes float2 { from { transform: translate3d(0,0,0) scale(1.1); } to { transform: translate3d(-10vw, -4vh, 0) scale(0.95); } }
@keyframes float3 { from { transform: translate3d(0,0,0) scale(0.9); } to { transform: translate3d(6vw, -8vh, 0) scale(1.2); } }

/* ---------- Каркас ---------- */
.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 264px 1fr;
  height: 100vh;
}

/* ---------- Сайдбар ---------- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--border);
  background: rgba(10, 6, 20, 0.55);
  backdrop-filter: blur(24px);
  min-height: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 22px;
}
.logo-mark { width: 38px; height: 38px; display: grid; place-items: center; background: rgba(255,255,255,.04); border-radius: 12px; border: 1px solid var(--border); }
.logo-mark svg { width: 22px; height: 22px; }
.logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-dim);
  transition: all 0.2s ease;
}
.nav-btn svg { width: 20px; height: 20px; }
.nav-btn:hover { color: var(--text); background: var(--surface); }
.nav-btn.active {
  color: #fff;
  background: linear-gradient(120deg, rgba(168, 85, 247, 0.22), rgba(236, 72, 153, 0.22));
  box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.35);
}

.pl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 12px 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-dim);
}
.pl-head button {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 15px;
  transition: all .2s;
}
.pl-head button:hover { color: #fff; background: var(--surface-2); }

.playlists {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 60px;
}
.pl-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-dim);
  transition: all .2s;
  text-align: left;
  width: 100%;
}
.pl-item:hover { background: var(--surface); color: var(--text); }
.pl-item.active { color: #fff; background: var(--surface-2); }
.pl-item .pl-ico {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--surface-2);
  font-size: 15px;
  flex-shrink: 0;
}
.pl-item .pl-ico.liked-ico { background: var(--grad); }
.pl-item .pl-body { flex: 1; min-width: 0; }
.pl-item .pl-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-item .pl-cnt { font-size: 11px; color: var(--text-dim); }
.pl-item .pl-del {
  opacity: 0;
  width: 22px; height: 22px;
  border-radius: 7px;
  display: grid; place-items: center;
  color: var(--text-dim);
  font-size: 12px;
}
.pl-item:hover .pl-del { opacity: 1; }
.pl-item .pl-del:hover { color: #fda4af; background: rgba(244, 63, 94, .15); }

.side-foot {
  padding: 14px 12px 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

/* ---------- Основная область ---------- */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 28px;
}
.searchwrap {
  flex: 1;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 44px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all .25s;
}
.searchwrap:focus-within {
  border-color: rgba(168, 85, 247, .55);
  background: rgba(255, 255, 255, .07);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, .12);
}
.searchwrap svg { width: 18px; height: 18px; color: var(--text-dim); flex-shrink: 0; }
.searchwrap input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
}
.searchwrap input::placeholder { color: var(--text-dim); }
.searchwrap input::-webkit-search-cancel-button { -webkit-appearance: none; }

#burger { display: none; }

.icon-btn {
  width: 38px; height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--text-dim);
  transition: all .2s;
  position: relative;
  flex-shrink: 0;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { color: #fff; background: var(--surface-2); }
.icon-btn.small { width: 32px; height: 32px; }
.icon-btn.small svg { width: 17px; height: 17px; }
.icon-btn.on { color: var(--a2); }
.icon-btn.on::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--a2);
  transform: translateX(-50%);
}

.pill-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all .2s;
}
.pill-btn svg { width: 17px; height: 17px; }
.pill-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }

/* ---------- Контент ---------- */
#views {
  flex: 1;
  overflow-y: auto;
  padding: 10px 28px calc(var(--pb-h) + 40px);
  min-height: 0;
  scroll-behavior: smooth;
}
#views::-webkit-scrollbar, .playlists::-webkit-scrollbar, .queue-rows::-webkit-scrollbar { width: 9px; }
#views::-webkit-scrollbar-thumb, .playlists::-webkit-scrollbar-thumb, .queue-rows::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.12);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.view { animation: fadeUp .38s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.view-hero {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  margin: 14px 0 26px;
}
.view-hero .hero-info h1 {
  margin: 0 0 6px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: .3px;
  line-height: 1.1;
}
.view-hero .hero-sub { color: var(--text-dim); font-size: 13.5px; }
.hero-gradient {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-note { color: var(--text-dim); font-size: 12.5px; }

/* Кнопки действий в шапке вида */
.view-actions { display: flex; gap: 10px; margin-top: 14px; align-items: center; }
.grad-btn {
  height: 40px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13.5px;
  color: #fff;
  background: var(--grad);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(168, 85, 247, .35);
  transition: transform .2s, box-shadow .2s;
}
.grad-btn svg { width: 17px; height: 17px; }
.grad-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(168, 85, 247, .45); }

.ghost-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .2s;
}
.ghost-btn svg { width: 16px; height: 16px; }
.ghost-btn:hover { color: #fff; border-color: var(--border-strong); }
.ghost-btn.danger:hover { color: #fda4af; border-color: rgba(244, 63, 94, .4); }

/* ---------- Хиро трек чарта ---------- */
.chart-wrap { display: flex; flex-direction: column; gap: 8px; }

.top3 {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 14px;
  margin: 6px 0 18px;
}
.t3-card {
  position: relative;
  border-radius: var(--radius);
  padding: 18px;
  overflow: hidden;
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s;
  animation: fadeUp .4s ease backwards;
}
.t3-card:nth-child(2) { animation-delay: .06s; }
.t3-card:nth-child(3) { animation-delay: .12s; }
.t3-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: 0 14px 34px rgba(0,0,0,.4); }
.t3-card .t3-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  filter: saturate(1.2);
  transition: opacity .25s, transform .25s;
}
.t3-card:hover .t3-bg { opacity: 0.5; transform: scale(1.04); }
.t3-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,6,20,.2), rgba(10,6,20,.88));
}
.t3-card > *:not(.t3-bg) { position: relative; z-index: 1; }
.t3-rank {
  position: absolute;
  top: 12px; left: 16px;
  z-index: 2;
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  opacity: .9;
}
.t3-rank.gold { background: linear-gradient(120deg, #fde047, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.t3-rank.silver { background: linear-gradient(120deg, #e2e8f0, #94a3b8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.t3-rank.bronze { background: linear-gradient(120deg, #fbbf77, #b45309); -webkit-background-clip: text; background-clip: text; color: transparent; }
.t3-title { font-weight: 700; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t3-artist { font-size: 12.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t3-play {
  position: absolute;
  right: 14px; bottom: 14px;
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad);
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: all .22s;
  z-index: 2;
  box-shadow: 0 8px 18px rgba(168,85,247,.45);
}
.t3-card:hover .t3-play { opacity: 1; transform: none; }
.t3-play svg { width: 18px; height: 18px; }

/* ---------- Список треков ---------- */
.tlist { display: flex; flex-direction: column; gap: 2px; }
.trow {
  display: grid;
  grid-template-columns: 40px 52px minmax(0,1.35fr) minmax(0,.8fr) auto;
  align-items: center;
  gap: 14px;
  padding: 7px 12px;
  border-radius: 12px;
  transition: background .18s;
  cursor: default;
}
.trow:hover { background: var(--surface); }
.trow .rank {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}
.trow .rank.r1 { color: #fde047; }
.trow .rank.r2 { color: #cbd5e1; }
.trow .rank.r3 { color: #f59e0b; }
.trow .cover {
  position: relative;
  width: 48px; height: 48px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(168,85,247,.35), rgba(236,72,153,.35));
  flex-shrink: 0;
}
.trow .cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .25s;
}
.trow:hover .cover img { transform: scale(1.08); }
.trow .cover .hoverplay {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(10,6,20,.45);
  opacity: 0;
  transition: opacity .2s;
}
.trow:hover .cover .hoverplay { opacity: 1; }
.hoverplay svg { width: 20px; height: 20px; color: #fff; }
.trow .meta { min-width: 0; }
.trow .t-title {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trow .t-artist {
  font-size: 12.5px;
  color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
  width: fit-content;
}
.trow .t-artist:hover { color: var(--a1); text-decoration: underline; }
.trow .t-album {
  font-size: 12.5px;
  color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.trow .t-act { display: flex; align-items: center; gap: 2px; }
.t-dur { font-size: 12.5px; color: var(--text-dim); width: 40px; text-align: right; font-variant-numeric: tabular-nums; }

.mini-btn {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  color: var(--text-dim);
  opacity: 0;
  transition: all .18s;
}
.trow:hover .mini-btn, .mini-btn.liked { opacity: 1; }
.mini-btn svg { width: 17px; height: 17px; }
.mini-btn:hover { color: #fff; background: var(--surface-2); }
.mini-btn.liked { color: var(--a2); }
.heart svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.heart.liked svg, .mini-btn.liked svg { fill: currentColor; stroke: none; }

/* Играющий трек */
.trow.playing { background: linear-gradient(120deg, rgba(168,85,247,.14), rgba(236,72,153,.1)); box-shadow: inset 0 0 0 1px rgba(168,85,247,.3); }
.trow.playing .t-title { color: var(--a1); }
.eq { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 14px; margin-left: 8px; }
.eq i { width: 3px; border-radius: 2px; background: var(--a2); animation: eqb .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .2s; }
.eq i:nth-child(3) { animation-delay: .38s; }
.eq.paused i { animation-play-state: paused; }
@keyframes eqb { 0%,100% { height: 4px; } 50% { height: 14px; } }

/* Плейлист-обложка коллаж */
.collage {
  width: 172px; height: 172px;
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  background: var(--surface);
  box-shadow: 0 20px 50px rgba(0,0,0,.45), 0 0 0 1px var(--border-strong);
  flex-shrink: 0;
}
.collage .cell { position: relative; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, rgba(168,85,247,.3), rgba(236,72,153,.3)); font-size: 26px; color: rgba(255,255,255,.6); }
.collage img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Очередь ---------- */
.queue {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 340px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  background: rgba(14, 9, 26, 0.92);
  backdrop-filter: blur(28px);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.32,.72,.25,1);
}
.queue.open { transform: none; }
.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  font-weight: 700;
  font-size: 16px;
}
.queue-rows { flex: 1; overflow-y: auto; padding: 4px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.q-row {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .18s;
}
.q-row:hover { background: var(--surface); }
.q-row.playing { background: linear-gradient(120deg, rgba(168,85,247,.16), rgba(236,72,153,.12)); }
.q-row .cover {
  width: 42px; height: 42px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(168,85,247,.35), rgba(236,72,153,.35));
}
.q-row .cover img { width: 100%; height: 100%; object-fit: cover; }
.q-row .meta { min-width: 0; }
.q-row .t-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-row .t-artist { font-size: 11.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-row .q-del {
  width: 26px; height: 26px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--text-dim);
  opacity: 0;
  transition: all .18s;
  font-size: 12px;
}
.q-row:hover .q-del { opacity: 1; }
.q-row .q-del:hover { color: #fda4af; background: rgba(244,63,94,.14); }
.queue-foot { padding: 10px 16px 16px; border-top: 1px solid var(--border); }
.queue-foot button {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all .2s;
}
.queue-foot button:hover { color: #fda4af; border-color: rgba(244,63,94,.35); }

#backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(5, 2, 12, 0.5);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
#backdrop.show { opacity: 1; pointer-events: auto; }

/* ---------- Плеер ---------- */
.playerbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  height: var(--pb-h);
  display: grid;
  grid-template-columns: minmax(180px, 300px) 1fr minmax(180px, 300px);
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  background: rgba(12, 7, 22, 0.8);
  backdrop-filter: blur(30px) saturate(1.3);
  border-top: 1px solid var(--border);
}

.pb-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pb-cover {
  position: relative;
  width: 58px; height: 58px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(168,85,247,.4), rgba(236,72,153,.4));
  box-shadow: 0 8px 22px rgba(0,0,0,.4);
}
.pb-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pb-cover .pb-note { font-size: 22px; color: rgba(255,255,255,.7); }
.pb-meta { min-width: 0; }
.pb-meta > div:nth-child(1) {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pb-meta > div:nth-child(2) {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.pb-left .heart { opacity: .85; }

.pb-center { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.pb-controls { display: flex; align-items: center; gap: 6px; }
.pb-play {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid; place-items: center;
  margin: 0 10px;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 20px rgba(168,85,247,.4);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.pb-play:hover { transform: scale(1.07); box-shadow: 0 8px 26px rgba(168,85,247,.55); }
.pb-play:active { transform: scale(.96); }
.pb-play svg { width: 20px; height: 20px; }

.pb-progress { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; }
.pb-progress span {
  font-size: 11px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  min-width: 34px;
}
.pb-progress span:first-child { text-align: right; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
  cursor: pointer;
  transition: height .15s;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 0 0 4px rgba(168, 85, 247, .35);
  transition: transform .15s;
  transform: scale(0);
}
input[type="range"]:hover::-webkit-slider-thumb,
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1); }
input[type="range"]:hover { height: 6px; }
#pbSeek { flex: 1; }
#pbVol { width: 110px; }

.pb-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.badge {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 4px 8px;
  border-radius: 7px;
  color: var(--a3);
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
}
.volwrap { display: flex; align-items: center; gap: 8px; }
.volwrap svg { width: 18px; height: 18px; color: var(--text-dim); flex-shrink: 0; }

/* ---------- Меню плейлистов ---------- */
.popmenu {
  position: fixed;
  z-index: 80;
  min-width: 230px;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 16px;
  background: rgba(20, 13, 34, 0.97);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
.popmenu .pm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  text-align: left;
  color: var(--text);
  transition: background .15s;
}
.popmenu .pm-item:hover { background: var(--surface-2); }
.popmenu .pm-item .pm-ico { width: 15px; height: 15px; display: grid; place-items: center; opacity: .8; }
.popmenu .pm-sep { height: 1px; margin: 5px 8px; background: var(--border); }
.popmenu .pm-item.new { color: var(--a1); font-weight: 700; }

/* ---------- Модалка ---------- */
.modal[hidden], .popmenu[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(5, 2, 12, 0.6);
  backdrop-filter: blur(6px);
}
.modal-card {
  width: min(92vw, 420px);
  padding: 26px 24px 20px;
  border-radius: 22px;
  background: rgba(22, 14, 38, 0.97);
  border: 1px solid var(--border-strong);
  box-shadow: 0 40px 90px rgba(0,0,0,.6);
  animation: pop .25s cubic-bezier(.3,1.4,.5,1);
}
@keyframes pop { from { opacity: 0; transform: scale(.92) translateY(12px); } to { opacity: 1; } }
.modal-title { font-size: 18px; font-weight: 800; margin-bottom: 16px; }
.modal-card input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 14.5px;
  outline: none;
  transition: all .2s;
}
.modal-card input:focus { border-color: rgba(168,85,247,.55); box-shadow: 0 0 0 4px rgba(168,85,247,.12); }
.modal-msg { min-height: 20px; font-size: 12px; color: #fda4af; margin-top: 8px; }
.modal-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.modal-card .modal-text { color: var(--text-dim); font-size: 14px; line-height: 1.55; margin-bottom: 8px; }

/* ---------- Тосты ---------- */
#toasts {
  position: fixed;
  bottom: calc(var(--pb-h) + 18px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 11px 18px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(24, 16, 40, 0.95);
  border: 1px solid var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
  animation: toastIn .3s cubic-bezier(.3,1.3,.5,1);
}
.toast.out { animation: toastOut .3s ease forwards; }
.toast.err { border-color: rgba(244, 63, 94, .45); color: #fecdd3; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.95); } to { opacity: 1; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }

/* ---------- Прочее ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 70px 20px;
  color: var(--text-dim);
  text-align: center;
}
.empty .big { font-size: 44px; opacity: .5; }
.empty p { margin: 0; font-size: 14px; }

.sk {
  border-radius: 12px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 37%, var(--surface) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sk-row { height: 64px; margin-bottom: 6px; }

.chip {
  display: inline-flex;
  height: 32px;
  align-items: center;
  padding: 0 14px;
  margin: 0 8px 10px 0;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all .2s;
  cursor: pointer;
}
.chip:hover { color: #fff; border-color: var(--border-strong); }

kbd {
  font-family: inherit;
  font-size: 11px;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
}

/* ---------- Адаптив ---------- */
@media (max-width: 1020px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    z-index: 45;
    top: 0; left: 0; bottom: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.32,.72,.25,1);
    background: rgba(14, 9, 26, 0.96);
  }
  .sidebar.open { transform: none; }
  #burger { display: inline-grid; }
  .trow { grid-template-columns: 40px 52px minmax(0,1fr) auto; }
  .trow .t-album { display: none; }
  .top3 { grid-template-columns: 1fr 1fr; }
  .top3 .t3-card:nth-child(3) { display: none; }
  .queue { width: min(92vw, 340px); }
  .pb-right .badge { display: none; }
}
@media (max-width: 640px) {
  .view-hero .hero-info h1 { font-size: 24px; }
  .collage { width: 110px; height: 110px; }
  .pb-meta > div:nth-child(2) { display: none; }
  .pb-cover { width: 46px; height: 46px; }
  .playerbar { grid-template-columns: minmax(120px, 1fr) 1.4fr; padding: 0 12px; gap: 10px; }
  .pb-right { display: none; }
  .pb-left .heart { display: none; }
  #btnQueueTop span { display: none; }
  #views { padding: 10px 14px calc(var(--pb-h) + 30px); }
  .topbar { padding: 12px 14px; }
}

/* Уменьшенная анимация */
@media (prefers-reduced-motion: reduce) {
  .aurora i { animation: none; }
}
