What caused this, and how can I prevent it from happening again?
This happens to me all the time. It doesn't really do anything to your stats, it just looks like it. Somethings instead of getting negative stats I would get more damage, one time I had 1246845 damage. The only way I seem to get rid of it is going into any battle(unicorn way is easiest) kill them and when you're out of the battle your stats should be fixed.
Its a display glitch. It tends to happen with slower internet speeds, so update your internet plan.
I have the fastest internet speed available in my country~ connection is a non-issue.
This is also the first and only time this has ever happened, though I've heard of it happening to other people before, for various reasons. Once again, my connection is a non-issue.
I did what Nathan suggested and logged out, then back in. Everything was fine after that, so it must have just had something to do with the forced restart (I'm wondering if it froze because of maintenance issues, since it was around that time).