When Labyrinth was first released, critics were overwhelmingly negative, bordering on hostile. Variety called the 1986 film starring David Bowie “silly and flat,” while Gene Siskel said it was “quite awful.” Audiences at the time largely agreed: The movie grossed $12.7 million domestically—hardly half its budget—and Tri-Star Pictures pulled it from theaters after less than a month. Because Jim Henson was the director, many people, including reporters, had gone into the film expecting Muppets. Instead, they got something much darker.

The last feature film that Henson would direct, Labyrinth is about a teenage girl named Sarah (Jennifer Connelly) whose baby brother is kidnapped by Bowie’s Goblin King, Jareth. Sarah has to rescue her brother from the goblins’ castle at the center of a curiously populated maze before midnight, or he’ll be turned into a goblin. (Or something—the plot meanders and at times disappears entirely, but the whole quest may simply be a ploy for the Goblin King to win Sarah’s love.) Why then has Labyrinth—101 minutes of Bowie rock opera and Hensonian spectacle—become so beloved that it’s now a mainstream cult favorite, and what keeps people watching 30 years on?

For all its flaws and superficial delights, Labyrinth reacquainted audiences with an old idea that Hollywood had long neglected: Childhood is a scary and dangerous place, an inherently strange time filled with dead-ends, wrong turns, lies, and traps. In other words: It’s not the Muppets.

Goblins’ eyes snap open in the audience’s first glimpse of them, a dimly lit shot crowded with teeth, white-rolling eyes, green flesh, and horns. It’s a strange moment, juxtaposed with Sarah in her baby brother’s bedroom, trying to get the screaming toddler to sleep. Then the wall-to-wall goblins come out of nowhere. Are they in Sarah’s head? the audience wonders. Have goblins always been there, waiting in the corners, holding their breath, or sleeping until we say the magic words?

To access art is to access darkness, and to dwell in childhood is to dwell in a place of death, the potential deepest darkness. For those who are parents, the shadow of death is always with us. When my son was born after 24 hours of labor, the midwives informed us that I had suffered a partial placental abruption. Had the placenta fully detached too soon, my baby likely would have suffered brain damage, and I could have bled to death. Consider the terror new parents are meant to feel abut SIDS, and the alarming and ever-changing information of how parents should do the most basic of tasks: put their baby to sleep.

It’s significant that Henson’s goblins arrive in Labyrinth exactly when Sarah is attempting to do just that: put the baby to bed. When she flicks off the light and the baby goes silent, she knows instantly, instinctively, that something is wrong. Jareth enters Sarah’s brother’s bedroom in a flurry of boots and cape, snowy owl wings bating, and French doors thrown open wide. He’s stolen her brother (didn’t Sarah ask him to take the baby, pleading and desperate, not realizing he was listening?), but if Sarah can find her brother in the labyrinth before 13 hours are up, she can have him back. Under a blood-red sky, Jareth shows Sarah his maze, goblin castle at the center. Her backyard has seemingly peeled away to reveal the goblin kingdom.

Jareth’s land, an eerie expanse of bullies, traps, and two-faced allies, is pretty much an exaggerated blueprint of childhood. In Labyrinth, as in childhood, everything is magnified and inexplicable. Things are kept from children in the interest of protecting them, but in the absence of knowing, kids supply their own answers, which are usually awful. Much of what I remember about my youth involves worrying: that there was a man staring at me from the air-conditioner vents above my bed, that a tornado would come in the night, that robbers would come in the night, that wolves would come in the night. Childhood is full of such demons. Or goblins.

With Labyrinth, Henson sought to illuminate an old notion: Childhood is notoriously dark in the traditional fairy tales of Grimm and Hans Christian Andersen. The little mermaid basically commits suicide and turns into sea foam. A rich man promises he will only remarry someone whose beauty rivals his dead wife, so he pursues his own daughter. A young girl’s husband turns daily into a hedgehog. (Henson would later mine some of this classic fairy-tale territory in his acclaimed but low-rated 1988 TV series The Storyteller, including the episodes “Sapsorrow” and “Hans, My Hedgehog”). Not only were these stories read to children, but they also feature children—getting eaten or starving to death, or being married off far too young to monsters.

This kind of heavy view of childhood had been distant in kids’ films from the 1970s, the era of The Bad News Bears and the Herbie series, The Shaggy DA, and Mountain Family Robinson. Children’s movies were largely saccharine and low stakes, a trend that continued in the early ’80s with movies like Popeye, Annie, and Heidi’s Song.

But childhood involves a kind of wonder that’s anything but simple. In Labyrinth, the stakes are high, but it’s hard to know who or what to trust. Most of the characters Sarah encounters in the maze are ambivalent and borderline passive-aggressive. The first creature she meets (a worm) accidentally sends her exactly the wrong way. Others won’t help her unless she solves a riddle or pays them. They offer advice that is confusing and unhelpful. Even the core group of characters who eventually become her traveling companions have mixed loyalties: There’s Sir Didymus, an oblivious fox knight, and the dwarf-like creature Hoggle who loves Sarah, yet misleads her and poisons her after Jareth bullies him into it.

