ry = localStorage.getItem('audioGeneratorHistory');
    if (savedHistory) {
      try { 
        history = JSON.parse(savedHistory).map(item => ({...item, timestamp: new Date(item.timestamp), blob: null }));
      } catch (e) {
        console.error("Could not parse history, resetting.", e);
        localStorage.removeItem('audioGeneratorHistory');
       }
    }
}
function showStatus(message, type) {
    statusMessage.textContent = message;
    statusMessage.className = `status ${type}`;
    setTimeout(() 