/* ==========================================================================
   Nexuz Music — единая тема
   ========================================================================== */

:root {
  --bg: #08080f;
  --bg-soft: #0c0c15;
  --surface: #11111c;
  --surface-2: #161624;
  --surface-3: #1d1d2f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f5f5fa;
  --muted: #9d9db3;
  --muted-2: #707089;
  --accent: #8b5cf6;
  --accent-2: #22d3ee;
  --accent-3: #ec4899;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --header-h: 72px;
  --player-h: 98px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 14px 36px rgba(0, 0, 0, 0.22);
  --gradient: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 55%, #22d3ee 140%);
  --gradient-soft: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(34, 211, 238, 0.06));
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(139, 92, 246, 0.18), transparent 62%),
    radial-gradient(900px 560px at 92% 4%, rgba(34, 211, 238, 0.1), transparent 60%),
    radial-gradient(900px 700px at 50% 110%, rgba(236, 72, 153, 0.06), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); }
button { font: inherit; color: inherit; }
input, select, textarea, button { font-family: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding-left: 1.2em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

::selection { background: rgba(139, 92, 246, 0.4); }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 200;
  background: var(--surface-3);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.icon { display: inline-block; vertical-align: -0.2em; flex: none; }

.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.text-danger { color: var(--danger); }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.mono { font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { color: var(--muted-2); margin: 0 2px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* --------------------------------- Шапка --------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 8, 15, 0.76);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: -0.02em;
  flex: none;
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 26px rgba(139, 92, 246, 0.45);
}
.brand-text { font-size: 16px; }

.main-nav { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; overflow: hidden; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 550;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.is-active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.24), rgba(34, 211, 238, 0.08));
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.25);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 190px;
  flex: none;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: border-color 0.18s, width 0.2s;
}
.header-search:focus-within { border-color: rgba(139, 92, 246, 0.6); width: 230px; }
.header-search input {
  border: 0; outline: 0; background: transparent; color: var(--text);
  width: 100%; font-size: 13.5px; min-width: 0;
}
.header-search input::placeholder { color: var(--muted-2); }

.header-actions { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }

.mobile-toggle { display: none; }

.mobile-nav {
  border-top: 1px solid var(--line);
  background: rgba(10, 10, 18, 0.98);
  padding: 10px 0 14px;
}
.mobile-nav-inner { display: flex; flex-direction: column; gap: 2px; }
.mobile-nav .nav-link { padding: 11px 12px; font-size: 14px; }
.nav-button { border: 0; background: transparent; text-align: left; width: 100%; cursor: pointer; }

/* ------------------------------ Пользователь ----------------------------- */

.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  background: var(--surface-3);
}
.avatar-sm { width: 30px; height: 30px; }
.avatar-lg { width: 84px; height: 84px; }

.user-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  padding: 4px 6px 4px 4px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.18s, border-color 0.18s;
}
.user-summary::-webkit-details-marker { display: none; }
.user-summary:hover { background: var(--surface-2); border-color: var(--line); }
.user-name { font-size: 13px; font-weight: 600; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dropdown { position: relative; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }

.dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 240px;
  background: rgba(18, 18, 30, 0.98);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 70;
  animation: dropIn 0.16s ease-out;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }

.dropdown-panel a,
.dropdown-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
}
.dropdown-panel a:hover,
.dropdown-button:hover { background: var(--surface-3); color: var(--text); }
.logout-form { margin: 0; }

.user-panel { width: 270px; }
.user-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.user-panel-head div { display: flex; flex-direction: column; min-width: 0; }
.user-panel-head strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.user-panel-head span { font-size: 12px; color: var(--muted); }

/* ---------------------------- Уведомления -------------------------------- */

