:root {
  --bg-color: #0b1428;
  --glass-bg: rgba(18, 26, 44, 0.55);
  --glass-bg-hover: rgba(22, 34, 56, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(155, 89, 182, 0.35);
  --purple-accent: #9b59b6;
  --purple-glow: rgba(155, 89, 182, 0.25);
  --text-main: #ffffff;
  --text-muted: #98a8c8;
  --radius: 18px;
  --shadow-glass: 0 8px 40px rgba(0, 0, 0, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 120px;
}

body::before, body::after {
  content: '';
  position: fixed;
  pointer-events: none;
  z-index: 0;
}
body::before {
  top: -30%;
  left: -20%;
  width: 70%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(155, 89, 182, 0.2), transparent 70%);
}
body::after {
  bottom: -20%;
  right: -20%;
  width: 60%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(52, 152, 219, 0.14), transparent 70%);
}

/* === Верхняя панель === */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2.5rem;
  background: rgba(10, 18, 34, 0.45);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-weight: 800;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  text-shadow: 0 0 14px rgba(155, 89, 182, 0.35);
  font-size: 1.1rem;
}

.btn-admin {
  padding: 0.6rem 1.4rem;
  background: var(--purple-accent);
  color: white;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(155, 89, 182, 0.35);
}
.btn-admin:hover {
  background: #8e4ca8;
  transform: translateY(-2px);
}

/* === Основная сетка === */
.page-layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

/* === Стекло === */
.glass-block {
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(1.3);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-glass);
}

/* === Левое меню === */
.sidebar {
  align-self: start;
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.sidebar .glass-block {
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  box-shadow: none;
}
.sidebar > .glass-block:first-child {
  padding: 1.4rem 1.2rem;
}
.menu {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.menu-item {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.8rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 0.95rem;
}
.menu-item:hover, .menu-item.active {
  background: rgba(155, 89, 182, 0.14);
  border-color: rgba(155, 89, 182, 0.4);
  color: var(--purple-accent);
  box-shadow: 0 0 16px rgba(155, 89, 182, 0.22);
  transform: translateX(4px);
}
.sidebar-footer {
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* === Строки статистики в сайдбаре === */
.stat-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.stat-row:last-child { margin-bottom: 0; }
.stat-icon { color: var(--purple-accent); flex-shrink: 0; }
.stat-row b { color: #fff; font-weight: 600; }

/* === ТОП 10 — ОТДЕЛЬНЫЙ БЛОК === */
.sidebar-top-tracks { padding: 1.4rem 1.2rem; }
.sidebar-top-header {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 1rem; font-size: 0.9rem; font-weight: 700; color: #fff;
  padding-bottom: 0.8rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-top-icon { color: var(--purple-accent); flex-shrink: 0; }
.sidebar-top-list { display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-top-loader { text-align: center; color: var(--text-muted); font-size: 0.85rem; padding: 1rem 0; }
.sidebar-top-item {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.55rem 0.5rem; border-radius: 10px;
  cursor: pointer; transition: all 0.25s ease; border: 1px solid transparent;
}
.sidebar-top-item:hover { background: rgba(155, 89, 182, 0.14); border-color: rgba(155, 89, 182, 0.3); }
.sidebar-top-item.playing { background: rgba(155, 89, 182, 0.18); border-color: rgba(155, 89, 182, 0.45); }
.sidebar-top-rank {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; color: #fff; flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
}
.sidebar-top-item:nth-child(1) .sidebar-top-rank { background: linear-gradient(135deg, #f1c40f, #e67e22); box-shadow: 0 2px 8px rgba(241, 196, 15, 0.4); }
.sidebar-top-item:nth-child(2) .sidebar-top-rank { background: linear-gradient(135deg, #bdc3c7, #95a5a6); box-shadow: 0 2px 8px rgba(189, 195, 199, 0.3); }
.sidebar-top-item:nth-child(3) .sidebar-top-rank { background: linear-gradient(135deg, #cd7f32, #a0522d); box-shadow: 0 2px 8px rgba(205, 127, 50, 0.3); }
.sidebar-top-cover { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.sidebar-top-cover-vinyl {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, #1e2940, #14203a); position: relative; overflow: hidden;
}
.sidebar-top-cover-vinyl::before {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #1a1a2e 0%, #16213e 30%, #0f0f1a 60%, #0a0a12 100%);
}
.sidebar-top-cover-vinyl::after {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 22%; aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-accent), #6c3483);
}
.sidebar-top-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 0.1rem; overflow: hidden; }
.sidebar-top-title { font-size: 0.82rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-top-artist { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-top-plays { display: flex; align-items: center; gap: 3px; font-size: 0.68rem; color: var(--text-muted); flex-shrink: 0; }
.sidebar-top-plays svg { width: 11px; height: 11px; color: var(--purple-accent); }

/* === Центральная область === */
.main-area {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0; /* ЭТО САМОЕ ВАЖНОЕ: разрешает сжиматься детям, чтобы работал overflow */
}

/* === Категории === */
.categories-bar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 1.2rem 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(1.3);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-glass);
}
.category-chip {
  padding: 0.55rem 1.3rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.category-chip:hover {
  background: rgba(155, 89, 182, 0.18);
  border-color: rgba(155, 89, 182, 0.45);
  color: #fff;
  box-shadow: 0 0 14px rgba(155, 89, 182, 0.2);
}
.category-chip.active {
  background: rgba(155, 89, 182, 0.3);
  border-color: var(--purple-accent);
  color: #fff;
  box-shadow: 0 0 18px rgba(155, 89, 182, 0.35);
}

/* === Поисковая строка перед треками === */
.search-area {
  padding: 0 0.5rem;
  margin-bottom: 1.5rem;
}
.search-box-inline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(1.3);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 0.8rem 1.3rem;
  box-shadow: var(--shadow-glass);
  transition: all 0.25s ease;
}
.search-box-inline:focus-within {
  border-color: rgba(155, 89, 182, 0.5);
  box-shadow: 0 0 18px rgba(155, 89, 182, 0.3);
}
.search-icon-inline {
  color: var(--purple-accent);
  flex-shrink: 0;
}
.search-box-inline input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  width: 100%;
  font-size: 0.95rem;
  font-family: inherit;
}
.search-box-inline input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

/* ====================== ПЛЕЙЛИСТЫ (блок) ====================== */

.playlists-section {
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(1.3);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-glass);
  padding: 1.8rem;
  position: relative;
}

.playlists-tabs {
  display: flex;
  gap: 0.5rem;
}

.playlists-tab {
  padding: 0.5rem 1.1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.playlists-tab:hover {
  background: rgba(155, 89, 182, 0.18);
  border-color: rgba(155, 89, 182, 0.45);
  color: #fff;
  box-shadow: 0 0 14px rgba(155, 89, 182, 0.2);
}
.playlists-tab.active {
  background: rgba(155, 89, 182, 0.3);
  border-color: var(--purple-accent);
  color: #fff;
  box-shadow: 0 0 18px rgba(155, 89, 182, 0.35);
}

.playlists-panel { display: none; }
.playlists-panel.active { display: block; }

.playlists-scroll-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.playlists-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  flex: 1;
  padding-top: 1rem;
  padding-bottom: 0.6rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(155, 89, 182, 0.3) transparent;
}
.playlists-grid::-webkit-scrollbar { height: 6px; }
.playlists-grid::-webkit-scrollbar-track { background: transparent; }
.playlists-grid::-webkit-scrollbar-thumb { background: rgba(155, 89, 182, 0.3); border-radius: 3px; }
.playlists-grid::-webkit-scrollbar-thumb:hover { background: rgba(155, 89, 182, 0.5); }

.playlists-scroll-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(155, 89, 182, 0.12);
  border: 1px solid rgba(155, 89, 182, 0.25);
  border-radius: 50%;
  color: var(--purple-accent);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  z-index: 5;
}
.playlists-scroll-btn:hover:not(:disabled) {
  background: rgba(155, 89, 182, 0.28);
  border-color: var(--purple-accent);
  box-shadow: 0 0 14px rgba(155, 89, 182, 0.35);
  transform: scale(1.08);
}
.playlists-scroll-btn:disabled {
  opacity: 0.25;
  cursor: default;
}
.playlists-scroll-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.playlists-scroll-left { left: -6px; }
.playlists-scroll-right { right: -6px; }

/* --- Карточка плейлиста --- */

.playlist-card {
  flex: 0 0 150px;
  width: 150px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  cursor: pointer;
  transition: transform 0.25s ease;
  position: relative;
}
.playlist-card:hover {
  transform: translateY(-4px);
}

.playlist-card-cover {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #1e2940, #14203a);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: box-shadow 0.3s ease;
}
.playlist-card:hover .playlist-card-cover {
  box-shadow: 0 0 16px rgba(155, 89, 182, 0.3);
}
.playlist-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.35s ease, transform 0.35s ease;
  filter: brightness(0.88);
}
.playlist-card:hover .playlist-card-cover img {
  filter: brightness(1.12) saturate(1.15);
  transform: scale(1.06);
}
.playlist-card-vinyl {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, #1e2940, #14203a);
  position: relative;
  overflow: hidden;
}
.playlist-card-vinyl::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 70%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #1a1a2e 0%, #16213e 30%, #0f0f1a 60%, #0a0a12 100%);
  border: 2px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.03), 0 4px 12px rgba(0, 0, 0, 0.5);
}
.playlist-card-vinyl::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 22%; aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-accent), #6c3483);
  box-shadow: 0 0 12px rgba(155, 89, 182, 0.4);
}

.playlist-card-public-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  font-size: 0.6rem;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(155, 89, 182, 0.85);
  color: #fff;
  backdrop-filter: blur(4px);
  z-index: 3;
}

.playlist-card-name {
  font-size: 0.78rem;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  transition: color 0.25s ease;
}
.playlist-card:hover .playlist-card-name {
  color: var(--purple-accent);
}

.playlist-card-creator {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
}

.playlist-card-info {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.1;
}

/* --- Кнопки на карточке --- */

.playlist-card-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.15s;
  padding: 0;
  z-index: 4;
  backdrop-filter: blur(3px);
}
.playlist-card:hover .playlist-card-delete { opacity: 1; }
.playlist-card-delete:hover { background: #e74c3c; color: #fff; }
.playlist-card-delete svg { width: 14px; height: 14px; fill: currentColor; }

.playlist-card-public-toggle {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.15s;
  padding: 0;
  z-index: 4;
  backdrop-filter: blur(3px);
}
.playlist-card:hover .playlist-card-public-toggle { opacity: 1; }
.playlist-card-public-toggle:hover { color: var(--purple-accent); }
.playlist-card-public-toggle svg { width: 14px; height: 14px; fill: currentColor; }

/* --- Карточка создания --- */

.playlist-card-create {
  flex: 0 0 150px;
  width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: transform 0.25s ease;
  min-height: 180px;
  border: 2px dashed rgba(155, 89, 182, 0.3);
  border-radius: 10px;
  background: rgba(155, 89, 182, 0.04);
}
.playlist-card-create:hover {
  transform: translateY(-4px);
  border-color: var(--purple-accent);
  background: rgba(155, 89, 182, 0.1);
  box-shadow: 0 0 16px rgba(155, 89, 182, 0.25);
}
.playlist-card-create-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(155, 89, 182, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-accent);
  transition: all 0.25s ease;
}
.playlist-card-create:hover .playlist-card-create-icon {
  background: rgba(155, 89, 182, 0.25);
  box-shadow: 0 0 14px rgba(155, 89, 182, 0.35);
}
.playlist-card-create-icon svg { width: 22px; height: 22px; fill: currentColor; }
.playlist-card-create-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-align: center;
  transition: color 0.25s ease;
}
.playlist-card-create:hover .playlist-card-create-label { color: var(--purple-accent); }

