a.message || 'Unknown error'}</div>`;
                }
            } catch (error) {
                document.getElementById('signup-result').innerHTML =
                    `<div class="error">‚ùå Error: ${error.message}</div>`;
            }
        });

        // Auto-check for CSRF token when page loads
        window.addEventListener('load', () => {
            console.log('üöÄ Page loaded, checking for auto-generated CSRF token...');
            checkAutoToken();
        });
    </script>
