            // Progress bar click for seeking
                progressBar.addEventListener('click', (e) => {
                    e.stopPropagation();
                    const rect = progressBar.getBoundingClientRect();
                    const pos = (e.clientX - rect.left) / rect.width;
                    audioElement.currentTime = pos * audioElement.duration;
                    updateProgress();
                });
                
                // Seeking functionality for the spectrogram
          