ument.querySelector('.nav-links').style.backgroundColor = "white";
        }
        icon.classList.replace("fa-moon", "fa-sun");
      }

      darkModeToggle.addEventListener("click", () => {
        document.body.classList.toggle("dark-mode");

        // Update icon and save preference
        if (document.body.classList.contains("dark-mode")) {
          icon.classList.replace("fa-moon", "fa-sun");
          localStorage.setItem("darkMode", "enabled");
        } else {
          icon.classList.replace(