  updateSearchHistoryUI();
            }

            // Format relative time
            function formatRelativeTime(timestamp) {
                const now = Date.now();
                const diff = now - timestamp;

                // If less than a minute
                if (diff < 60 * 1000) {
                    return 'just now';
                }

                // If less than an hour
                if (diff < 60 * 60 * 1000) {
                    const minutes = Math.floor(diff / (60 * 1000));
  