/* --- Форма создания --- */

.playlist-create-form-card {
  flex: 0 0 240px;
  width: 240px;
  padding: 16px;
  background: rgba(26, 34, 51, 0.6);
  border: 1px solid rgba(155, 89, 182, 0.25);
  border-radius: 12px;
}
.playlist-create-form-card .form-group { margin-bottom: 0.6rem; }
.playlist-create-form-card .form-input,
.playlist-create-form-card .form-file {
  font-size: 0.8rem;
  padding: 0.5rem 0.7rem;
}
.playlist-create-form-card .form-inline-row {
  display: flex;
  gap: 8px;
}
.playlist-create-form-card .form-inline-row .btn-primary {
  width: auto;
  padding: 0.5rem 0.8rem;
  font-size: 0.8rem;
}

/* --- Сообщения --- */

.playlists-empty {
  flex: 1;
  text-align: center;
  padding: 2.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.playlists-premium-hint {
  flex: 0 0 auto;
  padding: 10px 14px;
  background: rgba(155, 89, 182, 0.08);
  border: 1px solid rgba(155, 89, 182, 0.15);
  border-radius: 10px;
  font-size: 0.75rem;
  color: rgba(155, 89, 182, 0.8);
  white-space: nowrap;
  display: flex;
  align-items: center;
  align-self: center;
}

.playlists-limit-message {
  flex: 0 0 auto;
  padding: 10px 14px;
  background: rgba(231, 76, 60, 0.08);
  border: 1px solid rgba(231, 76, 60, 0.15);
  border-radius: 10px;
  font-size: 0.75rem;
  color: rgba(231, 76, 60, 0.8);
  white-space: nowrap;
  display: flex;
  align-items: center;
  align-self: center;
}

/* === Блок артистов (горизонтальный скролл) === */
.artists-section {
  background: var(--glass-bg);
  backdrop-filter: blur(28px) saturate(1.3);
  -webkit-backdrop-filter: blur(28px) saturate(1.3);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-glass);
  padding: 1.8rem;
  position: relative;
}

