container').classList.remove('hidden');
                        
                        // If stats are available, update the dashboard
                        if (data.stats) {
                            updateDashboard(data.stats);
                        } else {
                            // If no stats yet, fetch them
                            fetchAiStats();
                        }
                    } else if (data.pairingCode) {
                        // If pairing code available but not co