/* =========================================================================
   Volna — оформление.
   Нейтральная тёмная тема: почти чёрный фон, серые панели, белые кнопки.
   Переменная --accent берётся из обложки играющего трека и отвечает за
   акценты: заливка полос трека и громкости, активные элементы, лайк.
   ========================================================================= */

:root {
  --accent: #7c5cff;

  --bg: #0b0b0c;
  --bg-side: #0f0f10;
  --panel: #151516;
  --panel-2: #1c1c1e;
  --panel-3: #232326;
  --text: #ffffff;
  --muted: #8c8c92;
  --muted-2: #6a6a70;
  --line: #232326;
  --line-soft: #ffffff12;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-pill: 999px;

  --player-h: 96px;
  --sidebar-w: 248px;

  --shadow: 0 18px 50px #000000a6;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.tiny { font-size: 12.5px; }

.ico { width: 20px; height: 20px; fill: currentColor; flex: none; }
.big-ico { width: 24px; height: 24px; }
/* сердце рисуется контуром и заливается, когда трек в библиотеке */
.ico.heart { fill: none; stroke: currentColor; stroke-width: 1.8; }
.icon-btn.on .ico.heart, .row.playing .ico.heart.on { fill: currentColor; stroke: none; }

.label {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* ------------------------------- кнопки ------------------------------- */

.btn {
  border: 0;
  border-radius: var(--r-pill);
  padding: 11px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14.5px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: .15s;
  white-space: nowrap;
}
.btn-primary { background: #fff; color: #0b0b0c; }
.btn-primary:hover { transform: scale(1.02); }
.btn-ghost { background: var(--panel-2); color: var(--text); }
.btn-ghost:hover { background: var(--panel-3); }
.btn-block { width: 100%; justify-content: center; }
.btn .ico { width: 18px; height: 18px; }

/* Единая кнопка-кружок: одна высота, одна рамка, один ховер.
   Так выглядят все кнопки в хотбаре и у строк списков. */
.ctrl {
  width: 44px; height: 44px; flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  display: inline-grid; place-items: center;
  cursor: pointer;
  transition: .14s;
  padding: 0;
}
.ctrl .ico { width: 20px; height: 20px; }
.ctrl:hover { color: var(--text); border-color: var(--muted-2); background: var(--panel-2); }
.ctrl:active { transform: scale(.96); }
.ctrl.on, .ctrl.active {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--panel));
}
.ctrl.muted-off { color: #ff6b81; border-color: #ff6b8155; }
.ctrl.small { width: 34px; height: 34px; border-width: 0; background: transparent; }
.ctrl.small .ico { width: 18px; height: 18px; }
.ctrl.small:hover { background: var(--line-soft); }
/* главная кнопка плеера: того же размера, но белая — понятно, что она главная */
.ctrl.primary {
  background: #fff; color: #0b0b0c; border-color: #fff;
  width: 48px; height: 48px;
}
.ctrl.primary:hover { background: #fff; transform: scale(1.05); }
.ctrl.primary .ico { width: 24px; height: 24px; }
.ctrl.is-like .ico { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ctrl.is-like.on .ico, .ctrl.is-like.done .ico { fill: currentColor; stroke: none; }
/* компактный вариант для строк списка */
.ctrl.tiny { width: 34px; height: 34px; border-color: transparent; background: transparent; }
.ctrl.tiny .ico { width: 18px; height: 18px; }
.ctrl.tiny:hover { background: var(--line-soft); border-color: var(--line); }

/* старые имена оставлены, чтобы ничего не отвалилось */
.icon-btn { background: transparent; border: 0; cursor: pointer; color: var(--muted);
  padding: 8px; border-radius: var(--r-sm); display: inline-grid; place-items: center; }
.icon-btn:hover { color: var(--text); background: var(--line-soft); }

/* ------------------------------- вход -------------------------------- */

.auth {
  display: grid;
  place-items: center;
  height: 100%;
  background:
    radial-gradient(900px 500px at 50% -15%, color-mix(in srgb, var(--accent) 22%, transparent), transparent),
    var(--bg);
}
.auth-card {
  width: 400px;
  max-width: calc(100vw - 32px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 30px;
  box-shadow: var(--shadow);
}
.auth-logo { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }

.logo-text { font-size: 21px; font-weight: 800; letter-spacing: -.4px; }

.segmented {
  display: flex; gap: 4px; padding: 4px; margin: 20px 0;
  background: var(--panel-2); border-radius: var(--r-pill);
}
.seg {
  flex: 1; border: 0; background: transparent; color: var(--muted);
  padding: 9px; border-radius: var(--r-pill); cursor: pointer; font-size: 14px;
  font-weight: 600;
}
.seg.active { background: #fff; color: #0b0b0c; }

.stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
input {
  background: var(--panel-2); border: 1px solid transparent; color: var(--text);
  padding: 12px 14px; border-radius: var(--r-md); outline: none; font: inherit;
}
input:focus { border-color: color-mix(in srgb, var(--accent) 70%, transparent); background: var(--panel-3); }
input::placeholder { color: var(--muted-2); }
.error { color: #ff6b81; font-size: 13px; margin-top: 14px; min-height: 17px; }

/* ------------------------------- каркас ------------------------------- */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 1fr var(--player-h);
  grid-template-areas: "sidebar main" "sidebar player";
  height: 100%;
}

.sidebar {
  grid-area: sidebar;
  background: var(--bg-side);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; overflow-y: auto;
}
.sidebar-top { padding: 22px 14px 10px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: var(--r-md);
  color: var(--muted); font-size: 14.5px; font-weight: 500;
}
.nav a:hover { color: var(--text); background: var(--line-soft); }
.nav a.active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 16%, var(--panel-2));
}
.nav a.active .ico { color: var(--accent); }
.sidebar-foot {
  margin-top: auto; padding: 16px 14px 18px;
  display: flex; flex-direction: column; gap: 12px;
  border-top: 1px solid var(--line);
}
.nav-link { color: var(--muted); padding: 0 12px; }
.nav-link:hover { color: var(--text); }
.user { display: flex; align-items: center; gap: 11px; padding: 0 4px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: linear-gradient(140deg, var(--accent), #ffffff40);
  display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 15px;
}
.user-name { font-size: 14px; font-weight: 600; }

.main { grid-area: main; overflow-y: auto; position: relative; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 28px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.search { flex: 0 1 520px; min-width: 190px; position: relative; }
.search-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }
.search input { width: 100%; border-radius: var(--r-pill); padding: 12px 18px 12px 44px; }
/* большое поле поиска на главной */
.big-search { max-width: none; margin: 0 0 26px; }
.big-search input { padding: 16px 22px 16px 52px; font-size: 16px; background: var(--panel); }
.big-search .search-ico { left: 20px; width: 22px; height: 22px; }
/* неоновая линия в шапке: колеблется вместе с музыкой */
/* неоновая линия тянется по всей шапке справа от поиска и плавно затухает */
.viz {
  flex: 1 1 auto; min-width: 90px; height: 36px; opacity: .95;
  align-self: center;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
@media (max-width: 780px) { .viz { height: 30px; min-width: 56px; } }
.content { padding: 26px 28px 124px; }

/* ---------------------------- типографика ----------------------------- */

h1 { font-size: 34px; margin: 0 0 22px; letter-spacing: -.7px; font-weight: 800; }
h2 { font-size: 21px; margin: 0; letter-spacing: -.3px; font-weight: 700; }
.section { margin-bottom: 34px; }
.section-head { display: flex; align-items: center; gap: 14px; margin-bottom: 15px; }
.section-head .more {
  margin-left: auto; font-size: 13.5px; color: var(--muted); cursor: pointer;
  padding: 6px 12px; border-radius: var(--r-pill);
}
.section-head .more:hover { background: var(--line-soft); color: var(--text); }
.greeting { margin-bottom: 26px; }
.greeting h1 { margin-bottom: 6px; }
.greeting .sub { color: var(--muted); font-size: 14.5px; }

/* --------------------------- сетки карточек --------------------------- */

.grid { display: grid; gap: 18px; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

.card {
  background: var(--panel);
  border-radius: var(--r-lg);
  padding: 12px;
  cursor: pointer;
  transition: .16s;
  position: relative;
}
.card:hover { background: var(--panel-2); transform: translateY(-3px); }
.card img, .card .cover-ph {
  width: 100%; aspect-ratio: 1; border-radius: var(--r-md);
  object-fit: cover; display: block; background: var(--panel-3);
}
.card .c-title {
  font-weight: 600; margin-top: 12px; font-size: 14.5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .c-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .play-fab {
  position: absolute; right: 20px; bottom: 76px;
  width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: #fff; color: #0b0b0c; display: grid; place-items: center;
  opacity: 0; transform: translateY(8px); transition: .16s; cursor: pointer;
  box-shadow: var(--shadow);
}
.card:hover .play-fab { opacity: 1; transform: none; }
.card .badge {
  position: absolute; right: 18px; top: 18px;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: #000000a8; color: var(--accent); font-size: 13px; backdrop-filter: blur(6px);
}

/* ---------------------------- строки треков --------------------------- */

.rows { display: flex; flex-direction: column; gap: 2px; }
.row {
  display: grid;
  grid-template-columns: 34px 48px 1fr auto auto;
  align-items: center; gap: 14px;
  padding: 8px 12px; border-radius: var(--r-md); cursor: pointer;
}
.row:hover { background: var(--panel); }
.row.playing { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.row .idx { color: var(--muted-2); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.row img { width: 48px; height: 48px; border-radius: var(--r-sm); object-fit: cover; background: var(--panel-3); }
.row .r-main { min-width: 0; }
.row .r-title {
  display: block; font-size: 14.5px; font-weight: 500; color: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row .r-title:hover { text-decoration: underline; }
.row.playing .r-title { color: var(--accent); }
.row .r-artist {
  display: block; color: var(--muted); font-size: 12.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row .r-artist:hover { color: var(--text); text-decoration: underline; }
/* перетаскивание строк: порядок внутри альбома или «Мне нравится» */
.rows.orderable .row { grid-template-columns: 18px 34px 48px 1fr auto auto; }
.rows.orderable .row { cursor: default; }
.drag-handle {
  color: var(--muted-2); cursor: grab; font-size: 15px; line-height: 1;
  opacity: 0; transition: .12s; user-select: none;
}
.rows.orderable .row:hover .drag-handle { opacity: .85; }
.row.dragging { opacity: .45; background: var(--panel-2); }
.rows.orderable .row:active .drag-handle { cursor: grabbing; }
.row .r-dur { color: var(--muted-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.row .r-actions { display: flex; gap: 4px; opacity: 0; transition: .12s; }
.row:hover .r-actions, .row.playing .r-actions { opacity: 1; }

/* ------------------------------ hero ---------------------------------- */

.hero {
  display: flex; gap: 26px; align-items: flex-end;
  margin-bottom: 30px; padding: 26px; border-radius: var(--r-xl);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--accent) 26%, var(--panel)) 0%, var(--panel) 62%);
}
.hero-art { position: relative; flex: none; }
.hero-art img {
  width: 208px; height: 208px; border-radius: var(--r-lg); object-fit: cover;
  box-shadow: var(--shadow); display: block;
}
.hero-info { min-width: 0; }
.hero-kind { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #ffffffb0; font-weight: 600; }
.hero h1 { margin: 8px 0 10px; font-size: 40px; line-height: 1.08;
  overflow-wrap: anywhere; }
.hero .h-sub { color: #ffffff9c; font-size: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center; }
.hero-play {
  width: 62px; height: 62px; border-radius: 50%; border: 0; cursor: pointer;
  background: #fff; color: #0b0b0c; display: grid; place-items: center;
  transition: .15s; box-shadow: var(--shadow);
}
.hero-play:hover { transform: scale(1.06); }
.hero-play .ico { width: 30px; height: 30px; }

/* «волна»: большая кнопка и мягкий градиент */
.wave-card {
  display: flex; align-items: center; gap: 24px;
  padding: 28px; border-radius: var(--r-xl); margin-bottom: 30px;
  background:
    radial-gradient(700px 260px at 12% 0%, color-mix(in srgb, var(--accent) 42%, transparent), transparent),
    var(--panel);
}
.wave-card .w-text { min-width: 0; }
.wave-card h1 { margin: 6px 0 8px; }
.wave-card .w-sub { color: var(--muted); font-size: 14px; }

/* ------------------------------ чипсы --------------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 20px; }
.chip {
  padding: 9px 16px; border-radius: var(--r-pill); border: 1px solid var(--line);
  background: transparent; cursor: pointer; font-size: 13.5px; color: var(--muted);
  font-weight: 500;
}
.chip:hover { color: var(--text); border-color: var(--muted-2); }
.chip.active {
  background: color-mix(in srgb, var(--accent) 20%, var(--panel-2));
  border-color: transparent; color: var(--text);
}
/* вторая полоска чипсов в волне — настроения: отделяем от выбора источника */
.chips-mood { margin-top: -11px; }
.chips-mood .chip { border-style: dashed; }
.chips-mood .chip.active { border-style: solid; }
.mood-empty { max-width: 720px; }

/* ------------------------------- хотбар ------------------------------- */

.player {
  grid-area: player;
  position: relative;
  /* одинаковый отступ полоски слева и справа: справа — до кнопки скачивания */
  --strip-inset: 170px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: 18px;
  padding: 0 18px;
  background: var(--bg-side);
  border-top: 1px solid var(--line);
}
/* колонки могут сжиматься — тогда длинные названия обрезаются, а не лезут на кнопки */
.player > * { min-width: 0; }

/* --- полоска воспроизведения: тонкая линия поверх всего хотбара ---
   Служит и верхней границей плеера: слева заливка акцентом, справа
   еле заметная дорожка; кружок появляется при наведении. */
.seek-strip {
  /* дорожка полоски садится ровно на верхний край хотбара: чуть выше края,
     но по-прежнему вплотную к нему */
  position: absolute; top: -12px; left: var(--strip-inset); right: var(--strip-inset);
  width: auto; height: 22px; z-index: 4; padding: 0; margin: 0; flex: none;
}
.seek-strip::-webkit-slider-runnable-track {
  height: 4px; border-radius: 0;
  background: linear-gradient(to right,
      var(--accent) 0 var(--val, 0%),
      #ffffff30 var(--val, 0%) 100%);
}
.seek-strip::-webkit-slider-thumb {
  width: 13px; height: 13px; margin-top: -4.5px;
  opacity: 0; transition: opacity .15s, transform .12s;
}
.seek-strip:hover::-webkit-slider-thumb,
.seek-strip:focus::-webkit-slider-thumb,
.seek-strip:active::-webkit-slider-thumb { opacity: 1; }
.seek-strip::-moz-range-track { height: 4px; border-radius: 0; }
.seek-strip::-moz-range-thumb {
  width: 13px; height: 13px; opacity: 0; transition: opacity .15s;
}
.seek-strip:hover::-moz-range-thumb { opacity: 1; }

.np { display: flex; align-items: center; gap: 12px; min-width: 0; }
.np-cover-wrap { position: relative; flex: none; }
.np-cover-wrap img {
  width: 58px; height: 58px; border-radius: var(--r-md); object-fit: cover;
  background: var(--panel-2); display: block;
}
.np-cover-play {
  position: absolute; inset: 0; border: 0; cursor: pointer;
  border-radius: var(--r-md); background: #0000007a; color: #fff;
  display: grid; place-items: center; opacity: 0; transition: .15s;
}
.np-cover-wrap:hover .np-cover-play { opacity: 1; }
/* текст трека должен обрезаться многоточием, а не залезать под кнопки */
.np-text { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.np-title {
  display: block; font-size: 14.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.np-title:hover { text-decoration: underline; }
.np-artist {
  display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.np-artist:hover { color: var(--text); text-decoration: underline; }
.np-side { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* текст занимает ровно свою ширину — по самой длинной из строк, поэтому
   плюс и лайк стоят вплотную за названием, а не у края панели */
.np-side .np { flex: 0 1 auto; }
.np-actions { display: flex; align-items: center; gap: 8px; flex: none; }

.center-controls { display: flex; align-items: center; justify-content: center; gap: 16px; }
.buttons { display: flex; align-items: center; gap: 10px; }
.time {
  font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
  min-width: 38px; text-align: center;
}

/* --- ползунки: заливка слева от бегунка, бегунок по центру полосы ---
   Раньше и полоса, и бегунок жили в одном элементе, из-за чего кружок
   уезжал вверх и не совпадал с дорожкой. Теперь дорожка и бегунок заданы
   отдельными правилами с точным выравниванием. */
.range {
  -webkit-appearance: none; appearance: none;
  background: transparent;
  height: 22px;          /* высокая область попадания мышью */
  padding: 0; margin: 0;
  outline: none; cursor: pointer; flex: 1;
}
.range::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(to right,
      var(--accent) 0 var(--val, 0%),
      #ffffff24 var(--val, 0%) 100%);
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px; margin-top: -4.5px;   /* (4 - 13) / 2 */
  border: 0; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px #00000080;
  transition: transform .12s;
}
.range:hover::-webkit-slider-thumb { transform: scale(1.12); }
.range::-moz-range-track { height: 4px; border-radius: 2px; background: #ffffff24; }
.range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
.range::-moz-range-thumb {
  width: 13px; height: 13px; border: 0; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px #00000080;
}
/* --- громкость: шторка с ползунком выезжает вверх над динамиком --- */
.vol-wrap { position: relative; display: flex; align-items: center; }
.vol-pop {
  position: absolute; left: 50%; bottom: calc(100% + 12px);
  width: 38px; height: 112px;
  display: grid; place-items: center;
  background: var(--bg-side); border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 14px 30px #00000099;
  opacity: 0; pointer-events: none; z-index: 90;
  transform: translateX(-50%) translateY(8px);
  transition: opacity .16s ease, transform .16s ease;
}
.vol-wrap:hover .vol-pop,
.vol-wrap:focus-within .vol-pop {
  opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0);
}
/* ползунок повёрнут: значение растёт вверх, ноль внизу */
.vol-range { flex: none; width: 84px; height: 20px; transform: rotate(-90deg); }

.right-controls { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

/* ------------------------------ очередь ------------------------------- */

.queue {
  position: fixed; right: 0; top: 0; bottom: var(--player-h); width: 360px;
  background: var(--bg-side); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: .22s cubic-bezier(.4,0,.2,1);
  z-index: 80; display: flex; flex-direction: column;
}
/* в полноэкранном плеере очередь открывается поверх него и до самого низа */
body.np-open .queue { bottom: 0; }
.queue.open { transform: none; box-shadow: -30px 0 60px #00000080; }
.queue-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 14px; border-bottom: 1px solid var(--line);
}
.queue-list { overflow-y: auto; padding: 10px; }
.queue-item {
  display: flex; gap: 12px; align-items: center; padding: 8px;
  border-radius: var(--r-md); cursor: pointer;
}
.queue-item:hover { background: var(--panel); }
.queue-item.current { background: color-mix(in srgb, var(--accent) 16%, var(--panel)); }
.queue-item img { width: 42px; height: 42px; border-radius: var(--r-sm); object-fit: cover; background: var(--panel-3); }
.queue-item .qi-main { min-width: 0; }
.queue-item .qi-t { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-item.current .qi-t { color: var(--accent); }
.queue-item .qi-a { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --------------------------- модалка / тосты -------------------------- */

.modal {
  position: fixed; inset: 0; background: #000000a6; z-index: 60;
  display: grid; place-items: center; backdrop-filter: blur(4px);
}
.modal-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 24px; width: 400px;
  max-width: calc(100vw - 30px); max-height: 72vh; overflow-y: auto;
  box-shadow: var(--shadow);
}
.modal-card h3 { margin: 0 0 16px; font-size: 19px; }
.pl-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 10px;
  border-radius: var(--r-md); cursor: pointer;
}
.pl-item:hover { background: var(--panel-2); }
.pl-item .ico { color: var(--muted); }
.toasts { position: fixed; bottom: calc(var(--player-h) + 18px); right: 20px; z-index: 70;
  display: flex; flex-direction: column; gap: 9px; }
.toast {
  background: var(--panel-2); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  padding: 12px 17px; border-radius: var(--r-md); font-size: 13.5px;
  box-shadow: var(--shadow); animation: slide .22s ease;
}
@keyframes slide { from { opacity: 0; transform: translateX(24px); } }

/* ------------------------------ настроения ---------------------------- */

.moods { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; }
.mood-card {
  border-radius: var(--r-lg); padding: 20px; cursor: pointer;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 20%, var(--panel)) 0%, var(--panel) 70%);
  min-height: 122px; transition: .16s;
}
.mood-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.mood-card .m-name { font-size: 17px; font-weight: 700; }
.mood-card .m-count { color: var(--muted); font-size: 13px; margin-top: 7px; }
.bar { height: 6px; border-radius: var(--r-pill); background: #ffffff1a; margin: 14px 0; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: var(--r-pill); }

/* -------------------------------- прочее ------------------------------ */

.empty { color: var(--muted); padding: 34px 0; text-align: center; font-size: 14.5px; }
.notice {
  background: color-mix(in srgb, var(--accent) 12%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--r-md); padding: 13px 16px; margin-bottom: 18px; font-size: 13.5px;
}
.spinner {
  width: 24px; height: 24px; border: 2px solid #ffffff26; border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.only-mobile { display: none; }
.stat-row { display: flex; justify-content: space-between; padding: 11px 14px; border-radius: var(--r-md); }
.stat-row:nth-child(odd) { background: var(--panel); }
.stat-row .s-key { color: var(--muted); }

/* ------------------------------- адаптив ------------------------------ */

@media (max-width: 1000px) {
  .player { --strip-inset: 14px; grid-template-columns: minmax(0, 1fr) auto; padding: 0 14px; gap: 12px; }
  .time { display: none; }
  .np-side .np-actions { display: none; }
  .right-controls { display: none; }
  .content { padding: 20px 16px 50px; }
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; grid-template-areas: "main" "player"; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 268px; z-index: 50;
    transform: translateX(-100%); transition: .2s;
  }
  .sidebar.open { transform: none; }
  .only-mobile { display: inline-grid; }
  .row { grid-template-columns: 48px 1fr auto; }
  .row .idx { display: none; }
  .row .r-actions { opacity: 1; }
  .hero { flex-direction: column; align-items: flex-start; padding: 18px; }
  .hero-art img { width: 152px; height: 152px; }
  .hero h1 { font-size: 28px; }
  .wave-card { flex-direction: column; align-items: flex-start; }
  .queue { width: 100%; }
  .np { max-width: 62vw; }
  .topbar { padding: 12px 14px; }
  .grid.cards { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}


/* --------------------- большая «Моя волна» ----------------------------- */
/* Живой фон с плавающими волнами и крупным центром управления —
   в духе старого приложения Яндекс.Музыки. */

.wave-stage {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  min-height: 420px;
  display: grid;
  place-items: center;
  background: #0b0b0c;
  margin-bottom: 26px;
  isolation: isolate;
}
.wave-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wave-center {
  position: relative; z-index: 1; text-align: center;
  padding: 46px 24px; display: grid; gap: 13px; justify-items: center;
}
.wave-row { display: flex; align-items: center; gap: 16px; }
.wave-toggle {
  width: 64px; height: 64px; border-radius: 50%; border: 0; cursor: pointer;
  background: #fff; color: #0b0b0c; display: grid; place-items: center;
  box-shadow: 0 12px 34px #0009; transition: .15s;
}
.wave-toggle:hover { transform: scale(1.06); }
.wave-ico { width: 26px; height: 26px; fill: currentColor; }
.wave-title {
  margin: 0; font-size: clamp(30px, 5vw, 56px); font-weight: 700;
  letter-spacing: -0.02em; color: #fff;
}
.wave-setup {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  padding: 10px 18px; border-radius: var(--r-pill);
  border: 1px solid #ffffff2e; background: #ffffff14; color: #fff;
  font-size: 14px; font-weight: 500; backdrop-filter: blur(8px);
}
.wave-setup:hover { background: #ffffff22; }
.wave-now { color: #e6e6ee; font-size: 15px; max-width: 620px; }
.wave-info { color: #ffffff8c; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; }
.wave-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 4px; }
.wave-stage .btn-ghost { background: #ffffff16; border-color: #ffffff2e; color: #fff; }
.wave-stage .btn-ghost:hover { background: #ffffff26; color: #fff; }

.wave-settings { margin: 0 0 22px; }
.wave-settings .chips { margin-bottom: 4px; }
.ws-label {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted-2); margin: 14px 0 8px;
}

/* --------------------- полноэкранный плеер ----------------------------- */

.np-full { position: fixed; inset: 0; z-index: 70; background: #0b0b0c; display: grid; place-items: center; }
.npf-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .85; }
.npf-close { position: absolute; top: 20px; right: 20px; z-index: 3; }
.npf-body {
  position: relative; z-index: 2; width: 100%; max-width: 760px;
  display: grid; justify-items: center; gap: 16px; padding: 34px 24px;
}
.npf-art-wrap { width: min(42vh, 340px); aspect-ratio: 1; }
.npf-cover {
  width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-xl);
  background: var(--panel-2); box-shadow: 0 30px 90px #000b;
}
.npf-meta { text-align: center; display: grid; gap: 5px; }
.npf-title { font-size: clamp(20px, 3vw, 28px); font-weight: 700; }
.npf-artist { color: #d6d6de; font-size: 15px; }
.npf-artist:hover, .npf-title:hover { text-decoration: underline; }
.npf-album { color: var(--muted-2); font-size: 13px; }
.npf-progress { display: flex; align-items: center; gap: 12px; width: 100%; }
.npf-progress .range { flex: 1; }
.npf-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.ctrl.big { width: 52px; height: 52px; }
.ctrl.huge { width: 68px; height: 68px; }
.ctrl.huge .ico { width: 28px; height: 28px; }
/* пока открыт большой плеер, хотбар не нужен */
body.np-open .player { display: none; }

@media (max-width: 900px) {
  .wave-stage { min-height: 320px; }
  .wave-center { padding: 30px 18px; }
  .wave-toggle { width: 54px; height: 54px; }
  .npf-art-wrap { width: min(48vh, 280px); }
  .npf-controls { gap: 6px; }
  .ctrl.big { width: 46px; height: 46px; }
  .ctrl.huge { width: 60px; height: 60px; }
}


/* ------------------- настройки и панель владельца ---------------------- */

.user-button {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 8px; border-radius: var(--r-md); cursor: pointer;
  border: 1px solid transparent; background: transparent; text-align: left;
  color: inherit;
}
.user-button:hover { background: var(--panel); border-color: var(--line); }
.avatar { position: relative; }
.avatar .badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--accent); color: #0b0b0c;
  font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg-side);
}

.auth-note {
  margin-top: 14px; font-size: 13px; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 12px 14px; line-height: 1.45;
}

.settings { display: grid; gap: 6px; max-width: 560px; width: 100%; }
.settings-head { display: flex; align-items: center; gap: 13px; margin-bottom: 8px; }
.settings-name { font-size: 18px; font-weight: 700; }
.settings-label {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 16px 0 6px; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted-2);
}
.settings-empty { padding: 8px 0; line-height: 1.5; }
.admin-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--panel); margin-bottom: 6px;
}
.admin-main { flex: 1; min-width: 0; }
.admin-name { font-size: 14px; font-weight: 600; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.admin-name.mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: .04em; }
.btn-small { padding: 8px 13px; font-size: 12.5px; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

@media (max-width: 700px) {
  .admin-row { flex-wrap: wrap; }
  .admin-row .btn-small { flex: 1; }
}


/* ------------------- полоса прокрутки в стиле приложения ------------------- */
/* Раньше браузер рисовал её белой — теперь это тонкая серая полоска. */
* { scrollbar-width: thin; scrollbar-color: #ffffff26 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: #ffffff26; border-radius: 999px;
  border: 3px solid transparent; background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: #ffffff4d; background-clip: content-box; }
