Warning: MAJOR SPOILERS ahead for Shazam

Shazam is now in theaters, and while the trailers have shown off some funny and epic moments, there are still plenty of surprises in store for audiences. Avoiding spoilers for upcoming movies isn't always easy, and test screenings for Shazam led to one major cameo in particular being revealed early. However, from the secret villains of the movie to the reveal of the Shazam Family and their powers, the movie has managed to keep some of the coolest moments under wraps.

Directed by David F. Sandberg, Shazam stars Asher Angel as Billy Batson, a troublesome foster kid who keeps running away from homes in search of his biological mother. He's given another chance with a new foster family, and after a moment of bravery is whisked away to the Rock of Eternity, where a powerful wizard (Djimon Hounsou) gifts him with incredible powers. By saying the word "Shazam!" Billy is transformed into an adult superhero (Zachary Levi), complete with a snazzy costume, super-speed, lightning powers, near-invulnerability, and a host of other powers. With the help of his new foster brother, Freddy Freeman (Jack Dylan Grazer), Billy tries to get to grips with his newfound ability and figure out what kind of superhero he's going to be.

Related: Everything We Know About Shazam 2

Unfortunately, the evil Doctor Sivana (Mark Strong) has acquired some powers of his own, and will now stop at nothing to defeat the wizard's champion and steal Shazam's power for himself. Here's our breakdown of the biggest spoilers, surprises, twists and turns in Shazam.

The Movie Opens With Dr. Sivana's Origins

Shazam Faces Off With Dr. Sivana Zachary Levi Mark Strong

While Billy Batson and the Shazam family are the heart of Shazam, we don't actually meet Billy until after the movie's opening title. The very first scene in Shazam isn't Billy's origin story, but Doctor Sivana's. We see a young Sivana playing with a Magic 8 Ball in the back of a car, with his bullying father and brother in the front seats, when suddenly he's transported to the Rock of Eternity. With incredible powers within his grasp, young Sivana fails a test to see whether he's pure of heart - reaching out to try and steal the Eye of Sin when tempted by the Seven Deadly Sins. The wizard sends Sivana away again, and his ensuing freak-out results in a car crash that leaves his father paralyzed.

The Seven Deadly Sins Are Shazam's Real Villains

Shazam's trailers did a good job of concealing the movie's real villains: the Seven Deadly Sins. These beings are trapped inside statues on the Rock of Eternity, and are held captive there by wizards - whose numbers have been whittled down until just one is left. When Sivana finally returns to the Rock of Eternity he puts the Eye of Sin - a glowing orb to which the Seven Deadly Sins are connected - into his own head. While Sivana thinks that he's in control and has amassed great power, the reality is that he's simply a pawn being used by the Seven Deadly Sins. Each of these monstrous beings can emerge from Sivana and take on either a solid or smoky form, making them difficult to fight. With each Sin that leaves, Sivana's powers become weaker, but the hardest Sin of all to separate from him is Envy. It's not until the end of the movie that Shazam is finally able to draw Envy out - and leave Sivana helpless.

Black Adam Has a Flashback Cameo

It's now been more than a decade since Dwayne Johnson's name was first attached to the character Black Adam, and he's set to star in his own Black Adam solo movie. However, while Black Adam was at one point going to be the main antagonist of Shazam, his role in the movie is limited to a cameo appearance (not performed by Johnson). The wizard explains that at many years ago the council chose a different champion, but that he abused his powers and used them for evil, unleashing the Seven Deadly Sins upon the world. He illustrates this story with a glowing hologram of a character that is surely Black Adam, setting the villain up for a potential sequel appearance.

Related: Shazam! May Already Confirm BLACK ADAM in The DCEU

Billy's Mother Left Him on Purpose

Billy's main goal for much of Shazam is to track down his birth mother, from whom he was separated after he got lost at a carnival. Billy repeatedly runs away from foster homes in search of his mother, tracking down every Rachel Batson in the city, but he doesn't actually find her until he gets help from his foster brother, Eugene. Billy finds out that his mother reverted to her maiden name, which is why he was unable to find her, but when he finally tracks her down he gets an unpleasant shock: his mother left him behind on purpose.

