:root {
  --azul-fondo: #0051FF;
  --azul-seccion: #1DA1FF;
  --amarillo: #FFD700;
  --rojo: #FF0000;
  --blanco: #FFFFFF;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
 
}

html, body {
  width: 100%;
  height: 100%;
  background: var(--azul-fondo);
  overflow-y: auto; /* Permitir scroll vertical */
  scroll-behavior: smooth; /* Scroll suave para anclas (#top) */
}

/* ============================
   CONTENEDOR PRINCIPAL
============================ */
.contenedor-principal {
  display: grid;
  grid-template-columns: 65% 35%;
  min-height: 100vh; /* Ocupa al menos la altura del viewport y permite crecer */
  gap: 0;
  padding-bottom: 100px; /* Espacio para el reproductor fijo */
  box-sizing: border-box;
  overflow: visible; /* Permitir que el contenido aumente la altura del documento */
}

.cabecera {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* izquierda | centro | derecha */
  align-items: center;
  gap: clamp(8px, 1.5vh, 15px);
  padding: clamp(8px, 1.5vh, 15px) 0;
  margin-bottom: clamp(8px, 1.5vh, 12px);
  border-bottom: 2px solid rgba(255, 255, 255, 0.1); /* Separador sutil */
}


.redes {
  display: flex;
  gap: clamp(6px, 1.2vh, 12px);
  justify-content: center;
  align-items: center;
}

.redes a {
  display: inline-flex;
  padding: clamp(3px, 0.6vh, 5px);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.redes a:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

.redes img {
  width: clamp(24px, 3.5vh, 35px); /* Más grandes */
  height: clamp(24px, 3.5vh, 35px);
  transition: transform 0.2s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}







/* ============================
   COLUMNA IZQUIERDA - Optimizada
============================ */
.columna-izquierda {
  display: grid;
  grid-template-rows: auto 1fr; /* Cabecera compacta + lista maximizada */
  padding: clamp(12px, 2vh, 20px);
  background-color: var(--azul-fondo);
  color: var(--blanco);
  gap: clamp(8px, 1.5vh, 12px);
  height: 100%;
  overflow: hidden;
}

.cabecera h1 {
  font-size: clamp(1.3rem, 2.5vh, 1.8rem); /* Más grande */
  font-weight: 900;
  line-height: 1.1;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4); /* Profundidad */
  letter-spacing: 0.5px;
}

.columna-izquierda h1 {
  font-size: clamp(1.3rem, 2.5vh, 1.8rem);
  font-weight: 900;
}
.yellow { color: var(--amarillo); }
.white { color: var(--blanco); }
.red { color: var(--rojo); }

