/* ══════════════════════════════════════════════
   MXM MUSIC — MAIN STYLES
   ══════════════════════════════════════════════ */

/* ─── Reset ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-tap-highlight-color: transparent; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  height: 100dvh;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
svg { stroke: currentColor; fill: none; display: block; flex-shrink: 0; }

/* ─── Variables ────────────────────────────── */
:root {
  --bg:          #0a0017;
  --bg-2:        #110020;
  --bg-3:        #1a0030;
  --bg-4:        #230040;
  --bg-hover:    #2d0055;
  --primary:     #8b1cf7;
  --primary-h:   #7209d4;
  --primary-l:   #b86fff;
  --accent:      #e100ff;
  --accent-2:    #ff2ef2;
  --text:        #f5eeff;
  --text-2:      #b89fd4;
  --text-3:      #6b4e8a;
  --border:      rgba(139,28,247,.18);
  --border-2:    rgba(225,0,255,.35);
  --success:     #34D399;
  --danger:      #F87171;
  --warn:        #FBBF24;
  --radius:      12px;
  --radius-sm:   8px;
  --radius-xs:   6px;
  --radius-full: 9999px;
  --shadow:      0 8px 40px rgba(0,0,0,.55);
  --shadow-sm:   0 2px 12px rgba(0,0,0,.3);
  --glow:        0 0 24px rgba(124,58,237,.4);
  --sidebar-w:   240px;
  --player-h:    82px;
  --topnav-h:    64px;
  --t:           .2s ease;
  --t-slow:      .4s cubic-bezier(.4,0,.2,1);
}

/* ─── Scrollbar ────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ─── Utilities ────────────────────────────── */
.hidden { display: none !important; }

/* ─── App Shell ────────────────────────────── */
#app {
  display: flex;
  height: 100dvh;
  overflow: hidden;
  padding-bottom: var(--player-h);
}

/* ═══════════════ SIDEBAR ═══════════════════ */
#sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  padding: 20px 12px 24px;
  gap: 28px;
  z-index: 200;
  transition: transform var(--t-slow);
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px;
  user-select: none;
}
.logo-text {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #A78BFA, #E879F9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -.5px;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-3);
  padding: 0 12px;
  margin: 12px 0 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--t);
  user-select: none;
}
.nav-item:hover { background: var(--bg-3); color: var(--text); }
.nav-item.active { background: rgba(124,58,237,.18); color: var(--primary-l); }
.nav-icon { width: 18px; height: 18px; stroke-width: 1.75; flex-shrink: 0; }

/* Контейнер для автодополнения (относительное позиционирование) */
.autocomplete-wrapper {
  position: relative;
  width: 100%;
}

/* Само окно с подсказками */
.suggestions-box {
  position: absolute;
  top: 100%;          /* сразу под полем ввода */
  left: 0;
  right: 0;
  background: #1c0131; /* тёмный фон, подходящий к теме */
  border: 1px solid #2d0055;
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;       /* чтобы быть поверх других элементов */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  margin-top: 4px;     /* небольшой отступ от поля */
  display: none;       /* скрыто по умолчанию */
}

.suggestions-box:not(.hidden) {
  display: block;      /* показываем, когда не hidden */
}

/* Элемент списка */
.suggestion-item {
  padding: 10px 12px;
  cursor: pointer;
  color: #eee;
  transition: background 0.2s;
  border-bottom: 1px solid #3a3a3a;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: #3a3a3a;
}

.suggestion-item.selected {
  background: #7c3aed; /* фиолетовый акцент, как у вас */
  color: white;
}

/* Если нужно, можно добавить плавное появление */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
.suggestions-box:not(.hidden) {
  animation: fadeIn 0.15s ease;
}

/* ═══════════════ MAIN WRAPPER ═════════════ */
#main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* ═══════════════ TOP NAV ══════════════════ */
#topnav {
  height: var(--topnav-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  background: rgba(8,5,26,.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 90;
  flex-shrink: 0;
}

#menu-toggle {
  display: none;
  color: var(--text-2);
  padding: 7px;
  border-radius: var(--radius-xs);
  transition: color var(--t);
  flex-shrink: 0;
}
#menu-toggle:hover { color: var(--text); }

.search-bar {
  flex: 1;
  max-width: 480px;
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 13px;
  width: 15px;
  height: 15px;
  color: var(--text-3);
  stroke-width: 2.2;
  pointer-events: none;
}
.search-bar input {
  width: 100%;
  height: 38px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text);
  padding: 0 36px 0 38px;
  font-size: 13.5px;
  transition: all var(--t);
  outline: none;
}
.search-bar input::placeholder { color: var(--text-3); }
.search-bar input:focus {
  border-color: var(--primary);
  background: var(--bg-4);
  box-shadow: 0 0 0 3px rgba(124,58,237,.14);
}
.search-clear {
  position: absolute;
  right: 10px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  border-radius: 50%;
  transition: color var(--t);
}
.search-clear:hover { color: var(--text); }

#user-area { margin-left: auto; display: flex; align-items: center; }
.user-guest { display: flex; gap: 8px; align-items: center; }
.user-logged { position: relative; }

.avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 6px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  transition: background var(--t);
  cursor: pointer;
}
.avatar-btn:hover { background: var(--bg-3); }
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  text-transform: uppercase;
}

