r(
        ".progress-percentage"
      );
      const texts = [
        "Organizing your thoughts...",
        "Drafting your ideas...",
        "Structuring your research...",
        "Building your knowledge...",
      ];

      let index = 0;
      let progress = 0;

      //changed: check if user has already seen the loading screen
      const hasSeenLoading = localStorage.getItem("hasSeenLoading");

      //changed: Only run loadinganimation if first-time visitor
      if (!hasSeenLoading) {

        