// ---- Helper Functions ---- function showNotification(message, type = 'info') { toastr.options = { closeButton: true, newestOnTop: true, progressBar: true, positionClass: "toast-top-center", preventDuplicates: true, onclick: null, showDuration: "1000", hideDuration: "3000", timeOut: "10000", extendedTimeOut: "1000", showEasing: "swing", hideEasing: "linear", showMethod: "fadeIn", hideMethod: "fadeOut", }; toastr[type](message); } function addGenre() { const genreValue = document.getElementById('genreInput').value.trim(); if (!genreValue) { showNotification('Please enter a valid genre.', 'error'); return; } const genreIndex = document.getElementById('genreInputs').children.length; const genreHtml = `