Have a layer on top of all layers in the main menu which is just coloured black and set its opacity to 0. When the player clicks play or whatever, increase the opacity over time until it reaches 100. Then switch to the game layout.
On the game layout, have the same top black layer, instead with its opacity as 100. Then at the start of the layout do what you did before but in reverse to get the game to fade in.