.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 6px;
  min-width: 190px;
  box-shadow: var(--shadow);
  z-index: 300;
}
.user-menu button {
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: var(--radius-xs);
  font-size: 13.5px;
  color: var(--text-2);
  transition: all var(--t);
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-menu button svg { width: 15px; height: 15px; stroke-width: 2; }
.user-menu button:hover { background: var(--bg-4); color: var(--text); }
.user-menu button.danger { color: var(--danger); }
.user-menu button.danger:hover { background: rgba(248,113,113,.1); }
.user-menu hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* ═══════════════ CONTENT ══════════════════ */
#content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 30px 26px 40px;
  scroll-behavior: smooth;
}

/* ═══════════════════════════════════════════════════
   FULLSCREEN PLAYER — красивое открытие и анимации
   ═══════════════════════════════════════════════════ */

.fullscreen-player {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.3s ease;
  opacity: 1;
  visibility: visible;
}

.fullscreen-player.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: block !important; /* добавьте эту строку */
}

.fullscreen-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  height: 85%;
  margin: 0 auto;
  top: 50%;
  transform: translateY(-50%) scale(1);
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1);
  display: flex;
  gap: 30px;
  background: var(--bg-elevated, #1e1e1e);
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.fullscreen-player.hidden .fullscreen-content {
  transform: translateY(-50%) scale(0.9);
}

/* Левая колонка: обложка и управление */
.fullscreen-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.2s ease;
}

/* Правая колонка: текст */
.fullscreen-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.fullscreen-left.changing,
.fullscreen-right.changing {
  opacity: 0;
}

/* Обложка */
.fullscreen-cover {
  width: 80%;
  max-width: 400px;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.fullscreen-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Информация о треке */
.fullscreen-track-info {
  text-align: center;
}

.fullscreen-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary, #fff);
}

.fullscreen-artist {
  font-size: 18px;
  color: var(--text-secondary, #aaa);
}

/* Панель управления */
.fullscreen-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.fullscreen-controls .ctrl-play {
  width: 60px;
  height: 60px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0520;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.fullscreen-controls .ctrl-play:hover {
  transform: scale(1.07);
  background: var(--primary-l, #b86fff);
}

.fullscreen-controls .ctrl-play svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  stroke: none;
}

.fullscreen-controls .ctrl-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.2s ease;
  border: none;
  cursor: pointer;
}

.fullscreen-controls .ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.fullscreen-controls .ctrl-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
}

/* Кнопка лайка */
.fullscreen-like {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease;
}

.fullscreen-like.liked {
  color: var(--accent-2, #ff2ef2);
}

.fullscreen-like svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.fullscreen-like.liked svg {
  fill: currentColor;
}

/* Блок с текстом */
.fullscreen-lyrics-header {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary, #fff);
}

.fullscreen-lyrics {
  flex: 1;
  overflow-y: auto;
  padding-right: 10px;
  line-height: 1.6;
  font-size: 16px;
  white-space: pre-wrap;
  color: var(--text-primary, #eee);
  scrollbar-width: thin;
  scrollbar-color: var(--bg-4, #444) transparent;
}

.fullscreen-lyrics::-webkit-scrollbar {
  width: 5px;
}

.fullscreen-lyrics::-webkit-scrollbar-thumb {
  background: var(--bg-4, #444);
  border-radius: 10px;
}

/* Пустое состояние текста */
.lyrics-empty {
  text-align: center;
  color: var(--text-3, #666);
  padding: 40px 20px;
}

.lyrics-empty svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  stroke: currentColor;
}

/* Кнопка закрытия */
.fullscreen-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  backdrop-filter: blur(5px);
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
  z-index: 10;
}

.fullscreen-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.fullscreen-close svg {
  width: 20px;
  height: 20px;
  stroke: white;
  stroke-width: 2;
}

/* Обложка обычного плеера – кликабельна */
.player-cover {
  cursor: pointer;
}

/* Адаптивность */
@media (max-width: 900px) {
  .fullscreen-content {
    flex-direction: column;
    width: 95%;
    height: 90%;
    padding: 20px;
    gap: 20px;
  }

  .fullscreen-left {
    flex: none;
    max-height: 60%;
  }

  .fullscreen-cover {
    max-width: 200px;
  }

  .fullscreen-title {
    font-size: 22px;
  }

  .fullscreen-artist {
    font-size: 16px;
  }

  .fullscreen-controls {
    gap: 10px;
  }

  .fullscreen-controls .ctrl-play {
    width: 50px;
    height: 50px;
  }

  .fullscreen-controls .ctrl-btn {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .fullscreen-content {
    padding: 16px;
  }

  .fullscreen-cover {
    max-width: 150px;
  }

  .fullscreen-title {
    font-size: 18px;
  }

  .fullscreen-artist {
    font-size: 14px;
  }

  .fullscreen-lyrics-header {
    font-size: 16px;
  }

  .fullscreen-lyrics {
    font-size: 14px;
  }
}
/* ═══════════════ BUTTONS ══════════════════ */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 600;
  transition: all var(--t);
  cursor: pointer;
  white-space: nowrap;
  border: none;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-h), var(--primary));
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(124,58,237,.45);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary.btn-full { width: 100%; padding: 12px; font-size: 15px; border-radius: var(--radius); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  padding: 8px 17px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 500;
  transition: all var(--t);
  border: 1px solid var(--border-2);
  cursor: pointer;
}
.btn-ghost:hover { border-color: var(--text-3); color: var(--text); background: var(--bg-3); }

.btn-danger {
  background: rgba(248,113,113,.12);
  color: var(--danger);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(248,113,113,.25);
  cursor: pointer;
  transition: all var(--t);
}
.btn-danger:hover { background: rgba(248,113,113,.2); }

/* ═══════════════ FORMS ════════════════════ */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12.5px; font-weight: 600; color: var(--text-2); letter-spacing: .2px; }
.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px;
  transition: all var(--t);
  outline: none;
  width: 100%;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-3); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: var(--bg-4);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.form-group select option { background: var(--bg-3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-error {
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.3);
  border-radius: var(--radius-xs);
  color: var(--danger);
  padding: 9px 13px;
  font-size: 13px;
}
.form-success {
  background: rgba(52,211,153,.1);
  border: 1px solid rgba(52,211,153,.3);
  border-radius: var(--radius-xs);
  color: var(--success);
  padding: 9px 13px;
  font-size: 13px;
}

/* ═══════════════ AUTH MODAL ═══════════════ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
}
.modal-box {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  padding: 30px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: modalIn .25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.94) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  transition: all var(--t);
}
.modal-close:hover { background: var(--bg-3); color: var(--text); }
.modal-close svg { width: 16px; height: 16px; stroke-width: 2.2; }
.modal-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #A78BFA, #E879F9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-tabs {
  display: flex;
  background: var(--bg-3);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.auth-tab {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-xs);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: all var(--t);
}
.auth-tab.active { background: var(--primary); color: #fff; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }

/* ═══════════════ COVER UTILS ══════════════ */
.grad-cover {
  width: 100%; height: 100%;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}
.grad-cover svg { width: 40%; height: 40%; opacity: .6; }

/* ═══════════════ ALBUM CARDS ══════════════ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 16px;
}
.album-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all var(--t);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.album-card:hover {
  background: var(--bg-3);
  border-color: var(--border-2);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
}
.album-card:hover .card-play { opacity: 1; transform: translateY(0) scale(1); }
.card-cover-wrap {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
}
.card-cover-wrap img { width: 100%; height: 100%; object-fit: cover; }
.card-play {
  position: absolute;
  bottom: 8px; right: 8px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: translateY(6px) scale(.9);
  transition: all var(--t);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,.55);
  border: none;
  cursor: pointer;
}
.card-play svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.card-play:hover { transform: translateY(0) scale(1.08); background: var(--primary-h); }
.card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-sub {
  font-size: 12px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

/* ═══════════════ ARTIST CARDS ═════════════ */
.artists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 14px;
}
.artist-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 8px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--t);
  text-align: center;
}
.artist-card:hover { background: var(--bg-3); }
.artist-avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.artist-card-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.artist-card-genre { font-size: 11px; color: var(--text-2); margin-top: 1px; }

