Hear me out...

I [17M] am in high school and I have a few friends. Generally I DON'T have issues with people. I am quite nerdy and a bit reserved and keep to a few close friends. Anyway there is a girl in my class [17F] who is a total bitch, she is a bit nasty to people and stuck up. 

However she never really spoke directly to me before (though I'm willing to bet she has said things about me, as she does with many people). Anyway one day in class last week she decides to talk me and out of nowhere she says ''You are quite a weirdo aren't you, if you keep playing video games all day you will stay a loser virgin''. 

My initial response in my head was WTF? Who even says shit like that? But after that initial response I just went full savage and said ''Yeah but at least I'm not a filthy whore like you. Imagine what your dead dad must think of you being the school slut? Go suck a dick''. 

Yeah, it was completely savage...and I have an anger problem sometimes. Generally I AM a quite person, however there have been instances in the past when people keep prodding me I just explode. This was no exception...it is known in the school that her dad died last year, and that she is also known for being quite promiscuous. 

After I said that, everyone went quiet...she burst into tears and the teacher comes in and freaks out, he asks what happened and I get sent to head office. I was given detention and ordered to apologize. I said ''I'm sorry for expressing my opinion'' and I was given detention AGAIN for not giving a real apology.

Afterwards, quite a lot of people came up to me and gave me high fives...they were all happy that I ''tore her down a peg'' and some even invited me to parties (I'm not even interested in going to them, but feels weird...). However some of her friends (mostly all guys) came up to me and said I am a horrible misogynist douche for saying what I said and that I owe her a real apology, I just told them to fuck off as well. 

This has caused some tension with some of her female friends too, who said I am being evil. 

Was I wrong here? I thought what I did was justified given the circumstances for what I did but it has caused some issues with people.

**TLDR - Called a girl bully a slut and that her dad would be ashamed of her after SHE sexually shamed me for being a virgin loser who plays video games...given detention because I didn't apologize, tensions with school mates.**