You were on the phone for many hours ( far too much time on it, since we don't know the extend of damage from excessive exposure), laying down, slouching or sitting and then assumed an upright position to shower.
Sudden change of position from prolonged sitting/slouching/laying down to an upright position, is a triggering factor in vasovagal syncope.
Heat could also be a factor.
Hormonal imbalance may play a role in it too, hard to say.
You can consider a hormonal panel, however, chances are that it won't reveal much, considering you don't have any history of hormonal related issues ( at least from what you have posted)
You must have gotten really scared, but I suspect, it is an isolated event. Keep drinking a lot of water daily,
limit your exposure to cell phones and screens as much as possible, if it does not serve a useful purpose.
The price of entertainment, being for hours on cell phones and other devices, is not just because it's usually unproductive time or it's addictive, it is potentially very harmful.
Be extra careful, because of your age, where these concerns are usually minimized or discarded.
Hello~I hope you have not had any more scary episodes.
I would say that the heat could have played a large amount in causing the symptoms you had. The fact that drinking water helped tells me you may have been mildly dehydrated. You need to drink 8 glasses of water daily.
You said you were a teen, well, hormones could certainly play a role in what happened as well, your body is still going through a lot of changes and sometimes these changes are not so pleasant. It would be wise to ask your PCP for a hormonal assessment panel.
I just re-read your post, I noticed that you said you bumped the back of your head. Well, in doing that, you could have caused some of the vertebrae in your neck to become misaligned. This could be the reason for the symptoms you are having as well. I highly suggest seeing a chiropractor, he/she will take an x-ray of your cervical region and will be able to determine what, if anything, is going on in your neck and if that is the cause of the dizziness, etc.
I hope you are feeling better soon. God bless you.