.notif-dropdown .icon-button { position: relative; }
.notif-panel { width: 330px; padding: 0; overflow: hidden; }
.dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.dropdown-head a { color: var(--accent-2); width: auto; padding: 0; }
.notif-item {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start !important;
  gap: 2px !important;
  padding: 11px 15px !important;
  border-radius: 0 !important;
  border-bottom: 1px solid var(--line) !important;
}
.notif-item:last-child { border-bottom: 0 !important; }
.notif-item.is-unread { background: rgba(139, 92, 246, 0.08); }
.notif-title { font-size: 13px; font-weight: 650; color: var(--text); }
.notif-body { font-size: 12px; color: var(--muted); }
.notif-time { font-size: 11px; color: var(--muted-2); }
.empty-mini { padding: 24px; text-align: center; color: var(--muted); font-size: 13px; }

.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent-3);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}

/* ------------------------------- Основное -------------------------------- */

.main-content {
  min-height: calc(100vh - var(--header-h) - 220px);
  padding-top: 30px;
  padding-bottom: 170px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-title {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 750;
}
.page-subtitle { color: var(--muted); margin-top: 6px; font-size: 14px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.section { margin-top: 38px; }
.section:first-child { margin-top: 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.section-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-link { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.section-link:hover { color: var(--accent-2); }

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.breadcrumbs a:hover { color: var(--text); }

/* -------------------------------- Карточки ------------------------------- */

.card {
  background: linear-gradient(180deg, rgba(24, 24, 38, 0.9), rgba(15, 15, 25, 0.94));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.card-pad { padding: 20px; }
.card-flat { background: var(--surface); box-shadow: none; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.stat-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
}
.stat-label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-value { font-size: 26px; font-weight: 750; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-hint { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }

/* -------------------------------- Кнопки --------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.12s, background 0.18s, border-color 0.18s, box-shadow 0.18s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); border-color: rgba(255, 255, 255, 0.24); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 28px rgba(109, 40, 217, 0.32);
}
.btn-primary:hover { background: var(--gradient); filter: brightness(1.08); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); }

.btn-danger { color: #fff; background: linear-gradient(135deg, #e11d48, #9f1239); border-color: transparent; }
.btn-danger:hover { filter: brightness(1.08); }

.btn-sm { padding: 7px 12px; border-radius: 10px; font-size: 12.5px; }
.btn-wide { width: 100%; }
.btn-icon-only { padding: 9px; }

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.icon-button:hover { background: var(--surface-2); color: var(--text); }
.icon-button.is-active { color: var(--accent-2); background: rgba(34, 211, 238, 0.1); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.18s;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.is-active, .chip-active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(34, 211, 238, 0.12));
  border-color: rgba(139, 92, 246, 0.45);
}
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* -------------------------------- Формы ---------------------------------- */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.input, .select, .textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.7);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.select option { background: var(--surface-2); color: var(--text); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .span-2 { grid-column: span 2; }
.form-hint { font-size: 12px; color: var(--muted-2); }
.form-error {
  display: flex;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid rgba(251, 113, 133, 0.3);
  color: #fecdd3;
  font-size: 13px;
  margin-bottom: 14px;
}
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0;
}
.checkbox input {
  width: 17px; height: 17px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex: none;
}

.input-group { position: relative; }
.input-group .input { padding-right: 46px; }
.input-group .icon-button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px;
}

.file-drop {
  display: block;
  border: 1.5px dashed var(--line-strong);
  border-radius: 16px;
  padding: 34px 22px;
  text-align: center;
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 0.18s, background 0.18s;
  cursor: pointer;
}
.file-drop:hover, .file-drop.is-dragover { border-color: var(--accent); background: rgba(139, 92, 246, 0.06); }
.file-drop:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14); }
.file-drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}
.file-drop-title { font-weight: 650; margin-bottom: 6px; }

/* --------------------------- Прогресс загрузки --------------------------- */
.upload-progress {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}
.upload-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.upload-progress-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.upload-progress-percent {
  color: var(--accent-2);
  font-variant-numeric: tabular-nums;
}
.upload-progress-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.upload-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.2s ease;
}
.upload-progress.is-processing .upload-progress-bar {
  width: 100% !important;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--accent) 0 12px,
    rgba(34, 211, 238, 0.75) 12px 24px
  );
  background-size: 34px 34px;
  animation: upload-stripes 0.9s linear infinite;
}
.upload-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11.5px;
}
@keyframes upload-stripes {
  from { background-position: 0 0; }
  to { background-position: 34px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .upload-progress.is-processing .upload-progress-bar { animation: none; }
}

/* ------------------------------- Flash ----------------------------------- */

.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-size: 13.5px;
  margin-bottom: 18px;
  animation: fadeDown 0.25s ease-out;
}
.flash-ok { border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.08); color: #a7f3d0; }
.flash-error { border-color: rgba(251, 113, 133, 0.35); background: rgba(251, 113, 133, 0.08); color: #fecdd3; }
.flash span { flex: 1; }
.flash-close { border: 0; background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; opacity: 0.7; }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } }

