/* Modern Audio Player - Diseño elegante y moderno */

.modern-audio-player {
    position: fixed;
    bottom: -200px;
    right: 20px;
    width: 380px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(50px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.modern-audio-player.show {
    bottom: 20px;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.player-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.player-backdrop::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.player-content {
    position: relative;
    padding: 20px;
    color: white;
    border-radius: 20px;
    backdrop-filter: blur(20px);
}

/* Header */
.player-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.track-info {
    flex: 1;
    min-width: 0;
}

.track-title {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.track-artist {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 12px;
    flex-shrink: 0;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: scale(1.05);
}

/* Controls */
.player-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.play-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.play-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.play-btn:active {
    transform: scale(0.95);
}

/* Progress Section */
.progress-section {
    flex: 1;
    min-width: 0;
}

.progress-container {
    position: relative;
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress-bar:hover .progress-handle {
    opacity: 1;
    transform: scale(1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffffff, #f0f0f0);
    border-radius: 3px;
    transition: width 0.1s ease;
    position: relative;
}

.progress-handle {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transform: translateY(-50%) scale(0.8);
    opacity: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Volume Section */
.volume-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.volume-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.volume-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.volume-slider-container {
    position: relative;
}

.volume-slider {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 480px) {
    .modern-audio-player {
        right: 10px;
        left: 10px;
        width: auto;
        bottom: -200px;
    }
    
    .modern-audio-player.show {
        bottom: 10px;
    }
    
    .player-content {
        padding: 16px;
    }
    
    .player-controls {
        gap: 12px;
    }
    
    .volume-section {
        display: none;
    }
}

@media (max-width: 320px) {
    .track-title {
        font-size: 14px;
    }
    
    .track-artist {
        font-size: 12px;
    }
    
    .play-btn {
        width: 44px;
        height: 44px;
    }
}

/* Animaciones adicionales */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.modern-audio-player.loading .track-title {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Estados de hover mejorados */
.progress-bar:hover {
    transform: scaleY(1.2);
    transition: transform 0.2s ease;
}

.player-controls button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Mejoras visuales */
.player-backdrop::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    border-radius: 20px 20px 0 0;
    pointer-events: none;
}