:root {
  --neon-1: #00f0ff;   /* cian */
  --neon-2: #ff00d4;   /* magenta */
  --neon-3: #8b5cf6;   /* violeta */
  --bg: #050508;
  --text: #eaeaf2;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  overflow: hidden;
}

canvas#viz {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

/* ---------- Título ---------- */
.hero {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}
.hero h1 {
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  background: linear-gradient(90deg, var(--neon-1), var(--neon-2), var(--neon-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(0, 240, 255, 0.45));
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(0, 240, 255, 0.35)); }
  50%      { filter: drop-shadow(0 0 30px rgba(255, 0, 212, 0.55)); }
}

/* ---------- Barra de controles ---------- */
.controls {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(10, 10, 18, 0.72);
  border: 1px solid rgba(0, 240, 255, 0.25);
  backdrop-filter: blur(14px);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.12);
  z-index: 3;
  max-width: min(94vw, 680px);
}
.ctl {
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 1.05rem;
  opacity: 0.8;
  transition: opacity 0.15s ease, text-shadow 0.15s ease;
  flex-shrink: 0;
}
.ctl:hover { opacity: 1; text-shadow: 0 0 12px var(--neon-1); }

button.play {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--neon-1), var(--neon-2));
  color: #050508;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 0 18px rgba(255, 0, 212, 0.45);
  flex-shrink: 0;
}
button.play:hover { transform: scale(1.08); box-shadow: 0 0 28px rgba(0, 240, 255, 0.7); }

.track-info { min-width: 0; }
.track-info .name {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.track-info .time {
  font-size: 0.72rem;
  color: rgba(234, 234, 242, 0.5);
  font-variant-numeric: tabular-nums;
}

.progress {
  -webkit-appearance: none;
  appearance: none;
  width: 150px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}
.progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--neon-1);
  box-shadow: 0 0 10px var(--neon-1);
}

/* ---------- Panel de playlist ---------- */
.playlist {
  position: fixed;
  right: 24px;
  bottom: 104px;
  width: min(320px, 86vw);
  max-height: 55vh;
  overflow-y: auto;
  background: rgba(10, 10, 18, 0.85);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 16px;
  backdrop-filter: blur(14px);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.15);
  z-index: 3;
  display: block;
  padding: 8px;
}
.playlist .item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.12s ease;
}
.playlist .item:hover { background: rgba(0, 240, 255, 0.08); }
.playlist .item.current {
  background: rgba(255, 0, 212, 0.12);
  color: var(--neon-1);
}
.playlist .item .num {
  font-size: 0.7rem;
  color: rgba(234, 234, 242, 0.4);
  width: 18px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.playlist::-webkit-scrollbar { width: 6px; }
.playlist::-webkit-scrollbar-thumb { background: rgba(0, 240, 255, 0.3); border-radius: 3px; }

@media (max-width: 560px) {
  .progress { width: 70px; }
  .track-info .name { max-width: 100px; }
}
