       const showTypingAnimation = () => {
                const typingElement = document.createElement("div");
                typingElement.id = "typing";
                typingElement.className = "typing-animation";
                typingElement.innerHTML = `Typing <div class="dots"><span></span><span></span><span></span></div>`;
                messages.appendChild(typingElement);
                messages.scrollTop = messages.scrollHeight;
            };

            const hideTypingAnimation = () => {
