Improved the CSS animation