.artists-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Обёртка со стрелками прокрутки */
.artists-scroll-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.artists-scroll-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(155, 89, 182, 0.12);
  border: 1px solid rgba(155, 89, 182, 0.25);
  border-radius: 50%;
  color: var(--purple-accent);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  z-index: 5;
}
.artists-scroll-btn:hover:not(:disabled) {
  background: rgba(155, 89, 182, 0.28);
  border-color: var(--purple-accent);
  box-shadow: 0 0 14px rgba(155, 89, 182, 0.35);
  transform: scale(1.08);
}
.artists-scroll-btn:disabled {
  opacity: 0.25;
  cursor: default;
}
.artists-scroll-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Горизонтальная лента артистов */
.artists-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  flex: 1;
  padding-top: 1.0rem;
  padding-bottom: 0.6rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(155, 89, 182, 0.3) transparent;
}
.artists-grid::-webkit-scrollbar {
  height: 6px;
}
.artists-grid::-webkit-scrollbar-track {
  background: transparent;
}
.artists-grid::-webkit-scrollbar-thumb {
  background: rgba(155, 89, 182, 0.3);
  border-radius: 3px;
}
.artists-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(155, 89, 182, 0.5);
}

/* Карточка артиста — фиксированная ширина: 6 штук в ряд */
.artist-card {
  flex: 0 0 calc((100% - 5rem) / 6);
  max-width: calc((100% - 5rem) / 6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: transform 0.25s ease;
}
.artist-card:hover {
  transform: translateY(-4px);
}
.artist-cover-wrap {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 2px solid rgba(155, 89, 182, 0.3);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.artist-card:hover .artist-cover-wrap {
  border-color: var(--purple-accent);
  box-shadow: 0 0 20px rgba(155, 89, 182, 0.4);
}
.artist-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.35s ease, transform 0.35s ease;
  filter: brightness(0.88);
}
.artist-card:hover .artist-cover-wrap img {
  filter: brightness(1.12) saturate(1.15);
  transform: scale(1.06);
}
.artist-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, #1e2940, #14203a);
}
.artist-info {
  width: 100%;
  text-align: center;
}
.artist-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: color 0.25s ease;
}
.artist-card:hover .artist-name {
  color: var(--purple-accent);
}
.artist-genre {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.artist-plays {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.artist-plays svg {
  width: 11px;
  height: 11px;
  color: var(--purple-accent);
  flex-shrink: 0;
}
.artists-loader {
  flex: 1;
  text-align: center;
  padding: 2.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.artists-empty {
  flex: 1;
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* === Сетка треков === */
.tracks-container {
  background: rgba(18, 26, 44, 0.7);
  /* backdrop-filter УБРАТЬ */
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-glass);
  padding: 1.8rem;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.4rem;
}
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}
.tracks-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.7rem;
  max-height: 1000px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.6rem 0.6rem 0 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(155, 89, 182, 0.3) transparent;
}
.tracks-grid::-webkit-scrollbar { width: 6px; }
.tracks-grid::-webkit-scrollbar-track { background: transparent; }
.tracks-grid::-webkit-scrollbar-thumb {
  background: rgba(155, 89, 182, 0.3);
  border-radius: 3px;
}
.tracks-grid::-webkit-scrollbar-thumb:hover {
  background: rgba(155, 89, 182, 0.5);
}
.track-card {
  content-visibility: auto;
  contain-intrinsic-size: 130px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  cursor: pointer;
  transition: transform 0.12s ease;
}
.track-card:hover {
  transform: translateY(-4px);
}
.track-cover-wrap {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #1e2940, #14203a);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.track-card:hover .track-cover-wrap {
  box-shadow: 0 0 16px rgba(155, 89, 182, 0.3);
  border-color: rgba(155, 89, 182, 0.3);
}
/* === ДОБАВЛЕНО: свечение для играющего трека === */
.track-card.playing .track-cover-wrap {
  box-shadow: 0 0 16px rgba(155, 89, 182, 0.3);
  border-color: rgba(155, 89, 182, 0.3);
}
/* === /ДОБАВЛЕНО === */
.track-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.88);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.track-card:hover .track-cover-wrap img {
  filter: brightness(1.12) saturate(1.15);
  transform: scale(1.06);
}
/* === ДОБАВЛЕНО: обложка ярче на играющем треке === */
.track-card.playing .track-cover-wrap img {
  filter: brightness(1.05) saturate(1.1);
}
/* === /ДОБАВЛЕНО === */
.track-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, #1e2940, #14203a);
}
.track-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  background: rgba(0, 0, 0, 0.3);
}
.track-card:hover .track-play-overlay {
  opacity: 1;
}
/* === ДОБАВЛЕНО: оверлей с кнопкой паузы всегда виден на играющем треке === */
.track-card.playing .track-play-overlay {
  opacity: 1;
}
/* === /ДОБАВЛЕНО === */
.track-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--purple-accent);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(155, 89, 182, 0.5);
  transition: transform 0.2s ease;
}
.track-play-btn:hover {
  transform: scale(1.12);
}
.track-play-btn svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}
.track-playing-indicator {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 18px;
}
.track-playing-indicator span {
  width: 3px;
  background: var(--purple-accent);
  border-radius: 2px;
  animation: bar-bounce 0.8s infinite ease-in-out;
}
.track-playing-indicator span:nth-child(1) { height: 60%; animation-delay: 0s; }
.track-playing-indicator span:nth-child(2) { height: 100%; animation-delay: 0.15s; }
.track-playing-indicator span:nth-child(3) { height: 40%; animation-delay: 0.3s; }
@keyframes bar-bounce {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}
.track-info h3 {
  font-size: 0.76rem;
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  margin: 0;
  transition: color 0.25s ease;
}
.track-card:hover .track-info h3 {
  color: var(--purple-accent);
}
/* === ДОБАВЛЕНО: название трека подсвечено на играющем треке === */
.track-card.playing .track-info h3 {
  color: var(--purple-accent);
}
/* === /ДОБАВЛЕНО === */
.track-info p {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.1rem;
  line-height: 1.1;
}
.tracks-loader {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* === Бейдж прослушиваний на карточках === */
.track-plays-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  border-radius: 6px;
  padding: 2px 5px;
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  z-index: 3;
  pointer-events: none;
}
.track-plays-badge svg {
  width: 13px;
  height: 13px;
  color: var(--purple-accent);
  flex-shrink: 0;
}

