/* Variables de Diseño Global */
:root {
    --primary-color: #e63946;
    --whatsapp-color: #25d366;
    --instagram-color: #e1306c;
    --text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

/* Reset de Estilos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==========================================================================
   SOLUCIÓN AL OPACADO: BAMBÚES ULTRA NÍTIDOS Y VISIBLES EN MÓVILES
   ========================================================================== */

body {
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
    /* Cambiamos el fondo oscuro invasivo por un tono que no manche la imagen en celulares */
    background: #0d130e; 
    min-height: 100vh;
    /* Propiedad estándar moderna para adaptar la altura exacta a las pantallas de teléfonos */
    min-height: 100dvh; 
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    
    /* SOLUCIÓN AL OPACADO: Fusionamos la imagen con un degradado de luz sutil en una sola propiedad nativa */
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.25)), 
        url('bambuscreem.jpg'); 
        
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    
    /* COMPORTAMIENTO CRÍTICO: 'scroll' fluido para celulares (evita que se rompa u opaque) */
    background-attachment: scroll; 
    
    z-index: 1; /* Se mantiene estrictamente al fondo de todos los botones */
}

/* El efecto fijo (parallax) solo se activará en laptops y pantallas de escritorio grandes */
@media (min-width: 768px) {
    .background-overlay {
        background-attachment: fixed;
    }
}


/* Contenedor Principal Adaptable */
.app-container {
    position: relative;     /* Permite posicionar elementos internos de forma absoluta */
    width: 100%;
    max-width: 450px; 
    min-height: 85vh;
    margin: 40px auto;
    padding: 25px 25px 0 25px; /* Dejamos el espacio inferior en 0 para pegar las barras */
    background: rgba(25, 25, 25, 0.5);
    border-radius: 30px;    /* Esquinas redondeadas del reproductor */
    backdrop-filter: blur(2px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    
    /* PROPIEDAD CLAVE: Corta automáticamente cualquier barra que pise la curva */
    overflow: hidden; 
}
/* Esquina Superior Izquierda: Live Badge */
.live-stream-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-weight: 900;
    text-shadow: var(--text-shadow);
}

.live-stream-badge i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.live-stream-badge span {
    font-size: 1.1rem;
    letter-spacing: 2px;
    margin-top: 2px;
}

.live-stream-badge small {
    font-size: 0.65rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 1px;
}

/* Animación del icono de transmisión */
.icon-pulse {
    animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 8px var(--primary-color)); }
}

/* Esquina Superior Derecha: Redes Sociales */
.social-sidebar {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.8rem;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.social-btn:hover {
    transform: translateY(-3px);
}

.social-btn.whatsapp { background: var(--whatsapp-color); }
.social-btn.instagram { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }

/* Sección del Contenido Central */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    margin-top: 80px;
}

/* Logotipo Circular */
.logo-container {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(25, 25, 25, 0.85);
    border: 5px solid #ffffff;
    padding: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
}

.logo-placeholder {
    text-align: center;
}

.logo-placeholder i {
    font-size: 4rem;
    color: #ffd166;
}

.logo-text {
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 5px;
    color: white;
}

/* Busca y reemplaza esta regla en tu style.css */
.station-title {
    font-size: 1.8rem; 
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    
    /* SOLUCIÓN: Sombra múltiple en cruz que simula el borde negro de forma limpia sin pixelarse */
    text-shadow: 
        -1.5px -1.5px 0 #000,  
         1.5px -1.5px 0 #000,
        -1.5px  1.5px 0 #000,
         1.5px  1.5px 0 #000,
         2px 2px 8px rgba(0, 0, 0, 0.9);
         
    /* Forzar al procesador gráfico del teléfono a suavizar los bordes */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    
    white-space: nowrap; 
    width: 100%;
    max-width: 100%;
    margin-bottom: 15px;
}


/* Contenedor del Electrocardiograma */
.pulse-wave {
    width: 220px; /* Un poco más ancho para apreciar el latido */
    height: 50px;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.ecg-svg {
    width: 100%;
    height: 100%;
}

/* Animación del trazo del electrocardiograma */
.ecg-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: ecgBeat 2.5s linear infinite;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
}

