Being grounded is a punishment, and if you are punished, you must've done something bad. Being grounded is a fair punishment for any case unless you are falsely accused, but in other cases it is not such a bad punishment and it shouldn't be illegal.
Ok. I understand that your parents overreacted to the situation but I also understand that what you did is very stupid. I kind of try to prevent this kind of thing by keeping my online life and IRL life vaguely related by kind of doing some things to keep people from finding me.