Page Powars knows there is something deeply satisfying about turning an unbearable character into someone readers cannot help but love.

The New York Times best-selling author previously embraced that challenge in “And They Were Roommates,” but his latest YA romance, “But I Hate Him,” approaches it from a different angle. This time, the love interest is not necessarily the problem. The protagonist is.

The novel follows Rory, a brilliant transgender student under immense pressure to maintain his reputation as one of the smartest teenagers in the country. When an apparently carefree hockey player repeatedly beats him in academic competitions, Rory devises a perfectly reasonable revenge plan: Romance his rival, break his heart, and distract him before their final contest.

Naturally, the scheme becomes real, and everything descends into what Powars lovingly calls “a gay mess.”

Beyond its academic-rivals-to-lovers romance, “But I Hate Him” reflects Powars’ commitment to giving young transgender readers stories filled with humor, possibility and queer joy. The author spoke with Gayety about creating messy transgender characters, finding himself through animated media and helping queer books reach young readers amid growing censorship.

How would you describe “But I Hate Him” and the wonderfully messy romance at its center?

It is about a young academic who is transgender, but he’s also kind of famous for being really smart. He has both of those pressures upon him and one more contest to win to prove himself.

Then this hockey player, who is also competing and doesn’t seem to really try or care about academics, beats him. It makes him go out of his mind. This guy who doesn’t try or care keeps beating him, so Rory comes up with a scheme to romance him and break his heart right before the final contest at a summer camp.

Of course, it becomes too real, as it always does, and it’s a gay mess. You’ll have to read to find out exactly what the mess is, but I can promise you there is one.

Why does the enemies-to-lovers dynamic work so well for these characters?

A lot of the reasons my books end up so messy and enemies-to-lovers is because the characters are 15 or 16 years old.

When you’re 16, you are in this bubble where school feels like it is forever. You can’t really see the horizon of a life where you’re not controlled by adults. You’re told every day that if you fail even one test, it will reflect the rest of your life and you’ll never get a job.

I can’t imagine not losing your mind like Rory does, especially when he’s on a public platform for being the smartest kid in America, or at least the peak image of one.

Your books center transgender characters without making trauma the entire story. What kinds of stories do you want to give young transgender readers?

In all of my books that have starred transgender protagonists, and hopefully all the ones that will star transgender protagonists, the comedy trumps everything else.

My favorite books can be heavy on queer trauma, so I’m not trying to bash them at all. I just know my skill set. I love when a group of 14-year-old kids tells me they took a 16-hour road trip with an older sister to see me, and then they show me their cosplays and Instagram pages about my books and characters. It creates such a fun, wholesome atmosphere for these transgender kids.

We don’t end up talking about how any of us are transgender at those events. It’s obvious, but I think they also see an adult and think, “Oh my God, you’re writing silly trans stories that read like cartoons, you’re trans and you’re successful. I want to do that.”

There’s nothing better than that. Writing for teens is my No. 1 joy. That is my queer joy, and hopefully I never have to leave it.

Was there any media that helped you feel seen or understand your identity while growing up?

I genuinely would not know that I’m a transgender man to this day if I hadn’t been so absorbed in cartoons and animated media that featured men who weren’t wearing cargo shorts.

Growing up in the Midwest, I was surrounded by men who didn’t know how to dress. They all had very short hair and they were all straight. Then I found Tumblr, and suddenly there were all these twinks in media and in the anime I was watching.

There’s a “Danganronpa” character tattooed on the back of my arm because I was so obsessed with him when I was 16. He kind of looks like a woman when you first see him. That was one of my earliest encounters with that kind of character.

It wasn’t really real people who helped me find myself. I found myself in characters who weren’t technically trans kings, but in my head, they were.

What does publishing an openly transgender and queer book mean in the current political climate?

People showed up for “And They Were Roommates” more than I ever thought they would. It became a New York Times bestseller, and it is still selling steadily a year later. I think the objective gayness of the cover made so many people pick it up.

I’m sure I’m getting censored in places that I’m not aware of, but I don’t feel like it’s impacting me. In fact, I think people are here more than ever to support the book and get it into the hands of people who need it, especially in the South.

I work with a nonprofit organization called Rainbows and Reflections. They have contacts around the United States, especially in the South, through people who know transgender kids. My publisher and I have been working to donate hundreds and hundreds of copies of this book for them to distribute.

We figure out a way every time.

Rory interprets almost every kind interaction as part of a larger plan against him. What did you enjoy about writing his anxious inner world?

Every time the love interest speaks genuinely kindly to Rory, Rory assumes it’s some tactic to do something to him. Sometimes I went too far with it. There was one line that was even worse in the first draft, and my editor had to remind me, “Hey, they’re 15. Pull it back.”

Coming up with all the clever ways to make the main character hate the love interest, whether or not it was justified, was very fun. I had to get creative in the worst ways.

It’s such a double-edged sword because I feel like so many gay people, myself included, have a lot of anxiety. You think everything must be about you because you’re anxious and feel like you’ve done something wrong. But it’s also kind of self-centered to think anyone cares about you that much.

You are also beginning to publish adult romance. What can you tease about what comes next?

I have an adult romance coming out in April with Penguin Random House. It’s a cowboy romance starring a transgender cowboy, and it’s also very funny. I can’t write a book if the plot doesn’t inherently have some kind of strangeness to it.

It follows the heir to a horse ranch who doesn’t know how to ride horses and needs a teacher. He gets the main character, but there’s a mix-up and the main character doesn’t know how to ride horses either. They’re both trying to figure it out.

Of course there’s romance, but I personally care about the horse part the most.

I’m also working on a book with a flower shop and tattoo parlor vibe. The characters are kids, so they act like they own the places, but they actually belong to their parents. It has been very cute and reflective to remember when I was that shy and anxious, too.

This conversation has been edited and condensed.

“But I Hate Him” will be released Aug. 25 wherever books are sold.