/* === НИЖНИЙ ПЛЕЕР === */
.music-player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: rgba(12, 20, 38, 0.7);
  backdrop-filter: blur(36px) saturate(1.5);
  -webkit-backdrop-filter: blur(36px) saturate(1.5);
  border-top: 1px solid rgba(155, 89, 182, 0.2);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.4), 0 -2px 16px rgba(155, 89, 182, 0.08);
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 1rem;
  gap: 1.5rem;
}

.player-left {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-shrink: 0;
}

#playerCoverContainer {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.player-cover {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(155, 89, 182, 0.25);
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.player-cover-vinyl {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e2940, #14203a);
  border: 1px solid rgba(155, 89, 182, 0.25);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.player-cover-vinyl::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 70%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #1a1a2e 0%, #16213e 30%, #0f0f1a 60%, #0a0a12 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.03);
}
.player-cover-vinyl::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 22%; aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-accent), #6c3483);
  box-shadow: 0 0 10px rgba(155, 89, 182, 0.4);
}
.music-player-bar.playing .player-cover-vinyl::before {
  animation: vinyl-spin-player 4s linear infinite;
}
@keyframes vinyl-spin-player {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.player-track-info {
  min-width: 0;
  overflow: hidden;
}
.player-track-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-track-artist {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.2rem;
}

.player-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  max-width: 520px;
}
.player-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.player-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s ease;
}
.player-btn:hover {
  color: #fff;
  background: rgba(155, 89, 182, 0.18);
}
.player-btn svg {
  width: 20px;
  height: 20px;
  fill: none;                /* обязательно: убираем заливку */
  stroke: currentColor;      /* цвет из .player-btn (purple/white) */
  display: block;            /* убирает лишние отступы у inline-svg */
  margin: 0;
  padding: 0;
}
.player-btn.play-btn {
  width: 48px;
  height: 48px;
  background: var(--purple-accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(155, 89, 182, 0.4);
}
.player-btn.play-btn:hover {
  background: #8e4ca8;
  transform: scale(1.06);
  box-shadow: 0 6px 22px rgba(155, 89, 182, 0.55);
}
.player-progress-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
}
.player-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 34px;
  text-align: center;
}
.player-progress-bar {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
.player-progress-fill {
  height: 100%;
  background: var(--purple-accent);
  border-radius: 3px;
  width: 0%;
  transition: width 0.15s linear;
  box-shadow: 0 0 8px rgba(155, 89, 182, 0.5);
}

.player-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  justify-content: flex-end;
}
.player-volume-icon {
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.player-volume-icon:hover {
  color: #fff;
}
.player-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 90px;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.player-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--purple-accent);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(155, 89, 182, 0.5);
}
.player-volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--purple-accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 6px rgba(155, 89, 182, 0.5);
}

.player-btn.active {
  color: #9b59b6;
  background: rgba(155, 89, 182, 0.15);
  box-shadow: 0 0 10px rgba(155, 89, 182, 0.4);
}
.player-btn.active svg {
  fill: #9b59b6;
}

/* === Авторизация, профиль === */
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.auth-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-auth {
  padding: 0.5rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.25s ease;
}
.btn-auth:hover {
  background: rgba(155, 89, 182, 0.14);
  border: 1px solid rgba(155, 89, 182, 0.35);
  color: var(--purple-accent);
  box-shadow: 0 0 12px rgba(155, 89, 182, 0.2);
}
.profile-block {
  position: relative;
  display: none;
}
.profile-block.active {
  display: flex;
}
.profile-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.profile-header:hover {
  background: rgba(155, 89, 182, 0.14);
  border: 1px solid rgba(155, 89, 182, 0.35);
}
.profile-header:hover .profile-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(155, 89, 182, 0.35);
  flex-shrink: 0;
  min-width: 34px;
}
.profile-name {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
}
.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 200px;
  background: rgba(14, 22, 40, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(155, 89, 182, 0.2);
  border-radius: 16px;
  padding: 0.5rem;
  margin-top: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.25s ease;
  z-index: 100;
}
.profile-dropdown-item {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #ccc;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  text-align: left;
  transition: all 0.25s ease;
}
.profile-dropdown-item:hover {
  background: rgba(155, 89, 182, 0.14);
  border: 1px solid rgba(155, 89, 182, 0.3);
  color: var(--purple-accent);
}

