/* ==========================================================
   XONIFY MUSIC WEB - HOJA DE ESTILOS (CYBERPUNK NEÓN)
   ========================================================== */

:root {
  --bg-dark: #0a0c13;
  --sidebar-bg: #0f121d;
  --card-bg: #141827;
  --card-hover: #1b2136;
  --border-color: rgba(255, 255, 255, 0.08);

  --accent-purple: #8b5cf6;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --shadow-neon: 0 0 25px rgba(6, 182, 212, 0.25);
  --shadow-glow: 0 8px 32px rgba(0, 0, 0, 0.5);
  --player-height: 86px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  overflow: hidden;
  height: 100vh;
  user-select: none;
}

/* ═══════════════════════════════════════════
   SISTEMA DE PARTÍCULAS Y ORBES DE FONDO
   ═══════════════════════════════════════════ */
.bg-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Orbe superior izquierdo — púrpura */
.bg-particles::before {
  content: '';
  position: absolute;
  top: -20%;
  left: -15%;
  width: 70vw;
  height: 70vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, rgba(139, 92, 246, 0.07) 40%, transparent 70%);
  animation: orbDrift1 20s ease-in-out infinite;
  filter: blur(70px);
}

/* Orbe inferior derecho — cian */
.bg-particles::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -15%;
  width: 65vw;
  height: 65vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.18) 0%, rgba(6, 182, 212, 0.05) 40%, transparent 70%);
  animation: orbDrift2 24s ease-in-out infinite;
  filter: blur(80px);
}

@keyframes orbDrift1 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.8; }
  33%       { transform: translate(4vw, 6vh) scale(1.1); opacity: 1; }
  66%       { transform: translate(-2vw, 3vh) scale(0.95); opacity: 0.7; }
}

@keyframes orbDrift2 {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
  33%       { transform: translate(-5vw, -4vh) scale(1.08); opacity: 0.9; }
  66%       { transform: translate(3vw, -6vh) scale(1.05); opacity: 1; }
}

/* Orbe central */
.bg-orb-mid {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 55vw;
  height: 55vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  animation: orbMid 28s ease-in-out infinite;
  filter: blur(60px);
}

@keyframes orbMid {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50%       { transform: translate(-50%, -50%) scale(1.25); opacity: 0.9; }
}

.bg-particles .particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0%   { opacity: 0; transform: translateY(100vh) scale(0); }
  8%   { opacity: 0.9; }
  85%  { opacity: 0.5; }
  100% { opacity: 0; transform: translateY(-20vh) scale(1.5); }
}

/* CONTENEDOR PRINCIPAL TIPO APLICACIÓN DE ESCRITORIO */
.app-container {
  display: flex;
  height: calc(100vh - var(--player-height));
  width: 100vw;
  position: relative;
  z-index: 1;
}

/* ==========================================================
   BARRA LATERAL (SIDEBAR)
   ========================================================== */
.sidebar {
  width: 250px;
  background: rgba(10, 12, 20, 0.70);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-right: 1px solid rgba(139, 92, 246, 0.14);
  box-shadow: 2px 0 40px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  gap: 14px;
  position: relative;
  z-index: 10;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 2px;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.nav-item:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.04);
  transform: translateX(6px);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.45), 0 0 24px rgba(6, 182, 212, 0.35);
}

.nav-item.active {
  color: var(--text-primary);
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.15), rgba(6, 182, 212, 0.1));
  border-left: 3px solid var(--accent-cyan);
}

.nav-item.active svg {
  color: var(--accent-cyan);
}

/* PIE DE BARRA LATERAL (LOGIN Y PERFIL) */
.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* BOTÓN INICIAR SESIÓN CON GOOGLE (Entre Sync e Invitado) */
.google-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  color: #1e293b;
  border: none;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.google-auth-btn:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
}

.google-auth-btn:active {
  transform: scale(0.98);
}

.google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* TARJETA DE USUARIO */
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  overflow: hidden;
  color: white;
  flex-shrink: 0;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.user-name {
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-id {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-action-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: all 0.2s;
}

.user-action-btn:hover {
  color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================
   ÁREA PRINCIPAL (MAIN CONTENT)
   ========================================================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 24px 36px;
  background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.09), transparent 60%),
              radial-gradient(circle at bottom left, rgba(6, 182, 212, 0.05), transparent 55%);
  position: relative;
  z-index: 1;
}

.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.search-bar-container {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(20, 24, 39, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: 24px;
  width: 430px;
  max-width: 100%;
  transition: all 0.2s;
}

.search-bar-container:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

.search-bar-container svg {
  color: var(--text-muted);
}

.search-bar-container input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  width: 100%;
}

/* BOTÓN DE PERFIL EN CABECERA SUPERIOR DERECHA */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-profile-avatar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 5px 14px 5px 6px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-profile-avatar:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

.avatar-ring {
  padding: 2px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-img-wrap {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

.avatar-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-profile-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* VISTAS */
.view-section {
  display: none;
  flex-direction: column;
  gap: 24px;
}

.view-section.active {
  display: flex;
}

.genre-pill-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.35) transparent;
}

.genre-pill-bar::-webkit-scrollbar {
  height: 4px;
}

.genre-pill-bar::-webkit-scrollbar-track {
  background: transparent;
}

.genre-pill-bar::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.35);
  border-radius: 4px;
}

.genre-pill-divider {
  width: 1px;
  height: 22px;
  background: var(--border-color);
  flex-shrink: 0;
  margin: 0 2px;
}

.genre-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(20, 24, 39, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s;
}

.genre-pill.mood-pill svg {
  color: var(--accent-purple);
}

.genre-pill.mood-pill.active svg {
  color: white;
}

.genre-pill:hover {
  color: var(--text-primary);
  background: rgba(27, 33, 54, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.45), 0 0 24px rgba(6, 182, 212, 0.35);
}

.genre-pill.active {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  color: white;
  border-color: transparent;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

.section-title-row {
  margin-bottom: 16px;
}

.section-title-row h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.section-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* GRID DE CANCIONES */
.tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.track-card {
  background: rgba(20, 24, 39, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.track-card:hover {
  background: rgba(27, 33, 54, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateY(-4px);
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: var(--shadow-glow), 0 0 25px rgba(6, 182, 212, 0.12);
}

.track-cover-box {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #000;
}

.track-cover-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.track-card:hover .track-cover-box img {
  transform: scale(1.05);
}

.card-play-overlay {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s ease;
}

.track-card:hover .card-play-overlay {
  opacity: 1;
  transform: translateY(0);
}

.track-title {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-tags-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: -4px;
}

.track-tag-chip {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.16);
  color: #c4b5fd;
  white-space: nowrap;
}

.track-tag-chip.lang {
  background: rgba(6, 182, 212, 0.16);
  color: #67e8f9;
}

/* ==========================================================
   REPRODUCTOR INFERIOR PERMANENTE (BOTTOM PLAYER)
   ========================================================== */
.bottom-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--player-height);
  background: rgba(8, 10, 18, 0.72);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  border-top: 1px solid rgba(139, 92, 246, 0.18);
  box-shadow: 0 -1px 0 rgba(255,255,255,0.03) inset,
              0 -8px 40px rgba(0, 0, 0, 0.45),
              0 -2px 20px rgba(139, 92, 246, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 100;
}

.player-track-info {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 280px;
}

.player-cover {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.player-title {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* CONTROLES CENTRALES */
.player-center-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 580px;
}

.playback-buttons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.control-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn:hover {
  color: var(--text-primary);
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.45), 0 0 24px rgba(6, 182, 212, 0.35);
}

.play-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
  transition: all 0.2s ease;
}

.play-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.45), 0 0 24px rgba(6, 182, 212, 0.35);
}

