/* ===========================================================
   МУРИНО ФМ — стили v2
   Дизайн-концепция: неоновый мем-стрим (розовый/фиолетовый на
   почти чёрном), по референсу пользователя. Сайдбар-карточка с
   мягким свечением по контуру, крупный хиро-баннер с танцующим
   маскотом, карточки звуков с "волной" и счётчиком прослушиваний.
   =========================================================== */

:root {
  --bg:          #0a0710;
  --surface:     #150e1e;
  --surface-2:   #1e1428;
  --border:      #2c1f3a;
  --text:        #f3eef7;
  --text-muted:  #a394b0;
  --pink:        #ff3fc7;
  --purple:      #b83bff;
  --blue:        #6fc7ff;
  --danger:      #ff5c7a;
  --gradient:    linear-gradient(90deg, var(--pink), var(--purple));

  --font-display: 'Montserrat', sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
  --font-script: 'Pacifico', cursive;

  --sidebar-w: 260px;
  --player-h: 92px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  height: 100%;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(ellipse 700px 500px at 15% 0%, rgba(184,59,255,0.10), transparent 55%),
    radial-gradient(ellipse 800px 600px at 100% 20%, rgba(255,63,199,0.08), transparent 55%);
}

button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--pink); color: #0a0710; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--border); }

/* =========================== LAYOUT =========================== */

.app {
  display: flex;
  gap: 18px;
  padding: 18px 18px 0;
  min-height: 100vh;
  padding-bottom: calc(var(--player-h) + 18px);
}

/* ---------------------------- Sidebar ---------------------------- */

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid rgba(255,63,199,0.25);
  border-radius: 20px;
  box-shadow: 0 0 40px rgba(184,59,255,0.08);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 18px;
  height: calc(100vh - 36px);
  overflow-y: auto;
}

.logo {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; padding: 0; margin: 0;
  cursor: pointer; text-align: left; color: inherit; font-family: inherit;
  transition: opacity 0.15s ease;
}
.logo:hover { opacity: 0.85; }
.logo__title { font-weight: 900; font-size: 19px; letter-spacing: 0.3px; }
.logo__accent {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo__crown { font-size: 15px; }

.nav { display: flex; flex-direction: column; gap: 3px; }

.nav__item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: transparent; border: none; border-radius: 10px;
  color: var(--text-muted);
  font-size: 13.5px; font-weight: 600; text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav__icon { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.nav__item:hover { background: var(--surface-2); color: var(--text); }
.nav__item.is-active {
  background: linear-gradient(90deg, rgba(255,63,199,0.18), rgba(184,59,255,0.10));
  color: var(--pink);
  box-shadow: inset 0 0 0 1px rgba(255,63,199,0.3);
}
.nav__item[hidden] { display: none !important; }

.sidebar__top {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.sidebar__top-heading {
  margin: 0; font-size: 12.5px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.sidebar__top-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.sidebar__top-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; cursor: pointer; border-radius: 6px; padding: 3px 4px;
  transition: background 0.15s ease;
}
.sidebar__top-row:hover { background: rgba(255,255,255,0.04); }
.sidebar__top-rank {
  font-family: var(--font-mono); font-weight: 700; font-size: 11px;
  color: var(--text-muted); width: 14px; flex-shrink: 0;
}
.sidebar__top-row:nth-child(1) .sidebar__top-rank { color: var(--pink); }
.sidebar__top-row:nth-child(2) .sidebar__top-rank { color: var(--purple); }
.sidebar__top-row:nth-child(3) .sidebar__top-rank { color: var(--blue); }
.sidebar__top-title {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text); font-weight: 600;
}
.sidebar__top-duration { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); flex-shrink: 0; }

.sidebar__account { min-height: 10px; }
.account-box { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 10px; background: var(--surface-2); }
.account-box__avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gradient); border: none; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  font-size: 12px; font-weight: 800; color: #0a0710; flex-shrink: 0;
}
.account-box__avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-box__name { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.account-box__badge {
  font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.5px; text-transform: uppercase;
  background: var(--gradient); color: #0a0710; padding: 2px 5px; border-radius: 999px; flex-shrink: 0;
}
.account-box__logout { margin-left: auto; background: none; border: none; color: var(--text-muted); font-size: 10.5px; text-decoration: underline; flex-shrink: 0; }
.account-box__logout:hover { color: var(--danger); }

.sidebar__social {
  margin-top: auto;
  display: flex; gap: 8px; justify-content: center;
  padding-top: 10px; border-top: 1px solid var(--border);
}
.sidebar__social a {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: var(--text-muted);
}
.sidebar__social a:hover { color: var(--pink); border-color: var(--pink); }

/* ----------------------------- Main ----------------------------- */

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 4px 18px; }

