t
    setInterval(() => {
        const loadingElement = document.getElementById('loadingText');
        if (loadingIndex < loadingMessages.length) {
            loadingElement.innerHTML = loadingMessages[loadingIndex] + '<span class="dots"></span>';
            loadingIndex++;
        } else {
            loadingIndex = 0;
        }
    }, 3000);

    // Check if main app is ready
    const checkAppReady = async () => {
        try {
            const response = await fetch('/api/health', {
               