const clicks = document.getElementById("click");

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

    if(document.body.classList.contains("dark-mode")){
        clicks.textContent = "☀️ Light Mode";
    } else {
        clicks.textContent = "🌙 Dark Mode";
    }
});


const menuBtn = document.getElementById("menu-btn");
const navMenu = document.querySelector(".Navlist");

menuBtn.addEventListener("click", () => {
    navMenu.classList.toggle("active");

    menuBtn.classList.toggle("fa-bars");
    menuBtn.classList.toggle("fa-times");
});


const questions = document.querySelectorAll(".question");

questions.forEach(function(question){
    question.addEventListener("click", function(){

        const answer = this.nextElementSibling;

        if(answer.style.display === "block"){
            answer.style.display = "none";
        }else{
            answer.style.display = "block";
        }

    });
});