.search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 11px 18px; width: 380px; max-width: 45vw;
}
.search__icon { font-size: 14px; opacity: 0.6; flex-shrink: 0; }
.search input { background: none; border: none; outline: none; color: var(--text); font-size: 13.5px; width: 100%; }
.search input::placeholder { color: var(--text-muted); }

.topbar__actions { display: flex; align-items: center; gap: 10px; }
.topbar__right { display: flex; align-items: center; gap: 12px; }

.notif-wrap { position: relative; }
.notif-bell {
  position: relative; width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: 15px; display: flex; align-items: center; justify-content: center;
}
.notif-bell:hover { border-color: var(--pink); }
.notif-bell__badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--gradient); color: white;
  font-size: 10px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
  font-family: var(--font-mono);
}
.notif-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; width: 320px; max-height: 400px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5); overflow: hidden; z-index: 60;
  display: flex; flex-direction: column;
}
.notif-dropdown[hidden] { display: none; }
.notif-dropdown__heading { margin: 0; padding: 14px 16px; font-weight: 800; font-size: 13.5px; border-bottom: 1px solid var(--border); }
.notif-dropdown__list { overflow-y: auto; max-height: 340px; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 12.5px; line-height: 1.5; }
.notif-item:last-child { border-bottom: none; }
.notif-item.is-unread { background: rgba(255,63,199,0.06); }
.notif-item__time { display: block; margin-top: 4px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); }
.notif-empty { padding: 24px 16px; text-align: center; color: var(--text-muted); font-size: 12.5px; }

.content { padding: 0 4px 40px; }

.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 16px; }
.section-heading__title { font-size: 18px; font-weight: 800; margin: 0; display: flex; align-items: center; gap: 8px; }
.section-heading__title-lg { font-size: 30px; font-weight: 900; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.section-heading__subtitle { color: var(--text-muted); font-size: 13.5px; margin: 0; }
.link-btn { background: none; border: none; color: var(--pink); font-size: 12.5px; font-weight: 700; }
.link-btn:hover { text-decoration: underline; }

.view[hidden] { display: none; }

.empty-state { padding: 60px 20px; text-align: center; color: var(--text-muted); border: 1px dashed var(--border); border-radius: var(--radius); }

/* ============================ HERO ============================ */

.hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 480px;
  padding: 46px 60px;
  display: flex; align-items: center;
  background:
    radial-gradient(ellipse 700px 420px at 78% 45%, rgba(214,20,170,0.32), transparent 60%),
    radial-gradient(ellipse 500px 340px at 85% 25%, rgba(255,80,220,0.22), transparent 55%),
    linear-gradient(135deg, #0e0816 0%, #170c22 45%, #1e0f29 100%);
  border: 1px solid rgba(255,63,199,0.18);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.5) 1px, transparent 1px);
  background-size: 56px 56px; opacity: 0.05;
}

