/* ===================================================
   RETRO FM - Sistema de Diseño Global
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;600;700;800&display=swap');

:root {
  /* Paleta de colores */
  --primary: #ff6b35;
  --primary-mid: #e85520;
  --secondary: #ff2d78;
  --accent: #00d4ff;
  --neon-cyan: #00d4ff;
  --neon-pink: #ff2d78;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  /* Fondos */
  --bg-base: #08090f;
  --bg-surface: rgba(255, 255, 255, 0.04);
  --bg-surface-hover: rgba(255, 255, 255, 0.08);
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(255, 107, 53, 0.08);
  --bg-glass-strong: rgba(255, 107, 53, 0.15);

  /* Bordes */
  --border: rgba(255, 255, 255, 0.1);
  --border-accent: rgba(255, 107, 53, 0.4);

  /* Texto */
  --text-primary: #f5f0eb;
  --text-secondary: rgba(245, 240, 235, 0.6);
  --text-muted: rgba(245, 240, 235, 0.35);

  /* Gradientes */
  --grad-primary: linear-gradient(135deg, #ff6b35, #ff2d78);
  --grad-surface: linear-gradient(135deg, rgba(255,107,53,0.15), rgba(255,45,120,0.08));
  --grad-bg: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255,107,53,0.18) 0%, transparent 70%);

  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px rgba(255,107,53,0.3);
  --shadow-glow-sm: 0 0 15px rgba(255,107,53,0.2);

  /* Radios */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Tipografía */
  --font-main: 'Inter', sans-serif;
  --font-display: 'Bebas Neue', sans-serif;

  /* Transiciones */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ─── RESET ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; height: 100%; }
body {
  font-family: var(--font-main);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── SCROLLBAR ──────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-accent); border-radius: 99px; }

/* ─── GRADIENTE DE FONDO ─────────────────────── */
.bg-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: var(--grad-bg);
}
.bg-glow::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  top: -200px; left: -200px;
  background: radial-gradient(circle, rgba(255,107,53,0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatGlow 8s ease-in-out infinite alternate;
}
.bg-glow::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  bottom: -150px; right: -100px;
  background: radial-gradient(circle, rgba(255,45,120,0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatGlow 10s ease-in-out infinite alternate-reverse;
}
@keyframes floatGlow {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 40px) scale(1.1); }
}

/* ─── GLASS CARD ─────────────────────────────── */
.glass {
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ─── BUTTONS ────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border: none; border-radius: var(--radius-full);
  cursor: pointer; font-family: var(--font-main);
  font-size: 14px; font-weight: 600;
  transition: all 0.2s var(--ease);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(255,107,53,0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255,107,53,0.5);
}
.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-accent);
}
.btn-icon {
  width: 42px; height: 42px;
  padding: 0; border-radius: 50%;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-size: 16px;
}
.btn-icon:hover {
  background: var(--bg-glass);
  color: var(--primary);
  border-color: var(--border-accent);
}
.btn-icon.active {
  background: var(--bg-glass-strong);
  color: var(--primary);
  border-color: var(--border-accent);
}
.btn-danger {
  background: rgba(239,68,68,0.1);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ─── PLAY BUTTON GRANDE ─────────────────────── */
.play-btn-lg {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--grad-primary);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: white;
  box-shadow: 0 0 0 0 rgba(255,107,53,0.4);
  transition: all 0.3s var(--ease-spring);
}
.play-btn-lg:hover {
  transform: scale(1.08);
  box-shadow: 0 0 40px rgba(255,107,53,0.5);
}
.play-btn-lg.playing {
  animation: pulseRing 2s ease-in-out infinite;
}
@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(255,107,53,0.5); }
  70%  { box-shadow: 0 0 0 20px rgba(255,107,53,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,107,53,0); }
}

/* ─── ALBUM ART ──────────────────────────────── */
.album-art {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}
.album-art img, .album-art .art-placeholder {
  width: 100%; height: 100%;
  object-fit: cover;
}
.art-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-surface);
  font-size: 3em;
  border: 1px solid var(--border);
}