/* === Модальные окна === */
.auth-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.auth-modal.open {
  display: flex;
}
.auth-modal-content {
  background: rgba(16, 24, 42, 0.85);
  backdrop-filter: blur(32px) saturate(1.4);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
  border: 1px solid rgba(155, 89, 182, 0.2);
  border-radius: 22px;
  padding: 2.2rem;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
}
.auth-modal-content h3 {
  color: #fff;
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.4rem;
}
.form-group {
  margin-bottom: 1rem;
}
.form-label {
  display: block;
  color: #ccc;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}
.form-input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: rgba(8, 14, 28, 0.7);
  border: 1px solid rgba(155, 89, 182, 0.15);
  border-radius: 12px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.form-input:focus {
  outline: none;
  border-color: rgba(155, 89, 182, 0.5);
  box-shadow: 0 0 12px rgba(155, 89, 182, 0.2);
}
.form-file {
  width: 100%;
  padding: 0.45rem;
  background: rgba(8, 14, 28, 0.7);
  border: 1px solid rgba(155, 89, 182, 0.15);
  border-radius: 12px;
  color: #ccc;
  font-size: 0.85rem;
  box-sizing: border-box;
}
.btn-primary {
  width: 100%;
  padding: 0.75rem;
  background: rgba(155, 89, 182, 0.25);
  border: 1px solid rgba(155, 89, 182, 0.45);
  border-radius: 12px;
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: all 0.25s ease;
}
.btn-primary:hover {
  background: rgba(155, 89, 182, 0.4);
  box-shadow: 0 0 18px rgba(155, 89, 182, 0.35);
}
.btn-cancel {
  margin-top: 0.75rem;
  width: 100%;
  background: transparent;
  color: #888;
  border: none;
  cursor: pointer;
  padding: 0.6rem;
  font-family: inherit;
  font-size: 0.9rem;
}
.btn-cancel:hover {
  color: #aaa;
}
.auth-error {
  color: #e74c3c;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  display: none;
}
.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: transparent;
  color: #888;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  z-index: 10;
}
.modal-close-btn:hover {
  background: rgba(231, 76, 60, 0.15);
  border-color: rgba(231, 76, 60, 0.3);
  color: #e74c3c;
}
.edit-profile-header {
  text-align: center;
  margin-bottom: 1.5rem;
}
.edit-profile-nickname {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.edit-profile-avatar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.edit-profile-avatar-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(155, 89, 182, 0.3);
  background: #2a3650;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.edit-profile-avatar-hint {
  color: #666;
  font-size: 0.78rem;
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

/* === Поиск (верхняя панель) === */
.search-container {
  position: relative;
  flex: 1;
  max-width: 420px;
  margin: 0 2rem;
}
.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(155, 89, 182, 0.45);
  border-radius: 9999px;
  padding: 0.5rem 1.1rem;
  box-shadow: 0 0 10px rgba(155, 89, 182, 0.18);
  transition: all 0.25s ease;
}
.search-box:focus-within {
  border-color: var(--purple-accent);
  box-shadow: 0 0 18px rgba(155, 89, 182, 0.4);
  background: rgba(255, 255, 255, 0.06);
}
.search-icon {
  color: rgba(155, 89, 182, 0.8);
  margin-right: 0.55rem;
  flex-shrink: 0;
}
#globalSearch {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  width: 100%;
  font-size: 0.9rem;
  font-family: inherit;
}
#globalSearch::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}
.search-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: rgba(14, 22, 40, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(155, 89, 182, 0.22);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  overflow: hidden;
  max-height: 400px;
  overflow-y: auto;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
}
.search-result-item:hover {
  background: rgba(155, 89, 182, 0.14);
}
.search-result-item:last-child {
  border-bottom: none;
}
.search-result-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.search-result-thumb-vinyl {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e2940, #14203a);
}
.search-result-thumb-vinyl::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 70%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #1a1a2e 0%, #16213e 30%, #0f0f1a 60%, #0a0a12 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.search-result-thumb-vinyl::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 22%; aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-accent), #6c3483);
  box-shadow: 0 0 8px rgba(155, 89, 182, 0.4);
}
.search-result-artist {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.15rem;
}
.search-no-results {
  padding: 1.2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.search-dropdown::-webkit-scrollbar {
  width: 6px;
}
.search-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.search-dropdown::-webkit-scrollbar-thumb {
  background: rgba(155, 89, 182, 0.3);
  border-radius: 3px;
}

/* === Футер (вне grid) === */
.footer-bar {
  max-width: 1440px;
  margin: 2rem auto;
  padding: 0.8rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 26, 44, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(155, 89, 182, 0.4);
  border-radius: 9999px;
  box-shadow: 0 0 18px rgba(155, 89, 182, 0.4), 0 0 10px rgba(155, 89, 182, 0.2);
  position: relative;
  z-index: 1;
}
.footer-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 0 8px rgba(155, 89, 182, 0.5);
}
.footer-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--purple-accent);
  text-decoration: none;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}
.footer-link:hover {
  color: #b370c7;
  text-shadow: 0 0 12px rgba(155, 89, 182, 0.7);
}

/* === Пункт «Трансляции» === */
.menu-item-live {
  display: flex;
  align-items: center;
  gap: 8px;
}
.menu-item-live .live-dot {
  width: 10px;
  height: 10px;
  background-color: #ff4757;
  border: 2px solid rgba(255, 71, 87, 0.5);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 71, 87, 0.7);
  animation: pulse-dot 1.5s infinite ease-in-out;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 6px rgba(255, 71, 87, 0.5); }
  50% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 14px rgba(255, 71, 87, 0.9); }
  100% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 6px rgba(255, 71, 87, 0.5); }
}

/* === Виниловый диск === */
.track-cover-vinyl {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e2940, #14203a);
  position: relative;
  overflow: hidden;
}
.track-cover-vinyl::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 70%; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #1a1a2e 0%, #16213e 30%, #0f0f1a 60%, #0a0a12 100%);
  border: 2px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.03), 0 4px 12px rgba(0, 0, 0, 0.5);
}
.track-cover-vinyl::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 22%; aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-accent), #6c3483);
  box-shadow: 0 0 12px rgba(155, 89, 182, 0.4);
}
.track-card.playing .track-cover-vinyl::before {
  animation: vinyl-spin 4s linear infinite;
}
@keyframes vinyl-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* === АДАПТИВ === */
@media (max-width: 900px) {
  .page-layout {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1.2rem;
  }
  .top-bar {
    padding: 0.8rem 1rem;
  }
  .search-container {
    display: none;
  }
  .sidebar {
    position: static;
  }
  .tracks-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.7rem;
  }
  .artists-grid {
    gap: 0.8rem;
  }
  .artist-card {
    flex: 0 0 calc((100% - 2.4rem) / 4);
    max-width: calc((100% - 2.4rem) / 4);
  }
  .artist-cover-wrap {
    width: 80px;
    height: 80px;
  }
  .artists-scroll-btn {
    display: none;
  }
  .playlists-scroll-btn {
    display: none;
  }
  .playlist-card {
    flex: 0 0 120px;
    width: 120px;
  }
  .playlist-card-create {
    flex: 0 0 120px;
    width: 120px;
  }

  .playlist-create-form-card {
    flex: 0 0 200px;
    width: 200px;
  }
  .music-player-bar {
    height: 80px;
    padding: 0 1rem;
    gap: 1rem;
  }
  .player-left {
    min-width: 0;
    max-width: 200px;
  }
  #playerCoverContainer,
  .player-cover,
  .player-cover-vinyl {
    width: 56px;
    height: 56px;
  }
  .player-right {
    display: none;
  }
  .player-track-info {
    display: none;
  }
  body {
    padding-bottom: 90px;
  }
  .sidebar-top-tracks {
    display: none;
  }
  .footer-bar {
    margin: 1rem auto;
  }
}

@media (max-width: 500px) {
  .player-left {
    max-width: 64px;
  }
  .player-track-info {
    display: none;
  }
  .player-btn {
    width: 36px;
    height: 36px;
  }
  .player-btn.play-btn {
    width: 42px;
    height: 42px;
  }
  .artist-card {
    flex: 0 0 calc((100% - 1.6rem) / 3);
    max-width: calc((100% - 1.6rem) / 3);
  }
  .artist-cover-wrap {
    width: 70px;
    height: 70px;
  }
  .playlist-card {
    flex: 0 0 100px;
    width: 100px;
  }
  .playlist-card-create {
    flex: 0 0 100px;
    width: 100px;
  }
  .playlists-tab {
    padding: 0.4rem 0.8rem;
    font-size: 0.78rem;
  }
}

/* ===== СТРАНИЦА АРТИСТА (КВАДРАТНЫЕ ОБЛОЖКИ) ===== */

.artist-page-modal {
  z-index: 10000;
}

.artist-page-content {
  background: rgba(15, 18, 30, 0.92);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(155, 89, 182, 0.25);
  border-radius: 20px;
  max-width: 560px;
  width: 92%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 60px rgba(155, 89, 182, 0.15), 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: artistPageIn 0.3s ease;
}