/* ═══════════════ TRACK LIST ═══════════════ */
.track-list { display: flex; flex-direction: column; }
.track-list-header {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  padding: 6px 10px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.track-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--t);
  position: relative;
}
.track-row:hover { background: var(--bg-3); }
.track-row.playing { background: rgba(124,58,237,.12); }
.track-row.playing .track-title { color: var(--primary-l); }

.track-num-col {
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  position: relative;
}
.track-num-text { transition: opacity var(--t); }
.track-row:hover .track-num-text,
.track-row.playing .track-num-text { opacity: 0; }
.track-play-overlay,
.track-anim-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--t);
}
.track-row:hover .track-play-overlay { opacity: 1; }
.track-row.playing .track-anim-overlay { opacity: 1; }
.track-play-overlay svg { width: 16px; height: 16px; fill: currentColor; stroke: none; color: var(--text); }

.playing-bars { display: flex; align-items: flex-end; gap: 2px; height: 14px; }
.playing-bars span {
  display: block;
  width: 3px;
  background: var(--primary-l);
  border-radius: 2px;
  animation: bar .7s ease-in-out infinite alternate;
}
.playing-bars span:nth-child(2) { animation-delay: .14s; }
.playing-bars span:nth-child(3) { animation-delay: .28s; }
@keyframes bar { from { height: 3px; } to { height: 14px; } }

.track-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.track-cover-sm {
  width: 40px; height: 40px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  flex-shrink: 0;
}
.track-row-w-cover { grid-template-columns: 40px 1fr auto; }