@keyframes ecgBeat {
    0% {
        stroke-dashoffset: 1000;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

/* Fila de Controles (En Vivo, Play, Ubicación) */
.controls-row {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    margin-bottom: 20px;
}

.control-status, .control-location {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    font-weight: 700;
    font-size: 0.9rem;
    text-shadow: var(--text-shadow);
}

.control-status i, .control-location i {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

/* Botón Play Estilo de la Imagen */
.play-btn {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: transparent;
    border: 5px solid #d62828;
    color: #ffffff;
    font-size: 2.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(214, 40, 40, 0.4), inset 0 0 15px rgba(214, 40, 40, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.play-btn::before {
    content: '';
    position: absolute;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.3);
}

.play-btn:hover {
    transform: scale(1.08);
    background: rgba(214, 40, 40, 0.2);
}

.play-btn i {
    margin-left: 5px; /* Ajuste visual para el icono play centrado */
}

/* ==========================================================================
   ECUALIZADOR INFERIOR FIJO: MÁS GRUESO Y MOVIMIENTO ATENUADO
   ========================================================================== */

.audio-visualizer {
    position: absolute;     /* Se ancla directamente a la base de la caja del reproductor */
    bottom: 0;              /* Pegado al ras de la curva inferior */
    left: 0;
    width: 100%;            /* Ocupa exactamente el ancho interno del reproductor */
    height: 60px;           
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 5px;               
    padding: 0;
    margin: 0;
    z-index: 5;
    pointer-events: none;
}

.bar {
    flex-grow: 1;
    max-width: 12px;        /* Grosor más marcado para cada barra */
    background: linear-gradient(to top, #2a6f97, #014f86);
    border-radius: 4px 4px 0 0; /* Bordes superiores redondeados */
    height: 6px;            /* Altura mínima fija mientras está en pausa */
    
    /* SUAVIZADO DE MOVIMIENTO: Transición sutil al cambiar de altura */
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
}

/* Responsividad para pantallas grandes (Laptops y Desktops) */

@media (min-width: 768px) {
    .app-container {
        max-width: 450px; 
        background: rgba(0, 0, 0, 0.3);
        border-radius: 30px;
        padding: 40px 30px;
        backdrop-filter: blur(10px);
        box-shadow: 0 20px 50px rgba(0,0,0,0.6);
        border: 1px solid rgba(255,255,255,0.1);
    }

    /* Forzar que en pantallas grandes el título se mantenga compacto y legible */
    .station-title {
        font-size: 1.9rem; /* Tamaño óptimo para computadoras de escritorio */
        letter-spacing: 0.5px;
    }
}



/* ==========================================================================
   FIRMA DEL DISEÑADOR: FUERA DE LA CAJA, ABAJO A LA DERECHA (RESPONSIVE)
   ========================================================================== */

.creator-credits {
    position: fixed;            /* Lo independiza de las cajas y lo ancla a la pantalla */
    bottom: 15px;               /* Separación sutil del borde inferior del navegador */
    right: 20px;                /* Lo empuja por completo hacia la esquina derecha */
    font-size: 0.50rem;         /* Tamaño ultra pequeño, discreto y muy estético */
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5); /* Color blanco semitransparente muy elegante */
    letter-spacing: 0.8px;
   
    z-index: 99999 !important;  /* Capa máxima para garantizar que reciba los clics sin bloqueos */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
}

.creator-credits a {
    color: #ffffff;             /* Nombre en color blanco nítido */
    text-decoration: none;      /* Quita el subrayado clásico de enlace */
    font-weight: 600;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

/* Efecto cuando pasan el cursor por encima o pulsan la pantalla en el celular */
.creator-credits a:hover {
    color: #ffd166;             /* Cambia a un tono dorado sutil al interactuar */
    text-shadow: 0 0 6px rgba(255, 209, 102, 0.6);
}

/* Ajuste responsive para celulares con pantallas muy pequeñas */
@media (max-width: 480px) {
    .creator-credits {
        bottom: 10px;           /* Reduce ligeramente el espacio en smartphones verticales */
        right: 15px;
        font-size: 0.45rem;      /* Se vuelve aún más compacto en pantallas móviles */
    }
}