@keyframes artistPageIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.artist-page-content::-webkit-scrollbar { width: 6px; }
.artist-page-content::-webkit-scrollbar-track { background: transparent; }
.artist-page-content::-webkit-scrollbar-thumb { background: rgba(155, 89, 182, 0.3); border-radius: 3px; }

.artist-page-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.4);
  color: #a0b0d0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.artist-page-close:hover {
  background: rgba(155, 89, 182, 0.3);
  color: #fff;
  border-color: rgba(155, 89, 182, 0.5);
}

.artist-page-header {
  display: flex;
  gap: 20px;
  padding: 28px 28px 20px;
  align-items: flex-start;
}

.artist-page-photo-wrap {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(155, 89, 182, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
  border: 3px solid rgba(155, 89, 182, 0.3);
  position: relative;
  background: #0b1428;
  transform: translateZ(0);
}

.artist-page-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.artist-page-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: linear-gradient(135deg, #2a3650, #1a2233);
  border-radius: 12px;
  overflow: hidden;
}

.artist-page-meta {
  flex: 1;
  padding-top: 8px;
}

.artist-page-genre {
  color: var(--purple-accent);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}

.artist-page-name {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.2;
}

.artist-page-bio {
  color: #a0b0d0;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.artist-page-plays {
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.artist-page-plays svg {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}

.artist-page-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(155, 89, 182, 0.3), transparent);
  margin: 0 28px 20px;
}

.artist-tracks-heading {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 28px 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* === СЕТКА: 2 ТРЕКА В ЛИНИЮ === */
.artist-tracks-list {
  padding: 0 28px 28px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.artist-track-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: rgba(26, 34, 51, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 48px;
}
.artist-track-item:hover {
  background: rgba(42, 54, 80, 0.6);
  border-color: rgba(155, 89, 182, 0.2);
}
.artist-track-item.artist-track-playing {
  background: rgba(155, 89, 182, 0.12);
  border-color: rgba(155, 89, 182, 0.3);
}

/* Обложка 40×40 */
.artist-track-cover-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #0b1428;
  transform: translateZ(0);
}

.artist-track-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.artist-track-vinyl {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e2940, #14203a);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.artist-track-vinyl::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #1a1a2e 0%, #16213e 30%, #0f0f1a 60%, #0a0a12 100%);
}
.artist-track-vinyl::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 22%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-accent), #6c3483);
}
.artist-track-playing .artist-track-vinyl::before {
  animation: vinylSpin 4s linear infinite;
}
@keyframes vinylSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.artist-track-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: 8px;
}
.artist-track-item:hover .artist-track-play-overlay,
.artist-track-item.artist-track-playing .artist-track-play-overlay {
  opacity: 1;
}

