   // Search with debounce
            searchInput.addEventListener('input', () => {
                loadingSpinner.style.display = 'block';

                if (searchTimeout) {
                    clearTimeout(searchTimeout);
                }

                searchTimeout = setTimeout(() => {
                    filterDatasets();
                    loadingSpinner.style.display = 'none';
                }, 300); // Wait 300ms after typing stops
            });

            // Theme toggle
            th