Courtesy of Warner Bros. Pictures

Everybody loves to trash-talk DC films, and these critics are mostly justified. After all, DC’s repertoire is filled with embarrassments —  from the mishmashed “Suicide Squad” to the mediocre “Justice League,” it’s easy to write DC off as incompetent, especially in comparison to the consistent success of films in the Marvel Cinematic Universe. But recently, the tide has turned, with “Wonder Woman” garnering huge acclaim and “Aquaman” becoming a gigantic box office and critical success (albeit undeservedly). DC’s latest, “Shazam!,” continues its recent trend of success by combining humor, an engaging premise and fantastic acting. While it takes a bit of time to get going, “Shazam!” is a thoroughly enjoyable and emotional entry into the DC universe.

14-year-old Billy Batson (Asher Angel) is an orphaned miscreant entering his umpteenth foster home. Miserable and hopeless, Billy’s bad luck suddenly changes for the better when an ancient wizard (Djimon Hounsou) recruits the teenager to turn him into an adult superhero (Zachary Levi) whenever he utters the word “Shazam!” With help from his new foster brother, Freddy Freeman (Jack Dylan Grazer), Billy learns to cope with his newfound powers and eventually tries to stop the evil Doctor Thaddeus Sivana (Mark Strong) and his seven demons, who are dead set on capturing Shazam’s powers and destroying the world.

Comedy seems to be further and further permeating superhero films, with movies like “Deadpool” and “Thor: Ragnarok” emphasizing self-referential humor and wit. “Shazam!” bravely follows in their footsteps, tossing jokes at the audience and frequently landing them. Director David F. Sandberg (known for horror films like “It Follows”) never overdoes it, smartly pacing the humor without overpowering the film’s gravitas. This dispersion of humor ensures that jokes land more effectively. It also allows certain comedic scenes to stand out, including a montage in which Billy discovers his superpowers and a gag involving Sivana’s climactic speech.

Though more geared toward children than “Deadpool” or “Thor: Ragnarok,” “Shazam!” surpasses both films in terms of its well-rounded cast of characters. Billy’s foster family is comprised of a variety of colorful, fleshed-out characters that are uncommon for a blockbuster of this level. Faithe Herman stands out as young motormouth Darla Dudley, Ian Chen is delightful as the gaming-obsessed Eugene Choi and Cooper Andrews slays dad jokes as foster father Victor Vasquez. In any other film, such side characters might be one-dimensional and neglected, but “Shazam!” gives them prominence in Batson’s story. In return, they give “Shazam!” a strong, diverse supporting cast.

Grazer, whose breakout role came as Eddie Kaspbrak in 2017’s “It,” steals the show as Billy’s paraplegic roommate Freddy. Freddy is Billy’s perfect partner; while Billy helps Freddy to take down bullies, Freddy serves as Billy’s moral compass. The two need each other, and their relationship is one of the most heartfelt aspects of the film. And while the film is largely independent from previous DC films, Freddy’s adoration of superheroes gracefully connects “Shazam!” with the rest of the universe.

At the core of the film is Levi, whose immersive portrayal of Shazam carries the film on his back. Not for one second did I doubt that Levi was a child in an adult’s body, as he conveys an unbelievable sense of childlike wonder for a 38-year-old actor. It’s refreshing to finally see a big-screen hero who embraces the glory of having special powers. Hopefully, Levi’s performance will teach other actors that being a hero doesn’t mean restricting oneself to stoicism and brooding.

The film takes awhile to get into its groove, likely because it devotes significant time to introducing the villain, Dr. Sivana. Kudos to Sandberg for building a fairly complex villain and running with it, but Sivana isn’t a particularly intriguing or characteristic baddie — he’s just intimidating and extremely evil. While Strong is a talented actor, he doesn’t have much to work with, as Sivana is mainly serious and intimidating for the length of the film. While he serves as an adequate foil for the bright-eyed Billy, I would’ve liked to see Sivana have more personality.

Perhaps the most impressive feat of “Shazam!” is its ability to avoid typical superhero film pitfalls. Its battle scenes never overuse CGI, its characters are fleshed out and it sets up a potential sequel without detracting from the story. The climactic battle scene manages to showcase all of its strengths in a way that’s fresh and unpredictable. Overall, “Shazam!” is the most well-rounded DC movie thus far, fixing the flaws of its predecessors with a stellar blend of humor, character-building and stimulating plot. The DC haters will continue to hate, but with films like “Shazam!,” it’s becoming much harder to do so.

Grade: A-