ete(query);
        else {
            autocompleteList.innerHTML = "";
            autocompleteList.style.display = "none";
        }
    });

    searchBar.addEventListener("keydown", (event) => {
        const items = autocompleteList.querySelectorAll("li");
        if (!items.length) return;

        if (event.key === "ArrowDown") {
            event.preventDefault();
            highlightedIndex = (highlightedIndex + 1) % items.length;
            highlightItem(highlightedIndex);
        } else if (eve