.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.time-label {
  font-size: 0.75rem;
  font-family: monospace;
  color: var(--text-muted);
  width: 36px;
  text-align: center;
}

.slider-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-cyan);
}

.player-right-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 280px;
  justify-content: flex-end;
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 120px;
  color: var(--text-muted);
}

/* ==========================================================
   DRAWER / MODAL DE PERFIL ESTILO SPOTIFY / ANDROID APP
   ========================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  display: none;
  justify-content: flex-end;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.drawer-backdrop.open {
  display: flex;
}

.profile-drawer {
  width: 100%;
  max-width: 380px;
  height: 100vh;
  background: rgba(18, 18, 24, 0.82);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  border-left: 1px solid rgba(139, 92, 246, 0.2);
  box-shadow: var(--shadow-glow), -10px 0 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 20px 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(24, 24, 32, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.drawer-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.close-drawer-btn {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.close-drawer-btn:hover {
  color: white;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
}

.drawer-user-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

.drawer-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drawer-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.drawer-user-name {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-user-id {
  font-size: 0.7rem;
  font-family: monospace;
  color: var(--accent-cyan);
}

.drawer-user-email {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-sync-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.2;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.drawer-sync-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.drawer-sync-status[data-status="ok"] {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.35);
}

.drawer-sync-status[data-status="pending"] {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

.drawer-sync-status[data-status="error"] {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.35);
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 0 4px;
}

.drawer-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.drawer-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.menu-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-item-arrow {
  color: var(--accent-cyan);
  font-weight: 700;
}

.menu-item-status {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.drawer-version-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.drawer-footer-actions {
  margin-top: auto;
  padding-top: 16px;
}

.drawer-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.drawer-logout-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* COLORES DE APOYO */
.text-cyan { color: var(--accent-cyan); }
.text-purple { color: var(--accent-purple); }
.text-amber { color: #f59e0b; }
.font-mono { font-family: monospace; }

.hidden {
  display: none !important;
}

/* ESTADO VACÍO */
.empty-state {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 40px 20px;
  text-align: center;
  grid-column: 1 / -1;
}

.track-card.now-playing {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

/* COLA */
.queue-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.queue-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.queue-item.queue-current {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.12), transparent);
  border-left: 3px solid var(--accent-cyan);
}

.queue-idx {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 24px;
  text-align: center;
}

.queue-current .queue-idx {
  color: var(--accent-cyan);
}

.queue-cover {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #000;
}

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

.queue-title {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-current .queue-title {
  color: var(--accent-cyan);
}

.queue-artist {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.queue-dur {
  font-size: 0.75rem;
  font-family: monospace;
  color: var(--text-muted);
}

/* SCROLLBAR */
.main-content::-webkit-scrollbar,
.drawer-content::-webkit-scrollbar {
  width: 8px;
}

.main-content::-webkit-scrollbar-track,
.drawer-content::-webkit-scrollbar-track {
  background: transparent;
}

.main-content::-webkit-scrollbar-thumb,
.drawer-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .sidebar {
    width: 72px;
    padding: 16px 8px;
    align-items: center;
  }

  .logo-text, .nav-item span, .user-details, #googleLoginText {
    display: none;
  }

  .google-auth-btn {
    padding: 10px;
    justify-content: center;
  }

  .nav-item {
    justify-content: center;
    padding: 12px;
  }

  .user-card {
    justify-content: center;
    padding: 8px;
  }

  .user-action-btn {
    display: none;
  }

  .main-content {
    padding: 16px 20px;
  }

  .search-bar-container {
    width: 200px;
  }

  .player-track-info {
    width: 180px;
  }

  .player-right-controls {
    width: 120px;
  }
}

@media (max-width: 600px) {
  .sidebar {
    display: none;
  }

  .bottom-player {
    padding: 0 12px;
  }

  .player-right-controls {
    width: auto;
  }

  .volume-container {
    display: none;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==========================================================
   INTERACCIÓN Y MEJORAS: BIBLIOTECA, SHUFFLE Y NOW PLAYING
   ========================================================== */

/* 1. Clickable Player Info & Shuffle */
.clickable-player-info {
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
  user-select: none;
  border-radius: 12px;
  padding: 4px 8px;
}

.clickable-player-info:hover {
  background: rgba(255, 255, 255, 0.04);
}

.clickable-player-info:hover .player-title {
  color: var(--accent-cyan);
}

.player-mini-like-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.player-mini-like-btn:hover {
  color: #ff3366;
  transform: scale(1.15);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.45), 0 0 24px rgba(6, 182, 212, 0.35);
}

.player-mini-like-btn.liked {
  color: #ff3366;
}

.control-btn.active {
  color: var(--accent-cyan) !important;
  filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.6));
}

/* 2. Vista Biblioteca */
.library-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.btn-create-playlist {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
  transition: all 0.2s ease;
}

.btn-create-playlist:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.playlist-card {
  background: rgba(20, 24, 39, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.playlist-card:hover {
  background: rgba(27, 33, 54, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.playlist-card-cover {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 12px;
  background: #111422;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.playlist-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.favorite-cover {
  background: linear-gradient(135deg, #7928ca, #ff0080);
  color: #fff;
}

.playlist-quick-play {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-cyan);
  color: #040914;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.5);
}

.playlist-card:hover .playlist-quick-play {
  opacity: 1;
  transform: translateY(0);
}

.playlist-quick-play:hover {
  transform: scale(1.1) !important;
}

.playlist-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Detalle de Playlist en Biblioteca */
.library-detail-view {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.btn-back-library {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
  transition: all 0.2s;
}

.btn-back-library:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

/* BOTÓN VOLVER EN EL HEADER SUPERIOR (EN REEMPLAZO DEL BUSCADOR GENERAL) */
.btn-back-library-header {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.btn-back-library-header:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.35);
  transform: translateX(-3px);
}

.btn-back-library-header svg {
  color: var(--accent-cyan);
  transition: transform 0.2s;
}

.btn-back-library-header:hover svg {
  transform: translateX(-2px);
}

.detail-hero {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.detail-cover {
  width: 190px;
  height: 190px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #7928ca, #ff0080);
  color: #fff;
  flex-shrink: 0;
  position: relative;
}

.detail-cover.favorite-cover {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
}

.detail-cover img,
.detail-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* BUSCADOR DENTRO DE LA PLAYLIST (DEBAJO DE LA PORTADA) */
.playlist-search-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0 16px 0;
  padding-bottom: 6px;
}

.playlist-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 10px 18px;
  border-radius: 24px;
  width: 380px;
  max-width: 100%;
  transition: all 0.2s;
  position: relative;
}

.playlist-search-box:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 18px rgba(6, 182, 212, 0.22);
}

.playlist-search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.playlist-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  width: 100%;
}

.btn-clear-playlist-search {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 50%;
  transition: color 0.15s;
}

.btn-clear-playlist-search:hover {
  color: #fff;
}

.playlist-search-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.detail-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--accent-cyan);
}

.detail-title {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: 'Space Grotesk', sans-serif;
  color: #fff;
}

.detail-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.btn-play-all-detail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-cyan);
  color: #050b14;
  border: none;
  padding: 12px 24px;
  border-radius: 24px;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 10px;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.4);
  transition: all 0.2s;
}

