A girl confessed to me, I ruined it (I think). What should I do?

So we were friends since 2nd year of highschool (now we're on 5th) and one day (last year) I saw her in the classroom, she looked sad/aloof; I asked her what was up and she said "nothing" (kept talking, I thought it was serious so I asked again). She told me that she liked a guy, but he liked another girl. I told her that It's better to speak out. Then, she looked down (She's quite shy), locked eyes, and told me: "I like you, but I don't want anything, as you already like X". This is where I F**** things up, I thought that what she did was really brave and I offered her a hug. She said no. And now she thinks that I did this out of pity (which believe me, I did not, I value authenticity in relationships more than anything so it'd be silly for me to do that). The thing is: By the time she told me this, I had already told X that I like her: Flat out rejected. Moved on. But now, I wanted to get closer to this girl, just to know her a bit more; after all we could continue to be friends. We talked for some time, and now I think I've started to like her (I always felt comfortable around her, but not in this way until now). We share opinions and actually have a similar sense of humor, we get along well. Now the problem is: The hug. I think that she's hiding the pain she felt then, and she doesn't want to tell me. I feel really bad about this and would like to do something, but eh! I can't. (The one that told me this was one of her friends, so I would screw things up AGAIN if I ask her directly). Well maybe I should ask anyways, maybe that's the greater good. I don't know. I made a mistake, and feel stupid about this. If you could tell me how you'd feel and/or what you think I should do I'd be really thankful.

Thanks for reading.
+1 y
Sorry, It's too long a backstory and I didn't know how to put line breaks.
A girl confessed to me, I ruined it (I think). What should I do?
Add Opinion