.hero__text { position: relative; z-index: 2; max-width: 460px; }
.hero__crown { font-size: 30px; display: inline-block; margin-bottom: 4px; filter: drop-shadow(0 0 10px rgba(255,80,220,0.8)); }
.hero__title { font-weight: 900; font-size: 46px; line-height: 1.03; text-transform: uppercase; color: #f5f0f7; margin: 0; }
.hero__title .accent {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 20px rgba(255,63,199,0.5));
}
.hero__subtitle { margin-top: 18px; color: #b9adc4; font-size: 14.5px; line-height: 1.6; max-width: 360px; }
.hero__actions { margin-top: 26px; display: flex; gap: 12px; }

.hero__badge-500k {
  position: absolute; top: 60px; right: 400px;
  font-family: var(--font-script); font-size: 26px; color: #ff6fd8;
  text-shadow: 0 0 12px rgba(255,111,216,0.9), 0 0 26px rgba(255,111,216,0.5);
  transform: rotate(-8deg); z-index: 2;
}
.hero__crown-small { position: absolute; top: 34px; right: 372px; font-size: 19px; transform: rotate(-14deg); filter: drop-shadow(0 0 8px rgba(255,111,216,0.7)); z-index: 2; }
.hero__badge-dollar {
  position: absolute; top: 46px; right: 100px;
  font-family: var(--font-script); font-size: 54px; color: #6fc7ff;
  text-shadow: 0 0 14px rgba(111,199,255,0.9), 0 0 30px rgba(111,199,255,0.5);
  transform: rotate(6deg); z-index: 2;
}

.hero__figure {
  position: absolute; right: 30px; bottom: 0; width: 400px; height: 100%; z-index: 1;
  display: flex; align-items: flex-end; justify-content: center;
}
.hero__figure-glow {
  position: absolute; left: 50%; bottom: 40px; width: 360px; height: 360px; margin-left: -180px;
  background: radial-gradient(circle, rgba(255,60,200,0.55), rgba(184,59,255,0.25) 55%, transparent 72%);
  filter: blur(10px); z-index: 0;
}
.hero__figure-img {
  position: relative; z-index: 1; height: 420px; width: auto;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.6)) drop-shadow(0 0 30px rgba(255,80,220,0.25));
  transform-origin: 50% 100%;
}

/* Танец включается классом is-dancing, когда реально играет музыка */
.hero__figure-img.is-dancing { animation: chill-groove 2.2s ease-in-out infinite; }
@keyframes chill-groove {
  0%   { transform: translateX(0)     translateY(0)     rotate(0deg)  skewX(0deg)  scale(1, 1); }
  15%  { transform: translateX(-16px) translateY(-4px)  rotate(-7deg) skewX(3deg)  scale(1.02, 0.98); }
  30%  { transform: translateX(-24px) translateY(2px)   rotate(-10deg) skewX(4deg) scale(1.03, 0.96); }
  42%  { transform: translateX(-14px) translateY(-8px)  rotate(-5deg) skewX(2deg)  scale(0.99, 1.03); }
  50%  { transform: translateX(0)     translateY(-10px) rotate(0deg)  skewX(0deg)  scale(0.98, 1.04); }
  58%  { transform: translateX(14px)  translateY(-8px)  rotate(5deg)  skewX(-2deg) scale(0.99, 1.03); }
  70%  { transform: translateX(24px)  translateY(2px)   rotate(10deg) skewX(-4deg) scale(1.03, 0.96); }
  85%  { transform: translateX(16px)  translateY(-4px)  rotate(7deg)  skewX(-3deg) scale(1.02, 0.98); }
  100% { transform: translateX(0)     translateY(0)     rotate(0deg)  skewX(0deg)  scale(1, 1); }
}
.hero__figure-glow.is-dancing { animation: glow-pulse 1.1s ease-in-out infinite; }
@keyframes glow-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.1); }
}

/* ============================ SOUND ROW / GRID ============================ */

.sound-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 200px;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.sound-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.sound-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.sound-card:hover { border-color: rgba(255,63,199,0.4); transform: translateY(-2px); background: var(--surface-2); }
.sound-card.is-playing { border-color: var(--pink); box-shadow: 0 0 0 1px rgba(255,63,199,0.3); }

.sound-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sound-card__avatar { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--surface-2); }
.sound-card__meta { min-width: 0; }
.sound-card__title { font-size: 13px; font-weight: 700; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sound-card__artist { font-size: 11px; color: var(--text-muted); margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sound-card__artist--link { cursor: pointer; width: fit-content; }
.sound-card__artist--link:hover { color: var(--pink); text-decoration: underline; }
.sound-card__duration { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); margin: 2px 0 0; }

.sound-card__wave { display: flex; align-items: center; gap: 8px; }
.sound-card__bars { flex: 1; display: flex; align-items: flex-end; gap: 2px; height: 22px; overflow: hidden; }
.sound-card__bars span {
  flex: 1; min-width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--pink), var(--purple));
  opacity: 0.35;
}
.sound-card.is-playing .sound-card__bars span { opacity: 0.9; animation: bar-bounce 0.8s ease-in-out infinite; }
@keyframes bar-bounce {
  0%, 100% { transform: scaleY(0.4); }
  50%      { transform: scaleY(1); }
}