.btn-play-all-detail:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 22px rgba(6, 182, 212, 0.6);
}

.detail-tracks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 3. VISTA EXPANDIDA NOW PLAYING (IDÉNTICA A YOUTUBE MUSIC - CAPTURA 2) */
.main-content.in-now-playing {
  padding: 18px 30px;
}

.main-content.in-now-playing .top-header {
  display: none;
}

.now-playing-view {
  width: 100%;
  height: 100%;
  animation: fadeIn 0.3s ease;
}

.now-playing-container {
  display: flex;
  gap: 40px;
  height: calc(100vh - var(--player-height) - 100px);
  align-items: stretch;
}

.now-playing-left {
  flex: 1;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 10px;
}

.now-playing-close-bar {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.btn-collapse-now-playing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-collapse-now-playing:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
}

.now-playing-cover-wrap {
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1/1;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(6, 182, 212, 0.15);
  background: #090b12;
}

.now-playing-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 22px;
}

.now-playing-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25), rgba(6, 182, 212, 0.15), transparent 70%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}

.now-playing-track-details {
  width: 100%;
  max-width: 440px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}

.now-playing-title-artist {
  min-width: 0;
  flex: 1;
}

.now-playing-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-artist {
  font-size: 1rem;
  color: var(--accent-cyan);
  margin-top: 4px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-like-now-playing {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-left: 14px;
}

.btn-like-now-playing:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ff3366;
  transform: scale(1.1);
}

.btn-like-now-playing.liked {
  background: rgba(255, 51, 102, 0.15);
  border-color: rgba(255, 51, 102, 0.4);
  color: #ff3366;
}

/* Lado derecho: Lista "A CONTINUACIÓN" */
.now-playing-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(15, 18, 29, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 20px;
  backdrop-filter: blur(20px);
  min-width: 320px;
  overflow: hidden;
}

.now-playing-queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 12px;
}

.now-playing-tab {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--accent-cyan);
  border-bottom: 2px solid var(--accent-cyan);
  padding-bottom: 6px;
}

.now-playing-queue-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.now-playing-queue-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 4px;
}

/* Item de la cola en Now Playing */
.np-queue-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.np-queue-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.np-queue-item.active {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.35);
}

.np-queue-item.active .np-item-title {
  color: var(--accent-cyan);
  font-weight: 700;
}

.np-item-index {
  font-size: 0.8rem;
  color: var(--text-muted);
  width: 20px;
  text-align: center;
}

.np-item-cover {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #000;
}

.np-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.np-item-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.np-item-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.np-item-artist {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.np-item-duration {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: monospace;
}

/* Modal Crear Playlist */
.playlist-create-modal {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--text-primary);
  margin: auto;
}

.playlist-create-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.playlist-create-modal .modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.playlist-create-modal .modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.playlist-create-modal label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.playlist-create-modal input,
.playlist-create-modal textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
}

.playlist-create-modal input:focus,
.playlist-create-modal textarea:focus {
  border-color: var(--accent-cyan);
}

.playlist-create-modal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.btn-cancel {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-confirm-create {
  background: var(--accent-cyan);
  color: #040812;
  border: none;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-confirm-create:hover {
  transform: scale(1.03);
}

/* ==========================================================
   BOTÓN 3 PUNTITOS EN REPRODUCTOR (AL LADO DEL VOLUMEN)
   ========================================================== */
.player-options-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.player-options-btn:hover {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.45), 0 0 24px rgba(6, 182, 212, 0.35);
}

/* BOTÓN COLA ACTUAL EN REPRODUCTOR INFERIOR PERMANENTE (al lado del botón de opciones) */
.player-queue-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.player-queue-btn:hover {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  transform: scale(1.1);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.45), 0 0 24px rgba(6, 182, 212, 0.35);
}

.player-queue-btn.queue-btn-active {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.18);
}

/* BOTÓN 3 PUNTITOS EN FILAS DE PLAYLIST / COLA */
.track-item-options-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
  transition: all 0.2s;
  flex-shrink: 0;
  margin-left: 6px;
}

.queue-item:hover .track-item-options-btn {
  opacity: 1;
}

.track-item-options-btn:hover {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.15);
  transform: scale(1.15);
}

/* BOTÓN 3 PUNTITOS EN TARJETAS DE INICIO (GRID) */
.card-options-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(5, 11, 20, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.85);
  transition: all 0.2s ease;
  z-index: 4;
  backdrop-filter: blur(8px);
}

.track-card:hover .card-options-btn {
  opacity: 0.9;
  transform: scale(1);
}

.card-options-btn:hover {
  opacity: 1 !important;
  color: var(--accent-cyan);
  background: rgba(5, 11, 20, 0.95);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
  transform: scale(1.1) !important;
}

/* ==========================================================
   RESALTADO DE CANCIÓN EN REPRODUCCIÓN EN PLAYLIST
   ========================================================== */
.queue-item.active-playing {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.16), rgba(121, 40, 202, 0.08)) !important;
  border-left: 3px solid var(--accent-cyan) !important;
  box-shadow: inset 0 0 20px rgba(6, 182, 212, 0.08);
}

.queue-item.active-playing .queue-title {
  color: var(--accent-cyan) !important;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.35);
}

.queue-item.active-playing .queue-idx {
  color: var(--accent-cyan) !important;
}

/* ANIMACIÓN DE ECUALIZADOR PARA PISTA EN REPRODUCCIÓN */
.eq-bars-anim {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  width: 14px;
  height: 14px;
}

.eq-bars-anim span {
  width: 3px;
  background: var(--accent-cyan);
  border-radius: 1px;
  animation: eqBounce 1s infinite ease-in-out;
}

.eq-bars-anim span:nth-child(1) { height: 40%; animation-delay: 0.1s; }
.eq-bars-anim span:nth-child(2) { height: 100%; animation-delay: 0.3s; }
.eq-bars-anim span:nth-child(3) { height: 60%; animation-delay: 0.2s; }

@keyframes eqBounce {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

/* ==========================================================
   RESALTADO DE PLAYLIST EN REPRODUCCIÓN EN TU BIBLIOTECA
   ========================================================== */
.playlist-card.is-playing-playlist {
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 28px rgba(6, 182, 212, 0.35) !important;
  transform: translateY(-2px);
  position: relative;
}

.playlist-playing-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(5, 11, 20, 0.85);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 3;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.3);
}

/* ==========================================================
   MODAL DE OPCIONES DE CANCIÓN (IDÉNTICO A ANDROID)
   ========================================================== */
.track-options-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.track-options-modal {
  background: rgba(20, 24, 36, 0.82);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 20px;
  width: 90%;
  max-width: 420px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.8), 0 0 35px rgba(6, 182, 212, 0.18);
  animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.track-options-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.track-options-cover {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: #000;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.track-options-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.track-options-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-options-artist {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-options-close {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.15s;
}

.track-options-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.track-options-list {
  padding: 10px 0;
}

.track-option-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.track-option-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

