Default Sudden switch off

Plzz help. Phone automatically switched off while in normal use e.g. once changing whatsapp dp, listening music, playing a mini game, making a call etc.

The screen fades and gets black, a coloured dot appears on the black screen and phone switches off (all this happens within fraction of second). Neither the battery was low nor was the ram too buzy. M using MIUI 4.1.2 by evildev and around 7 basic apps installed.

Plzz help whats the problem in- rom, hardware or something else???