/* --------------------------------- Hero ---------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(700px 380px at 80% -10%, rgba(139, 92, 246, 0.3), transparent 60%),
    radial-gradient(500px 340px at 100% 100%, rgba(34, 211, 238, 0.16), transparent 60%),
    linear-gradient(150deg, #151526 0%, #0e0e1a 70%);
  padding: clamp(28px, 5vw, 54px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 30px;
  align-items: center;
  box-shadow: var(--shadow);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.35;
  pointer-events: none;
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.7), transparent 70%);
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: #c4b5fd;
  margin-bottom: 14px;
}
.hero-title {
  font-size: clamp(34px, 6vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 800;
  max-width: 720px;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(120deg, #a78bfa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  color: var(--muted);
  font-size: clamp(14px, 1.7vw, 16px);
  max-width: 530px;
  margin-top: 16px;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.hero-stats { display: flex; gap: 26px; margin-top: 28px; flex-wrap: wrap; }
.hero-stat strong { display: block; font-size: 20px; font-weight: 750; letter-spacing: -0.03em; }
.hero-stat span { font-size: 12px; color: var(--muted); }

.hero-visual {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.vinyl {
  width: min(280px, 70vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #0a0a10 0 16%, #1a1a2a 16.5% 17%, transparent 17.5%),
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 7px),
    radial-gradient(circle at 35% 30%, #2a2a42, #0b0b14 60%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 0 40px rgba(0, 0, 0, 0.6);
  animation: spin 28s linear infinite;
  position: relative;
}
.vinyl::after {
  content: "";
  position: absolute;
  inset: 42%;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}
.vinyl-label {
  position: absolute;
  left: 18%;
  top: 12%;
  bottom: 12%;
  width: 30%;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.25), rgba(34, 211, 238, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
  transform: rotate(-8deg);
  z-index: 2;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------- Списки треков --------------------------- */

.track-list { display: flex; flex-direction: column; gap: 2px; }

.track-row {
  display: grid;
  grid-template-columns: 40px 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 11px;
  padding: 7px 9px;
  border-radius: 13px;
  transition: background 0.16s;
}
.track-row:hover { background: rgba(255, 255, 255, 0.045); }
.track-row.is-current { background: rgba(139, 92, 246, 0.12); box-shadow: inset 0 0 0 1px rgba(139, 92, 246, 0.2); }

.track-play {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.18s;
}
.track-play:hover { color: #fff; background: var(--gradient); border-color: transparent; transform: scale(1.05); }
.track-play.is-disabled { cursor: default; opacity: 0.45; border-style: dashed; }
.track-play.is-disabled:hover { background: transparent; transform: none; color: var(--muted); }

.track-cover {
  width: 40px; height: 40px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-3);
  flex: none;
}
.track-cover img { width: 100%; height: 100%; object-fit: cover; }