.artist-track-play-icon,
.artist-track-pause-icon {
  width: 18px;
  height: 18px;
  color: #fff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.artist-track-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.artist-track-title {
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.artist-track-playing .artist-track-title {
  color: var(--purple-accent);
}

.artist-track-plays {
  color: #667799;
  font-size: 0.7rem;
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.artist-track-plays svg {
  width: 10px;
  height: 10px;
  opacity: 0.5;
}

.artist-page-no-tracks {
  color: #667799;
  text-align: center;
  padding: 2rem 0;
  font-size: 0.9rem;
}

/* === МИНИ-ПЛЕЕР (ужат под 2 колонки) === */

.artist-track-mini-player {
  display: none;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.artist-track-item.artist-track-playing .artist-track-mini-player {
  display: flex;
}

.artist-track-mini-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
  transition: all 0.15s ease;
  padding: 0;
}
.artist-track-mini-btn:hover {
  color: #fff;
  background: rgba(155, 89, 182, 0.2);
}
.artist-track-mini-btn svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.artist-track-mini-progress {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  min-width: 20px;
}
.artist-track-mini-progress-fill {
  height: 100%;
  background: var(--purple-accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 6px rgba(155, 89, 182, 0.5);
}

.artist-track-mini-time {
  font-size: 0.6rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 22px;
  text-align: center;
}

.artist-track-mini-loop {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
  transition: all 0.15s ease;
  padding: 0;
}
.artist-track-mini-loop:hover {
  color: #fff;
  background: rgba(155, 89, 182, 0.2);
}
.artist-track-mini-loop.active {
  color: var(--purple-accent);
}
.artist-track-mini-loop svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.artist-track-mini-shuffle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
  transition: all 0.15s ease;
  padding: 0;
}
.artist-track-mini-shuffle:hover {
  color: #fff;
  background: rgba(155, 89, 182, 0.2);
}
.artist-track-mini-shuffle.active {
  color: var(--purple-accent);
}
.artist-track-mini-shuffle svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

/* === АДАПТИВ === */
@media (max-width: 600px) {
  .artist-page-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px 16px;
  }
  .artist-page-photo-wrap {
    width: 120px;
    height: 120px;
    border-radius: 12px;
  }
  .artist-page-meta { text-align: center; }
  .artist-page-divider { margin: 0 16px 16px; }
  .artist-tracks-heading { margin: 0 16px 12px; }
  .artist-tracks-list {
    padding: 0 16px 20px;
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .artist-track-item {
    padding: 6px 8px;
    gap: 8px;
    min-height: 44px;
  }
  .artist-track-cover-wrap {
    width: 36px;
    height: 36px;
  }
  .artist-track-play-icon,
  .artist-track-pause-icon {
    width: 16px;
    height: 16px;
  }
  .artist-track-title {
    font-size: 0.8rem;
  }
  .artist-track-plays {
    font-size: 0.68rem;
  }
  .artist-track-mini-btn,
  .artist-track-mini-loop,
  .artist-track-mini-shuffle {
    width: 16px;
    height: 16px;
  }
  .artist-track-mini-btn svg,
  .artist-track-mini-loop svg,
  .artist-track-mini-shuffle svg {
    width: 10px;
    height: 10px;
  }
  .artist-track-mini-time {
    font-size: 0.58rem;
    min-width: 18px;
  }
}


/* ===== АЛЬБОМЫ В КАРТОЧКЕ АРТИСТА ===== */
.artist-albums-section { padding: 0 28px; margin-bottom: 20px; }
.artist-albums-heading {
  color: #fff; font-size: 1rem; font-weight: 700;
  margin: 0 0 14px; text-transform: uppercase; letter-spacing: 1px;
}
.artist-albums-grid {
  display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden;
  scroll-behavior: smooth; padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: rgba(155, 89, 182, 0.3) transparent;
}
.artist-albums-grid::-webkit-scrollbar { height: 6px; }
.artist-albums-grid::-webkit-scrollbar-track { background: transparent; }
.artist-albums-grid::-webkit-scrollbar-thumb { background: rgba(155, 89, 182, 0.3); border-radius: 3px; }
.artist-albums-grid::-webkit-scrollbar-thumb:hover { background: rgba(155, 89, 182, 0.5); }

.artist-album-card { flex: 0 0 120px; width: 120px; cursor: pointer; transition: transform 0.25s ease; }
.artist-album-card:hover { transform: translateY(-4px); }
.artist-album-cover-wrap {
  width: 120px; height: 120px; border-radius: 10px; overflow: hidden; position: relative;
  background: linear-gradient(135deg, #1e2940, #14203a);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.artist-album-card:hover .artist-album-cover-wrap {
  box-shadow: 0 0 16px rgba(155, 89, 182, 0.3);
  border-color: rgba(155, 89, 182, 0.3);
}
.artist-album-cover-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: filter 0.35s ease, transform 0.35s ease; filter: brightness(0.88);
}
.artist-album-card:hover .artist-album-cover-wrap img {
  filter: brightness(1.12) saturate(1.15); transform: scale(1.06);
}
.artist-album-cover-vinyl {
  width: 100%; height: 100%; background: linear-gradient(135deg, #1e2940, #14203a);
  position: relative; overflow: hidden;
}
.artist-album-cover-vinyl::before {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #1a1a2e 0%, #16213e 30%, #0f0f1a 60%, #0a0a12 100%);
  border: 2px solid rgba(255, 255, 255, 0.05);
}
.artist-album-cover-vinyl::after {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 22%; aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-accent), #6c3483);
  box-shadow: 0 0 12px rgba(155, 89, 182, 0.4);
}
.artist-album-name {
  margin-top: 8px; font-size: 0.78rem; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-align: center; transition: color 0.25s ease;
}
.artist-album-card:hover .artist-album-name { color: var(--purple-accent); }

/* Контурная кнопка "+" */
.artist-album-add-btn { flex: 0 0 120px; width: 120px; cursor: pointer; }
.artist-album-add-card {
  width: 120px; height: 120px; border-radius: 10px;
  border: 2px dashed rgba(155, 89, 182, 0.4);
  background: rgba(155, 89, 182, 0.06);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease;
}
.artist-album-add-card:hover {
  border-color: var(--purple-accent);
  background: rgba(155, 89, 182, 0.14);
  box-shadow: 0 0 16px rgba(155, 89, 182, 0.3);
}
.artist-album-add-card svg {
  width: 32px; height: 32px; color: var(--purple-accent);
  opacity: 0.7; transition: opacity 0.25s ease;
}
.artist-album-add-card:hover svg { opacity: 1; }
.artist-album-add-label {
  margin-top: 8px; font-size: 0.78rem; color: var(--text-muted); text-align: center;
}
.artist-albums-empty { color: #667799; font-size: 0.85rem; padding: 1rem 0; }

/* ===== ПРОСМОТР АЛЬБОМА ===== */
.album-view-back {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--purple-accent); font-size: 0.85rem; font-weight: 600;
  cursor: pointer; padding: 8px 14px; border-radius: 10px;
  background: transparent; border: 1px solid rgba(155, 89, 182, 0.2);
  transition: all 0.2s ease; font-family: inherit;
}
.album-view-back:hover {
  background: rgba(155, 89, 182, 0.14); border-color: rgba(155, 89, 182, 0.4);
}
.album-view-back svg { width: 16px; height: 16px; fill: currentColor; }
.album-view-header { display: flex; gap: 20px; padding: 0 28px 20px; align-items: center; }
.album-view-cover-wrap {
  flex-shrink: 0; width: 140px; height: 140px; border-radius: 12px; overflow: hidden;
  box-shadow: 0 0 30px rgba(155, 89, 182, 0.2), 0 8px 24px rgba(0,0,0,0.4);
  border: 2px solid rgba(155, 89, 182, 0.3); background: #0b1428;
}
.album-view-cover-wrap img { width: 100%; height: 100%; object-fit: cover; }
.album-view-cover-vinyl {
  width: 100%; height: 100%; background: linear-gradient(135deg, #1e2940, #14203a);
  position: relative; overflow: hidden;
}
.album-view-cover-vinyl::before {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #1a1a2e 0%, #16213e 30%, #0f0f1a 60%, #0a0a12 100%);
  border: 2px solid rgba(255, 255, 255, 0.05);
}
.album-view-cover-vinyl::after {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 22%; aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-accent), #6c3483);
  box-shadow: 0 0 12px rgba(155, 89, 182, 0.4);
}
.album-view-info { flex: 1; min-width: 0; }
.album-view-title { color: #fff; font-size: 1.4rem; font-weight: 700; margin: 0 0 6px; }
.album-view-artist { color: var(--text-muted); font-size: 0.9rem; }
.album-view-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.album-view-actions button {
  padding: 6px 14px; border-radius: 10px; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; border: 1px solid rgba(155, 89, 182, 0.3);
  background: rgba(155, 89, 182, 0.1); color: var(--purple-accent);
  transition: all 0.2s ease; font-family: inherit;
}
.album-view-actions button:hover {
  background: rgba(155, 89, 182, 0.25); border-color: var(--purple-accent);
}
.album-view-actions button.danger {
  border-color: rgba(231, 76, 60, 0.3); background: rgba(231, 76, 60, 0.1); color: #e74c3c;
}
.album-view-actions button.danger:hover {
  background: rgba(231, 76, 60, 0.25); border-color: #e74c3c;
}
.album-view-tracks { padding: 0 28px 28px; }

/* Удаление трека в альбоме */
.album-track-delete-btn {
  width: 28px; height: 28px; border-radius: 6px;
  background: rgba(231, 76, 60, 0.1); border: 1px solid rgba(231, 76, 60, 0.2);
  color: #e74c3c; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.2s ease;
}
.album-track-delete-btn:hover {
  background: rgba(231, 76, 60, 0.25); border-color: #e74c3c;
}
.album-track-delete-btn svg { width: 14px; height: 14px; fill: currentColor; }

/* Инлайн-формы */
.album-create-form {
  display: none; padding: 16px; background: rgba(26, 34, 51, 0.6);
  border: 1px solid rgba(155, 89, 182, 0.2); border-radius: 12px; margin-bottom: 14px;
}
.album-create-form.active { display: block; }
.album-track-form {
  display: none; padding: 16px; background: rgba(26, 34, 51, 0.6);
  border: 1px solid rgba(155, 89, 182, 0.2); border-radius: 12px; margin: 14px 0;
}
.album-create-form .form-inline-row,
.album-track-form .form-inline-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.album-create-form .form-inline-row .btn-primary,
.album-track-form .form-inline-row .btn-primary {
  width: auto;
}

@media (max-width: 600px) {
  .artist-albums-section { padding: 0 16px; }
  .artist-album-card, .artist-album-add-btn { flex: 0 0 100px; width: 100px; }
  .artist-album-cover-wrap, .artist-album-add-card { width: 100px; height: 100px; }
  .album-view-header { flex-direction: column; text-align: center; padding: 0 16px 16px; }
  .album-view-cover-wrap { width: 120px; height: 120px; }
  .album-view-tracks { padding: 0 16px 20px; }
}

/* Кнопка "Назад к артисту" — отступ снизу */
.album-view-back {
  margin-bottom: 20px;
}

/* Форма добавления трека в альбом — скрыта по умолчанию */
.album-track-form {
  display: none;
  margin-top: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Показывается при добавлении класса active */
.album-track-form.active {
  display: block;
}

/* Отступы между полями формы */
.album-track-form .form-group {
  margin-bottom: 14px;
}

/* ====================== ПЛЕЙЛИСТЫ (сайдбар, меню) ====================== */

.sidebar-playlist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 4px;
}
.sidebar-playlist-item:hover {
  background: rgba(255,255,255,0.05);
}

.sidebar-playlist-cover {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
}
.sidebar-playlist-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sidebar-playlist-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.sidebar-playlist-name {
  color: rgba(255,255,255,0.8);
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-playlist-item:hover .sidebar-playlist-name {
  color: #fff;
}

.sidebar-playlist-create {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px;
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 8px;
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 4px;
}
.sidebar-playlist-create:hover {
  border-color: rgba(155,89,182,0.4);
  color: #9b59b6;
}

.sidebar-playlist-empty {
  color: rgba(255,255,255,0.3);
  font-size: 0.78rem;
  padding: 8px;
  text-align: center;
}

.playlist-create-form {
  padding: 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  margin-bottom: 8px;
}

/* Кнопка "+" на карточке трека */
.track-add-playlist-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s;
  padding: 0;
  z-index: 4;
  backdrop-filter: blur(3px);
}
.track-add-playlist-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.track-card:hover .track-add-playlist-btn {
  opacity: 1;
}
.track-add-playlist-btn:hover {
  background: var(--purple-accent);
  color: #fff;
  box-shadow: 0 0 12px rgba(155, 89, 182, 0.4);
}

/* Выпадающее меню "Добавить в плейлист" */
.add-to-playlist-menu {
  background: rgba(20, 25, 40, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 6px;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
}
.add-to-playlist-header {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
  padding: 4px 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 4px;
}
.add-to-playlist-item {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.8);
  transition: background 0.12s;
}
.add-to-playlist-item:hover {
  background: rgba(155, 89, 182, 0.15);
  color: #fff;
}
.add-to-playlist-empty {
  padding: 8px 10px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
}
.add-to-playlist-create {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--purple-accent);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 4px;
  transition: background 0.12s;
}
.add-to-playlist-create:hover {
  background: rgba(155, 89, 182, 0.1);
}
.artist-track-item {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  max-width: 100%;
}

.artist-track-info {
  min-width: 0;
  overflow: hidden;
}

.artist-track-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1rem;
  line-height: 1.2;
  margin: 0 0 4px 0;
  display: block;
}

.artist-track-artist,
.artist-track-info > p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.75rem;
  color: var(--text-muted, #8899b0);
  line-height: 1.2;
  margin: 0;
  display: block;
}

/* Внутренний span — он двигается внутри блока с overflow: hidden */
.marquee-text {
  display: inline-block;
  white-space: nowrap;
}

/* Анимация только для элементов, где текст не влезает */
.artist-track-title.marquee-active:hover .marquee-text,
.artist-track-artist.marquee-active:hover .marquee-text,
.artist-track-info > p.marquee-active:hover .marquee-text {
  animation: marquee-scroll var(--marquee-duration, 4s) linear infinite alternate;
}



.track-cover-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.track-like-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  position: absolute;
  bottom: 6px;   /* почти в самый низ */
  left: 6px;     /* почти в самый левый край */
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, opacity 0.2s, color 0.2s;
}

