Meghan Trainor got signed to a songwriting deal right out of high school and went on to cowrite two tracks for Rascal Flatts. Now she's 20 and has a hit of her own, the body-confidence anthem "All About That Bass," which you've surely gotten stuck in your head at least once since the video debuted (it now has more than 1.7 million views on YouTube). Cosmopolitan.com spoke to Trainor about the song's origin story, her own struggles with self-esteem, and critics of her "skinny bitches" lyric.

How'd you come up with the idea for the song?
That was an awesome day. I was just a songwriter — I didn't have a record deal or anything — and I'd just met this producer who I work with every day now. His name is Kevin Kadish [cowriter of Jason Mraz's "Wordplay" and Stacie Orrico's "(There's Gotta Be) More to Life"]. I was just in LA for a week, writing for all these other artists, and I walked in and I said, "Man, it's hard to picture yourself as Rihanna and try to write for her. Let's just write a really good fun song for the world." And he started making the beat and I just started rapping [raps], "It's pretty clear I ain't no size 2." And then we said, "Can we make like a big anthem that's about loving your body?" We wrote it, and we both loved it. My publisher and everyone said, "It's a great song but there's not a lot of artists who can sing this." And that's when LA Reid heard it and was like, "You are the artist. Be one," and I was like, "Alright! Let's do it!"

So it wasn't written specifically for you?
No, I just wrote it as a fun song, and I hoped the world would react to it as it is now, so it's kind of like a dream come true overnight. Like fairy tales.

Have you always had such a good attitude about your body?
No, no, not at all. I didn't know how cool I was until just recently. I wish I knew how cool I was in high school, you know? And I see my little cousins — now they have Instagram at 13. I didn't have Instagram, but I'm pretty sure I [would have been] more confused about everything if I did at that age. I wrote it to help me as well. And it has helped me because people have been complimenting me like, "Man, you look good in that video!" and I'm like, "Yeah I do!" If I help other people that's just another dream come true.

What was hard about high school?
I think about it and still can't believe I was always uncomfortable. Like in my outfits, I tried to dress up and I tried to look good, but at the end of the day I was still sitting there uncomfortable, like, "I hope guys will still like me." All my friends were cheerleaders and I was the girl who hung out at home. I just worked on my music all the time.

Were you ever bullied?
It was more in my head, I think. It was so bad that I wouldn't go to the beach, and I'm from Cape Cod and Nantucket where I'm surrounded by beaches but I refused to go to the beach with my friends one day because, like, I didn't want to not be the girl in the bikini. I think a lot of people struggle with it. I get these letters from these little girls saying, "I was just so miserable until I heard your song, and I just want to thank you." And I cry just reading these things, like, holy cow.

In the song you sing, "I'm bringing booty back/Go 'head and tell them skinny bitches that/No, I'm just playing — I know you think you're fat." Have you gotten any flack for the "skinny bitches" line?
Yes, I have! I can't read the comments because then I'll never sleep. I got people coming in saying, "Well, I'm skinny so you must hate me. Thanks." But it's crazy that I have these little warriors. Apparently — my brother told me — that every bad comment they'll just fight and be like, "You're not listening to the lyric! You're not hearing what she's trying to say! She says, 'Naw, I'm just playing, I know you guys even think you're fat, but I'm here to tell you that you're perfect.'"

How did you come up with the look of the video?
[Director/choreographer] Fatima Robinson [who also choreographed music videos for Michael Jackson, Prince, Rihanna, and Fergie] is a genius and she said, "I want to set it up with pastel colors 'cause that's the new summer thing. And I think it would be cute if you're like a little innocent-looking girl doing, like, booty-bumping dance moves and just shaking it up." And I said, "Yes, let's do it. That's hilarious, and that's awesome." And it's a fun song so we tried to make it as fun as we could.

Tell me about your upcoming album.
I think it will be done in the next couple months. I definitely want to put on a show. I want people to be interested and always surprised. Quite a few songs have that '50s throwback feel. But then you'll definitely hear me rapping on it and then you'll hear the reggae-influence. I try to put all that in one but it's hard. I've got a real honesty with my songs — with the stories I tell — and I think it will be entertaining.

Do you identify as a feminist?
A feminist, like a woman-power person? I guess so, yeah. I just think women should love themselves more than they do. Because I think — with all the social media stuff — we look at ourselves too much and we just destroy ourselves when we're way cooler than we know.

RELATED:
Colbie Caillat Took an Incredible Stand Against Photoshop

Follow Jenna on Twitter.