/* ===============================================
   CUSTOM CSS - Radio Player
   =============================================== */

/* Fuentes personalizadas */
:root {
    --font-primary: 'Open Sans', sans-serif;  
    --font-secondary: 'Roboto', sans-serif;
    
    /* Colores por defecto */
    --player-primary: #38B6FF;
    --player-bg-app: #f0f0f0;
    --player-bg-inset: #d0d0d0;
    --player-bg-transparent: rgba(0, 0, 0, 0.1);
    --player-bg-modal: rgba(0, 0, 0, 0.2);
    --player-bg-dark: rgba(0, 0, 0, 0.75);
    --player-bg-gradient: linear-gradient(140deg, #38B6FF, #007bff);
    --player-color-title: #ffffff;
    --player-color-text: rgb(255 255 255 / 50%);
    --player-duration: 0.3s;
    --player-shadow-l: 0 5px 20px rgba(0, 0, 0, 0.75);
}

/* Transición suave del color primario */
* {
    transition-property: background-color, color, border-color;
    transition-duration: var(--player-duration);
}

/* Player cerrado por defecto */
.app-newplayer:not(.is-fullscreen) {
    height: 70px;
}

@media (max-width: 991px) {
    .app-newplayer:not(.is-fullscreen) {
        height: 140px;
    }
}

/* Animación del equalizer - 3 barras */
.equalizer {
    display: flex;
    gap: 2px;
    height: 12px;
    align-items: flex-end;
}

.equalizer span {
    width: 3px;
    background: #fff;
    animation: equalize 1.2s ease-in-out infinite;
    border-radius: 2px;
}

.equalizer span:nth-child(1) {
    animation-delay: 0s;
}

.equalizer span:nth-child(2) {
    animation-delay: 0.2s;
}

.equalizer span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes equalize {
    0%, 100% {
        height: 30%;
    }
    50% {
        height: 100%;
    }
}

/* Badge "EN VIVO" mejorado */
.player-equalizer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    background-color: var(--player-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Mejora visual del player mini */
.player-mini {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Scroll suave para títulos largos */
.player-title.is-scrolling {
    animation: textIndent var(--text-scroll-duration, 8s) linear infinite alternate;
}

@keyframes textIndent {
    0%, 20% {
        text-indent: 0;
    }
    80%, 100% {
        text-indent: var(--text-scroll);
    }
}

/* Transición suave de imágenes */
.player-cover-image,
.player-modal-image,
.player-artwork img {
    transition: opacity 0.5s ease-in-out;
}

/* Botón de play/pause mejorado */
.player-button-play {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.player-button-play:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.player-button-play:active {
    transform: scale(0.95);
}

/* Efecto hover en botones */
.player-button {
    transition: all 0.3s ease;
}

.player-button:hover {
    transform: translateY(-2px);
}

/* Modal mejorado */
.player-modal {
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.player-modal.is-active {
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Overlay del modal */
.modal-overlay.is-active {
    pointer-events: auto;
}

/* Artwork con efecto de entrada */
.player-artwork img {
    animation: artworkFadeIn 0.5s ease-out;
}

@keyframes artworkFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Controles de volumen mejorados */
.player-range-thumb {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.player-range-thumb:hover {
    transform: translateY(-50%) scale(1.2);
}

.player:not(.is-fullscreen) .player-range-thumb:hover {
    transform: translateX(-50%) scale(1.2);
}

/* Dropdown de volumen con animación */
.dropdown {
    animation: dropdownSlideIn 0.2s ease-out;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Iconos de redes sociales mejorados */
.modal-social a,
.player-social-item {
    transition: all 0.3s ease;
}

.modal-social a:hover,
.player-social-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Botón fullscreen mejorado */
.player-fullscreen {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    background-color: rgba(0, 0, 0, 0.3);
}

.player-fullscreen:hover {
    background-color: var(--player-primary);
    transform: scale(1.1);
}

.player-fullscreen.is-active {
    transform: rotate(180deg);
}

.player-fullscreen.is-active:hover {
    transform: rotate(180deg) scale(1.1);
}

/* Background blur mejorado */
.player-cover-image {
    filter: blur(1.5rem) saturate(150%);
    opacity: 0.7;
}

/* Ajustes responsive */
@media (max-width: 991px) {
    .player:not(.is-fullscreen) .player-cover-title {
        max-width: calc(100% - 160px);
    }
    
    .player-equalizer {
        font-size: 10px;
        padding: 0.25rem 0.5rem;
    }
}

/* Mejoras de accesibilidad */
.player-button:focus,
.player-fullscreen:focus {
    outline: 2px solid var(--player-primary);
    outline-offset: 2px;
}

/* Animación de carga */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.song-artist {
    animation: pulse 2s ease-in-out infinite;
}

body.is-playing .song-artist {
    animation: none;
}

/* Transición suave del color primario en toda la UI */
.player-button.is-active,
.player-button:hover,
.player-button-play,
.player-equalizer,
.player-range-fill,
.player-range-thumb,
.modal-social a:hover {
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Sombra dinámica según el color primario */
.player-button-play {
    box-shadow: 0 4px 12px var(--player-primary);
}

/* Mejorar visibilidad del texto */
.player-title,
.player-text {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Animación de entrada del player */
.app-newplayer {
    animation: playerSlideUp 0.4s ease-out;
}

@keyframes playerSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Preload - evitar animaciones al cargar */
.preload * {
    transition: none !important;
    animation: none !important;
}




