                  // Show all tags in the HTML, visibility will be controlled by CSS
                            tagsArray.forEach(tag => {
                                tagsHTML += `<span class="tag cursor-pointer" onclick="document.getElementById('search').value='${tag}'; document.getElementById('search').dispatchEvent(new Event('input'));">${tag}</span>`;
                            });
                            tagsHTML += '</div>';

                            // Add "more tags" indicator only if t