.lista-canciones {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columnas fijas = 7 filas perfectas con 21 canciones */
  gap: clamp(5px, 0.8vh, 10px); /* Gap optimizado */
  background: var(--azul-seccion);
  padding: clamp(6px, 1vh, 10px);
  border-radius: 15px;
  height: 100%; /* Ocupa el espacio disponible */
  overflow: hidden; /* SIN SCROLL en desktop */
  
  /* Auto-ajuste de filas para que quepan las 21 canciones en 7 filas */
  grid-auto-rows: minmax(0, 1fr);
  
  /* Alineación óptima */
  align-content: start;
  
  /* Sombra interna para profundidad */
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.song-item {
  background: var(--azul-fondo);
  color: var(--blanco);
  padding: clamp(8px, 1.2vh, 14px); /* Padding optimizado */
  border-radius: clamp(8px, 1.2vh, 12px);
  /*display: flex;*/
  flex-direction: column;
  gap: clamp(5px, 0.8vh, 10px);
  cursor: pointer;
  transition: all 0.2s ease;
  
  /* Asegurar que el item se ajuste al espacio disponible */
  min-height: 0;
  overflow: hidden;
  
  /* Borde sutil */
  border: 1px solid rgba(255, 255, 255, 0.05);
  
  /* Sombra para profundidad */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.song-item:hover {
  transform: translateY(-3px) scale(1.01);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

.song-item:active {
  transform: translateY(-1px) scale(0.99);
}

.song-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
}

.song-title {
  font-size: clamp(0.75rem, 1.3vh, 1rem); /* Más grande */
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Máximo 2 líneas */
  -webkit-box-orient: vertical;
  flex: 1;
  font-weight: 500; /* Peso medio para legibilidad */
}

.vote-icon {
  background: linear-gradient(135deg, var(--rojo) 0%, #cc0000 100%);
  color: var(--blanco);
  border-radius: 50%;
  width: clamp(28px, 3.5vh, 36px); /* Icono más grande */
  height: clamp(28px, 3.5vh, 36px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.9rem, 1.6vh, 1.2rem);
  flex-shrink: 0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(255, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.song-item:hover .vote-icon {
  background: linear-gradient(135deg, #ff0000 0%, #ff4b4b 100%);
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 4px 10px rgba(255, 0, 0, 0.6);
}

.vote-info {
  font-size: clamp(0.7rem, 1.1vh, 0.95rem); /* Más grande */
  opacity: 0.85;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vote-bar {
  height: clamp(5px, 1vh, 8px); /* Barra más visible */
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.vote-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rojo) 0%, orange 50%, yellow 100%);
  width: 0%;
  transition: width 0.4s ease;
}

.vote-bar {
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.vote-fill {
  height: 100%;
  width: 0%;
  position: relative;
  transition: width 0.5s cubic-bezier(0.4, 0.0, 0.2, 1); /* Animación suave */
  border-radius: 6px;
}

/* Efecto de brillo suave */
.glow::after {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
  animation: shine 1.5s infinite;
}

/* Brillo m�s r�pido e intenso para l�der */
.leader::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.8),
    transparent
  );
  animation: shine 0.8s infinite;
}

@keyframes shine {
  0% { left: -50%; }
  100% { left: 100%; }
}



/* ============================
   COLUMNA DERECHA
============================ */
.columna-derecha {
  /* Diseño optimizado con jerarquía visual clara */
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vh, 20px);
  padding: clamp(15px, 2.5vh, 25px);
  background: var(--azul-seccion);
  color: var(--blanco);
  text-align: center;
  height: 100%;
  overflow: hidden;
  justify-content: space-evenly; /* Distribución uniforme optimizada */
}

.columna-derecha img.logo {
  max-width: 85%;
  max-height: clamp(80px, 15vh, 180px); /* Logo más grande */
  height: auto;
  width: auto;
  object-fit: contain;
  margin: 0 auto;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.columna-derecha img.logo:hover {
  transform: scale(1.05); /* Efecto hover sutil */
}

.contenido-derecha {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.5vh, 15px);
  flex: 1; /* Ocupa el espacio disponible */
  overflow: hidden;
}

.columna-derecha h1 {
  font-size: clamp(1.2rem, 2.8vh, 2rem); /* Más grande */
  line-height: 1.2;
  margin: clamp(8px, 1.5vh, 15px) 0;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); /* Profundidad */
}

.columna-derecha p {
  font-size: clamp(0.85rem, 1.6vh, 1.1rem); /* Más legible */
  line-height: 1.6; /* Mejor lectura */
  margin: clamp(8px, 1.5vh, 12px) 0;
  padding: 0 clamp(5px, 1vh, 15px);
  font-weight: 400;
  opacity: 0.95;
}

.seccion-suscripcion {
  background: rgba(255, 255, 255, 0.1);
  padding: clamp(10px, 2vh, 20px);
  border-radius: 15px;
  margin: clamp(8px, 1.5vh, 12px) 0;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.seccion-suscripcion h2 {
  font-size: clamp(0.9rem, 1.8vh, 1.3rem); /* Más grande */
  line-height: 1.4;
  margin-bottom: clamp(8px, 1.5vh, 12px);
  font-weight: 600;
}

.equipo {
  width: 100%;
  max-height: clamp(120px, 22vh, 280px); /* Imagen equipo optimizada */
  height: auto;
  object-fit: contain; /* Mostrar completa sin cortar */
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); /* Profundidad */
  margin: clamp(8px, 1.5vh, 12px) 0;
  transition: transform 0.3s ease;
}

.equipo:hover {
  transform: scale(1.02); /* Efecto hover sutil */
}

.boton {
  background: linear-gradient(135deg, var(--rojo) 0%, #cc0000 100%);
  color: var(--blanco);
  padding: clamp(10px, 1.8vh, 14px) clamp(15px, 2.5vh, 25px);
  text-decoration: none;
  display: inline-block;
  border-radius: 25px; /* Más redondeado */
  margin-top: clamp(5px, 1vh, 8px);
  font-size: clamp(0.85rem, 1.6vh, 1.1rem);
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.3);
  min-height: 44px; /* Touch target mínimo */
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.boton:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.5);
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
}

