But nooo, force the kids to suffer and then act surprised when they rebel.
As for school being fun.. if you're doing well and the course material is interesting, then school is generally fun I think. School becomes particularly unfun when you're struggling with difficult/uninteresting material combined with the stress that comes from knowing that good performance is important to your future. That struggle+stress can be very hard on some people and lead them to self-medicate by binging alcohol or video games. Booze and game binging make people feel better in the immediate sense but harms them in the long run. I don't think you can address this problem by making school more fun, except insofar as you can shift students into subjects they care about and can do well in. But stress avoidance has its limits, even if school is an absolute pleasure, everybody will encounter stress eventually in life and knowing alternatives to escapism is important.
No regulation of screen time at all, no conditions about behavior/grades, is dangerous territory. It teaches harmful habits which some kids will have a very hard time shaking. Have a bad time in school? Come home and numb the pain by spending 12 hours playing games late into the night. Go to school the next day without enough sleep, the cycle repeats but the whole thing doesn't collapse because you're still forced to go to school. That is, until you hit college and now have the option of skipping class to continue playing video games. Then they flunk out after a year or two of wasted tuition money. Many of the friends I made in freshman year at college flunked out due to this vicious cycle of video game binging. All of them were long-time gamers by that point, expressing great incredulity when I told them I came from a household were I was limited to an hour a day. They said I had been abused, while they were flunking out due to their own lack of self control.