// Smooth scroll for anchor links document.querySelectorAll('a[href^="#"]').forEach(anchor => { anchor.addEventListener('click', function (e) { e.preventDefault(); document.querySelector(this.getAttribute('href')).scrollIntoView({ behavior: 'smooth' }); }); }); // Dynamic server stats counter (example) const counters = document.querySelectorAll('.text-5xl'); const speed = 200; counters.forEach(counter => { const target = +counter.getAttribute('data-target'); const count = +counter.innerText; const increment = target / speed; if(count < target) { counter.innerText = Math.ceil(count + increment); setTimeout(updateCount, 1); } else { counter.innerText = target; } function updateCount() { const current = +counter.innerText; if(current < target) { counter.innerText = Math.ceil(current + increment); setTimeout(updateCount, 1); } else { counter.innerText = target; } } });