.track-title { font-size: 13.5px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-meta { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-meta a:hover { color: var(--primary-l); text-decoration: underline; }

.track-right { display: flex; align-items: center; gap: 6px; }
.track-duration { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.track-fav-btn {
  opacity: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  transition: all var(--t);
  flex-shrink: 0;
}
.track-row:hover .track-fav-btn { opacity: 1; }
.track-fav-btn.liked { opacity: 1; color: var(--accent-2); }
.track-fav-btn:hover { color: var(--accent-2); background: rgba(232,121,249,.1); }
.track-fav-btn svg { width: 15px; height: 15px; stroke-width: 2; }
.track-fav-btn.liked svg { fill: currentColor; }

/* ═══════════════ SECTION LAYOUT ═══════════ */
.section { margin-bottom: 38px; }
.section-title { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 18px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-header .section-title { margin-bottom: 0; }
.see-all { font-size: 13px; color: var(--text-2); cursor: pointer; transition: color var(--t); font-weight: 500; }
.see-all:hover { color: var(--primary-l); }

/* ═══════════════ HOME FEATURED ════════════ */
.featured-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.featured-scroll::-webkit-scrollbar { display: none; }
.featured-card {
  flex-shrink: 0;
  width: 270px;
  height: 152px;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--t);
}
.featured-card:hover { transform: scale(1.02); }
.featured-bg { position: absolute; inset: 0; }
.featured-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.1) 60%);
}
.featured-info { position: absolute; bottom: 14px; left: 14px; right: 14px; }
.featured-info .fi-title { font-size: 14px; font-weight: 700; color: #fff; }
.featured-info .fi-sub { font-size: 11.5px; color: rgba(255,255,255,.65); margin-top: 2px; }

/* ═══════════════ PAGE HERO ════════════════ */
.page-hero {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  margin-bottom: 36px;
  padding: 28px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  min-height: 240px;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,.1) 100%);
  z-index: 1;
}
.page-hero > * { position: relative; z-index: 2; }
.hero-cover {
  width: 200px; height: 200px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
  flex-shrink: 0;
}
.hero-cover.circle { border-radius: 50%; }
.hero-info { flex: 1; min-width: 0; }
.hero-type { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: var(--accent); margin-bottom: 8px; }
.hero-title { font-size: clamp(22px, 3.5vw, 40px); font-weight: 800; color: #fff; line-height: 1.1; margin-bottom: 8px; }
.hero-sub { font-size: 13.5px; color: rgba(255,255,255,.65); margin-bottom: 18px; }
.hero-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hero-play-btn {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--bg);
  transition: all var(--t);
  cursor: pointer; border: none; flex-shrink: 0;
}
.hero-play-btn svg { fill: currentColor; stroke: none; width: 22px; height: 22px; }
.hero-play-btn:hover { transform: scale(1.07); box-shadow: 0 0 0 6px rgba(255,255,255,.15); }
.hero-fav-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7);
  transition: all var(--t); cursor: pointer; background: none;
}
.hero-fav-btn:hover,
.hero-fav-btn.liked { border-color: var(--accent-2); color: var(--accent-2); }
.hero-fav-btn.liked svg { fill: currentColor; }
.hero-fav-btn svg { width: 18px; height: 18px; stroke-width: 2; }

