/* PLAYER PERSISTENTE SPEKTRA FM */
.spektra-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background: #09060f; /* Nuevo fondo oscuro del flyer */
    border-top: 2px solid #e3001b; /* Rojo Spektra vibrante */
    z-index: 9999;
    color: white;
    padding: 0 20px;
}

.player-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Info de programa/canción */
.now-playing { 
    display: flex; 
    align-items: center; 
    width: 380px; /* Un poco más de ancho para títulos largos */
}

.album-art {
    flex-shrink: 0;
}

.album-art img { 
    width: 60px; 
    height: 60px; 
    border-radius: 4px; 
    margin-right: 15px; 
    border: 1px solid #333; 
    object-fit: cover; /* Mantiene la proporción de los flyers de programas */
    background-color: #000;
    transition: all 0.5s ease; /* Transición suave cuando cambie de programa */
}

.track-data {
    overflow: hidden; /* Evita que el texto rompa el diseño */
}

.track-data h4 { 
    margin: 0; 
    font-size: 14px; 
    color: #fff; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Añade puntos suspensivos si el título es muy largo */
}

.track-data p { 
    margin: 0; 
    font-size: 11px; /* Ligeramente más pequeño para jerarquía */
    color: #e3001b; 
    font-weight: bold; 
    text-transform: uppercase;
}

/* Botón Play */
.play-button {
    background: #e3001b;
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(227, 0, 27, 0.4);
    flex-shrink: 0;
}

.play-button:hover { transform: scale(1.1); background: #ff1a35; }
.play-button svg { width: 30px; fill: white; }

/* =========================================
   VISUALIZADOR ANIMADO (LA DEFINITIVA)
   ========================================= */
.audio-visualizer { 
    display: flex; 
    align-items: flex-end; 
    height: 25px; 
    gap: 3px; 
    margin-left: 20px; 
}

/* Estado de reposo (Stop/Pause) */
.spektra-footer .audio-visualizer .bar { 
    width: 3px; 
    background: #e3001b; 
    height: 3px; 
    border-radius: 2px;
    transition: height 0.3s ease; 
    animation: none; 
}

/* Animación al dar Play */
.spektra-footer.is-playing .audio-visualizer .bar { 
    animation: vumetroSpektra infinite alternate ease-in-out;
}

/* Desincronización para cada barra */
.spektra-footer.is-playing .audio-visualizer .bar:nth-child(1) { animation-duration: 0.6s; animation-delay: 0.1s; }
.spektra-footer.is-playing .audio-visualizer .bar:nth-child(2) { animation-duration: 0.8s; animation-delay: 0.4s; }
.spektra-footer.is-playing .audio-visualizer .bar:nth-child(3) { animation-duration: 0.5s; animation-delay: 0.0s; }
.spektra-footer.is-playing .audio-visualizer .bar:nth-child(4) { animation-duration: 0.7s; animation-delay: 0.3s; }
.spektra-footer.is-playing .audio-visualizer .bar:nth-child(5) { animation-duration: 0.9s; animation-delay: 0.2s; }

@keyframes vumetroSpektra { 
    0% { height: 3px; } 
    100% { height: 25px; } 
}

/* Volumen */
.player-extra { 
    width: 300px; 
    display: flex; 
    justify-content: flex-end; 
    flex-shrink: 0;
}

.volume-control { display: flex; align-items: center; gap: 10px; }
.volume-control svg { fill: #888; }

input[type=range] { 
    accent-color: #e3001b; 
    cursor: pointer; 
}

/* Responsive básico para el player */
@media (max-width: 768px) {
    .now-playing { width: 200px; }
    .player-extra { display: none; } /* Ocultamos volumen en móviles para ganar espacio */
}