d to initialize search:', error);
                document.getElementById('status').innerHTML = `<div class="error">Failed to initialize search: ${error.message}</div>`;
            }
        }
        
        function stringToWasmPtr(str) {
            const bytes = new TextEncoder().encode(str + '\0');
            const ptr = wasmModule.exports.__wbindgen_malloc(bytes.length);
            if (!ptr) {
                // Fallback: write to a known memory location
                const memoryArray = new Uin