Improved page switch animation