        userMessageInput.value = selectedQuestion;
                }
            });

            const addMessage = (message, type = "bot") => {
                const messageElement = document.createElement("div");
                messageElement.classList.add("message", type === "user" ? "user-message" : "bot-message");
                messageElement.textContent = message;
                messages.appendChild(messageElement);
                messages.scrollTop = messages.scrollHeight;
            };

     