/* ==========================================
   REPRODUCTOR HOME - Estilo La Voz del Caribe
   ========================================== */

.radio-player-home {
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
}

.home-player-card {
    background: radial-gradient(ellipse at center, #1a0a0f 0%, #0a0a0a 100%);
    border: 1px solid rgba(204, 30, 30, 0.3);
    border-radius: 30px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(204, 30, 30, 0.4);
    transition: all 0.3s ease;
}

/* Efecto hover deslizante */
.home-player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(204, 30, 30, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.home-player-card:hover::before {
    left: 100%;
}

.home-player-card:hover {
    transform: translateY(-5px);
    border-color: #CC1E1E;
    box-shadow: 0 25px 70px rgba(204, 30, 30, 0.5);
}

.home-player-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
}

.wave {
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(196, 30, 58, 0.1) 0%, transparent 70%);
    border-radius: 45%;
}

.wave1 {
    bottom: -150%;
    left: -50%;
    animation: wave 15s infinite linear;
}

.wave2 {
    bottom: -160%;
    left: -50%;
    animation: wave 20s infinite linear;
    animation-delay: -5s;
}

.wave3 {
    bottom: -170%;
    left: -50%;
    animation: wave 25s infinite linear;
    animation-delay: -10s;
}

@keyframes wave {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.home-player-content {
    position: relative;
    z-index: 2;
}

.station-artwork {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.artwork-circle {
    width: 160px;
    height: 160px;
    margin: 0 auto;
    background: linear-gradient(135deg, #CC1E1E 0%, #990000 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(204, 30, 30, 0.6);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.station-icon {
    color: white;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(204, 30, 30, 0.6);
    border-radius: 50%;
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(204, 30, 30, 0.95);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(204, 30, 30, 0.6);
}

.live-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: blink 1.5s infinite;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.station-info {
    text-align: center;
    margin-bottom: 30px;
}

.station-name {
    font-size: 32px;
    font-weight: 800;
    color: white;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 10px rgba(204, 30, 30, 0.5);
}

.station-tagline {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-weight: 400;
}

.home-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(204, 30, 30, 0.2);
    transition: all 0.3s ease;
}

.home-controls:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(204, 30, 30, 0.4);
}

.home-play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #CC1E1E 0%, #990000 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(204, 30, 30, 0.5);
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.home-play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.home-play-btn:hover::before {
    left: 100%;
}

.home-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(204, 30, 30, 0.7);
}

.home-play-btn:active {
    transform: scale(0.95);
}

.home-play-btn svg {
    fill: white;
}

.loading-spinner-home {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.volume-control-home {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.volume-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.volume-icon-btn:hover {
    transform: scale(1.1);
}

.volume-icon-btn svg {
    fill: #CC1E1E;
}

.volume-bar-container {
    flex: 1;
}

.volume-bar {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.volume-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #CC1E1E 0%, #990000 100%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(204, 30, 30, 0.6);
    transition: transform 0.2s ease;
}

.volume-bar::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-bar::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #CC1E1E 0%, #990000 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(204, 30, 30, 0.6);
    transition: transform 0.2s ease;
}

.volume-bar::-moz-range-thumb:hover {
    transform: scale(1.2);
}

.volume-percent {
    color: #CC1E1E;
    font-size: 14px;
    font-weight: 700;
    min-width: 45px;
    text-align: right;
}

.audio-visualizer {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    height: 60px;
    margin-bottom: 20px;
}

.audio-visualizer .bar {
    width: 8px;
    background: linear-gradient(180deg, #CC1E1E 0%, #990000 100%);
    border-radius: 4px;
    animation: visualize 1s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(204, 30, 30, 0.5);
}

.audio-visualizer .bar:nth-child(1) { animation-delay: 0s; height: 20%; }
.audio-visualizer .bar:nth-child(2) { animation-delay: 0.1s; height: 40%; }
.audio-visualizer .bar:nth-child(3) { animation-delay: 0.2s; height: 60%; }
.audio-visualizer .bar:nth-child(4) { animation-delay: 0.3s; height: 80%; }
.audio-visualizer .bar:nth-child(5) { animation-delay: 0.4s; height: 100%; }
.audio-visualizer .bar:nth-child(6) { animation-delay: 0.5s; height: 80%; }
.audio-visualizer .bar:nth-child(7) { animation-delay: 0.6s; height: 60%; }
.audio-visualizer .bar:nth-child(8) { animation-delay: 0.7s; height: 40%; }
.audio-visualizer .bar:nth-child(9) { animation-delay: 0.8s; height: 20%; }
.audio-visualizer .bar:nth-child(10) { animation-delay: 0.9s; height: 30%; }

@keyframes visualize {
    0%, 100% { height: 20%; opacity: 0.6; }
    50% { height: 100%; opacity: 1; }
}

.player-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-size: 14px;
}

.listener-count {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(204, 30, 30, 0.2);
    transition: all 0.3s ease;
}

.listener-count:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(204, 30, 30, 0.4);
}

.listener-count svg {
    fill: #CC1E1E;
}