/* ═══════════════ LIBRARY TABS ═════════════ */
.lib-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-2);
  padding: 4px;
  border-radius: var(--radius);
  width: fit-content;
  margin-bottom: 24px;
}
.lib-tab {
  padding: 8px 22px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--t);
}
.lib-tab.active { background: var(--primary); color: #fff; }

.lib-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}
.lib-empty svg { width: 48px; height: 48px; margin: 0 auto 16px; stroke: var(--text-3); }
.lib-empty h3 { font-size: 17px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.lib-empty p { font-size: 13.5px; }

/* ═══════════════ SEARCH VIEW ══════════════ */
.search-prompt {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}
.search-prompt svg { width: 52px; height: 52px; margin: 0 auto 16px; }
.search-prompt h3 { font-size: 18px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.search-prompt p { font-size: 13.5px; }
.genre-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; justify-content: center; }
.genre-chip {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all var(--t);
  border: 1px solid var(--border-2);
  color: var(--text-2);
}
.genre-chip:hover { border-color: var(--primary); color: var(--primary-l); background: rgba(124,58,237,.1); }

/* ═══════════════ UPLOAD VIEW ══════════════ */
.upload-wrap { max-width: 580px; }
.view-title { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.view-subtitle { color: var(--text-2); font-size: 14px; margin-bottom: 28px; }
.upload-form { display: flex; flex-direction: column; gap: 18px; }

.file-drop {
  border: 2px dashed var(--border-2);
  border-radius: var(--radius);
  padding: 34px;
  text-align: center;
  cursor: pointer;
  transition: all var(--t);
  background: var(--bg-2);
}
.file-drop:hover,
.file-drop.drag-over { border-color: var(--primary); background: rgba(124,58,237,.07); }
.file-drop svg { width: 40px; height: 40px; margin: 0 auto 12px; stroke: var(--text-3); }
.file-drop p { font-size: 13.5px; color: var(--text-2); }
.file-drop .drop-hint { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.file-selected {
  display: flex; align-items: center; gap: 10px;
  background: rgba(124,58,237,.1);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 13.5px; color: var(--primary-l);
}
.file-selected svg { flex-shrink: 0; stroke: var(--primary-l); }

.cover-row { display: flex; gap: 14px; align-items: flex-start; }
.cover-thumb {
  width: 80px; height: 80px;
  border-radius: var(--radius-sm);
  border: 2px dashed var(--border-2);
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color var(--t);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  background: var(--bg-3);
}
.cover-thumb:hover { border-color: var(--primary); }
.cover-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ═══════════════ LOADING ═══════════════════ */
.page-loading {
  display: flex; align-items: center; justify-content: center;
  height: 200px; color: var(--text-3);
}
.spinner {
  width: 30px; height: 30px;
  border: 3px solid var(--bg-4);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════ TOAST ════════════════════ */
#toast-container {
  position: fixed;
  bottom: calc(var(--player-h) + 18px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex; flex-direction: column-reverse; gap: 8px;
  pointer-events: none;
  width: max-content; max-width: calc(100vw - 40px);
}
.toast {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  font-size: 13.5px; color: var(--text);
  box-shadow: var(--shadow);
  white-space: nowrap;
  animation: toastIn .28s ease;
  text-align: center;
}
.toast.success { border-color: rgba(52,211,153,.4); }
.toast.error   { border-color: rgba(248,113,113,.4); color: var(--danger); }
@keyframes toastIn { from { opacity:0; transform:translateY(10px) scale(.94); } to { opacity:1; transform:translateY(0) scale(1); } }

/* ═══════════════ PLAYER ════════════════════ */
#player {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--player-h);
  background: rgba(12, 8, 30, .96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 290px 1fr 290px;
  align-items: center;
  padding: 0 22px;
  gap: 20px;
  z-index: 500;
}

.player-track { display: flex; align-items: center; gap: 12px; min-width: 0; }
.player-cover {
  width: 50px; height: 50px;
  border-radius: var(--radius-xs);
  overflow: hidden; flex-shrink: 0;
  background: var(--bg-4);
}
.player-info { min-width: 0; flex: 1; }
.player-title { font-size: 13.5px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-artist { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.player-like {
  flex-shrink: 0; padding: 6px; border-radius: 50%;
  color: var(--text-3); transition: all var(--t);
}
.player-like:hover { color: var(--accent-2); }
.player-like.liked { color: var(--accent-2); }
.player-like.liked svg { fill: currentColor; }
.player-like svg { width: 18px; height: 18px; stroke-width: 2; }

.player-center { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.player-controls { display: flex; align-items: center; gap: 6px; }
.ctrl-btn {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); transition: all var(--t);
}
.ctrl-btn:hover { color: var(--text); }
.ctrl-btn.active { color: var(--primary-l); }
.ctrl-btn svg { width: 17px; height: 17px; stroke-width: 1.8; }

.ctrl-play {
  width: 38px; height: 38px; border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: #0a0520; transition: all var(--t); flex-shrink: 0;
}
.ctrl-play:hover { transform: scale(1.07); background: var(--primary-l); }
.ctrl-play svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }

.player-progress { display: flex; align-items: center; gap: 10px; width: 100%; }
.time-label, .time { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 30px; }
.time-label.right { text-align: right; }

.progress-bar {
  flex: 1; height: 4px;
  background: var(--bg-4);
  border-radius: var(--radius-full);
  cursor: pointer; position: relative;
  transition: height var(--t);
}
.progress-bar:hover { height: 6px; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius-full);
  width: 0%;
  transition: width .1s linear;
  pointer-events: none;
}
.progress-thumb {
  position: absolute; top: 50%; left: 0%;
  transform: translate(-50%, -50%) scale(0);
  width: 12px; height: 12px;
  border-radius: 50%; background: #fff;
  transition: transform var(--t), left .1s linear;
  pointer-events: none;
}
.progress-bar:hover .progress-thumb { transform: translate(-50%, -50%) scale(1); }

.player-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.volume-ctrl { display: flex; align-items: center; gap: 8px; }
.volume-ctrl input[type="range"] {
  -webkit-appearance: none;
  width: 88px; height: 4px;
  background: var(--bg-4);
  border-radius: var(--radius-full);
  outline: none; cursor: pointer;
  accent-color: var(--primary);
}
.volume-ctrl input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%; background: #fff; cursor: pointer;
}

.no-audio-badge {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--warn);
  background: rgba(251,191,36,.1);
  border: 1px solid rgba(251,191,36,.25);
  padding: 4px 10px;
  border-radius: var(--radius-full); white-space: nowrap;
}
.no-audio-badge svg { width: 13px; height: 13px; stroke: var(--warn); }

/* ═══════════════ MOBILE NAV ════════════════ */
#mobile-nav {
  display: none;
  position: fixed;
  bottom: var(--player-h);
  left: 0; right: 0;
  background: rgba(12,8,30,.96);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 400;
  justify-content: space-around;
  align-items: center;
  height: 58px;
}
.mobile-nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 3px;
  padding: 8px 4px;
  color: var(--text-3); font-size: 10px; font-weight: 500;
  transition: color var(--t); cursor: pointer;
}
.mobile-nav-item svg { width: 22px; height: 22px; stroke-width: 1.75; }
.mobile-nav-item.active { color: var(--primary-l); }

/* ═══════════════ SIDEBAR OVERLAY ═══════════ */
#sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 199;
  backdrop-filter: blur(2px);
}
#sidebar-overlay.visible { display: block; }

/* ═══════════════ RESPONSIVE ════════════════ */
@media (max-width: 900px) {
  #sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-100%); z-index: 300;
    box-shadow: 6px 0 30px rgba(0,0,0,.6);
  }
  #sidebar.open { transform: translateX(0); }
  #menu-toggle { display: flex; }
  #mobile-nav { display: flex; }
  #app { padding-bottom: calc(var(--player-h) + 58px); }
  #toast-container { bottom: calc(var(--player-h) + 58px + 12px); }
  #player { grid-template-columns: 1fr auto; }
  .player-right { display: none; }
}

