/* ================================
   RESET BÁSICO
================================ */
*{
  box-sizing:border-box;
}

body{
  margin:0;
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(139,92,246,.15), transparent 60%),
    radial-gradient(900px 500px at 80% 30%, rgba(34,211,238,.12), transparent 55%),
    #0a0a0f;
  font-family: Arial, Helvetica, sans-serif;
}

/* ================================
   CONTENEDOR GENERAL
================================ */
.boombox{
  width:100%;
  max-width:none;
 padding:12px 16px;
  background:linear-gradient(180deg,#1b1c22,#0f1016);
  border-radius:20px;
  box-shadow:
    inset 0 0 1px rgba(255,255,255,.12),
    inset 0 0 30px rgba(0,0,0,.8),
    0 20px 60px rgba(0,0,0,.9);
}

/* ================================
   HEADER
================================ */
.radio-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 16px;
  margin-bottom:16px;
  background:rgba(0,0,0,.3);
  border-radius:14px;
}

/* ================================
   TITULO RADIO (VIVO)
================================ */
.radio-title{
  flex:1;
  text-align:center;
  font-weight:900;
  letter-spacing:1.5px;
  font-size:16px;
  text-transform:uppercase;

  background:linear-gradient(
    90deg,
    #22d3ee,
    #8b5cf6,
    #22d3ee
  );
  background-size:200% auto;
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;

  animation:titleFlow 6s linear infinite;
  filter:drop-shadow(0 0 6px rgba(34,211,238,.6));
}

/* Animación sutil */
@keyframes titleFlow{
  from{ background-position:0% center; }
  to{ background-position:200% center; }
}


.radio-live{
  font-size:12px;
  font-weight:bold;
  padding:4px 10px;
  border-radius:999px;
  background:linear-gradient(90deg,#22d3ee,#8b5cf6);
  color:#000;
}

/* ================================
   CUERPO PRINCIPAL
================================ */
.radio-body{
  display:flex;
  align-items:center;   /* 🔥 CLAVE */
  justify-content:space-between;
  gap:24px;
}

/* ================================
   PARLANTES (FIJOS)
================================ */
/* CONTENEDOR DE LA CARÁTULA */
.radio-speaker{
  width:18%;
  aspect-ratio:1/1;   /* cuadrado perfecto */
  max-width:200px;
  min-width:120px;
}


/* IMAGEN: RESPETA PROPORCIÓN REAL */
.radio-speaker img,
#coverArt{
  width:auto;          /* 🔑 NO forzar */
  height:auto;         /* 🔑 NO forzar */
  max-width:100%;
  max-height:100%;
  object-fit:contain;  /* respaldo */
}

/* FORZAR CUADRADO EN AMBOS LADOS */
.radio-speaker,
.radio-speaker img,
#coverArt{
  border-radius:18px !important;
}

