on page load
document.addEventListener("DOMContentLoaded", () => {
    const themeToggle = document.getElementById('themeToggle');
    const toggleSpan = themeToggle.nextElementSibling; // The <span> element

    // Prevent animation on page load
    const savedTheme = localStorage.getItem('theme') || 'dark';
    document.body.classList.add(savedTheme === 'dark' ? 'dark-mode' : 'light-mode');
    themeToggle.checked = savedTheme === 'dark';

    // Add the "animate" class on user interaction
    themeToggle