WARNING: The following article contains spoilers for Shazam!, in theaters now.

It's no big secret the DC Extended Universe has struggled to find the right tone. We're not saying each film has to have to same voice and look the same way, but Zack Snyder's initial dark, gritty and violent vision certainly wasn't working out for the DCEU. However, David F. Sandberg's Shazam finally provides Warner Bros. with the tone it needs for these movies going forward.

RELATED: Shazam's Biggest DC Comic & Movie Easter Eggs

Man of SteelBatman v Superman: Dawn of Justice, Justice League and David Ayer's Suicide Squad just didn't hit the mark. There was an inherent sense of nihilism and dystopia in these movies that eroded any sense of warmth and inspiration. The mixed critical reception to these films and dwindling box office takes showed fans and critics alike were tiring of this style of superhero film.

Shazam!

Patty Jenkins' Wonder Woman started a course correction for the DCEU by fleshing out the titular hero's backstory and introducing a tone that wasn't as dark and nihilistic as the Snyder films, despite being set against the backdrop of World War I. But the movie lacked an edge in terms of action and spectacle, which was especially evident in the final fight against Ares, which felt like all style and no substance. James Wan's Aquaman then upped the ante in terms of spectacle, but it still couldn't land the balance in terms of comedy and overall action. In regards to heart and soul, the DCEU was close but no cigar. However, Shazam combines all of those elements successfully to make a solid superhero adventure that can also succeed both at the box office and with critics.

RELATED: Shazam: Who Plays [Spoiler] in the DC Movie

Shazam presents a youthful fire and exuberant innocence via a brand of '80s comedy that feels like Big meets Superman. The movie also digs deep into a theme that resonates with audiences: family. In this case, family isn't a sense of regal duty and obligation, as with Wonder Woman and Arthur Curry. It's also not forced like in Batman v Superman's infamous "Martha" scene. Shazam sees Billy Batson integrating into his foster family and befriending his new siblings, such as the well-intentioned Freddy Freeman. There's something earnest and genuine in the film as Billy searches for his mom en route to figuring out family isn't just blood.

The movie also has that much-needed spectacle factor in the form of city-levelling brawls with Doctor Sivana and the monstrous Seven Deadly Sins. While the battles feels high-stakes like the Zod-Superman fight in Man of Steel, it's more than just wanton destruction.

Sandberg produces a clever mix of all these facets, thus creating a well-balanced film with just the right amount of laughs, scares and shocks. The film is escapist, but also has nuanced plot threads and themes, including the concept of "the other," bullying and how dumbfounded most would be if they woke up as heroes. These thought-provoking notions were often missing from the older DCEU movies, but not Shazam. The movie never loses its levity while still emphasizing the gravity of a world tottering on the brink of collapse. Everything is well-thought out, the plot beats all feel natural and all the actors -- especially Levi -- sink into their roles, making their characters feel natural and real.

RELATED: Shazam! Electrifies Worldwide Box Office With Strong Opening

Like the best comics, Shazam combines the light side of superhero stories with the right amount of dark material without skewing to one side or the other. That's why Shazam totally outshines the Snyder era, while ambitiously and positively building on Wonder Woman and Aquaman. The movie doesn't disregard the DCEU that's come before it, instead Shazam embraces the cinematic universe while paying tribute and offering fan service to everything that the magic of DC Comics is built around.

Directed by David F. Sandberg, Shazam! stars Asher Angel as Billy Batson, Zachary Levi as Shazam, Mark Strong as Dr. Thaddeus Sivana, Djimon Hounsou as the ancient wizard Shazam, Grace Fulton as Mary Bromfield, Jack Dylan Grazer as Frederick “Freddy” Freeman, Ian Chen as Eugene Choi, Jovan Armand as Pedro Peña, Faithe Herman as Darla Dudley, Cooper Andrews as Victor Vásquez and Marta Milans as Rosa Vásquez. The film is in theaters now.