.track-main { min-width: 0; }
.track-title {
  display: block;
  font-size: 14px;
  font-weight: 620;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.track-title:hover { color: #c4b5fd; }
.track-sub {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.track-sub a:hover { color: var(--text); }

.track-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.track-plays { display: inline-flex; align-items: center; gap: 3px; }
.track-download { width: 30px; height: 30px; }
.track-duration { min-width: 40px; text-align: right; }

.status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.status-approved { color: #a7f3d0; background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.25); }
.status-pending { color: #fde68a; background: rgba(251, 191, 36, 0.1); border-color: rgba(251, 191, 36, 0.25); }
.status-in_review { color: #bae6fd; background: rgba(56, 189, 248, 0.1); border-color: rgba(56, 189, 248, 0.25); }
.status-changes_requested { color: #fbcfe8; background: rgba(236, 72, 153, 0.1); border-color: rgba(236, 72, 153, 0.25); }
.status-rejected, .status-taken_down { color: #fecdd3; background: rgba(251, 113, 133, 0.1); border-color: rgba(251, 113, 133, 0.25); }
.status-draft { color: var(--muted); background: var(--surface-2); }

/* ------------------------------- Сетки карточек -------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 18px;
}
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
}
.album-card { min-width: 0; }
.album-cover-wrap {
  position: relative;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-3);
  box-shadow: var(--shadow-soft);
}
.album-cover-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.album-card:hover .album-cover-wrap img { transform: scale(1.04); }
.album-cover-wrap .album-play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 0;
  background: var(--gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.2s;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}
.album-card:hover .album-cover-wrap .album-play { opacity: 1; transform: translateY(0); }
.album-title { margin-top: 10px; font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  transition: 0.18s;
}
.chip-link:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }
.chip-count { font-size: 11px; color: var(--muted-2); }

.genre-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.genre-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  transition: 0.18s;
}
.genre-pill:hover { color: var(--text); border-color: rgba(139, 92, 246, 0.4); background: rgba(139, 92, 246, 0.1); }
.genre-pill span { font-size: 11px; color: var(--muted-2); }

/* ------------------------------- Детали трека ---------------------------- */

.detail-hero {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: end;
  padding: 26px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(31, 31, 52, 0.9), rgba(13, 13, 23, 0.92));
  box-shadow: var(--shadow);
}
.detail-cover {
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  background: var(--surface-3);
}
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { min-width: 0; }
.detail-kicker { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-2); font-weight: 700; margin-bottom: 10px; }
.detail-title { font-size: clamp(26px, 4vw, 46px); line-height: 1.05; letter-spacing: -0.045em; font-weight: 780; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 13px; margin-top: 14px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.detail-stats { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 18px; font-size: 12px; color: var(--muted-2); }
.detail-stats strong { color: var(--text); font-weight: 650; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; margin-top: 22px; align-items: start; }
.detail-side { display: flex; flex-direction: column; gap: 16px; }
.side-card { padding: 18px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.side-title { font-size: 13px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.side-list { display: flex; flex-direction: column; gap: 8px; }
.side-row { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.side-row strong { color: var(--text); font-weight: 600; text-align: right; overflow: hidden; text-overflow: ellipsis; }

.lyrics-placeholder { padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 16px; }

/* ----------------------------- Плеер ------------------------------------- */

.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  background: rgba(12, 12, 21, 0.92);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.35);
}

.player-progress-wrap { position: relative; height: 5px; background: rgba(255, 255, 255, 0.06); }
.player-progress { position: absolute; inset: 0; }
.player-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.15s linear; }
.player-seek { position: absolute; inset: -4px 0; width: 100%; opacity: 0; cursor: pointer; }

.player-inner {
  max-width: 1220px;
  margin: 0 auto;
  min-height: calc(var(--player-h) - 5px);
  padding: 10px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

.player-track { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-cover-link {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface-3);
  flex: none;
}
.player-cover-link img { width: 100%; height: 100%; object-fit: cover; }
.player-cover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  opacity: 0;
  transition: opacity 0.18s;
}
.player-cover-link:hover .player-cover-overlay { opacity: 1; }
.player-meta { min-width: 0; display: flex; flex-direction: column; }
.player-title { font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-title:hover { color: #c4b5fd; }
.player-artist { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-like { width: 34px; height: 34px; flex: none; }
.player-like.is-liked { color: var(--accent-3); }

.player-center { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.player-controls { display: flex; align-items: center; gap: 2px; }
.player-btn {
  width: 36px; height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.18s;
}
.player-btn:hover { color: var(--text); background: var(--surface-2); }
.player-btn.is-active { color: var(--accent-2); }
.player-play {
  width: 46px; height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin: 0 3px;
  box-shadow: 0 8px 24px rgba(109, 40, 217, 0.42);
  transition: 0.18s;
}
.player-play:hover { transform: scale(1.05); filter: brightness(1.08); }
.player-play:active { transform: scale(0.96); }
.player-times { display: flex; gap: 5px; font-size: 10.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.player-times-sep { opacity: 0.5; }

.player-right { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.player-volume { display: flex; align-items: center; gap: 4px; }
.player-volume input[type="range"] { width: 84px; accent-color: var(--accent); }
.player-btn[hidden] { display: none; }

.player-queue-panel {
  position: absolute;
  right: 20px;
  bottom: calc(100% + 10px);
  width: min(380px, calc(100vw - 40px));
  max-height: min(440px, 55vh);
  overflow: auto;
  background: rgba(16, 16, 27, 0.98);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 8px;
}
.player-queue-head {
  position: sticky;
  top: -8px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(16, 16, 27, 0.98);
  border-bottom: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
}
.player-queue-head strong { font-size: 13px; }
.player-queue-head span { font-size: 11px; color: var(--muted); flex: 1; }
.player-queue-head .icon-button { width: 30px; height: 30px; }
.player-queue-list { display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.queue-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border-radius: 10px;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-align: left;
  width: 100%;
}
.queue-item:hover { background: var(--surface-2); color: var(--text); }
.queue-item.is-current { background: rgba(139, 92, 246, 0.14); color: var(--text); }
.queue-item img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex: none; }
.queue-item div { min-width: 0; display: flex; flex-direction: column; }
.queue-item strong { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-item span { font-size: 11px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-item .queue-duration { margin-left: auto; font-size: 11px; color: var(--muted-2); }

/* --------------------------------- Подвал -------------------------------- */

.site-footer { border-top: 1px solid var(--line); background: rgba(8, 8, 15, 0.6); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr auto;
  gap: 26px;
  padding-top: 26px;
  padding-bottom: 28px;
  align-items: start;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 6px; }
.footer-inner p { font-size: 12px; color: var(--muted-2); max-width: 360px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12.5px; color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 12px; color: var(--muted-2); }

/* ------------------------------- Пустые состояния ------------------------ */

.empty-state {
  padding: 44px 22px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.012);
  color: var(--muted);
}
.empty-icon {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
}
.empty-state p { font-size: 13.5px; max-width: 420px; margin: 0 auto; }

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 24px; }
.pagination a, .pagination span {
  min-width: 36px; height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
}
.pagination .is-active { background: var(--gradient); color: #fff; border-color: transparent; }

/* --------------------------------- Авторизация --------------------------- */

.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: stretch;
  max-width: 980px;
  margin: 10px auto 0;
}
.auth-side {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  padding: clamp(26px, 4vw, 42px);
  background:
    radial-gradient(500px 360px at 90% 0%, rgba(139, 92, 246, 0.34), transparent 65%),
    radial-gradient(400px 300px at 0% 100%, rgba(34, 211, 238, 0.14), transparent 60%),
    linear-gradient(155deg, #171728, #0d0d18);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 460px;
}
.auth-side-title { font-size: clamp(30px, 4vw, 46px); line-height: 1.02; letter-spacing: -0.045em; font-weight: 800; }
.auth-side-sub { color: var(--muted); margin-top: 14px; font-size: 14px; max-width: 380px; }
.auth-points { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.auth-point { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.auth-point span { width: 28px; height: 28px; border-radius: 9px; background: rgba(255, 255, 255, 0.06); display: inline-flex; align-items: center; justify-content: center; color: var(--accent-2); }
.auth-card { padding: clamp(24px, 4vw, 38px); display: flex; flex-direction: column; justify-content: center; }
.auth-title { font-size: 27px; font-weight: 750; letter-spacing: -0.035em; }
.auth-sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; margin-bottom: 22px; }
.auth-footer { margin-top: 20px; font-size: 13px; color: var(--muted); text-align: center; }
.auth-footer a { color: #c4b5fd; font-weight: 600; }
.auth-footer a:hover { color: #fff; }

/* ---------------------------------- Чат ---------------------------------- */

.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.chat-card { display: flex; flex-direction: column; height: min(70vh, 680px); overflow: hidden; }
.chat-messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.chat-message { display: flex; gap: 10px; align-items: flex-start; }
.chat-message .avatar { width: 34px; height: 34px; flex: none; }
.chat-bubble { min-width: 0; max-width: min(620px, 85%); }
.chat-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.chat-meta strong { font-size: 12.5px; }
.chat-meta time { font-size: 10.5px; color: var(--muted-2); }
.chat-text {
  padding: 9px 13px;
  border-radius: 4px 14px 14px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat-message.is-self .chat-text { background: rgba(139, 92, 246, 0.14); border-color: rgba(139, 92, 246, 0.25); }
.chat-track {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  padding: 5px 9px;
  border-radius: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-form .input { border-radius: 12px; }
.chat-form button { flex: none; }
.chat-side { display: flex; flex-direction: column; gap: 14px; }
.chat-track-select { max-height: 220px; }
.chat-empty { margin: auto; text-align: center; color: var(--muted); font-size: 13px; }

/* --------------------------------- Админка ------------------------------- */

.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; padding-bottom: 4px; }
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
}
.admin-tab:hover { background: var(--surface-2); color: var(--text); }
.admin-tab.is-active { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }

.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-card { padding: 18px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.admin-card-title { font-size: 13px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 7px; }

.chart { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 8px; }
.chart-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; min-width: 2px; }
.chart-bar { width: 100%; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #a78bfa, #6d28d9); min-height: 0; transition: height 0.3s; }
.chart-col:hover .chart-bar { filter: brightness(1.2); }
.chart-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 4px 7px;
  font-size: 10px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 2;
}
.chart-col:hover .chart-tip { opacity: 1; }
.chart-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted-2); margin-top: 5px; }

.data-table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--line); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 620px; }
.data-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-weight: 650;
  white-space: nowrap;
}
.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.data-table .cell-title { font-weight: 600; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-table .cell-sub { font-size: 11px; color: var(--muted); }
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.queue-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 18px; align-items: start; }
.queue-list { display: flex; flex-direction: column; gap: 2px; max-height: 70vh; overflow-y: auto; }
.queue-list-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.queue-list-item:hover { background: var(--surface-2); }
.queue-list-item.is-active { background: rgba(139, 92, 246, 0.14); border-color: rgba(139, 92, 246, 0.25); }
.queue-list-item strong { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-list-item span { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mod-detail { padding: 20px; }
.mod-detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; flex-wrap: wrap; }
.mod-detail-title { font-size: 22px; font-weight: 750; letter-spacing: -0.03em; }
.mod-audio { width: 100%; margin: 16px 0; }
.mod-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { position: relative; padding: 0 0 14px 18px; border-left: 1px solid var(--line); }
.timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -4px; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.timeline-title { font-size: 12.5px; font-weight: 600; }
.timeline-meta { font-size: 11px; color: var(--muted-2); margin-top: 2px; }

/* ---------------------------------- Профиль ------------------------------ */

.profile-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(29, 29, 48, 0.9), rgba(12, 12, 21, 0.92));
  flex-wrap: wrap;
}
.profile-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line-strong); }
.profile-main { flex: 1; min-width: 220px; }
.profile-name { font-size: 28px; font-weight: 780; letter-spacing: -0.04em; }
.profile-handle { color: var(--muted); font-size: 13px; margin-top: 2px; }
.profile-bio { color: var(--muted); font-size: 13.5px; margin-top: 8px; max-width: 640px; }
.profile-stats { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 16px; }
.profile-stat strong { display: block; font-size: 18px; font-weight: 750; }
.profile-stat span { font-size: 11.5px; color: var(--muted); }

/* ---------------------------------- Прочее ------------------------------- */

.mini-list { display: flex; flex-direction: column; gap: 7px; }
.mini-row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--muted); }
.mini-row .num { width: 18px; text-align: right; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.mini-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-row .value { font-variant-numeric: tabular-nums; color: var(--text); }

.info-list { display: flex; flex-direction: column; gap: 10px; }
.info-row { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.info-row:last-child { border-bottom: 0; padding-bottom: 0; }
.info-row span { color: var(--muted); }
.info-row strong { font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.code-block {
  padding: 12px 14px;
  border-radius: 12px;
  background: #0a0a12;
  border: 1px solid var(--line);
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 12.5px;
  color: #c4b5fd;
  overflow-x: auto;
}

.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.copy-btn { cursor: pointer; }

.track-detail-list { display: flex; flex-direction: column; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.profile-preview { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 24px; }

.upload-progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.upload-progress span { display: block; height: 100%; width: 0; background: var(--gradient); transition: width 0.2s; }

/* ------------------------------ Дополнения ------------------------------- */

.search-hero {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  max-width: 760px;
}
.search-hero:focus-within { border-color: rgba(139, 92, 246, 0.6); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12); }
.search-hero input[type="search"] {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
}
.search-hero input::placeholder { color: var(--muted-2); }

.home-columns { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr); gap: 24px; margin-top: 38px; align-items: start; }
.home-side { display: flex; flex-direction: column; gap: 16px; }
.side-cta { background: linear-gradient(150deg, rgba(139, 92, 246, 0.12), var(--surface)); }

.artist-mini-list { display: flex; flex-direction: column; gap: 4px; }
.artist-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 11px;
  transition: background 0.16s;
}
.artist-mini:hover { background: var(--surface-2); }
.artist-mini img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); flex: none; }
.artist-mini > span { display: flex; flex-direction: column; min-width: 0; }
.artist-mini strong { font-size: 13px; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artist-mini small { font-size: 11px; color: var(--muted); }
.artist-rank { width: 20px; text-align: right; font-size: 11px; color: var(--muted-2); flex: none; }

.playlist-list { display: flex; flex-direction: column; gap: 8px; }
.playlist-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: 0.18s;
}
.playlist-card:hover { border-color: rgba(139, 92, 246, 0.34); background: var(--surface-2); }
.playlist-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.24), rgba(34, 211, 238, 0.1));
  color: #c4b5fd;
  flex: none;
}
.playlist-card-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.playlist-card-main strong { font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playlist-card-main span { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playlist-card-arrow { transform: rotate(-90deg); color: var(--muted-2); }

.wave-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(26px, 5vw, 46px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(600px 340px at 85% 10%, rgba(34, 211, 238, 0.18), transparent 60%),
    radial-gradient(600px 360px at 10% 100%, rgba(139, 92, 246, 0.24), transparent 60%),
    linear-gradient(150deg, #171728, #0c0c17);
  box-shadow: var(--shadow);
}
.wave-visual { color: rgba(255, 255, 255, 0.13); flex: none; animation: pulseWave 4s ease-in-out infinite; }
@keyframes pulseWave { 0%, 100% { transform: scale(1); opacity: 0.4; } 50% { transform: scale(1.06); opacity: 0.7; } }

.btn.is-liked { color: #fbcfe8; border-color: rgba(236, 72, 153, 0.4); background: rgba(236, 72, 153, 0.1); }

.chip input { display: none; }
.chip:has(input:checked) { color: var(--text); background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(34, 211, 238, 0.12)); border-color: rgba(139, 92, 246, 0.45); }

.track-manage-list { display: flex; flex-direction: column; gap: 10px; }
.track-manage { overflow: hidden; }
.track-manage-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}
.track-manage-summary::-webkit-details-marker { display: none; }
.track-manage-summary img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); flex: none; }
.track-manage-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.track-manage-title strong { font-size: 13.5px; font-weight: 640; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-manage-title small { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-manage-body { padding: 4px 16px 18px; border-top: 1px solid var(--line); padding-top: 16px; }

.notif-page-list { display: flex; flex-direction: column; gap: 8px; }
.notif-page-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: background 0.18s, border-color 0.18s;
}
.notif-page-item:hover { background: var(--surface-2); border-color: var(--line-strong); }
.notif-page-item.is-unread { background: rgba(139, 92, 246, 0.07); border-color: rgba(139, 92, 246, 0.24); }
.notif-page-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  color: var(--accent-2);
  flex: none;
}
.notif-page-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-page-main strong { font-size: 13.5px; }
.notif-page-main span { font-size: 12.5px; color: var(--muted); }
.notif-page-main small { font-size: 11px; color: var(--muted-2); }

.inline-form { margin: 0; }

/* -------------------------------- Адаптив -------------------------------- */

@media (max-width: 1180px) {
  .main-nav { display: none; }
  .mobile-toggle { display: inline-flex; }
  .header-search { margin-left: auto; }
}

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .home-columns { grid-template-columns: 1fr; }
  .wave-visual { display: none; }
  .search-hero { flex-wrap: wrap; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-hero { grid-template-columns: 160px minmax(0, 1fr); }
  .auth-layout { grid-template-columns: 1fr; max-width: 520px; }
  .auth-side { min-height: 220px; }
  .auth-points { display: none; }
  .chat-layout { grid-template-columns: 1fr; }
  .chat-side { display: none; }
  .queue-layout { grid-template-columns: 1fr; }
  .queue-list { max-height: 320px; }
  .admin-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-copy { grid-column: span 2; }
}

@media (max-width: 820px) {
  .header-search { display: none; }
  .user-name { display: none; }
  .header-upload { display: none; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-hero { grid-template-columns: 1fr; }
  .detail-cover { max-width: 220px; }
  .player-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "track right" "center center";
    gap: 6px 12px;
    padding: 8px 14px 10px;
  }
  .player-track { grid-area: track; }
  .player-center { grid-area: center; }
  .player-right { grid-area: right; }
  .player-volume { display: none; }
  .player-like { display: none; }
  .player-cover-link { width: 46px; height: 46px; }
  .player-times { display: none; }
  .player-queue-panel { bottom: calc(100% + 6px); right: 10px; }
  .main-content { padding-bottom: 210px; }
}

@media (max-width: 640px) {
  .container { padding-left: 14px; padding-right: 14px; }
  .header-inner { gap: 10px; min-height: 64px; }
  .brand-text { display: none; }
  .main-content { padding-top: 20px; }
  .track-row { grid-template-columns: 36px 38px minmax(0, 1fr) auto; gap: 8px; }
  .track-cover { width: 36px; height: 36px; }
  .track-play { width: 32px; height: 32px; }
  .track-plays { display: none; }
  .track-row .track-download { display: none; }
  .track-meta { gap: 6px; }
  .status { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .card-grid, .album-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 13px; }
  .hero { padding: 24px 20px; }
  .hero-stats { gap: 18px; }
  .footer-inner { grid-template-columns: 1fr; gap: 18px; }
  .footer-copy { grid-column: auto; }
  .detail-hero { padding: 18px; gap: 18px; }
  .detail-cover { max-width: 160px; }
  .profile-hero { padding: 18px; }
  .profile-avatar { width: 72px; height: 72px; }
  .chat-card { height: 72vh; }
  .player-queue-panel { width: calc(100vw - 20px); right: 10px; }
  .data-table { min-width: 560px; }
  .section { margin-top: 28px; }
}

@media (max-width: 420px) {
  .header-actions .btn { padding: 7px 10px; }
  .header-actions .btn-ghost { display: none; }
  .player-title { font-size: 12.5px; }
  .player-artist { font-size: 11px; }
  .stat-value { font-size: 22px; }
  .stat-grid { gap: 8px; }
}

/* --------------------------------- Toast --------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--player-h) + 24px);
  transform: translate(-50%, 14px);
  z-index: 120;
  max-width: min(460px, calc(100vw - 32px));
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(26, 26, 42, 0.98);
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 13px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast-error { border-color: rgba(251, 113, 133, 0.4); }

@media (max-width: 820px) {
  .toast { bottom: 178px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
