A bad perm, a school full of bullies, a popular brother who knows naught of life’s suffering — could Nadine possibly have it any worse? During the opening minutes of “The Edge of Seventeen,” she lifts her eyes to an uncaring God. “What have I ever had,” she cries, “that’s any good?”

What happens next — the death of a loved one — might be God’s direct answer to that question, but Nadine can’t see it that way. Her bitterness and self-absorption only increase. And therein lies the beauty of this sparkling, funny, painfully honest coming-of-age-movie. “The Edge of Seventeen” is a comedy about a girl who could grow up to become a tragedy.

advertisement | advertise on newsday

In the best performance of her fledgling career, 19-year-old Hailee Steinfeld (“True Grit”) plays 16-year-old Nadine, whose constant griping and superior attitude are offset by a sharp wit and glimmers of vulnerability. Nadine has only one friend, the chirpy and cheerful Krista (Haley Lu Richardson), and together they’re as archetypal as Pooh and Eeyore. When Krista falls — drunkenly, at first — for Nadine’s handsome brother, Darian (Blake Jenner), Nadine finally blows her top. Now, it’s her against the world.

Granted, Nadine does have an admirer, Erwin (an endearing Hayden Szeto), but he’s sweet and goofy — “I want to carry him around in a Baby Bjorn,” she says — not at all like her brooding, dangerous crush, Nick Mossman (Alexander Calvert). Nadine also has a devoted if slightly scattered mother, Mona (Kyra Sedgwick). Somehow, Nadine manages to alienate them all. Only the sardonic history teacher Mr. Bruner (a wonderful Woody Harrelson) tells her what she needs to hear. “Nadine,” he says, “maybe nobody likes you.”

Surely such well-drawn characters come from the pages of a young-adult novel, no? Actually, “The Edge of Seventeen” is an original script — a rarity these days — from first-time director Kelly Fremon Craig. She may have had a Mr. Bruner in her own life. This winning comedy speaks the language of adolescence with fluency, if only because it never talks down to its audience. In the end, its message rings loud and clear.