In these dark times, you might expect Star Trek Beyond to echo the tone of the previous film in this storied franchise, Star Trek Into Darkness. That was a paranoid thriller about suicide bombers, super-soldiers, and ethical rot at the heart of government—a decidedly dystopian tale. Happily, Beyond sweeps all of that aside, delivering a rollicking adventure about the transformative good of teamwork and unity that’s just as silly and enjoyable as that might sound. It’s no complex masterpiece, but it’s exactly the kind of fun steeped in effervescent goodwill that Hollywood should be delivering right now.

Like the two previous Star Trek films (which were directed by J.J. Abrams), Beyond stars Chris Pine, Zachary Quinto, Zoe Saldana, and others as younger, alternate versions of the original Enterprise crew, whose adventures tend to be a little heavier on the action beats and CGI mayhem than Gene Roddenberry’s original ’60s TV show. After making a royal mess of Into Darkness and moving on to the Star Wars franchise, Abrams handed the reins to the confident action director Justin Lin. Having revitalized the Fast & Furious franchise (directing the third, fourth, fifth, and sixth entries), Lin uses the same magic to spruce Star Trek up. Unlike Abrams’ sweeping 2009 reboot, Beyond can seem slight at times, but in a way that recalls the best of the franchise, harkening back to Roddenberry’s original, optimistic view of the future.

Some might scoff, but Lin’s time with Fast & Furious shines through even if the Enterprise crew is less muscle-bound. There’s a focus on squad unity, with Captain Kirk’s team thriving by acting as a surrogate family—one that always has fun and tosses out one-liners as the action clangs around them. Everyone is given at least a moment to shine: John Cho’s stoic family man Sulu, Karl Urban’s growling curmudgeon Bones, and the sadly departed Anton Yelchin’s endlessly enthusiastic Pavel Chekov. Beyond, written by its star Simon Pegg (who plays the irascible engineer Scotty) and Doug Jung, is rarely five minutes from an action scene, but it doesn’t get overwhelmed by the endless set-pieces. Its two-hour running time breezes by in a blur of day-glo adventure and derring-do.

Beyond begins with Captain Kirk (Pine) bored by the generally utopian universe he lives in, shuttling through deep space on diplomatic missions for Starfleet and longing for some real action. He gets it quickly enough: Embarking on a rescue mission into a remote nebula, the Enterprise is attacked by a hive of alien ships, and crash lands on an uncharted planet ruled by a tyrant named Krall (Idris Elba). For most of the film, Krall is rather thinly sketched: Speaking guttural, halting English and mugging behind layers of scaly makeup, Elba can only do so much with the role, which doesn’t get much context until the film’s climax.

Still, he represents a basic threat to everything Kirk and company stand for, ranting about Starfleet’s emphasis on diplomacy and peace, and cursing their pathetic emphasis on solidarity. Meanwhile, the Enterprise crew, scattered to four corners of the planet by Krall’s assault, have to come together to stop him, making an alliance with another stranded alien warrior named Jaylah (Sofia Boutella). Pegg and Jung’s script is simple stuff, mostly avoiding the lovable ponderousness of past editions of Trek (there’s no Patrick Stewart reciting Melville and Tennyson, though Spock does at least slip in a Shakespeare line). Perhaps this reflects Hollywood’s current lows more than anything else, but it’s refreshing to see a blockbuster that has any kind of philosophy, especially one this good-hearted.

Best of all, just as he did with the Fast & Furious franchise, Lin never hits the audience over the head with the crew’s sweeping sense of diversity and the power they draw from their egoless camaraderie. Early on, as the crew takes some shore leave on a space station, you catch a sweet, subtle glimpse of Sulu embracing his husband and child; when Uhura is captured by Krall, she doesn’t need her boyfriend Spock’s help in escaping his clutches; and there’s a continuation of the brotherhood between Scotty and his three-foot engineering assistant Keenser, a beady-eyed, fungus-resembling creature who sneezes acid any time he has a cold.

Like the best Star Trek moments, the lessons learned are about embracing each other’s idiosyncrasies and banding together to fight for a common good. That’s the kind of message Hollywood blockbusters should promote more often, but it feels especially relevant to the present. When he created Star Trek 50 years ago, Roddenberry was hoping to reflect humanity’s best qualities in a paean to the future it could create for itself. It’s heartening to see Star Trek Beyond continuing that noble cause.