/* ================================
   CENTRO
================================ */
.radio-center{
  flex:1;
  max-width:620px;
  background:linear-gradient(180deg,#121318,#0a0b10);
  border-radius:18px;
  padding:22px 24px; /* 🔥 reducido */
  display:flex;
  flex-direction:column;
  align-items:center;
  width:auto;
  box-shadow:
    inset 0 0 25px rgba(0,0,0,.9),
    inset 0 0 1px rgba(255,255,255,.12);
}


/* ================================
   DISPLAY
================================ */
.radio-display{
  width:100%;
  display:center;
  flex-direction:column;
  gap:14px;
  align-items:center;
}

/* ================================
   SONANDO AHORA
================================ */
.now-playing{
  width:100%;
  max-width:520px;
  background:#000;
  padding:12px 18px;
  border-radius:12px;
  font-family:"Courier New", monospace;
  color:#22d3ee;
  text-align:left;
  box-shadow:
    inset 0 0 14px rgba(34,211,238,.5),
    0 0 14px rgba(34,211,238,.4);
}

.now-playing span{
  display:block;
  margin-top:4px;
  font-size:16px;
  color:#7dd3fc;
}

/* ================================
   VOLUMEN HORIZONTAL
================================ */
.volume-h{
  width:100%;
  max-width:520px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 14px;
  background:#000;
  border-radius:10px;
  box-shadow:
    inset 0 0 8px rgba(34,211,238,.3),
    0 0 6px rgba(0,0,0,.7);
}

.volume-h input[type=range]{
  flex:1;
  height:4px;
  cursor:pointer;
}

.vol-txt{
  min-width:40px;
  text-align:right;
  font-family:"Courier New", monospace;
  font-size:13px;
  color:#22d3ee;
}

/* ================================
   CONTROLES
================================ */
.controls{
  display:flex;
  gap:12px;
  margin-top:8px;
}

.controls button{
  background:linear-gradient(180deg,#333,#111);
  border:1px solid #000;
  color:#eee;
  padding:8px 18px;
  border-radius:8px;
  cursor:pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    0 4px 8px rgba(0,0,0,.6);
}

.controls button.active{
  background:linear-gradient(180deg,#22d3ee,#0ea5e9);
  color:#000;
  box-shadow:
    inset 0 0 6px rgba(255,255,255,.6),
    0 0 12px rgba(34,211,238,.9);
}

/* ================================
   ECUALIZADOR
================================ */
.eq-wrapper{
  width:100%;
  max-width:520px;   /* igual que now-playing */
  margin-top:12px;
}

.eq-wrapper canvas{
  width:100%;
  height:90px;
  display:block;
  border-radius:12px;
  background:rgba(0,0,0,.6);
  box-shadow:
    inset 0 0 20px rgba(34,211,238,.4),
    0 0 20px rgba(139,92,246,.6);
}


#equalizer{
  width:100%;
  height:70px;
  display:block;
}



/* ================================
   CRÉDITOS
================================ */
.radio-credit{
  margin-top:14px;
  font-size:12px;
  font-family:"Courier New", monospace;
  color:#9ca3af;
  display:flex;
  justify-content:center;
  gap:8px;
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width:900px){
  .radio-body{
    flex-direction:column;
    align-items:center;
  }

  .radio-speaker{
    width:140px;
    height:140px;
  }

  .radio-center{
    width:100%;
  }
}

/* ================================
   CONFIG (TUERQUITA)
================================ */
.radio-config{
  position:relative;
  font-size:20px;
  text-decoration:none;
  color:#22d3ee;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border-radius:50%;
  transition:transform .6s ease, color .3s ease;
}

.radio-config:hover{
  transform:rotate(360deg);
  color:#8b5cf6;
}


.config-tooltip{
  position:absolute;
  top:50%;
  left:42px;
  transform:translateY(-50%);
  background:#0a0a0f;
  color:#22d3ee;
  font-size:12px;
  padding:6px 10px;
  border-radius:8px;
  white-space:nowrap;
  opacity:0;
  pointer-events:none;
  box-shadow:0 0 10px rgba(34,211,238,.6);
  transition:opacity .25s ease, left .25s ease;
}

/* Mostrar tooltip */
.radio-config:hover .config-tooltip{
  opacity:1;
  left:48px;
}

/* ================================
   LIVE + ANTENA
================================ */
.radio-live{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:bold;
  padding:4px 12px;
  border-radius:999px;
  background:#111;
  color:#555;
  transition:all .3s ease;
}

/* Antena */
.live-antenna{
  font-size:14px;
  opacity:.3;
  filter:grayscale(1);
  transition:all .3s ease;
}

/* LIVE ACTIVO */
.radio-live.on{
  background:linear-gradient(90deg,#22d3ee,#8b5cf6);
  color:#000;
  box-shadow:0 0 12px rgba(34,211,238,.8);
}

.radio-live.on .live-antenna{
  opacity:1;
  filter:none;
  animation:antennaPulse 1.2s infinite;
}

/* Pulso antena */
@keyframes antennaPulse{
  0%{ transform:scale(1); }
  50%{ transform:scale(1.15); }
  100%{ transform:scale(1); }
}
/* ================================
   SIN SEÑAL
================================ */
.no-signal{
  display:none;
  margin-top:6px;
  padding:6px 14px;
  font-size:12px;
  font-family:"Courier New", monospace;
  color:#f87171;
  background:#120a0a;
  border-radius:8px;
  box-shadow:0 0 10px rgba(248,113,113,.4);
}

.no-signal.on{
  display:inline-block;
}
/* ================================
   CARATULA DINAMICA (COVER ART)
================================ */
#coverArt{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:50%;
  transition:
    opacity .35s ease,
    transform .35s ease,
    filter .35s ease;
}

/* efecto cuando cambia */
#coverArt.changing{
  opacity:0;
  transform:scale(0.92);
  filter:blur(3px);
}
.radio-speaker.radio-cover{
  padding:0;
  overflow:hidden;
}
/* ================================
   COVER ART (INTEGRADO AL LAYOUT)
================================ */

.radio-speaker{
  position:relative;
  overflow:hidden;
}

.radio-cover-img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:50%;
  transition:
    opacity .35s ease,
    transform .35s ease,
    filter .35s ease;
}

/* estado de cambio (radio-now.js lo activa) */
.radio-cover-img.changing{
  opacity:0;
  transform:scale(0.92);
  filter:blur(3px);
}
