Calcolo Fase Lunare

`); }function calcolaFaseLunareOggi() { const oggi = new Date(); moonCalcFaseLunare(oggi); }// Calcola la fase lunare di oggi all'avvio calcolaFaseLunareOggi();function createParticles() { const particlesContainer = document.querySelector('.moon-calc-particles'); const numParticles = 50;for (let i = 0; i < numParticles; i++) { const particle = document.createElement('div'); particle.classList.add('moon-calc-particle'); particle.style.width = `${Math.random() * 3 + 1}px`; particle.style.height = particle.style.width; particle.style.left = `${Math.random() * 100}%`; particle.style.top = `${Math.random() * 100}%`; particle.style.animationDuration = `${Math.random() * 10 + 5}s`; particle.style.animationDelay = `${Math.random() * 5}s`; particlesContainer.appendChild(particle); }for (let i = 0; i < 3; i++) { const comet = document.createElement('div'); comet.classList.add('moon-calc-comet'); comet.style.animationDuration = `${Math.random() * 5 + 5}s`; comet.style.animationDelay = `${Math.random() * 5}s`; particlesContainer.appendChild(comet); }const container = document.querySelector('.moon-calc-container'); for (let i = 0; i < 50; i++) { const star = document.createElement('div'); star.classList.add('star'); star.style.left = `${Math.random() * 100}%`; star.style.top = `${Math.random() * 100}%`; star.style.animationDelay = `${Math.random() * 2}s`; container.appendChild(star); }const galaxy = document.createElement('div'); galaxy.classList.add('galaxy'); galaxy.style.left = `${Math.random() * 80}%`; galaxy.style.top = `${Math.random() * 80}%`; container.appendChild(galaxy); }createParticles();