@media (max-width: 680px) {
  :root { --topnav-h: 56px; --player-h: 64px; }
  #content { padding: 20px 16px 28px; }
  #player { grid-template-columns: 1fr auto; padding: 0 14px; gap: 12px; }
  .player-cover { width: 42px; height: 42px; }
  .player-center { display: none; }
  .page-hero { flex-direction: column; align-items: flex-start; padding: 18px; min-height: unset; }
  .hero-cover { width: 130px; height: 130px; }
  .hero-title { font-size: 22px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .artists-grid { grid-template-columns: repeat(3, 1fr); }
  .featured-card { width: 200px; height: 118px; }
  .form-row { grid-template-columns: 1fr; }
  .user-guest .btn-ghost { display: none; }
  .search-bar { max-width: unset; }
}

@media (max-width: 420px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .artists-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════════════════════════
   EXTENDED STYLES v2 — Animations & Components
   ══════════════════════════════════════════════ */

/* ─── AMBIENT BACKGROUND ────────────────────── */
#ambient-bg {
  position: fixed;
  inset: 0;
  opacity: .06;
  z-index: 0;
  pointer-events: none;
  transition: background 3s ease;
  filter: blur(120px);
}

/* ─── PAGE TRANSITIONS ──────────────────────── */
#content {
  transition: opacity .2s ease, transform .2s ease;
}
.page-exit {
  opacity: 0 !important;
  transform: translateY(12px) !important;
}
.page-enter {
  opacity: 0;
  transform: translateY(-8px);
}

/* ─── TOAST EXTENDED ────────────────────────── */
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast-icon {
  font-size: 14px;
  flex-shrink: 0;
}
.toast.success .toast-icon { color: var(--success); }
.toast.error   .toast-icon { color: var(--danger); }
.toast-out {
  animation: toastOut .32s ease forwards;
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(8px) scale(.92); }
}

/* ─── RIPPLE EFFECT ─────────────────────────── */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  transform: scale(0);
  animation: rippleAnim .6s linear;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(2.5); opacity: 0; }
}

/* ─── SKELETON LOADING ──────────────────────── */
.skeleton-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.skel {
  border-radius: var(--radius-xs);
  background: linear-gradient(90deg, var(--bg-3) 25%, var(--bg-4) 50%, var(--bg-3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}
.skel-cover {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
}
.skel-title { height: 13px; width: 80%; }
.skel-sub   { height: 11px; width: 55%; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── HOME HERO BANNER ──────────────────────── */
.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 36px 36px 36px;
  margin-bottom: 38px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(124,58,237,.15) 0%, rgba(192,132,252,.05) 100%);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  min-height: 220px;
}
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(124,58,237,.12) 0%, transparent 70%);
  pointer-events: none;
}
.home-hero-text { flex: 1; min-width: 0; position: relative; z-index: 1; }
.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(124,58,237,.18);
  border: 1px solid rgba(124,58,237,.35);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-l);
  margin-bottom: 16px;
  letter-spacing: .3px;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .6; transform: scale(1.3); }
}
.home-hero-title {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 900;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -1px;
}
.grad-text {
  font-style: normal;
  background: linear-gradient(135deg, #A78BFA, #E879F9, #60A5FA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: gradShift 4s linear infinite;
}
@keyframes gradShift {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}
.home-hero-sub {
  font-size: 15px;
  color: var(--text-2);
  margin-bottom: 24px;
}
.home-hero-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ─── VINYL DISC ANIMATION ──────────────────── */
.home-hero-visual {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.vinyl-wrap {
  position: relative;
  width: 180px;
  height: 180px;
}
.vinyl {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at 50%, #2a1f4a 0%, #0d0820 35%, #1a0d35 50%, #0a0617 70%, #160c2e 100%);
  box-shadow:
    0 20px 60px rgba(0,0,0,.7),
    0 0 0 2px rgba(124,58,237,.2),
    inset 0 0 30px rgba(124,58,237,.08);
  animation: spin 8s linear infinite;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vinyl-grooves {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50%,
      transparent 0px, transparent 6px,
      rgba(124,58,237,.06) 6px, rgba(124,58,237,.06) 7px
    );
}
.vinyl-label {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7C3AED, #C084FC);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(124,58,237,.5);
  position: relative;
  z-index: 1;
}
.vinyl-shadow {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 20px;
  background: radial-gradient(ellipse, rgba(124,58,237,.3) 0%, transparent 70%);
  filter: blur(8px);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── FLOATING NOTES ────────────────────────── */
.floating-notes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.note {
  position: absolute;
  font-size: 18px;
  color: var(--accent);
  animation: float 6s ease-in-out infinite;
  opacity: .5;
}
.n1 { top: 10%; left: 5%;  animation-delay: 0s;   font-size: 14px; }
.n2 { top: 20%; right: 5%; animation-delay: 1.5s; font-size: 20px; color: var(--primary-l); }
.n3 { bottom: 20%; left: 8%; animation-delay: 3s; font-size: 16px; }
.n4 { bottom: 10%; right: 8%;animation-delay: 4.5s; font-size: 22px; color: var(--accent-2); }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: .4; }
  33%       { transform: translateY(-12px) rotate(6deg); opacity: .7; }
  66%       { transform: translateY(-6px) rotate(-4deg); opacity: .5; }
}

/* ─── FEATURED CARD EXTENDED ────────────────── */
.featured-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.7);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0520;
  opacity: 0;
  transition: all var(--t);
  z-index: 2;
  cursor: pointer;
  border: none;
}
.featured-play-btn svg { width: 18px; height: 18px; }
.featured-card:hover .featured-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.featured-card {
  transition: transform var(--t), box-shadow var(--t);
}
.featured-card:hover {
  transform: scale(1.03);
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
}

/* ─── ALBUM CARD EXTENDED ───────────────────── */
.card-meta { display: flex; flex-direction: column; gap: 3px; }

