? 'day' : 'days'} ago`;
            }

            // Update search history UI
            function updateSearchHistoryUI() {
                if (searchHistory.length === 0) {
                    searchHistoryList.innerHTML = '<div class="search-history-empty">No recent searches</div>';
                    return;
                }

                searchHistoryList.innerHTML = '';

                searchHistory.forEach(item => {
                    const historyItem = document.createElement('div');
       