.fadeOut {
    animation: fadeOut 0.8s ease forwards;
}
.fadeIn {
    animation: fadeOut 0.8s ease forwards;
}

/* keyframes */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(0.9); }
}