Young-adult author Adam Silvera didn’t read a book about a queer teen until he was 19. It was Cassandra Clare’s “City of Bones,” and the fantasy novel surprised him.

“The only time I ever expected to see a book with queer characters was in a coming-out story,” he explained. “It was a happy surprise. And I bought way more into the romance between a demon hunter and a warlock than I did the rest of the plot. It’s what got me to read three 500-page books in a week.”

Long since “City of Bones,” which published 10 years ago, authors like Silvera have made young-adult novels a place where queer love stories feel mainstream rather than an exception to the rule.

And they’re about far more than coming out. The new generation of LGBT young-adult literature has room for romance, inclusion and happily-ever-after.

For Audrey Coulthurst, author of “Of Fire and Stars,” her two princesses fall in love and find their romance forbidden not because they are both women, but because of royal court politics. Princess Denna is meant to marry the crown prince of a fellow kingdom — only to fall for his sister instead.

“It was the book I wish had existed when I was a teen,” she said. “I read tons of fantasy as a teen and I saw secondary characters who woke me up, but I was almost 30 before I read a book that had a queer female lead that fell in love with another girl.”

Anna-Marie McLemore, author of the new “Wild Beauty,” agrees that fantasy YA has allowed for more inclusion, for readers to see themselves on the page. “It was incredibly freeing to me, to realize I was writing queer and trans characters in worlds that have magic — it was like, I can write about identity, but also about magic and let LGBTQ into that world. I was so excited to write about these queer Latina girls in ballgowns in gardens, and we belong there, even if we didn’t see ourselves there growing up.”

For Mackenzi Lee’s whip-smart “The Gentleman’s Guide to Vice and Virtue,” the author wanted to showcase an authentically positive representation of queer identity in centuries past. “I wanted so badly with this book to say to queer teenagers: ‘You have always existed even before there were words or vocabulary or acceptance,’ ” she said. “I wanted them to know they have not only existed, but they thrived and had fulfilled romantic and sexual lives with people they love.”

Lee meticulously cited 19th-century lesbian diarist Anne Lister and the works of modern historian Rachel Hope Cleves as points of reference. “I did a lot of research into the queer subculture of the 1700s and tried to look into individual queer historical experiences. I think we erase individuality in history,” she continued. “I wanted them to see that variability in history — like it wasn’t just, it was the 1700s and being queer sucked no matter what.”

Though these authors still note that, as a whole, inclusion in YA is a work in progress. “It’s been really good, these past five to 10 years — most of the stories [before] were about coming out and being ostracized, or getting killed and having the point of view be from a friend, learning life lessons about their death,” Coulthurst said. “There’s room to grow, of course. We’re not seeing enough queer people of color or enough with ability levels. There’s a lot of opportunity for more intersectional perspectives.”

As authors get more comfortable exploring LGBT storylines, the coming-out tale isn’t disappearing. “I think we’ll always need for the foreseeable future both types of stories,” Silvera added. “While I’ve been so happy being able to live an out life, I think a lot about teens who aren’t able to be out right now and I want to write for them.”

Slipping back in time to write for teenagers gives authors the opportunity to explore first love again. “It’s exciting to go back to that time before you’ve been burned,” Lee said. “It’s that idea of first love when everything is really new and turned up to the 10,000th power because you’ve never done any of this before. I know when I date people it’s like: ‘Here are all the ways it can go wrong because I’ve done this before.’ But when you’re a teen you’re so much more open to ‘maybe this will go right.’ It’s a beautiful ignorance to have.”

“I am not sure if I ever stopped looking at love through the eyes of a 17-year-old,” laughed McLemore, who said those late-teen years were her first steps in declaring her cultural and sexual identity. They were also the years she met her now-husband. “Writers aren’t always writing from their own perspective, but for me, it’s being a teen in that time when you’re claiming your identity and falling in love with someone who is claiming theirs.”

And sometimes that bravery trickles back into real life.

Writing from the perspectives of two teens on their last day alive for his latest, “They Both Die at the End,” Silvera found himself pressured to take chance into his own hands. “For the first time in my life, I made the first move on a guy last summer, and we dated for 14 months. That was not something I would do,” he remembered. “I’d always be the guy who admires hot guys on the train or at a bar and never takes the risk. I wouldn’t have done that if it weren’t for writing a character who had to bust out of his own shell.”