idates.length} candidates.`, 'success');
                        gatherBtn.disabled = false;
                    }
                };
                
                pc.onicegatheringstatechange = () => {
                    console.log('ICE gathering state:', pc.iceGatheringState);
                    if (pc.iceGatheringState === 'complete') {
                        showStatus(`Gathering complete. Found ${candidates.length} candidates.`, 'success');
                        gatherBtn.disabled = false;
   