s) + "%";
          }

          if (progress < 100) {
            setTimeout(updateProgress, 1200 + Math.random() * 800);
          }
        }

        // Enhanced entrance animation
        setTimeout(() => {
          loadingScreen.classList.add("show");
          updateProgress();
        }, 100);

        // Change text every 2.5 seconds for better rhythm
        const textInterval = setInterval(updateLoadingText, 2500);

        // Hide loading screen after 6 seconds with enhanced exit animation
    