As a young single mother (Billy's father was in prison), Rachel felt ill-equipped to raise young Billy, and though she searched for him frantically at first, when she saw him being taken care of by police officers at the carnival she realized he had a chance for a better future... and just walked away. Instead of welcoming him with open arms, Billy's mother nervously keeps him out of sight of her angry boyfriend, and doesn't even remember the compass she gave him. Though he is obviously upset that his dream of coming home to a loving, caring mother didn't come true, Billy is able to make peace with being left behind. He gives her the compass as a parting gift, and returns to his foster family.

Billy Shares His Powers to Create the Shazam Family

Shazam Marvel Family

Doctor Sivana's goal in Shazam is to force Billy to transfer his powers using the wizard's staff, so that he can add the powers of the champion to his already formidable abilities as host of the Seven Deadly Sins. In the movie's final battle scene, Sivana threatens to kill Billy's foster siblings unless he hands over his powers - but this gives Billy an idea. Instead of giving his powers to Sivana, Billy gets his newfound family to place their hands on the wizard's staff and say "Shazam!" - thereby distributing his powers among them and creating the Shazam Family (or "Shazamily," to borrow the movie's official hashtag). Each of Billy's siblings specializes in one of his powers; for example, Freddy can fly, Darla gets super-speed, and Pedro gets super-strength. At the end of the movie, the Shazam Family adopt the Rock of Eternity as their superhero lair, with each taking up a seat at the Council of Wizards.

Page 2: The Superman Cameo, the Post-Credits Scenes, and More

Shazam The Seven Deadly Sins

Shazam Locks Up The Seven Deadly Sins

Once the Shazam Family has drawn out and distracted six of the Seven Deadly Sins, Shazam and Sivana take part in a flying battle across the city and end up on a rooftop. There, Shazam figures out that the only Sin that never comes out is Envy, and taunts it to draw it out of Sivana, before hitting it with his transformative lightning bolt to stun it. Dragging Sivana back to the carnival, Shazam pulls out the Eye of Sin, sucking all of the Seven Deadly Sins back into it. He restores it to its original spot in the Rock of Eternity, and the statues of the Seven Deadly Sins rebuild themselves, locking the monsters up once more.

Superman Has a Cameo at the End

This spoiler unfortunately got out before Shazam's release, but if you managed to avoid it, it's one of the best moments of the movie. After Billy forgets to show up at school in costume to prove that Shazam is friends with Freddy, leaving Freddy humiliated, Billy makes it up to him - and then some. Not only does Shazam show up to have lunch with Freddy and his foster family, he also brings along a friend: Superman! We don't actually see Superman's face, just his body from the neck down, but Freddy is naturally blown away to see one of his favorite superheroes in the flesh. The movie ends on this Superman cameo, then jumping into the animated credits sequence.

Related: Shazam! Review: A Charming, If Uninventive Superhero Origin Story

The Credits Feature Justice League Members

Shazam Batman and Superman Child

There are references to the Justice League members throughout Shazam, since Freddy is a superhero mega-fan. He owns a bullet that bounced off Superman's body (until Billy accidentally drops it down a drain), has a replica batarang, and a wide selection of T-shirts with superhero logos on them. The Justice League themselves show up in animated form in the movie's animated end-credits sequence, which feature a number of fun fantasy scenarios - from Billy using the Batmobile to take Wonder Woman to the prom, to Darla having a race with the Flash. But, as with many superhero movies, things aren't over just because the credits are rolling.

Mister Mind Shows Up in the End Credits Scene

Shazam - Mister Mind

Hyper-intelligent worm Mister Mind, a classic villain from Shazam's early days as Captain Marvel, is first seen at the very start of the movie. As young Sivana enters the Rock of Eternity, Mister Mind is shown trapped inside a glass case, but when Sivana returns as an adult the case is empty. The devious worm returns in Shazam's mid-credits scene, where an imprisoned Sivana is maniacally scrawling symbols on the walls of his cell in the hope of opening a door to the Rock of Eternity again. As he gives up in frustration, Mister Mind arrives with an ominous cackle, making rude comments about "walking talking monkeys" with "cave drawings," before teasing that "there are more ways than a mind can imagine" to access magic. He declares he and Sivana are going to team up, and that, "The Seven Realms are about to be ours" - clear set-up for a sequel with Mister Mind as a main antagonist.

Read More: Shazam's After-Credits Scenes Explained

Aquaman is Referenced in the Post-Credits Scene

Shazam Movie Post-Credits Scene

If you stick around to the very end of Shazam's credits you'll get a post-credits scene that was actually shown (in part) in the Chinese trailer for the movie. In another one of Freddy's tests of Billy's Shazam superpowers, Billy pretends to be speaking telepathically to a goldfish. After a while, though, he admits that he was just kidding, and questions what cool things they could possibly do with the superpower of talking to fish. Freddy, pointing out the Aquaman T-shirt he's currently wearing, retorts, "Maybe command an army of billions in the ocean?" - and Billy concedes the point. Batman also mocked Aquaman for talking to fish in Justice League, and young Arthur Curry was mocked by his schoolmates in Aquaman for talking to fish as well. The poor guy just can't catch a break.

More: Every DC Movie Confirmed For After Shazam

Key Release Dates