.track-option-item svg {
  color: var(--accent-cyan);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.track-option-item:hover svg {
  transform: scale(1.1);
}

.track-option-item.text-danger svg,
.track-option-item .text-danger {
  color: #f87171 !important;
}

.track-option-item.text-danger:hover {
  background: rgba(239, 68, 68, 0.12);
}

.track-option-label {
  font-size: 0.9rem;
  font-weight: 600;
}

/* POPUP DE CRÉDITOS */
.credits-popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.credits-popup {
  background: rgba(20, 24, 36, 0.92);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 18px;
  width: 100%;
  max-width: 380px;
  max-height: 78vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.8), 0 0 35px rgba(6, 182, 212, 0.18);
  animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.credits-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.credits-popup-head-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.credits-popup-head-left svg {
  color: var(--accent-cyan);
}

.credits-popup-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.credits-popup-track {
  padding: 14px 20px 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credits-popup-body {
  padding: 12px 20px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.credits-popup-line {
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.92);
  word-break: break-word;
}

.credits-popup-line:empty {
  display: none;
}

.credits-popup-empty {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
}

.credits-popup-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
}

.credits-popup-close-btn {
  background: transparent;
  border: none;
  color: var(--accent-cyan);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 4px;
  transition: color 0.15s;
}

.credits-popup-close-btn:hover {
  color: #fff;
}

/* SUB-PANEL PLAYLISTS */
.track-options-sub {
  padding: 12px 0 16px 0;
}

.track-options-sub-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 20px 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-sub-back {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  border-radius: 14px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-sub-back:hover {
  color: #fff;
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.15);
}

.sub-header-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.track-options-playlists-list {
  max-height: 240px;
  overflow-y: auto;
  padding: 8px 0;
}

.sub-playlist-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.sub-playlist-row:hover {
  background: rgba(255, 255, 255, 0.07);
}

.sub-playlist-cover {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-purple);
  flex-shrink: 0;
}

.sub-playlist-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sub-playlist-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub-playlist-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ==========================================================
   AMIGOS, CHAT Y LISTEN TOGETHER (XONIFY COMUNIDAD)
   ========================================================== */

/* 1. SECCIÓN AMIGOS Y COMUNIDAD */
.friends-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.friends-auth-banner {
  background: linear-gradient(135deg, rgba(148, 69, 248, 0.15), rgba(54, 226, 180, 0.12));
  border: 1px solid rgba(54, 226, 180, 0.3);
  border-radius: 18px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  margin-bottom: 24px;
}

.friends-auth-banner svg {
  flex-shrink: 0;
}

.auth-banner-text {
  flex: 1;
}

.auth-banner-text h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.auth-banner-text p {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.btn-friends-login {
  background: linear-gradient(135deg, #9445F8, #36E2B4);
  color: #060913;
  border: none;
  padding: 12px 22px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(54, 226, 180, 0.3);
  transition: all 0.2s ease;
}

.btn-friends-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(54, 226, 180, 0.45);
}

.friends-content-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

.friends-left-col,
.friends-right-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.friends-card {
  background: rgba(20, 24, 39, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.friends-card-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.friends-card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.friends-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.badge-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.friends-badge-count {
  background: rgba(54, 226, 180, 0.15);
  border: 1px solid rgba(54, 226, 180, 0.3);
  color: #36E2B4;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

/* Buscador de Amigos */
.friends-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 16px;
  transition: all 0.2s ease;
}

.friends-search-box:focus-within {
  border-color: #36E2B4;
  box-shadow: 0 0 16px rgba(54, 226, 180, 0.2);
}

.friends-search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.friends-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.88rem;
  flex: 1;
  min-width: 0;
}

.btn-friends-search {
  background: #36E2B4;
  color: #060913;
  border: none;
  padding: 6px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-friends-search:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(54, 226, 180, 0.4);
}

.friends-search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Elemento de usuario en búsqueda */
.user-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.user-search-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.user-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.user-item-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9445F8, #3B82F6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}

.user-item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-item-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.user-item-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-item-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-friend-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-friend-action.add {
  background: rgba(54, 226, 180, 0.15);
  border: 1px solid rgba(54, 226, 180, 0.35);
  color: #36E2B4;
}

.btn-friend-action.add:hover {
  background: #36E2B4;
  color: #060913;
  box-shadow: 0 0 12px rgba(54, 226, 180, 0.4);
}

.btn-friend-action.pending {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: default;
}

.btn-friend-action.already-friend {
  background: rgba(148, 69, 248, 0.15);
  border: 1px solid rgba(148, 69, 248, 0.35);
  color: #9445F8;
  cursor: default;
}

/* Solicitudes pendientes */
.pending-requests-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pending-request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.request-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-accept-request {
  background: #36E2B4;
  color: #060913;
  border: none;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-accept-request:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(54, 226, 180, 0.4);
}

.btn-reject-request {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-reject-request:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* Lista de Mis Amigos */
.friends-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.friend-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}

.friend-row-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(54, 226, 180, 0.2);
  transform: translateY(-1px);
}

.friend-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.friend-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.friend-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #9445F8, #36E2B4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}

.friend-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.online-indicator-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #0f121d;
  background: #64748b;
  transition: all 0.25s ease;
}

.online-indicator-dot.online {
  background: #36E2B4;
  box-shadow: 0 0 10px #36E2B4;
}

.friend-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.friend-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend-status-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.friend-status-text.online {
  color: #36E2B4;
  font-weight: 600;
}

.friend-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-open-chat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(148, 69, 248, 0.2), rgba(54, 226, 180, 0.15));
  border: 1px solid rgba(54, 226, 180, 0.3);
  color: #36E2B4;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-open-chat:hover {
  background: #36E2B4;
  color: #060913;
  box-shadow: 0 0 16px rgba(54, 226, 180, 0.4);
  transform: translateY(-1px);
}

.btn-friend-options {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-friend-options:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
}

/* ==========================================================
   2. PANEL DE CHAT LATERAL DESLIZANTE
   ========================================================== */
