Bel Powley and Alexander Skarsgard in The Diary of a Teenage Girl.

A 15-year-old girl winds up in a relationship with her mother’s boyfriend—a man in his 30s—in The Diary of a Teenage Girl, ajustifiably uncomfortable and nicely acted film from director-screenwriter Marielle Heller.

Bel Powley is fantastic as Minnie, a dark, awkward teen living in San Francisco. She doodles strange things in her sketchbook and loses her virginity to Monroe (a never-been-better Alexander Skarsgård) behind the back of her mom (an excellent Kristen Wiig). The film handles the completely illegal relationship in a way that works out fine in the end, but it’s a little rough going at times.

Skarsgard pulls out all the stops as a charming moron, while Wiig kills it in the scene during which she finds out what’s going on. Powley, who is actually 7 years older than her character, captures the essence of a teenager who is getting a little ahead of herself—and might not be altogether stable, for myriad reasons.

Heller infuses the film with interesting animated sequences, and does a nice job re-creating 1970s San Francisco. It’s a good movie—but it certainly isn’t for everybody.

The Diary of a Teenage Girl is now playing at Regal Palm Springs Stadium 9 (789 E. Tahquitz Canyon Way, Palm Springs; 844-462-7342); the Regal Rancho Mirage Stadium 16 (72777 Dinah Shore Drive, Rancho Mirage; 844-462-7342); and the Century Theatres at The River (71800 Highway 111, Rancho Mirage; 760-836-1940).