Add delay when exiting the game

Preferences system is async and need some times to properly save the
user preferences.
Should not try to render negative damage
Fixed some CSS bugs on Firefox