/* ─── EQUALIZER ANIMATION ────────────────────── */
.equalizer {
  display: flex; align-items: flex-end; gap: 3px;
  height: 24px;
}
.eq-bar {
  width: 4px;
  border-radius: 2px;
  background: var(--grad-primary);
  animation: eqBounce 0.6s ease-in-out infinite alternate;
}
.eq-bar:nth-child(1) { animation-duration: 0.5s; animation-delay: 0s; }
.eq-bar:nth-child(2) { animation-duration: 0.7s; animation-delay: 0.1s; }
.eq-bar:nth-child(3) { animation-duration: 0.4s; animation-delay: 0.2s; }
.eq-bar:nth-child(4) { animation-duration: 0.8s; animation-delay: 0.05s; }
.eq-bar:nth-child(5) { animation-duration: 0.6s; animation-delay: 0.15s; }
@keyframes eqBounce {
  from { height: 4px; opacity: 0.4; }
  to   { height: 22px; opacity: 1; }
}
.equalizer.paused .eq-bar {
  animation-play-state: paused;
  height: 4px;
  opacity: 0.3;
}

/* ─── SLIDER DE VOLUMEN ──────────────────────── */
.volume-slider {
  -webkit-appearance: none;
  width: 100px; height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none; cursor: pointer;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--grad-primary);
  cursor: pointer;
  box-shadow: var(--shadow-glow-sm);
  transition: transform 0.15s;
}
.volume-slider::-webkit-slider-thumb:hover { transform: scale(1.3); }

/* ─── TAGS ───────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.tag-live {
  background: rgba(239,68,68,0.15);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.3);
}
.tag-live::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--danger);
  margin-right: 5px;
  animation: blink 1.2s ease-in-out infinite;
}
.tag-online {
  background: rgba(16,185,129,0.15);
  color: var(--success);
  border: 1px solid rgba(16,185,129,0.3);
}
.tag-decade {
  background: rgba(0, 212, 255, 0.12);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 212, 255, 0.3);
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* ─── PROGRESS BAR ───────────────────────────── */
.progress-bar {
  width: 100%; height: 3px;
  background: var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--grad-primary);
  border-radius: var(--radius-full);
  transition: width 1s linear;
}

/* ─── SONG LIST ITEM ─────────────────────────── */
.song-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  transition: all 0.2s var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
}
.song-item:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border);
}
.song-item.active {
  background: var(--bg-glass);
  border-color: var(--border-accent);
}
.song-thumb {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  border: 1px solid var(--border);
}
.song-info { flex: 1; min-width: 0; }
.song-title {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text-primary);
}
.song-artist {
  font-size: 12px; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.song-duration {
  font-size: 12px; color: var(--text-muted);
  flex-shrink: 0;
}

/* ─── DRAG & DROP ZONE ───────────────────────── */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  transition: all 0.25s var(--ease);
  cursor: pointer;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--primary);
  background: var(--bg-glass);
  transform: scale(1.01);
}
.drop-zone-icon { font-size: 40px; margin-bottom: 12px; }
.drop-zone-text { color: var(--text-secondary); font-size: 14px; }
.drop-zone-text strong { color: var(--primary); }

/* ─── INPUT ──────────────────────────────────── */
.input-field {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.input-field:focus {
  border-color: var(--border-accent);
}
.input-field::placeholder { color: var(--text-muted); }

/* ─── TOAST ──────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(8, 9, 15, 0.95);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  font-size: 13px; font-weight: 500;
  color: var(--text-primary);
  pointer-events: all;
  animation: slideIn 0.3s var(--ease-spring);
  box-shadow: var(--shadow-md);
  max-width: 300px;
}
.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.error   { border-color: rgba(239,68,68,0.4); }
.toast.info    { border-color: var(--border-accent); }
@keyframes slideIn {
  from { transform: translateX(100px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(100px); opacity: 0; }
}
.toast.removing { animation: slideOut 0.3s var(--ease) forwards; }

/* ─── UTILITIES ──────────────────────────────── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary-color { color: var(--primary); }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.w-full { width: 100%; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.section-title {
  font-family: var(--font-display);
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-muted); margin-bottom: 12px;
}

@media (max-width: 600px) {
  .toast-container {
    right: 10px;
    left: 10px;
    bottom: 12px;
    align-items: stretch;
  }

  .toast {
    max-width: none;
    width: 100%;
  }

  .btn {
    min-height: 36px;
  }
}
