Some of the most wonderful moments of Booksmart are those in which best friends Amy (Kaitlyn Dever) and Molly (Beanie Feldstein) express how much they love each other. More than once, they grind the action (which otherwise zips along with ease) to a halt, taking a pause to engage in a loving compliment-off. One is blinded by the other’s beauty, the other is offended that she dare be so beautiful, so on and so forth. They’re sweet, easy affirmations. This is women supporting women.

That sense of empowerment, however, isn’t just reserved for Amy and Molly. Booksmart, the directorial debut of actress Olivia Wilde (Tron: Legacy), is remarkable for putting two teenage girls in the spotlight, for allowing young women to behave badly and be selfish, and above all, for being kind. High school comedies often raise up their protagonists by emphasizing how dumb or lacking their classmates are, and Booksmart could easily have taken that route, too. But the film never takes that low road — it’s a raunchy, raucous blast for everyone involved, including the audience.

Molly and Amy are, as the title of the movie suggests, booksmart. They’ve spent all of high school hitting the books with the expectation that the Ivy League colleges their grades get them into will vault them out of the company of their perceived slacker peers. When Molly confronts some classmates she hears trash-talking her with that exact logic, she’s shocked to discover that their partying didn’t preclude them from getting into those same schools. The discovery doesn’t send Molly into a crisis of faith — rather, she proclaims that the two best friends will spend their last night before graduation making up for all of the fun they missed out on.

In Wilde’s microcosmos, none of the students are better than others, and Molly’s perception of superiority is one that the film challenges rather than supports. There’s not one “right” way of getting through life, and framing high school as something to win or lose (Molly’s morning ritual involves listening to a tape that tells her to crush all those other losers, in so many words) doesn’t really help anyone.

Yes, most of Molly and Amy’s peers fall into stereotypes — the jock (Mason Gooding), the mean girl (Diana Silvers), the slut (Molly Gordon), the rich kid (Skyler Gisondo) — but each preconception is dismantled before the night is over. There’s more to all of them than meets the eye; just as Molly and Amy know each other to contain multitudes, so do the students around them.

To that end, the only villain that Molly and Amy have to contend with is the clock. There are pre-graduation parties happening all over town, but only one (thrown by the aforementioned jock) that they really want to get to. Unfortunately, after years of not partying, they don’t have an easy way of obtaining the address, and the night becomes a quest to find it before time runs out.

High school comedies, particularly those about sex or modeled around any sort of “one last night,” are typically reserved for boys, though the last few years have seen the genre open up in a way that has been refreshing not just when it comes to gender parity but in terms of material. Blockers and Neighbors 2 ran so that Booksmart could fly.

Booksmart, with a script by Emily Halpern, Sarah Haskins, Susanna Fogel, and Katie Silberman, couches all of its heroines’ shenanigans in an exploration of how tough close friendship can sometimes be, and the trials and tribulations involved in just growing up. The little details, from Amy’s queerness (a natural part of her rather than her defining character trait) to Molly and Amy’s fixation on a cool teacher, all feel lived-in.

The most natural dynamic in the whole movie, and the thing that really makes it sing, however, is the chemistry between Dever and Feldstein. Molly and Amy may be on a quest to have fun — and each may be harboring a crush — but it’s their friendship that grounds the entire film. The warmth between them spills over into everything else, including the way the last days of high school can feel strangely halcyon, translated here into a dreamy sequence set to a Perfume Genius song. Just as Lady Bird made me immediately want to call my mom, this is the kind of movie that’ll have you texting your best friend as the credits start to roll, to remind them just how wonderful they are.