Please help! 04 sportsman 700 runs great then dies.

Hey all. Hoping some of you may have come across this. I have a 2004 sportmans 700 that runs and idles fine. You can open it up and drive like normal. For about 3 to 4 minutes then even at idle it’ll just cut out. Seems to be electrical. The fan will come on and lights will dim then less then a minute the bike and cluster die completely. (Fan still going) when I turn the key back on the cluster will not show anything until it sits for a minute or so. Then the everything works as it should again for 3 minutes or so. Any ideas? Here is a link to a video of what’s going on. It was running at idle for about 3 minutes before it quit.

https://youtu.be/xi0qbAeDh5c