ges = Math.ceil(filteredDatasets.length / itemsPerPage);
                paginationContainer.innerHTML = '';

                if (totalPages <= 1) return;

                // Add first page button
                if (currentPage > 1) {
                    const firstButton = createPaginationButton('«', () => {
                        currentPage = 1;
                        displayCurrentPage();
                        updatePagination();
                        window.scrollTo(0, 0);
                    }