300 stars is 3 stars on everything, including all the legacy levels. That's the easy part.
There are eleven marathon modes, one for each world in the main game and one for each of the five legacy zones. Marathon modes task you with completing all the levels in a world at once (there are always 10 levels in the main game, eight in legacy). At the end, you're ranking based on your time, how many stars you earned, how many resets you used, and how many deaths you had. To X rank, you need to 3 star every level without dying and without resetting.
It's not easy, but it's also not incredibly hard. It just takes a bit of practice and dedication. Remember that doing all 10 levels will probably only take about 45 seconds. That's not much time even for a failed run. So keep running it over and over and you'll get it in no time. My first marathon mode I did I had a rank D with 40 resets and 20 deaths. Two hours later I had an X rank. After that it was under an hour for each X rank or less (except for Legacy world one, that was a nightmare). I'm good at platformers, but I'm not the best. You can do this too.
To unlock the legacy marathon modes, you must attain 300 stars. The main game's marathon modes unlock when you beat all the levels the first time.
I'll be uploading videos of X rank Marathon runs to YouTube as I get to them. You can watch them to see how to 3 star any level consistently. There are a few tricks to do it faster, but for these videos I'm making sure to use consistent and repeatable methods. Here's what I have so far:
Main WorldsLegacy Worlds (Legacy One is easily the hardest of any of them)