function fadeIn() {
    document.querySelector('.container').classList.remove('fade-out');
    document.querySelector('.container').classList.add('fade-in');
}

function fadeOut(destination) {
    const container = document.querySelector('.container');
    container.classList.remove('fade-in');
    container.classList.add('fade-out');

    container.addEventListener('animationend', async () => {
        await window.electronAPI.changeContent(destination)
            .then(() => console.log('Navigated to dashboard'))
            .catch(error => console.error('Error navigating:', error));
    });
}