.boton:active {
  transform: translateY(0) scale(0.98);
}

.boton:focus {
  outline: 3px solid var(--amarillo);
  outline-offset: 4px;
}

/* Link "Subile Subile" */
.subir {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  color: var(--amarillo);
  font-size: clamp(0.9rem, 1.7vh, 1.2rem);
  font-weight: 700;
  padding: clamp(8px, 1.5vh, 12px);
  transition: all 0.3s ease;
  border-radius: 10px;
}

.subir:hover {
  background: rgba(255, 215, 0, 0.1);
  transform: translateY(-2px);
}

.subir h2 {
  margin: 0;
  font-size: inherit;
}

/* Animación de entrada suave */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contenido-derecha > * {
  animation: fadeInUp 0.6s ease backwards;
}

.contenido-derecha > *:nth-child(1) { animation-delay: 0.1s; }
.contenido-derecha > *:nth-child(2) { animation-delay: 0.2s; }
.contenido-derecha > *:nth-child(3) { animation-delay: 0.3s; }
.contenido-derecha > *:nth-child(4) { animation-delay: 0.4s; }
.contenido-derecha > *:nth-child(5) { animation-delay: 0.5s; }

/* Reducir animaciones si el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}



/* ============================
   RESPONSIVE - MÓVIL
============================ */
@media (max-width: 900px) {
  
  html, body {
    overflow-y: auto; /* SÍ permitir scroll en móvil */
    overflow-x: hidden;
  }
  
  .contenedor-principal {
    grid-template-columns: 1fr; /* Una sola columna vertical */
    grid-template-rows: auto auto; /* Todo automático - crece según contenido */
    height: auto; /* Auto - crece con el contenido */
    min-height: 100vh;
    overflow: visible; /* Permitir scroll */
    padding-bottom: 120px; /* Espacio para reproductor */
  }

  .lista-canciones {
    grid-template-columns: repeat(2, 1fr); /* 2 COLUMNAS en móvil */
    gap: 8px;
    padding: 8px;
    height: auto; /* Auto - crece según contenido */
    overflow: visible; /* SIN restricción de altura */
  }
  
  .columna-izquierda {
    height: auto; /* Auto - crece con las canciones */
    overflow: visible;
    padding: 15px;
  }
  
  .columna-derecha {
    height: auto; /* Auto - crece con el contenido */
    overflow: visible;
    padding: 20px;
    gap: 20px; /* Más espacio entre elementos */
  }
  
  .song-item {
    padding: 10px;
    gap: 6px;
  }
  
  .song-title {
    font-size: 0.85rem; /* Fuente fija legible */
    -webkit-line-clamp: 2;
  }
  
  .vote-icon {
    width: 28px;
    height: 28px;
    font-size: 0.95rem;
  }
  
  .vote-info {
    font-size: 0.75rem;
  }
  
  .vote-bar {
    height: 4px;
  }
  
  /* ===== SECCIÓN DE LA EMISORA (Mejorada) ===== */
  
  .columna-derecha img.logo {
    max-height: 100px; /* Logo más grande */
    width: auto;
    margin: 10px auto;
  }
  
  .columna-derecha h1 {
    font-size: 1.5rem; /* Más grande y legible */
    margin: 15px 0;
    line-height: 1.3;
  }
  
  .columna-derecha h1 .yellow {
    display: block; /* Cada parte en su línea */
  }
  
  .columna-derecha h1 .white {
    display: block;
  }
  
  .columna-derecha h1 .red {
    display: block;
  }
  
  .columna-derecha p {
    font-size: 1rem; /* Texto más grande */
    margin: 15px 0;
    line-height: 1.6;
    padding: 0 10px;
  }
  
  .seccion-suscripcion {
    background: rgba(255, 255, 255, 0.15);
    padding: 25px 20px;
    border-radius: 20px;
    margin: 25px 0;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  }
  
  .seccion-suscripcion h2 {
    font-size: 1.2rem; /* Grande y claro */
    line-height: 1.5;
    margin-bottom: 20px;
    font-weight: 700;
    text-align: center;
  }
  
  .equipo {
    max-height: none; /* Sin límite en móvil - mostrar completa */
    width: 100%;
    height: auto;
    object-fit: contain; /* Proporción original, sin cortar */
    border-radius: 15px;
    margin: 25px 0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); /* Profundidad */
  }
  
  .boton {
    padding: 16px 28px; /* Touch target óptimo */
    font-size: 1.1rem;
    margin: 15px auto;
    display: block;
    width: 90%; /* Ancho generoso */
    max-width: 320px;
    min-height: 52px; /* Touch target generoso 52x52px+ */
    text-align: center;
    border-radius: 30px;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
  }
  
  /* Cabecera en móvil */
  .cabecera {
    grid-template-columns: 1fr; /* Una columna */
    text-align: center;
    gap: 10px;
    margin-bottom: 15px;
  }
  
  .cabecera h1 {
    font-size: 1.3rem;
    order: 1;
  }
  
  .redes {
    order: 2;
    justify-content: center;
    gap: 15px;
  }
  
  .cabecera h3 {
    font-size: 1rem;
    order: 3;
    text-align: center;
  }
  
  .redes img {
    width: 40px; /* Touch targets grandes 40x40px */
    height: 40px;
  }
  
  .redes a {
    display: inline-block;
    padding: 5px; /* Área de touch expandida a 50x50px */
  }
  
  /* Link subir - Touch-friendly */
  .subir {
    padding: 16px;
    min-height: 52px;
    background: rgba(255, 215, 0, 0.15);
    border-radius: 15px;
    margin: 20px 0;
  }
  
  .subir h2 {
    font-size: 1.3rem;
    margin: 0;
  }
  
  /* Footer discreto */
  .columna-derecha > div:last-child {
    font-size: 0.85rem;
    opacity: 0.7;
    margin: 20px 0 10px 0;
  }
  
  /* Ajustar el último elemento */
  .song-item:last-child {
    margin-bottom: 15px;
  }
}