/* ─── PAGE HERO EXTENDED ────────────────────── */
.page-hero {
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 32px;
  position: relative;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--hero-grad);
  opacity: .85;
  z-index: 0;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.6) 0%, rgba(0,0,0,.15) 60%, rgba(0,0,0,.05) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 28px;
  align-items: flex-end;
  padding: 32px 28px;
  min-height: 240px;
}
.hero-cover {
  width: 180px;
  height: 180px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.7);
  flex-shrink: 0;
  animation: heroImgIn .4s ease .1s both;
}
.hero-cover.circle { border-radius: 50%; }
@keyframes heroImgIn {
  from { opacity: 0; transform: scale(.9) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.hero-info { flex: 1; min-width: 0; animation: heroInfoIn .4s ease .15s both; }
@keyframes heroInfoIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-artist {
  cursor: pointer;
  transition: color var(--t);
}
.hero-artist:hover { color: var(--primary-l); text-decoration: underline; }

/* ─── LIBRARY EXTENDED ──────────────────────── */
.lib-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  background: rgba(124,58,237,.2);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
  margin-left: 4px;
  color: var(--primary-l);
}
.lib-tab.active .lib-count {
  background: rgba(255,255,255,.25);
  color: #fff;
}
.lib-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(124,58,237,.12);
  border: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.lib-empty-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--primary-l);
}

/* ─── UPLOAD EXTENDED ───────────────────────── */
.file-size {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-3);
  flex-shrink: 0;
}
.file-selected { flex-wrap: nowrap; }

/* ─── PLAYER EXTENDED ───────────────────────── */
.ctrl-play.is-playing {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 0 20px rgba(124,58,237,.45);
}

/* ─── NAV ACTIVE INDICATOR ──────────────────── */
.nav-item.active {
  background: rgba(124,58,237,.15);
  color: var(--primary-l);
  position: relative;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
}

/* ─── MOBILE NAV ACTIVE ─────────────────────── */
.mobile-nav-item.active svg {
  filter: drop-shadow(0 0 6px rgba(167,139,250,.6));
}

/* ─── SEARCH PROMPT ICON ────────────────────── */
.search-prompt-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(124,58,237,.1);
  border: 1px solid var(--border-2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.search-prompt-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--primary-l);
  stroke-width: 2;
}
.search-prompt { display: flex; flex-direction: column; align-items: center; }

/* ─── GRADIENT TEXT UTIL ────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #A78BFA, #E879F9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── TRACK ROW — HOVER STATE ENHANCEMENT ───── */
.track-row {
  transition: background var(--t), transform .15s ease;
}
.track-row:hover {
  transform: translateX(2px);
}

/* ─── ALBUM/ARTIST CARD ANIMATIONS ─────────── */
.album-card, .artist-card {
  animation: cardIn .3s ease both;
}
.album-card:nth-child(1) { animation-delay: .05s; }
.album-card:nth-child(2) { animation-delay: .08s; }
.album-card:nth-child(3) { animation-delay: .11s; }
.album-card:nth-child(4) { animation-delay: .14s; }
.album-card:nth-child(5) { animation-delay: .17s; }
.album-card:nth-child(6) { animation-delay: .2s;  }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ─── PLAYER GLOW WHEN PLAYING ──────────────── */
#player {
  transition: box-shadow .5s ease;
}
body:has(#icon-pause:not(.hidden)) #player {
  box-shadow: 0 -2px 30px rgba(124,58,237,.12);
}

/* ─── SECTION TITLE ACCENT ──────────────────── */
.section-title {
  position: relative;
  display: inline-block;
}

/* ─── SIDEBAR LOGO HOVER ────────────────────── */
.sidebar-logo {
  cursor: pointer;
  transition: opacity var(--t);
}
.sidebar-logo:hover { opacity: .85; }

/* ─── RESPONSIVE ADDITIONS ──────────────────── */
@media (max-width: 760px) {
  .home-hero {
    flex-direction: column;
    padding: 24px 20px;
    min-height: unset;
    gap: 20px;
  }
  .home-hero-visual {
    width: 140px;
    height: 140px;
    align-self: center;
  }
  .vinyl-wrap, .vinyl { width: 130px; height: 130px; }
  .vinyl-label { width: 42px; height: 42px; }
  .home-hero-title { font-size: clamp(24px, 7vw, 36px); }
  .hero-content {
    flex-direction: column;
    align-items: flex-start;
    min-height: unset;
    padding: 20px;
  }
  .hero-cover { width: 120px; height: 120px; }
}

@media (max-width: 480px) {
  .home-hero { border-radius: 16px; }
  .home-hero-badge { font-size: 11px; }
  .home-hero-actions { gap: 8px; }
  .home-hero-actions .btn-ghost { display: none; }
  .floating-notes { display: none; }
}

/* ─── SCROLLBAR for content ─────────────────── */
#content::-webkit-scrollbar { width: 4px; }
#content::-webkit-scrollbar-thumb { background: var(--bg-hover); }