.sound-card__play {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: var(--gradient); border: none; color: white;
  display: flex; align-items: center; justify-content: center; font-size: 11px;
}
.sound-card__play:hover { filter: brightness(1.1); }

.sound-card__stats {
  margin-top: 8px; display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted);
}

.sound-card__actions {
  margin-top: 6px; display: flex; align-items: center; gap: 4px;
  flex-wrap: wrap;
}

.sound-card__like, .sound-card__addlist {
  background: none; border: none; color: var(--text-muted);
  font-family: var(--font-mono); font-size: 10.5px;
  display: flex; align-items: center; gap: 3px;
  padding: 2px 4px; border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.sound-card__like:hover { color: var(--pink); background: rgba(255,63,199,0.08); }
.sound-card__like:active, .sound-card__addlist:active { transform: scale(0.9); }
.sound-card__like.is-liked { color: var(--pink); }
.sound-card__addlist:hover { color: var(--blue); background: rgba(111,199,255,0.08); }

.sound-card__comments, .sound-card__share {
  background: none; border: none; color: var(--text-muted);
  font-family: var(--font-mono); font-size: 10.5px;
  display: flex; align-items: center; gap: 3px;
  padding: 2px 4px; border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.sound-card__comments:hover { color: var(--pink); background: rgba(255,63,199,0.08); }
.sound-card__share:hover { color: var(--blue); background: rgba(111,199,255,0.08); }
.sound-card__comments:active, .sound-card__share:active { transform: scale(0.9); }

/* Кнопки владельца трека — свои звуки можно менять, если ты автор (или админ) */
.sound-card__owner-actions { display: flex; gap: 6px; margin-top: 8px; }
.sound-card__owner-actions button {
  flex: 1; padding: 6px; border-radius: 8px; font-size: 11px; font-weight: 600;
  background: transparent; border: 1px solid var(--border); color: var(--text-muted);
}
.sound-card__cover-btn:hover { border-color: var(--blue); color: var(--blue); }
.sound-card__delete-btn:hover { border-color: var(--danger); color: var(--danger); }
.sound-card__title-btn:hover { border-color: #facc15; color: #facc15; }

.sound-card__download {
  background: none; border: none; color: var(--text-muted);
  font-size: 13px; padding: 2px 4px; border-radius: 6px;
}
.sound-card__download:hover { color: var(--pink); background: rgba(255,63,199,0.08); }

.sound-card.is-hidden-track { opacity: 0.55; }
.sound-card__hidden-badge {
  display: inline-block; margin-top: 6px; font-family: var(--font-mono); font-size: 10px;
  background: rgba(255,92,122,0.12); color: var(--danger); padding: 3px 8px; border-radius: 999px;
}

/* ============================ PLAYLISTS ============================ */

.playlist-picker { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.playlist-picker__empty { color: var(--text-muted); font-size: 13px; padding: 10px 0; }
.playlist-picker__row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
}
.playlist-picker__row button {
  background: var(--gradient); border: none; color: white;
  font-size: 11.5px; font-weight: 700; padding: 6px 12px; border-radius: 999px;
}
.playlist-picker__row button:disabled { opacity: 0.5; cursor: default; }
.playlist-picker__count { color: var(--text-muted); font-weight: 500; font-size: 11.5px; margin-left: 6px; }

.playlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.playlist-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; cursor: pointer; transition: border-color 0.15s ease, transform 0.15s ease;
}
.playlist-card:hover { border-color: rgba(255,63,199,0.4); transform: translateY(-2px); }
.playlist-card__icon { font-size: 26px; margin-bottom: 10px; }
.playlist-card__name { font-weight: 700; font-size: 14.5px; margin: 0 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playlist-card__count { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); margin: 0; }

.playlist-detail__header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.playlist-detail__back { background: none; border: none; color: var(--text-muted); font-size: 13px; font-weight: 700; }
.playlist-detail__back:hover { color: var(--pink); }
.playlist-detail__delete {
  margin-left: auto; background: transparent; border: 1px solid var(--danger); color: var(--danger);
  padding: 8px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
}
.playlist-detail__delete:hover { background: var(--danger); color: #0a0710; }

.sound-card__remove {
  width: 100%; margin-top: 8px; padding: 6px; border-radius: 8px;
  background: transparent; border: 1px solid var(--border); color: var(--text-muted);
  font-size: 11px; font-weight: 600;
}
.sound-card__remove:hover { border-color: var(--danger); color: var(--danger); }

/* ============================ PROFILE ============================ */

.profile-banner {
  position: relative; width: 100%; height: 200px; border-radius: 18px;
  overflow: hidden; background: linear-gradient(135deg, var(--surface-2), var(--surface));
}
.profile-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-banner__edit {
  position: absolute; top: 12px; right: 12px;
  background: rgba(10,7,16,0.6); border: 1px solid rgba(255,255,255,0.2); color: white;
  padding: 8px 14px; border-radius: 999px; font-size: 12px; font-weight: 600;
  backdrop-filter: blur(4px);
}
.profile-banner__edit:hover { background: rgba(10,7,16,0.85); }

.profile-header { display: flex; align-items: flex-end; gap: 18px; padding: 0 8px; margin-top: -46px; position: relative; z-index: 2; flex-wrap: wrap; }

.profile-avatar-wrap { position: relative; width: 96px; height: 96px; flex-shrink: 0; }
.profile-avatar {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--bg); background: var(--surface-2); display: block;
}
.profile-avatar-wrap__edit {
  position: absolute; bottom: 2px; right: 2px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--gradient); border: 3px solid var(--bg); color: white;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.profile-avatar-wrap__edit:hover { filter: brightness(1.1); }

.profile-info { flex: 1; min-width: 200px; padding-bottom: 6px; display: flex; flex-direction: column; gap: 6px; }
.profile-name { font-size: 22px; font-weight: 900; display: flex; align-items: center; gap: 8px; margin: 0; }
.profile-bio { color: var(--text-muted); font-size: 13.5px; line-height: 1.5; max-width: 560px; margin: 0; }
.profile-bio.is-empty { font-style: italic; opacity: 0.6; }

.profile-stats-row { display: flex; gap: 14px; flex-wrap: wrap; }
.profile-stat {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 12px; color: var(--blue);
  width: fit-content;
}

.profile-social { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-social a {
  display: flex; align-items: center; gap: 5px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.profile-social a:hover { border-color: var(--pink); color: var(--pink); }

.profile-edit-btn { padding-bottom: 6px; }

.profile-tracks-heading { margin-top: 30px; }

/* ============================ ADMIN PANEL ============================ */

.admin-list { display: flex; flex-direction: column; gap: 8px; }
.admin-row {
  display: grid; grid-template-columns: 18px 46px 1fr auto auto auto;
  align-items: center; gap: 14px; padding: 10px 14px;
  border-radius: 10px; background: var(--surface); border: 1px solid var(--border);
}
.admin-row.is-hidden-track { border-color: rgba(255,92,122,0.3); background: rgba(255,92,122,0.04); }
.admin-row__cover { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; }
.admin-row__info { min-width: 0; }
.admin-row__title { font-size: 14px; font-weight: 700; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row__artist { font-size: 12px; color: var(--text-muted); margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row__plays { font-family: var(--font-mono); font-size: 12px; color: var(--blue); white-space: nowrap; }
.admin-row__delete {
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--danger); color: var(--danger);
  padding: 8px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.admin-row__delete:hover { background: var(--danger); color: #0a0710; }

.admin-row__toggle {
  display: flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--border); color: var(--text-muted);
  padding: 8px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.admin-row__toggle:hover { border-color: #facc15; color: #facc15; }
.admin-row__toggle.is-hidden { border-color: rgba(255,92,122,0.4); color: var(--danger); }

.application-row {
  display: grid; grid-template-columns: 1fr auto auto;
  align-items: center; gap: 14px; padding: 12px 14px;
  border-radius: 10px; background: var(--surface); border: 1px solid var(--border);
  margin-bottom: 8px;
}
.application-row__info { min-width: 0; }
.application-row__name { font-size: 14px; font-weight: 700; margin: 0; }
.application-row__meta { font-size: 12px; color: var(--text-muted); margin: 2px 0 0; }
.application-row__meta a { color: var(--blue); }
.application-row__actions { display: flex; gap: 8px; }
.application-row__actions button {
  padding: 8px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.application-row__approve { background: var(--gradient); border: none; color: white; }
.application-row__approve:hover { filter: brightness(1.1); }
.application-row__reject { background: transparent; border: 1px solid var(--danger); color: var(--danger); }
.application-row__reject:hover { background: var(--danger); color: #0a0710; }
.application-row__status {
  font-family: var(--font-mono); font-size: 11px; padding: 5px 10px; border-radius: 999px;
  white-space: nowrap;
}
.application-row__status.is-approved { background: rgba(74,222,128,0.12); color: #4ade80; }
.application-row__status.is-rejected { background: rgba(255,92,122,0.12); color: var(--danger); }

.author-row {
  display: grid; grid-template-columns: 40px 1fr auto auto;
  align-items: center; gap: 14px; padding: 10px 14px;
  border-radius: 10px; background: var(--surface); border: 1px solid var(--border);
  margin-bottom: 8px;
}
.author-row__avatar {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--surface-2);
}
.author-row__avatar-fallback {
  width: 40px; height: 40px; border-radius: 50%; background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; color: #0a0710; font-size: 14px;
}
.author-row__info { min-width: 0; }
.author-row__name { font-size: 14px; font-weight: 700; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.author-row__email { font-size: 12px; color: var(--text-muted); margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.author-row__tracks { font-family: var(--font-mono); font-size: 12px; color: var(--blue); white-space: nowrap; }
.author-row__revoke {
  background: transparent; border: 1px solid var(--danger); color: var(--danger);
  padding: 8px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.author-row__revoke:hover { background: var(--danger); color: #0a0710; }

/* ------------------------- Поиск и массовые действия в админке ------------------------- */

.admin-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 10px 16px; margin: 18px 0; max-width: 420px;
}
.admin-search input { background: none; border: none; outline: none; color: var(--text); font-size: 13.5px; width: 100%; }
.admin-search input::placeholder { color: var(--text-muted); }

.admin-select-all {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-muted); margin: 4px 0 10px; cursor: pointer;
}

.admin-bulk-bar {
  margin-left: auto; display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; color: var(--text-muted); flex-wrap: wrap;
}
.admin-bulk-bar[hidden] { display: none; }

.admin-row__checkbox { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--pink); }

/* =========================== PLAYER (BOTTOM BAR) =========================== */

.player {
  position: fixed; left: 18px; right: 18px; bottom: 18px;
  height: var(--player-h);
  background: var(--surface);
  border: 1px solid rgba(255,63,199,0.22);
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  display: grid;
  grid-template-columns: 260px 1fr 180px;
  align-items: center;
  gap: 20px;
  padding: 0 26px;
  z-index: 20;
}

.player__track { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player__cover { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--surface-2); flex-shrink: 0; border: 1px solid var(--border); }
.player__meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.player__title { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player__artist { font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.player__like {
  flex-shrink: 0; background: none; border: none; font-size: 17px;
  color: var(--text-muted); padding: 6px; border-radius: 50%;
  transition: transform 0.1s ease, color 0.15s ease, background 0.15s ease;
}
.player__like:hover:not(:disabled) { background: rgba(255,63,199,0.1); }
.player__like:active:not(:disabled) { transform: scale(0.85); }
.player__like.is-liked { color: var(--pink); }
.player__like:disabled { opacity: 0.3; cursor: default; }

.player__center { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.player__controls { display: flex; align-items: center; gap: 16px; }

.ctrl-btn {
  background: none; border: none; color: var(--text-muted);
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 15px; transition: transform 0.1s ease, color 0.15s ease, background 0.15s ease;
}
.ctrl-btn:hover { color: var(--text); }
.ctrl-btn:active { transform: scale(0.88); }
.ctrl-btn.is-active { color: var(--pink); }

.ctrl-btn--play {
  width: 42px; height: 42px; font-size: 15px;
  background: var(--gradient); color: white;
}
.ctrl-btn--play:hover { filter: brightness(1.1); color: white; }
.ctrl-btn--play:active { transform: scale(0.88); }

.player__seek { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; }
.player__time { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); min-width: 34px; text-align: center; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; background: var(--border); border-radius: 999px; outline: none; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: linear-gradient(to right, var(--pink) var(--progress, 0%), var(--border) 0); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: var(--pink); border: 2px solid #0a0710; margin-top: -4.5px;
  box-shadow: 0 0 0 2px var(--pink); transition: transform 0.1s ease;
}
input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 999px; background: var(--border); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--pink); }
input[type="range"]::-moz-range-thumb { width: 11px; height: 11px; border-radius: 50%; background: var(--pink); border: 2px solid #0a0710; }

.player__volume { display: flex; align-items: center; gap: 8px; justify-self: end; width: 150px; }
.volume-bar { width: 100%; }

/* =============================== MODALS =============================== */

.overlay { position: fixed; inset: 0; background: rgba(6,4,10,0.75); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; z-index: 70; padding: 20px; }
.overlay[hidden] { display: none; }

.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px; width: 100%; max-width: 420px; position: relative; max-height: 88vh; overflow-y: auto; }
.modal--wide { max-width: 560px; }

/* ---------------------------- Детали трека / комментарии ---------------------------- */

.track-detail__head { display: flex; gap: 16px; margin-bottom: 20px; }
.track-detail__cover-wrap { width: 110px; height: 110px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: var(--surface-2); }
.track-detail__cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.track-detail__info { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.track-detail__title { font-size: 17px; font-weight: 800; margin: 0; }
.track-detail__artist { font-size: 13px; color: var(--text-muted); margin: 0; }
.track-detail__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.track-detail__stats { font-family: var(--font-mono); font-size: 11.5px; color: var(--blue); margin: 4px 0 0; }

.track-detail__comments-heading { font-size: 13.5px; font-weight: 800; margin: 0 0 12px; }
.track-detail__comments-list { display: flex; flex-direction: column; gap: 12px; max-height: 260px; overflow-y: auto; margin-bottom: 14px; }
.track-detail__no-comments { color: var(--text-muted); font-size: 12.5px; text-align: center; padding: 16px 0; margin: 0; }
.track-detail__login-hint { color: var(--text-muted); font-size: 12.5px; text-align: center; margin: 8px 0 0; }

.comment-item { display: flex; gap: 10px; align-items: flex-start; }
.comment-item__avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  background: var(--gradient); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #0a0710;
}
.comment-item__avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-item__body { flex: 1; min-width: 0; }
.comment-item__meta { margin: 0; font-size: 11.5px; }
.comment-item__author { font-weight: 700; color: var(--text); }
.comment-item__time { color: var(--text-muted); margin-left: 6px; }
.comment-item__text { margin: 3px 0 0; font-size: 13px; line-height: 1.5; word-break: break-word; }
.comment-item__delete { background: none; border: none; color: var(--text-muted); font-size: 12px; flex-shrink: 0; }
.comment-item__delete:hover { color: var(--danger); }

.comment-form { display: flex; gap: 8px; align-items: flex-end; }
.comment-form textarea {
  flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; color: var(--text); font-size: 13px; font-family: inherit; resize: vertical;
}
.comment-form textarea:focus { border-color: var(--pink); outline: none; }

/* ------------------------------------- Кроппер ------------------------------------- */

.crop-viewport {
  position: relative; width: 100%; overflow: hidden; background: #000;
  border: 1px solid var(--border); touch-action: none;
}
.crop-viewport.is-avatar { aspect-ratio: 1 / 1; border-radius: 50%; max-width: 280px; margin: 0 auto; }
.crop-viewport.is-banner { aspect-ratio: 3 / 1; border-radius: 12px; }
.crop-viewport img {
  position: absolute; top: 50%; left: 50%; max-width: none; cursor: grab;
  user-select: none; -webkit-user-drag: none;
}
.crop-viewport img:active { cursor: grabbing; }
.modal__close { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); border: none; color: var(--text-muted); font-size: 18px; line-height: 1; }
.modal__close:hover { color: var(--text); }
.modal__title { font-weight: 900; font-size: 24px; margin: 0 0 4px; }
.modal__subtitle { color: var(--text-muted); font-size: 13px; margin: 0 0 20px; }

.tabs { display: flex; gap: 4px; margin-bottom: 20px; background: var(--surface-2); padding: 4px; border-radius: 10px; }
.tabs__item { flex: 1; padding: 9px; border: none; background: none; color: var(--text-muted); font-weight: 700; font-size: 13px; border-radius: 7px; }
.tabs__item.is-active { background: var(--gradient); color: white; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form[hidden] { display: none !important; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="url"], .field__textarea {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; color: var(--text); font-size: 14px; outline: none;
}
.field__textarea { font-family: inherit; resize: vertical; }
.field input:focus, .field__textarea:focus { border-color: var(--pink); }
.field input[type="file"] { font-size: 12.5px; color: var(--text-muted); }
.field__hint { font-size: 11px; color: var(--text-muted); }

.cover-preview { width: 90px; height: 90px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

.form__error { margin: 0; font-size: 12.5px; color: var(--danger); min-height: 16px; }
.form__hint-block {
  margin: 0; font-size: 12.5px; color: #4ade80; background: rgba(74,222,128,0.1);
  border: 1px solid rgba(74,222,128,0.3); border-radius: 8px; padding: 10px 12px; line-height: 1.5;
  word-break: break-word;
}

.load-more-wrap { display: flex; justify-content: center; margin-top: 20px; }

/* ============================== BUTTONS ============================== */

.btn { padding: 12px 22px; border-radius: 999px; border: none; font-weight: 700; font-size: 13.5px; font-family: inherit; display: inline-flex; align-items: center; gap: 8px; transition: transform 0.12s ease, filter 0.15s ease; }
.btn--primary { background: var(--gradient); color: white; box-shadow: 0 8px 22px rgba(255,63,199,0.3); }
.btn--primary:hover { filter: brightness(1.08); }
.btn--primary:active { transform: scale(0.96); }
.btn--primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn--ghost { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16); color: var(--text); }
.btn--ghost:hover { border-color: var(--pink); color: var(--pink); }
.btn--outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn--outline:hover { border-color: var(--pink); color: var(--pink); }
.btn--sm { padding: 9px 16px; font-size: 12.5px; }
.btn--block { width: 100%; justify-content: center; }

/* Toast-уведомления */
.toast-stack { position: fixed; top: 18px; right: 18px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--pink); padding: 12px 16px; border-radius: 8px; font-size: 13px; max-width: 300px; animation: toast-in 0.2s ease; }
.toast.is-error { border-left-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* =============================== RESPONSIVE =============================== */

.burger-btn {
  display: none; /* показываем только на мобильном (см. медиа-запрос ниже) */
  width: 38px; height: 38px; flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-size: 18px; align-items: center; justify-content: center;
}

.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0; background: rgba(6,4,10,0.6); z-index: 40;
}
.sidebar-backdrop[hidden] { display: none; }

@media (max-width: 1000px) {
  .burger-btn { display: flex; }

  /* Сайдбар становится выезжающей слева панелью, а не просто пропадает —
     иначе на телефоне не открыть ни один раздел, кроме Главной */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
    height: 100vh; width: 280px; max-width: 85vw;
    border-radius: 0; margin: 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-backdrop:not([hidden]) { display: block; }

  .app { padding: 12px; padding-bottom: calc(var(--player-h) + 100px); }
  .topbar { gap: 10px; }
  .search { width: 100%; max-width: none; flex: 1; }
  .topbar__right { flex-shrink: 0; }
  .topbar__actions .btn span, .topbar__actions .btn { white-space: nowrap; }

  .notif-dropdown { width: min(320px, calc(100vw - 24px)); right: -8px; }

  .player { left: 12px; right: 12px; bottom: 12px; grid-template-columns: 1fr; grid-template-rows: auto auto; height: auto; padding: 12px 16px; gap: 8px; }
  .player__volume { display: none; }
  .hero { flex-direction: column; padding: 30px 24px; min-height: auto; }
  .hero__figure { position: relative; width: 100%; height: 260px; right: auto; margin-top: 20px; }
  .hero__figure-img { height: 240px; }
  .hero__badge-500k, .hero__badge-dollar, .hero__crown-small { display: none; }

  .admin-row { grid-template-columns: 18px 40px 1fr; grid-template-areas: "check cover info" "toggle toggle toggle" "delete delete delete"; row-gap: 8px; }
  .admin-row__checkbox { grid-area: check; }
  .admin-row__cover { grid-area: cover; }
  .admin-row__info { grid-area: info; }
  .admin-row__plays { display: none; }
  .admin-row__toggle { grid-area: toggle; }
  .admin-row__delete { grid-area: delete; }

  .application-row { grid-template-columns: 1fr; }
  .application-row__actions { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .search input::placeholder { font-size: 12.5px; }
  .topbar__actions .btn--sm { padding: 8px 12px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__figure-img.is-dancing { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