.track-like-btn:hover {
  opacity: 0.9;
  transform: scale(1.15);
}

/* По умолчанию — чёрное сердечко */
.like-icon {
  width: 22px;
  height: 22px;
  stroke-width: 2;
  color: #af4de7;
  stroke: #af4de7;
  fill: none;
}

/* Когда лайк поставлен — красное */
.track-like-btn.liked .like-icon {
  color: #ff3b30;
  stroke: #ff3b30;
  fill: #ff3b30;
}

.music-player-bar .track-like-btn {
  position: static;
  bottom: auto;
  left: auto;
}

/* Стрелки тренда в Топ 30 */
.sidebar-top-trend {
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 2px;
}
.sidebar-top-trend.trend-up {
  color: #2ecc71;
}
.sidebar-top-trend.trend-down {
  color: #e74c3c;
}
.sidebar-top-trend.trend-same {
  color: #7f8c8d;
  opacity: 0.5;
}

.sidebar-top-trend-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 16px;
}

.sidebar-top-trend {
  width: 14px;
  height: 14px;
}

.sidebar-top-trend.trend-up { color: #2ecc71; }
.sidebar-top-trend.trend-down { color: #e74c3c; }
.sidebar-top-trend.trend-same { color: #7f8c8d; opacity: 0.4; }

.sidebar-top-stat-icon {
  width: 13px;
  height: 13px;
  color: #9b59b6;
  flex-shrink: 0;
}

.sidebar-top-stats {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.sidebar-top-stat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  color: #6c7a93;
}

/* Плавное перемещение треков в Топ-30 */
.sidebar-top-item {
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.35, 1), opacity 0.4s ease, background 0.3s ease;
}

.sidebar-top-list {
  overflow: visible;
}

/* Подсветка трека при изменении лайков/прослушиваний */
.sidebar-top-item.top-stat-flash {
  background: rgba(46, 204, 113, 0.15);
}

.sidebar-top-item.top-stat-flash .sidebar-top-stats span {
  color: #2ecc71;
  transition: color 0.3s ease;
}

.artist-track-item[draggable="true"] {
  cursor: grab;
}
.artist-track-item[draggable="true"]:active {
  cursor: grabbing;
}
.playlist-dragging {
  opacity: 0.35;
}
.playlist-drop-above {
  border-top: 3px solid #9b59b6;
  margin-top: -3px;
}
.playlist-drop-below {
  border-bottom: 3px solid #9b59b6;
  margin-bottom: -3px;
}
.playlist-drag-handle {
  cursor: grab;
  flex-shrink: 0;
  padding: 4px 6px;
  color: #5a6a88;
  opacity: 0.5;
  transition: opacity 0.2s, color 0.2s;
}
.playlist-drag-handle:hover {
  opacity: 1;
  color: #9b59b6;
}
.playlist-drag-handle:active {
  cursor: grabbing;
}



@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(var(--marquee-shift, -50px)); }
}
