As a child, everything is magical. The wind can whisper messages. There is no question but that you are special and magical, and very likely, a lost prince or princess from some far-off land. And that monster under your bed: He is most definitely real.

As we grow, that magic slips away until the shadows of a tree branch lose their malevolence completely. But for a few years, perhaps between 10 and 13, just before the vicious superciliousness of puberty and its sex-obsessed talons take hold, we live in a world of magic and mystery, even as we are aware that we should not.

“Coraline,” the new film from stop-motion animation auteur Henry Selick (“The Nightmare Before Christmas”), tells the story of a lonely girl struggling to find her identity in a crushing world of monotony. Her parents neglect her, her neighbors are delusional weirdos and the only other kid in town is a yammering goth with no sense when to shut up. Everything changes when Coraline finds a door hidden behind the wallpaper and discovers a world of whimsy where button-eyed versions of her parents dote on her, magic is real and every silver lining carries a black cloud.

Make no mistake, “Coraline” is a scary movie. Despite the PG rating, it is hard for me to imagine a more effective thriller. In many ways, this is perhaps the best English-language horror film since Neil Marshall’s utterly terrifying cave-exploring masterpiece, “The Descent.” It is strong, angular, and surprisingly moving.

Instead of settling for simple, binary clichés of good versus evil, the filmmakers dare to give younger viewers a modicum of space to interpret what they are seeing. And what’s more, the film leaves the viewer with things to think about and real emotional elements to mull over. And not once does someone stop to explain the plot or assure the audience that everything will be all right.

The script, based on the novel by fantasy master Neil Gaiman, doesn’t soften the edges or make hard issues easy. There are dead children, broken homes, terrifying monsters and moments of absolutely transcendental beauty.

Though the film occasionally veers too close to Gaiman’s last feature adaptation, “Stardust,” it successfully navigates around the obvious and finds a way to make its “Wizard of Oz”-inspired structure feel fresh.

Coraline herself is a figure of wonder. Her characterization is spot on, and the voice acting (courtesy of Dakota Fanning) is realistic, layered and subtle. Her melancholy is believable and her joy is infectious.

And then there is the animation. Wow. I have never seen more gorgeous stop-motion work in my life. There are long point-of-view shots, spinning camera movements, a jaw-dropping trapeze and burlesque act and wonderful, fluid facial movements. The characters, many of whom appear to have been inspired by the inventive, macabre work of R. Crumb, each move with a distinct, individual pattern. And the various, often-gooey monsters feel legitimately intimidating.

It’s been a long time since I last saw a children’s movie with such an acute understanding of what it is to be a child. “Coraline” takes the best elements of the Brother’s Grimm fables, mixes them with vibrant animation and ties it all together with strong characters and fantastic imagery to make a film that is not only worth taking children to, but also demanding of a viewing even without them. It’s nothing short of magical.