.chat-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  background: rgba(15, 18, 29, 0.78);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  border-left: 1px solid rgba(139, 92, 246, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 95;
  box-shadow: -12px 0 35px rgba(0, 0, 0, 0.6), -4px 0 20px rgba(139, 92, 246, 0.08);
  animation: slideInChat 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInChat {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.chat-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(20, 24, 39, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.chat-avatar-wrap {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.chat-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #9445F8, #36E2B4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  overflow: hidden;
}

.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-user-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.chat-user-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-user-status {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.chat-user-status.online {
  color: #36E2B4;
  font-weight: 600;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-chat-listen {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(148, 69, 248, 0.15);
  border: 1px solid rgba(148, 69, 248, 0.3);
  color: #9445F8;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-chat-listen:hover {
  background: #9445F8;
  color: #fff;
  box-shadow: 0 0 12px rgba(148, 69, 248, 0.4);
}

.chat-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.15s ease;
}

.chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Área de mensajes */
.chat-messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-messages-area::-webkit-scrollbar {
  width: 6px;
}

.chat-messages-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

/* Burbujas de mensaje */
.chat-msg-row {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  animation: fadeInMsg 0.2s ease;
}

@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg-row.sent {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-msg-row.received {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.4;
  word-break: break-word;
}

.chat-msg-row.sent .chat-bubble {
  background: linear-gradient(135deg, #9445F8, #7928ca);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(148, 69, 248, 0.25);
}

.chat-msg-row.received .chat-bubble {
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border-bottom-left-radius: 4px;
}

.chat-msg-time {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 0 4px;
}

/* Tarjeta de canción en el chat */
.chat-track-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #141827;
  border: 1px solid rgba(54, 226, 180, 0.3);
  padding: 10px;
  border-radius: 14px;
  width: 270px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-track-card:hover {
  border-color: #36E2B4;
  box-shadow: 0 0 16px rgba(54, 226, 180, 0.3);
  transform: translateY(-2px);
}

.chat-track-cover {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  background: #000;
  flex-shrink: 0;
}

.chat-track-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.chat-track-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-track-artist {
  font-size: 0.72rem;
  color: #36E2B4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-chat-play-track {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #36E2B4;
  color: #060913;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(54, 226, 180, 0.4);
}

.btn-chat-play-track:hover {
  transform: scale(1.1);
}

/* Tarjeta de invitación a escuchar juntos */
.chat-listen-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(135deg, rgba(148, 69, 248, 0.15), rgba(54, 226, 180, 0.15));
  border: 1px solid rgba(54, 226, 180, 0.4);
  padding: 14px;
  border-radius: 16px;
  width: 280px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(54, 226, 180, 0.2);
}

.listen-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #36E2B4;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.listen-card-info {
  font-size: 0.85rem;
  color: #f1f5f9;
  line-height: 1.4;
}

.btn-join-listen {
  background: linear-gradient(135deg, #9445F8, #36E2B4);
  color: #060913;
  border: none;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(54, 226, 180, 0.35);
}

.btn-join-listen:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(54, 226, 180, 0.5);
}

/* Indicador de typing */
.chat-typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #36E2B4;
  animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Barra inferior del chat */
.chat-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #141827;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-input-area input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
  border-radius: 20px;
  color: #fff;
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s ease;
}

.chat-input-area input:focus {
  border-color: #36E2B4;
  box-shadow: 0 0 12px rgba(54, 226, 180, 0.2);
}

.chat-action-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent-cyan);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.chat-action-btn:hover {
  background: rgba(54, 226, 180, 0.15);
  border-color: #36E2B4;
  transform: scale(1.08);
}

.chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9445F8, #36E2B4);
  color: #060913;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(54, 226, 180, 0.35);
  flex-shrink: 0;
}

.chat-send-btn:hover {
  transform: scale(1.08);
}

/* ==========================================================
   3. TOAST FLOTANTE Y SUBPANEL DE AMIGOS EN TRACK OPTIONS
   ========================================================== */
.toast-notification {
  position: fixed;
  bottom: calc(var(--player-height) + 24px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 24, 39, 0.95);
  border: 1px solid #36E2B4;
  color: #fff;
  padding: 12px 24px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 18px rgba(54, 226, 180, 0.3);
  backdrop-filter: blur(12px);
  z-index: 1200;
  animation: toastPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

@keyframes toastPop {
  from { opacity: 0; transform: translate(-50%, 15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.sub-friend-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.sub-friend-row:hover {
  background: rgba(255, 255, 255, 0.07);
}

.sub-friend-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9445F8, #36E2B4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}

.sub-friend-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sub-friend-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sub-friend-name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub-friend-email {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* RESPONSIVE PARA AMIGOS Y CHAT */
@media (max-width: 1024px) {
  .friends-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .chat-panel {
    width: 100%;
  }
}

/* BANNER DE AUTOPLAY PENDIENTE (BRAVE / CHROMIUM UNLOCK) */
.autoplay-prompt-banner {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--accent-cyan, #00f2fe);
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.35), 0 10px 30px rgba(0,0,0,0.5);
  border-radius: 9999px;
  cursor: pointer;
  animation: bannerSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1), bannerGlowPulse 2s infinite ease-in-out;
  transition: transform 0.2s, opacity 0.2s;
  max-width: 90vw;
}

.autoplay-prompt-banner:hover {
  transform: translateX(-50%) scale(1.02);
}

.autoplay-prompt-banner.hidden {
  display: none !important;
}

.autoplay-prompt-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.autoplay-pulse-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #00f2fe);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.5);
}

.autoplay-prompt-text {
  display: flex;
  flex-direction: column;
}

.autoplay-prompt-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.autoplay-prompt-desc {
  font-size: 0.75rem;
  color: var(--accent-cyan, #00f2fe);
}

.autoplay-prompt-btn {
  background: linear-gradient(135deg, #a855f7, #00f2fe);
  color: #0b0f19;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 8px 16px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.autoplay-prompt-btn:hover {
  opacity: 0.9;
}

@keyframes bannerSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes bannerGlowPulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3), 0 8px 25px rgba(0,0,0,0.5);
  }
  50% {
    box-shadow: 0 0 28px rgba(0, 242, 254, 0.6), 0 8px 25px rgba(0,0,0,0.5);
  }
}

/* ==========================================================================
   PANTALLA DE ACCESO OBLIGATORIO GOOGLE (WEB AUTH GATE)
   ========================================================================== */
.web-auth-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(7, 9, 15, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInGate 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.web-auth-gate.hidden {
  display: none !important;
}

.web-auth-card {
  width: 100%;
  max-width: 420px;
  background: #0f1322;
  border: 1px solid rgba(6, 182, 212, 0.25);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(6, 182, 212, 0.15);
  border-radius: 24px;
  padding: 36px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.web-auth-logo-wrap {
  position: relative;
  margin-bottom: 20px;
}

.web-auth-logo {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 0 16px rgba(6, 182, 212, 0.4));
}

.web-auth-badge {
  position: absolute;
  bottom: -6px;
  right: -10px;
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.4);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  font-family: monospace;
}

.web-auth-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.web-auth-subtitle {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 28px;
}

.web-auth-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #ffffff;
  color: #1f2937;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 20px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.web-auth-google-btn:hover {
  background: #f1f5f9;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.web-auth-google-btn:active {
  transform: translateY(0);
}

.web-auth-note {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 20px;
  line-height: 1.4;
}

@keyframes fadeInGate {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================
   MODALES FLOTANTES CENTRADOS ESTILO ANDROID
   ========================================================== */
.xonify-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 16px;
  animation: fadeInModal 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.xonify-modal-backdrop.hidden {
  display: none !important;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popInModal {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.xonify-modal-card {
  width: 100%;
  max-width: 480px;
  background: rgba(20, 24, 39, 0.82);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 35px rgba(148, 69, 248, 0.15);
  display: flex;
  flex-direction: column;
  position: relative;
  max-height: 90vh;
  overflow: hidden;
  animation: popInModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-primary);
}

.modal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.modal-card-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-header-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.modal-header-icon-box.eq-icon-box {
  background: linear-gradient(135deg, #9445f8 0%, #06b6d4 100%);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.35);
}

.modal-header-icon-box.sleep-icon-box {
  background: linear-gradient(135deg, #a855f7 0%, #4f46e5 100%);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.35);
}

.modal-header-icon-box.legal-icon-box {
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
}

.modal-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.modal-card-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.modal-card-body {
  overflow-y: auto;
  flex: 1;
  padding-right: 2px;
}

.btn-primary-gradient {
  margin-top: 20px;
  width: 100%;
  padding: 13px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, #9445f8 0%, #3b82f6 50%, #36e2b4 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 18px rgba(148, 69, 248, 0.35);
  flex-shrink: 0;
  text-align: center;
}

.btn-primary-gradient:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(54, 226, 180, 0.4);
}

.btn-primary-gradient:active {
  transform: translateY(0);
}

/* ==========================================================
   ECUALIZADOR PRO - ESTILOS
   ========================================================== */
.eq-section-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.eq-presets-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.eq-preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
}

.eq-preset-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.eq-preset-chip.active {
  background: linear-gradient(135deg, #9445f8 0%, #06b6d4 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.eq-sliders-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.eq-slider-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.eq-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
}

.bass-label { color: #c084fc; }
.mid-label { color: #60a5fa; }
.treble-label { color: #34d399; }

.eq-slider-val {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.eq-range {
  width: 100%;
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.eq-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease;
}

.eq-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.bass-range::-webkit-slider-thumb {
  background: #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.6);
}

.mid-range::-webkit-slider-thumb {
  background: #3b82f6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}

.treble-range::-webkit-slider-thumb {
  background: #06b6d4;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
}

/* ==========================================================
   TEMPORIZADOR DE SUEÑO - ESTILOS
   ========================================================== */
.sleep-active-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
  margin-bottom: 16px;
}

.sleep-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #c084fc;
}

.sleep-clock-spinner {
  animation: spinSlow 8s linear infinite;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.btn-sleep-cancel-sm {
  background: rgba(239, 68, 68, 0.15);
  border: none;
  color: #f87171;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-sleep-cancel-sm:hover {
  background: rgba(239, 68, 68, 0.28);
}

.sleep-presets-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.sleep-preset-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.sleep-preset-btn:hover {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.3);
}

.preset-action {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: color 0.18s;
}

.sleep-preset-btn:hover .preset-action {
  color: var(--accent-purple);
}

.sleep-custom-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.sleep-custom-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
}

.sleep-custom-form input:focus {
  border-color: var(--accent-purple);
}

.btn-sleep-custom-submit {
  padding: 10px 18px;
  border-radius: 14px;
  background: var(--accent-purple);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.18s;
}

.btn-sleep-custom-submit:hover {
  opacity: 0.9;
}

.btn-sleep-deactivate {
  width: 100%;
  padding: 11px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
}

.btn-sleep-deactivate:hover {
  background: rgba(239, 68, 68, 0.12);
}

/* ==========================================================
   POLÍTICAS DE PRIVACIDAD Y TÉRMINOS - ESTILOS
   ========================================================== */
.legal-modal-card {
  max-width: 620px;
  max-height: 85vh;
}

.legal-scroll-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 4px 6px 12px 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.legal-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-block-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.legal-block-date {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: -6px;
  margin-bottom: 4px;
}

.legal-heading {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-top: 8px;
}

.legal-paragraph {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.legal-bullets {
  margin: 0 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
}

.legal-bullets li {
  color: var(--text-secondary);
}

.legal-separator {
  border: none;
  height: 1px;
  background: var(--border-color);
  margin: 12px 0;
}

.legal-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.legal-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.18s;
}

.legal-ext-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

.legal-card-footer .btn-primary-gradient {
  margin-top: 0;
  width: auto;
  min-width: 130px;
  padding: 10px 22px;
}

/* ==========================================================
   MODO NORMAL (DÍA) - PALETA Y COMPONENTES
   ========================================================== */
body.light, html.light {
  --bg-dark: #f8fafc;
  --sidebar-bg: #f1f5f9;
  --card-bg: #ffffff;
  --card-hover: #f1f5f9;
  --border-color: rgba(0, 0, 0, 0.08);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --shadow-neon: 0 0 20px rgba(6, 182, 212, 0.18);
  --shadow-glow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

body.light {
  background-color: var(--bg-dark);
  color: var(--text-primary);
}

body.light .sidebar {
  background-color: #ffffff;
  border-right: 1px solid #e2e8f0;
}

body.light .main-content {
  background: radial-gradient(circle at top right, rgba(148, 69, 248, 0.05), transparent 60%);
}

body.light .bottom-player {
  background-color: #ffffff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
}

body.light .search-bar-container input,
body.light .search-input-wrapper {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body.light .search-input-wrapper input {
  color: #0f172a !important;
}

body.light .search-input-wrapper input::placeholder {
  color: #94a3b8 !important;
}

body.light .profile-drawer {
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.1);
}

body.light .drawer-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

body.light .drawer-user-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light .drawer-menu-item {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #0f172a;
}

body.light .drawer-menu-item:hover {
  background: #f1f5f9;
}

body.light .xonify-modal-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12), 0 0 25px rgba(148, 69, 248, 0.1);
  color: #0f172a;
}

body.light .eq-sliders-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light .eq-preset-chip {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
}

body.light .eq-preset-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
}

body.light .eq-range {
  background: #e2e8f0;
}

body.light .sleep-preset-btn {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #0f172a;
}

body.light .sleep-preset-btn:hover {
  background: rgba(168, 85, 247, 0.08);
}

body.light .sleep-custom-form input {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.light .legal-block-title {
  color: #0f172a;
}

body.light .legal-paragraph,
body.light .legal-bullets li {
  color: #334155;
}

body.light .music-card,
body.light .card {
  background: #ffffff;
  border-color: #e2e8f0;
}

body.light .music-card:hover,
body.light .card:hover {
  background: #f8fafc;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

body.light .track-row:hover {
  background: #f1f5f9;
}

body.light .header-profile-avatar {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
}

/* ==========================================
   ESCUCHAR JUNTOS - SELECTOR DE CANCIÓN
   ========================================== */

.listen-together-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: fadeIn 0.2s ease;
}

.listen-together-backdrop.hidden {
  display: none;
}

.listen-together-modal {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card, #1a1c2e);
  border-radius: 20px 20px 0 0;
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  box-shadow: 0 -10px 40px rgba(0,0,0,0.4), 0 0 30px rgba(148,69,248,0.15);
  overflow: hidden;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.listen-together-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.08));
  background: linear-gradient(180deg, rgba(148,69,248,0.12), transparent);
}

.listen-together-close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  color: var(--text-secondary, #94a3b8);
  cursor: pointer;
  transition: all 0.15s ease;
}

.listen-together-close:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text-primary, #f8fafc);
}

.listen-together-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.listen-together-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-purple, #9457f8), var(--accent-cyan, #06b6d4));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 16px rgba(148,69,248,0.4);
}

.listen-together-meta {
  min-width: 0;
}

.listen-together-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary, #f8fafc);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listen-together-subtitle {
  font-size: 12px;
  color: var(--text-muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listen-together-exit {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(239,68,68,0.15), rgba(239,68,68,0.08));
  border: 1px solid rgba(239,68,68,0.25);
  color: #ef4444;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.listen-together-exit:hover {
  background: linear-gradient(135deg, rgba(239,68,68,0.25), rgba(239,68,68,0.15));
  transform: translateX(-2px);
  box-shadow: 0 4px 16px rgba(239,68,68,0.2);
}

.listen-together-exit svg {
  flex-shrink: 0;
}

.listen-together-search {
  position: relative;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.06));
}