.share-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(204, 30, 30, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: rgba(204, 30, 30, 0.2);
    border-color: #CC1E1E;
    transform: scale(1.1);
}

.share-btn svg {
    fill: #CC1E1E;
}

/* ========================================
   REPRODUCTOR FLOTANTE - OTRAS PÁGINAS
   ======================================== */
.radio-player-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.radio-player-floating .player-container {
    background: rgba(26, 10, 15, 0.95);
    border: 1px solid rgba(204, 30, 30, 0.5);
    border-radius: 50px;
    padding: 20px 35px;
    box-shadow: 0 10px 40px rgba(204, 30, 30, 0.5);
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 500px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.radio-player-floating .player-container:hover {
    border-color: #CC1E1E;
    box-shadow: 0 12px 50px rgba(204, 30, 30, 0.6);
    transform: translateY(-2px);
}

.play-btn, .volume-btn, .minimize-btn, .close-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.play-btn {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #CC1E1E 0%, #990000 100%);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(204, 30, 30, 0.4);
}

.volume-btn, .minimize-btn, .close-btn {
    width: 35px;
    height: 35px;
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(204, 30, 30, 0.6);
}

.volume-btn:hover, .minimize-btn:hover, .close-btn:hover {
    transform: scale(1.1);
}

.play-btn svg {
    fill: white;
}

.volume-btn svg, .minimize-btn svg, .close-btn svg {
    fill: rgba(255, 255, 255, 0.7);
}

.volume-btn:hover svg, .minimize-btn:hover svg, .close-btn:hover svg {
    fill: #CC1E1E;
}

.time-display {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    min-width: 85px;
    text-align: center;
    animation: pulseText 2s infinite;
}

@keyframes pulseText {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.progress-container {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #CC1E1E 0%, #990000 100%);
    width: 100%;
    animation: progressPulse 2s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #CC1E1E;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.volume-popup {
    position: absolute;
    background: rgba(26, 10, 15, 0.95);
    border: 1px solid rgba(204, 30, 30, 0.5);
    border-radius: 30px;
    padding: 20px 15px;
    box-shadow: 0 10px 30px rgba(204, 30, 30, 0.5);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    bottom: 80px;
    right: 80px;
    z-index: 100000;
    backdrop-filter: blur(10px);
}

.volume-popup.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.volume-slider {
    writing-mode: vertical-lr;
    direction: rtl;
    width: 6px;
    height: 120px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #CC1E1E 0%, #990000 100%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(204, 30, 30, 0.5);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #CC1E1E 0%, #990000 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(204, 30, 30, 0.5);
}

.volume-value {
    font-size: 13px;
    color: #CC1E1E;
    font-weight: 700;
}

.radio-player-minimized {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    background: linear-gradient(135deg, #CC1E1E 0%, #990000 100%);
    border-radius: 50px;
    padding: 12px 20px;
    box-shadow: 0 5px 25px rgba(204, 30, 30, 0.6);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-player-minimized:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(204, 30, 30, 0.8);
}

.restore-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.restore-btn svg {
    fill: white;
}

.radio-label {
    color: white;
    font-size: 14px;
    font-weight: 600;
}

/* Responsive - Optimizado para móvil */
@media (max-width: 768px) {
    .radio-player-home {
        padding: 10px;
    }
    
    .home-player-card {
        padding: 30px 20px;
    }
    
    /* Desactivar animaciones pesadas en móvil */
    .wave {
        display: none;
    }
    
    .home-player-card::before {
        display: none;
    }
    
    .home-player-card::after {
        display: none;
    }
    
    .home-play-btn::before {
        display: none;
    }
    
    .artwork-circle {
        width: 120px;
        height: 120px;
        animation: none;
    }
    
    .pulse-ring {
        display: none;
    }
    
    /* Simplificar visualizador de audio */
    .audio-visualizer .bar {
        animation-duration: 1.5s;
    }
    
    /* Reducir barras del visualizador */
    .audio-visualizer .bar:nth-child(n+6) {
        display: none;
    }
    
    .station-name {
        font-size: 24px;
    }
    
    .station-tagline {
        font-size: 14px;
    }
    
    .home-play-btn {
        width: 60px;
        height: 60px;
    }
    
    .home-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .volume-control-home {
        width: 100%;
    }
    
    /* Desactivar hover en móvil */
    .home-player-card:hover {
        transform: none;
        box-shadow: 0 20px 60px rgba(204, 30, 30, 0.4);
    }
    
    .home-play-btn:hover {
        transform: none;
    }
    
    .share-btn:hover {
        transform: none;
    }
    
    .radio-player-floating .player-container {
        padding: 15px 25px;
        gap: 15px;
        border-radius: 40px;
        max-width: calc(100vw - 40px);
    }

    .time-display {
        font-size: 12px;
        min-width: 70px;
    }

    .play-btn {
        width: 40px;
        height: 40px;
    }
    
    .radio-player-floating {
        bottom: 10px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .radio-player-minimized {
        bottom: 10px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .volume-popup {
        right: 50%;
        transform: translateX(50%);
    }
}

/* Optimización adicional para dispositivos de bajo rendimiento */
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}