/* Modern Audio Player Styles */
.modern-audio-player {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    max-width: 100%;
    margin: 15px 0;
}

.audio-header {
    margin-bottom: 10px;
}

.audio-title {
    color: #333;
    font-size: 12px;
    font-weight: 600;
    margin: 0;
    text-transform: lowercase;
}

.audio-controls-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.audio-main-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.play-btn {
    background: #dc3545;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.play-btn:hover {
    background: #c82333;
    transform: scale(1.05);
}

.play-btn i {
    color: white;
    font-size: 14px;
}

.play-btn.playing i::before {
    content: "\f04c"; /* pause icon */
}

.audio-waveform {
    flex: 1;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 16px;
    padding: 0 12px;
    overflow: hidden;
}

.waveform-bars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    height: 100%;
}

.bar {
    width: 2px;
    background: #dc3545;
    border-radius: 1px;
    height: 6px;
    transition: height 0.3s ease;
}

.bar:nth-child(odd) {
    height: 8px;
}

.bar:nth-child(3n) {
    height: 12px;
}

.bar:nth-child(5n) {
    height: 14px;
}

.bar:nth-child(7n) {
    height: 10px;
}

/* Animation for playing state */
.modern-audio-player.playing .bar {
    animation: waveAnimation 1.5s ease-in-out infinite;
}

.modern-audio-player.playing .bar:nth-child(2n) {
    animation-delay: 0.1s;
}

.modern-audio-player.playing .bar:nth-child(3n) {
    animation-delay: 0.2s;
}

.modern-audio-player.playing .bar:nth-child(4n) {
    animation-delay: 0.3s;
}

.modern-audio-player.playing .bar:nth-child(5n) {
    animation-delay: 0.4s;
}

@keyframes waveAnimation {
    0%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(1.5);
    }
}

.audio-time {
    color: #666;
    font-size: 11px;
    font-weight: 500;
    min-width: 30px;
    text-align: center;
}

.audio-speed-control {
    flex-shrink: 0;
}

.speed-select {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 11px;
    color: #495057;
    cursor: pointer;
    outline: none;
    min-width: 50px;
}

.speed-select:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 1px rgba(220, 53, 69, 0.25);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modern-audio-player {
        padding: 10px 12px;
    }
    
    .audio-controls-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .audio-main-controls {
        width: 100%;
        justify-content: center;
    }
    
    .audio-waveform {
        max-width: 180px;
        height: 28px;
    }
    
    .audio-speed-control {
        align-self: flex-end;
    }
    
    .play-btn {
        width: 28px;
        height: 28px;
    }
    
    .play-btn i {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .modern-audio-player {
        padding: 8px 10px;
        margin: 10px 0;
    }
    
    .waveform-bars {
        gap: 1px;
    }
    
    .bar {
        width: 1.5px;
    }
    
    .audio-waveform {
        max-width: 150px;
        height: 24px;
    }
}