.listen-together-search svg {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #64748b);
  pointer-events: none;
}

.listen-together-search input {
  width: 100%;
  padding: 10px 14px 10px 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  color: var(--text-primary, #f8fafc);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.listen-together-search input::placeholder {
  color: var(--text-muted, #64748b);
}

.listen-together-search input:focus {
  border-color: var(--accent-cyan, #06b6d4);
  box-shadow: 0 0 0 3px rgba(6,182,212,0.15);
}

.listen-together-content {
  max-height: 60vh;
  overflow-y: auto;
}

.listen-together-level1,
.listen-together-level2 {
  padding: 16px 20px 24px;
}

.listen-together-section {
  margin-bottom: 20px;
}

.listen-together-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted, #64748b);
  margin-bottom: 12px;
  padding-left: 4px;
}

.listen-together-fav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(236,72,153,0.12), rgba(244,114,182,0.08));
  border: 1px solid rgba(236,72,153,0.2);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.listen-together-fav-item:hover {
  background: linear-gradient(135deg, rgba(236,72,153,0.2), rgba(244,114,182,0.15));
  transform: translateX(4px);
  box-shadow: 0 4px 20px rgba(236,72,153,0.2);
}

.listen-together-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.listen-together-item-icon.fav-icon {
  background: linear-gradient(135deg, #ec4899, #f472b6);
  box-shadow: 0 4px 16px rgba(236,72,153,0.4);
}

.listen-together-item-icon.playlist-icon {
  background: linear-gradient(135deg, var(--accent-purple, #9457f8), var(--accent-cyan, #06b6d4));
  box-shadow: 0 4px 16px rgba(148,69,248,0.4);
}

.listen-together-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.listen-together-item-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary, #f8fafc);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listen-together-item-count {
  font-size: 11px;
  color: var(--text-muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listen-together-chevron {
  color: var(--text-muted, #64748b);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.listen-together-fav-item:hover .listen-together-chevron,
.listen-together-playlist-item:hover .listen-together-chevron {
  transform: translateX(4px);
  color: var(--accent-cyan, #06b6d4);
}

.listen-together-playlists {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.listen-together-playlist-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color, rgba(255,255,255,0.06));
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.listen-together-playlist-item:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--accent-cyan, #06b6d4);
  transform: translateX(4px);
}

.listen-together-back-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: -16px -20px 16px;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(135deg, rgba(148,69,248,0.15), rgba(6,182,212,0.1));
  border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.06));
  color: var(--accent-cyan, #06b6d4);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.listen-together-back-btn:hover {
  background: linear-gradient(135deg, rgba(148,69,248,0.25), rgba(6,182,212,0.15));
}

.listen-together-back-btn svg {
  flex-shrink: 0;
}

.listen-together-tracks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.listen-together-track-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color, rgba(255,255,255,0.04));
  cursor: pointer;
  transition: all 0.12s ease;
}

.listen-together-track-item:hover {
  background: rgba(255,255,255,0.07);
  border-color: var(--accent-cyan, #06b6d4);
}

.listen-together-track-cover {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255,255,255,0.05);
}

.listen-together-track-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listen-together-track-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.listen-together-track-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #f8fafc);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listen-together-track-artist {
  font-size: 11px;
  color: var(--text-muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listen-together-track-duration {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted, #64748b);
  flex-shrink: 0;
}

.listen-together-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted, #64748b);
}

.listen-together-empty svg {
  margin-bottom: 12px;
  opacity: 0.5;
}

.listen-together-empty p {
  font-size: 13px;
  margin: 0;
}

/* Light theme overrides */
body.light .listen-together-modal {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.12), 0 0 30px rgba(148,69,248,0.08);
}

body.light .listen-together-header {
  background: linear-gradient(180deg, rgba(148,69,248,0.08), transparent);
  border-color: #e2e8f0;
}

body.light .listen-together-close {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #64748b;
}

body.light .listen-together-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

body.light .listen-together-search input {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #0f172a;
}

body.light .listen-together-search input:focus {
  border-color: var(--accent-cyan, #06b6d4);
  box-shadow: 0 0 0 3px rgba(6,182,212,0.15);
}

body.light .listen-together-fav-item {
  background: linear-gradient(135deg, rgba(236,72,153,0.1), rgba(244,114,182,0.06));
  border-color: rgba(236,72,153,0.18);
}

body.light .listen-together-fav-item:hover {
  background: linear-gradient(135deg, rgba(236,72,153,0.18), rgba(244,114,182,0.12));
}

body.light .listen-together-playlist-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light .listen-together-playlist-item:hover {
  background: #f1f5f9;
  border-color: var(--accent-cyan, #06b6d4);
}

body.light .listen-together-back-btn {
  background: linear-gradient(135deg, rgba(148,69,248,0.1), rgba(6,182,212,0.08));
  border-color: #e2e8f0;
}

body.light .listen-together-back-btn:hover {
  background: linear-gradient(135deg, rgba(148,69,248,0.18), rgba(6,182,212,0.12));
}

body.light .listen-together-track-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light .listen-together-track-item:hover {
  background: #f1f5f9;
  border-color: var(--accent-cyan, #06b6d4);
}

body.light .listen-together-track-cover {
  background: #e2e8f0;
}

/* ==========================================
   INDICADOR ESCUCHAR JUNTOS EN PLAYER BAR
   ========================================== */

.listen-together-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(148,69,248,0.2), rgba(6,182,212,0.15));
  border: 1px solid rgba(148,69,248,0.3);
  border-radius: 20px;
  color: var(--accent-cyan, #06b6d4);
  font-size: 11px;
  font-weight: 600;
  margin-right: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  animation: pulseIndicator 2s ease-in-out infinite;
}

.listen-together-indicator:hover {
  background: linear-gradient(135deg, rgba(239,68,68,0.2), rgba(239,68,68,0.1));
  border-color: rgba(239,68,68,0.4);
  color: #ef4444;
  transform: translateY(-1px);
}

.listen-together-indicator .indicator-exit-icon {
  opacity: 0.65;
  transition: opacity 0.15s ease;
}

.listen-together-indicator:hover .indicator-exit-icon {
  opacity: 1;
}

@keyframes pulseIndicator {
  0%, 100% { box-shadow: 0 0 8px rgba(148,69,248,0.3); }
  50% { box-shadow: 0 0 16px rgba(6,182,212,0.5); }
}

.bottom-player.listen-together-active .player-track-info {
  border-left: 3px solid var(--accent-cyan, #06b6d4);
}

/* Light theme */
body.light .listen-together-indicator {
  background: linear-gradient(135deg, rgba(148,69,248,0.15), rgba(6,182,212,0.1));
  border-color: rgba(148,69,248,0.25);
  color: var(--accent-purple, #9457f8);
}

/* ==========================================
   BOTÓN ESCUCHAR JUNTOS EN CHAT HEADER (MODO ACTIVO)
   ========================================== */

.btn-chat-listen.listen-together-active {
  background: linear-gradient(135deg, rgba(239,68,68,0.2), rgba(239,68,68,0.1)) !important;
  border-color: rgba(239,68,68,0.4) !important;
  color: #ef4444 !important;
}

.btn-chat-listen.listen-together-active:hover {
  background: linear-gradient(135deg, rgba(239,68,68,0.3), rgba(239,68,68,0.15)) !important;
  box-shadow: 0 0 12px rgba(239,68,68,0.3) !important;
}

.btn-chat-listen.listen-together-active svg {
  color: #ef4444 !important;
}

/* ═══════════════════════════════════════════════════════════
   PERFIL PÚBLICO DE ARTISTA (Xonify Artist · estilo YouTube Music)
   Se muestra dentro de main-content: la música no se interrumpe
   y el mini-reproductor inferior permanece visible.
   ═══════════════════════════════════════════════════════════ */

/* Nombres de artista clicables (global) */
.xonify-artist-link {
  cursor: pointer;
  transition: color 0.15s ease;
  border-radius: 4px;
}

.xonify-artist-link:hover {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

#viewArtistProfile.artist-profile-view.active {
  display: block;
}

.artist-profile-view {
  animation: fadeIn 0.25s ease;
}

.artist-profile-inner {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* ── Botón volver ── */
.artist-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  padding: 9px 18px 9px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  font-family: inherit;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  width: fit-content;
}

.artist-back-btn:hover {
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.4);
  color: var(--text-primary);
}

/* ── Hero del artista ── */
.artist-hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  padding: 40px 36px 32px;
  border: 1px solid rgba(139, 92, 246, 0.22);
  background: linear-gradient(180deg, rgba(20, 24, 39, 0.2), rgba(10, 12, 19, 0.95)), var(--card-bg);
  box-shadow: var(--shadow-glow);
}

.artist-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  filter: blur(46px) saturate(1.4) brightness(0.55);
  transform: scale(1.3);
  z-index: 0;
}

.artist-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 12, 19, 0.25) 0%, rgba(10, 12, 19, 0.88) 78%);
  z-index: 1;
}