The world is larger than life when you’re a child, odd and suspicious. Everything is new. There is this strange confusion of language, the rules at school, school itself. And just when you learn the rules, they change on you. Once you hit the teenage years, everything is turned upside down all over again, much like the changing staircases in one of the last scenes in Labyrinth (and in Harry Potter, which followed much later). It’s why adolescence lends itself so well to horror.

And as Labyrinth shows, there’s particular danger in being a teenage girl. Connelly’s Sarah is 16, and Jareth, we learn, doesn’t just want a new baby to be reborn as a goblin, which is disturbing enough. He wants Sarah. He wants her to love him, and his longing increases, becoming more and more creepily clear, as the movie progresses. There’s both a paternal appeal and stranger-danger in Jareth, a confusing and unnerving quality given Bowie’s alleged statutory rape of two young fans in the ’70s (reports that only intensified after the singer’s death earlier this year). Frankly, it makes Labyrinth difficult at times to rewatch as an adult.

Labyrinth is a world of men: Almost all the creatures Sarah encounters in the maze—with the exception of the Junk Lady, who tries to make Sarah remain a child forever by piling toys onto her back, and a faerie that Hoggle tries to kill—are male. Many women have half-joked that Labyrinth was their sexual awakening, and it troubled me even as a child that I too was attracted to Bowie’s Jareth. I was drawn to the danger in him. I felt the pull of the magical world he promised, a dream world of pretty ball gowns and parties and masks and music when Sarah, after eating a poisoned peach given to her by Hoggle, fantasizes that she’s carried away in a bubble to a rollicking, fancy, and very adult masquerade party. A masked man fights his way through the crowd to her. It’s Jareth, of course. He takes off his Venetian mask, their eyes lock, and they dance in a scene with parallels to sequences from Stanley Kubrick’s 1999 film Eyes Wide Shut.

Sarah throws a chair through a window, ending the masquerade. She and her companions make their way to the Goblin City at the center of the maze. There’s a climatic fight scene won with rocks. Jareth sings a largely inappropriate song called “Within You” while Sarah tries to track him and her baby brother down. She finally defeats the Goblin King, winning her brother back and returning to the real world, with a simple line, a line of the triumph of youth, a line thrown at Jareth like a Molotov cocktail: You have no power over me.

Perhaps Labyrinth was preparing its audience for the explosion of YA, the teen as self-possessed heroine inheriting the Earth, scorched though it may be. Sarah does the right thing, as the Katnisses and Bellas and Hermiones do the right thing: Though their audience screams at them to choose fantasy, choose adventure, choose yourself, they go back to family and home and responsibilities every time. Just as I never understood why Dorothy Gale left the wonderful world of Oz and returned to flat, hot Kansas, I didn’t understand why Sarah went back from the Goblin City, to be a babysitter, an ordinary teenager. And I don’t think I ever forgave her.

The late ’80s and early ’90s saw more films exploring the bleakest territory of childhood. There was the Henson-produced adaptation of Roald Dahl’s The Witches, and the weird and morbid All Dogs Go to Heaven. Darkness even became a subgenre with certain kids’ films like The Nightmare Before Christmas and the creepy film adaptation of Neil Gaiman’s Coraline (button eyes, anyone?).

More grown-up themes became acceptable in films for kids, present even in the background of otherwise light-hearted narratives. There is mental disability and drowning in The Wizard, a young boy’s death in My Girl, child neglect and panic attacks in North. Even the slapstick comedy of Home Alone relied on the premise of a young child being accidentally abandoned (and then finding elaborate ways to torture would-be burglars). Some movies for children always had an edge to them—Savannah Smiles was an early favorite of mine, with its “happy” kidnapping of a young girl, and the 1980s also saw The Last Unicorn with its murderous red bull. But Labyrinth, more than any other film, seemed to greenlight the grotesque childhood.

Nowhere is this vision more present than in the works of the Mexican director Alfonso Cuarón. His first English-language film was for children: 1995’s A Little Princess. Cuarón’s adaptation of Frances Hodgson Burnett’s book is lush, aching, and deeply lonely. The poverty and hunger here feels very real, and the antagonist Miss Minchin is a borderline sadist who delights in the misfortune of the film’s heroine, Sara Crewe. In one memorable scene, Sara places a white rose through a neighbor’s barred door, her only way to reach out.

Cuarón has alternated grownup films with kids’ fare, helming what many consider the best of the Potter films, Harry Potter and the Prisoner of Azkaban—and was J.K. Rowling’s top choice for a director. Rowling writes in a lineage seemingly straight from Henson with her child characters in constant, magical peril, battling multi-headed dogs and basilisks, Death Eaters, and the soul-split, snake-faced Voldemort. While still very young, her characters learn of the worst that can happen; they experience it themselves. It’s fitting then, that Rowling, whose Harry Potter novels are the best-selling book series in history, won the inaugural Henson Award in 2005 for “reflect[ing] the core values and philosophy of Jim Henson and the company he founded.”

With Labyrinth, perhaps Henson was reminding us: This is where we come from. This is the origin of our nights and night-fearing stories. Thirty years later, the complex and confusing Labyrinth doesn’t feel edgy as much as classic. It’s not an advance so much as a return. Childhood has been this way forever: wonderful and hard and full of horror. Labyrinth just helps us remember what, deep down, in the dark, we’ve always known.