.reproductor {
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: yellow;
  max-height: 100px;
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  padding: 5px 10px;
  box-sizing: border-box;

  /* Centrado horizontal */
  justify-content: center;
}

/* Contenedor interno: logo + play + volumen */
.reproductor-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: nowrap;
}

/* Modal de reporte de streaming */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-contenido {
  background: linear-gradient(145deg, #0040c0, #0070ff);
  border-radius: 18px;
  padding: 24px 20px;
  max-width: 420px;
  width: 100%;
  color: #ffffff;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.modal-contenido h2 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.modal-contenido p {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.modal-botones {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-principal,
.btn-secundario {
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  min-width: 130px;
  transition: all 0.2s ease;
}

.btn-principal {
  background: linear-gradient(135deg, var(--rojo), #ff7b00);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
}

.btn-secundario {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-principal:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 0, 0, 0.6);
}

.btn-secundario:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Logo */
#logoplay {
  margin-bottom: 10%;
  object-fit: contain;
}

/* Botón Play/Pause */
#playPauseBtn {
  width: 70px;
  height: 70px;
  border: none;
  border-radius: 50%;
  background-color: #fff;
  cursor: pointer;
  position: relative;
}

/* Icono Play */
#playPauseBtn.play::before {
  content: '';
  position: absolute;
  left: 27px;
  top: 22px;
  width: 0;
  height: 0;
  border-left: 18px solid #ff6600;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}

/* Icono Pausa */
#playPauseBtn.pause::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 20px;
  width: 8px;
  height: 30px;
  background: #ff6600;
  box-shadow: 18px 0 0 #ff6600;
}

/* Control de volumen */
#volumeSlider {
  width: 150px;
  cursor: pointer;
  accent-color: #ff6600;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  /* Respetar área segura de móviles con barra inferior (iOS/Android) */
  .reproductor {
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }

  #logoplay {
 
  }

  #playPauseBtn {
   
  }

  #volumeSlider {
    width: 120px;
  }
}

@media (max-width: 600px) {
  .reproductor-inner {
    gap: 12px;
  }

  #logoplay {

  }

  #playPauseBtn {
   
  }

  #volumeSlider {
    width: 100px;
  }
}