.artist-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 26px;
}

.artist-avatar {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid rgba(139, 92, 246, 0.65);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.35), 0 8px 30px rgba(0, 0, 0, 0.55);
  background: #141827;
}

.artist-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.artist-hero-info {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.artist-verified-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.35);
  padding: 5px 12px;
  border-radius: 999px;
}

.artist-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.05;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
  word-break: break-word;
}

.artist-listeners {
  color: var(--accent-cyan);
  font-size: 15px;
  font-weight: 700;
}

.artist-stats-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.artist-stat-chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: 999px;
}

/* ── Redes sociales del artista (esquina inferior derecha del hero) ── */
.artist-socials {
  position: absolute;
  right: 36px;
  bottom: 32px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.artist-social-link {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.artist-social-link:hover {
  transform: translateY(-2px) scale(1.06);
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.artist-social-link svg { display: block; }

.artist-social-facebook { background: rgba(24, 119, 242, 0.9); border-color: rgba(24, 119, 242, 0.6); }
.artist-social-x { background: rgba(0, 0, 0, 0.85); }
.artist-social-instagram { background: linear-gradient(135deg, #f9ce34 0%, #ee2a7b 50%, #6228d7 100%); border-color: rgba(255, 255, 255, 0.28); }
.artist-social-tiktok { background: rgba(0, 0, 0, 0.85); }
.artist-social-discord { background: rgba(88, 101, 242, 0.92); border-color: rgba(88, 101, 242, 0.7); }

/* Evita que el texto del hero se monte sobre los iconos */
.artist-hero.has-socials .artist-hero-content { padding-right: 210px; }

/* ── Acciones (Aleatorio / Reproducir todo) ── */
.artist-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-artist-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-artist-action:active {
  transform: scale(0.97);
}

.btn-artist-shuffle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-primary);
}

.btn-artist-shuffle:hover {
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(139, 92, 246, 0.5);
}

.btn-artist-playall {
  background: linear-gradient(135deg, #8b5cf6, #3b82f6);
  border: none;
  color: #fff;
  box-shadow: 0 6px 22px rgba(139, 92, 246, 0.4);
}

.btn-artist-playall:hover {
  filter: brightness(1.12);
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.55);
}

.btn-artist-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Secciones del perfil ── */
.artist-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.artist-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.artist-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.artist-show-all {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
  padding: 7px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.artist-show-all:hover {
  border-color: rgba(6, 182, 212, 0.55);
  color: var(--accent-cyan);
}

/* ── Biografía ── */
.artist-bio-text {
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 14.5px;
  white-space: pre-line;
}

.artist-bio-text.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.artist-bio-more {
  margin-top: 2px;
  background: none;
  border: none;
  color: var(--accent-cyan);
  font-family: inherit;
  font-weight: 800;
  letter-spacing: 1.2px;
  cursor: pointer;
  font-size: 11.5px;
  padding: 4px 0;
  width: fit-content;
}

/* ── Canciones populares (filas) ── */
.artist-track-list {
  display: flex;
  flex-direction: column;
}

.artist-track-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.18s ease;
}

.artist-track-row:hover {
  background: var(--card-hover);
}

.artist-track-row.current {
  background: rgba(139, 92, 246, 0.1);
}

.artist-track-idx {
  width: 22px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  flex-shrink: 0;
}

.artist-track-cover {
  width: 48px;
  height: 48px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.artist-track-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.artist-track-title {
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist-track-row.current .artist-track-title {
  color: var(--accent-cyan);
}

.artist-track-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist-track-dur {
  color: var(--text-muted);
  font-size: 12.5px;
  flex-shrink: 0;
}

/* ── Carruseles de lanzamientos ── */
.artist-release-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 168px;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.4) transparent;
}

.artist-release-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 14px;
  padding: 10px;
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.artist-release-card:hover {
  background: var(--card-hover);
  border-color: rgba(139, 92, 246, 0.25);
}

.artist-release-cover {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.artist-release-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.artist-release-title {
  font-weight: 600;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist-release-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Detalle de lanzamiento (álbum / sencillo / EP) ── */
.release-detail-hero {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  padding: 26px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.16), rgba(6, 182, 212, 0.07) 60%, transparent), var(--card-bg);
  border: 1px solid rgba(139, 92, 246, 0.18);
}

.release-detail-cover {
  width: 190px;
  height: 190px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  flex-shrink: 0;
}

.release-detail-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.release-detail-type {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-cyan);
}

.release-detail-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  word-break: break-word;
}

.release-detail-meta {
  color: var(--text-secondary);
  font-size: 13.5px;
}

/* ── Estados: carga y error ── */
.artist-skeleton {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.skel {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.skel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  animation: skelShimmer 1.4s infinite;
}

@keyframes skelShimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.skel-hero {
  height: 230px;
  border-radius: 22px;
}

.skel-line {
  height: 18px;
}

.skel-row {
  height: 56px;
  border-radius: 12px;
}

.artist-error-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.artist-error-state h2 {
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
}

/* ── Tema claro ── */
body.light .artist-hero {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(241, 245, 249, 0.96)), #fff;
  border-color: rgba(139, 92, 246, 0.3);
}

body.light .artist-hero-overlay {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(248, 250, 252, 0.92) 78%);
}

