document.addEventListener('DOMContentLoaded', function() { // Initialize tooltips if needed const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')); tooltipTriggerList.map(function (tooltipTriggerEl) { return new bootstrap.Tooltip(tooltipTriggerEl); }); // Smooth scrolling for anchor links document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function (e) { e.preventDefault(); document.querySelector(this.getAttribute('href')).scrollIntoView({ behavior: 'smooth' }); }); }); // Auto-save demo (for exam interface) if (document.getElementById('exam-interface')) { setInterval(function() { console.log('Auto-saving exam progress...'); // In a real implementation, this would save to local storage or API }, 10000); // Every 10 seconds } });