Optimized the CSS transitions