Could be a few things... but if it gave up while running well... then I'm going to say the CDI failed. BUT... it could be simple like a wire getting broken, or cut. But that normally shows up as a intermittent sputter as it's breaking.
BUT... if the ECU wasn't talking to the CDI... it would give an error beep. (4 beeps)
I would start with checking the wires, and popping the MAG cover off. You may find the trigger coil broke loose, or is covered in metal filings.