             historyItem.classList.add('search-history-item');

                    historyItem.innerHTML = `
                         <span class="history-text">${item.term}</span>
                         <span class="history-time">${formatRelativeTime(item.timestamp)}</span>
                     `;

                    historyItem.addEventListener('click', () => {
                        searchInput.value = item.term;
                        searchHistoryDropdown.style.display = 'none';
                 