new Error(`Server responded with ${response.status}`);
                    }
                    
                    const data = await response.json();
                    this.results = data.results || [];
                    this.totalResults = data.total || 0;
                    this.totalPages = data.pages || 1;
                    this.formSubmitted = true;
                } catch (error) {
                    console.error('Search error:', error);
                    this.errorMessage = `Search fai