 response.json())
                            .then(result => {
                                dialog.remove();
                                
                                if (result.error) {
                                    showNotification(`Error: ${result.error}`, true);
                                } else {
                                    // Show results
                                    const resultsDialog = document.createElement('div');
                                    resultsDia