body.light .artist-name {
  color: #0f172a;
  text-shadow: none;
}

body.light .artist-back-btn,
body.light .btn-artist-shuffle {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.14);
  color: #334155;
}

body.light .artist-back-btn:hover,
body.light .btn-artist-shuffle:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.5);
  color: #0f172a;
}

body.light .artist-stat-chip {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.1);
  color: #475569;
}

body.light .artist-track-row:hover,
body.light .artist-release-card:hover {
  background: rgba(15, 23, 42, 0.05);
}

body.light .artist-track-row.current {
  background: rgba(139, 92, 246, 0.12);
}

body.light .release-detail-hero {
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.12), rgba(6, 182, 212, 0.05) 60%, transparent), #fff;
}

body.light .skel {
  background: rgba(15, 23, 42, 0.07);
}

body.light .skel::after {
  background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.05), transparent);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .artist-hero {
    padding: 26px 18px;
  }

  .artist-hero-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .artist-avatar {
    width: 104px;
    height: 104px;
  }

  .artist-name {
    font-size: 28px;
  }

  .release-detail-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
  }

  .release-detail-cover {
    width: 150px;
    height: 150px;
  }

  .release-detail-title {
    font-size: 26px;
  }

  .artist-release-row {
    grid-auto-columns: 136px;
  }

  /* Redes del artista: en móvil se alinean al final del bloque de stats */
  .artist-hero.has-socials .artist-hero-content { padding-right: 0; }

  .artist-socials {
    position: static;
    margin-top: 14px;
    justify-content: flex-end;
  }

  .artist-social-link {
    width: 32px;
    height: 32px;
  }
}