/* ─── SECTION ANIMATIONS ────────────────────── */
.section {
  animation: sectionIn .35s ease both;
}
@keyframes sectionIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── USER MENU ANIMATION ───────────────────── */
.user-menu:not(.hidden) {
  animation: menuIn .18s ease;
}
@keyframes menuIn {
  from { opacity: 0; transform: scale(.95) translateY(-6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ─── SIDEBAR SMOOTH CLOSE MOBILE ───────────── */
@media (max-width: 900px) {
  #sidebar {
    transition: transform var(--t-slow), box-shadow var(--t-slow);
  }
}

/* ─── FEATURED SCROLL SNAP ──────────────────── */
.featured-scroll {
  scroll-snap-type: x mandatory;
}
.featured-card {
  scroll-snap-align: start;
}

/* ─── PROGRESS BAR GLOW ─────────────────────── */
.progress-fill {
  box-shadow: 2px 0 10px rgba(192,132,252,.4);
}

/* ─── EGG MASCOT LOGO ───────────────────────── */
.logo-egg {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(225,0,255,.5));
  transition: filter var(--t), transform var(--t);
  flex-shrink: 0;
}
.sidebar-logo:hover .logo-egg {
  filter: drop-shadow(0 0 16px rgba(225,0,255,.8));
  transform: rotate(-8deg) scale(1.08);
}
.modal-logo .logo-egg {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 12px rgba(225,0,255,.6));
}

/* ─── LYRICS BUTTON IN PLAYER ───────────────── */
.player-lyrics-btn {
  flex-shrink: 0;
  padding: 6px;
  border-radius: 50%;
  color: var(--text-3);
  transition: all var(--t);
}
.player-lyrics-btn:hover { color: var(--accent); }
.player-lyrics-btn.active {
  color: var(--accent);
  background: rgba(225,0,255,.12);
}
.player-lyrics-btn svg { stroke-width: 1.75; stroke: currentColor; fill: none; }

/* ─── LYRICS PANEL ──────────────────────────── */
.lyrics-panel {
  position: fixed;
  bottom: var(--player-h);
  left: 0; right: 0;
  height: min(480px, 60dvh);
  background: rgba(10, 0, 23, .97);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-top: 1px solid var(--border-2);
  z-index: 450;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -12px 50px rgba(139,28,247,.18);
  transform: translateY(0);
  transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .35s ease;
}
.lyrics-panel.hidden {
  display: flex !important;
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}
.lyrics-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.lyrics-panel-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lyrics-track-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lyrics-artist-name {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}
.lyrics-panel-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lyrics-edit-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid rgba(225,0,255,.3);
  background: rgba(225,0,255,.08);
  transition: all var(--t);
  cursor: pointer;
}
.lyrics-edit-btn:hover { background: rgba(225,0,255,.15); border-color: var(--accent); }
.lyrics-edit-btn svg { stroke: currentColor; fill: none; flex-shrink: 0; }
.lyrics-close-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
  transition: all var(--t);
}
.lyrics-close-btn:hover { background: var(--bg-3); color: var(--text); }
.lyrics-close-btn svg { stroke: currentColor; fill: none; }

.lyrics-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px 28px;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-4) transparent;
}
.lyrics-text {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}
.lyrics-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-3);
}
.lyrics-empty svg { width: 44px; height: 44px; margin: 0 auto 14px; stroke: var(--text-3); fill: none; }
.lyrics-empty h3 { font-size: 15px; color: var(--text-2); margin-bottom: 6px; }
.lyrics-empty p { font-size: 13px; }

.lyrics-edit-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 22px;
  gap: 12px;
  overflow: hidden;
}
.lyrics-textarea {
  flex: 1;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  padding: 14px;
  font-size: 14px;
  line-height: 1.7;
  resize: none;
  outline: none;
  font-family: inherit;
  transition: border-color var(--t);
}
.lyrics-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(225,0,255,.1);
}
.lyrics-textarea::placeholder { color: var(--text-3); }
.lyrics-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .lyrics-panel { bottom: calc(var(--player-h) + 58px); height: min(400px, 55dvh); }
}
@media (max-width: 680px) {
  .lyrics-panel { bottom: calc(var(--player-h) + 58px); height: min(350px, 50dvh); }
  .lyrics-text { font-size: 14px; }
}

/* ─── HOME EGG MASCOT ───────────────────────── */
.egg-hero-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.egg-hero-img {
  width: 155px;
  height: 155px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 28px rgba(225,0,255,.55))
    drop-shadow(0 0 60px rgba(139,28,247,.3));
  animation: eggFloat 4s ease-in-out infinite;
  position: relative;
  z-index: 1;
}
@keyframes eggFloat {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%       { transform: translateY(-14px) rotate(4deg); }
}
.egg-hero-ring {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  border: 1.5px dashed rgba(225,0,255,.2);
  animation: spin 12s linear infinite;
}
.egg-hero-ring-2 {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  border: 1px solid rgba(139,28,247,.12);
  animation: spin 20s linear infinite reverse;
}
.egg-hero-shadow {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 90px; height: 14px;
  background: radial-gradient(ellipse, rgba(225,0,255,.25) 0%, transparent 70%);
  filter: blur(6px);
}

/* ─── MXM NAV GLOW ──────────────────────────── */
.nav-item.active {
  background: rgba(225,0,255,.08);
}
.nav-item.active::before {
  background: linear-gradient(to bottom, var(--accent), var(--primary));
}

/* ─── PLAY BUTTON PULSE ─────────────────────── */
.hero-play-btn:hover::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  animation: heroPlayPulse .6s ease-out;
}
.hero-play-btn { position: relative; }
@keyframes heroPlayPulse {
  from { transform: scale(1); opacity: 1; }
  to   { transform: scale(1.6); opacity: 0; }
}
