Inside Out is the first psychological thriller that's fun for the whole family. Really psychological. And really fun.

The central characters in Pixar's crazy-inventive animated adventure aren't talking toys, or cars, or monsters. They're emotions: Joy, Fear, Anger, Disgust, and Sadness, all jockeying for control in the "headquarters" of a pre-teen girl. That is, from the control room in her head.

Connected to HQ is a vast mindscape: a long-term memory area, "personality islands" built on core experiences, Imagination Land, and sectors dedicated to abstract thinking and the subconscious (it's spooky in there). Depending on where 11-year-old Riley (the voice of Kaitlyn Dias) finds herself, it can look like the inside of a pinball machine, or an amusement park, the set of a splashy Hollywood musical, or a trippy surrealist tableau.

Riley's parents (Diane Lane and Kyle MacLachlan) are picking up and moving from solid, suburban Minnesota to the decidely urban streets of San Francisco. Dad's got a new job. Mom's on the phone with the movers because their stuff has gone missing. And Riley's facing the dread and uncertainty of a new school in a new city. No friends. No idea where she fits in.

Luckily, she has Joy (Amy Poehler) running things - a perky, pixie-ish bundle of positivity. But as the pressure and anxiety mounts, Sadness (The Office's Phyllis Smith), a blue, bespectacled blob of woe, begins to exert her influence. When Joy and Sadness go off like Thelma and Louise on an urgent road trip across the byways of Riley's synapses, the ready-to-blow Anger (Lewis Black), the contemptuous Disgust (Mindy Kaling), and the quaking, shaking, bowtie-wearing Fear (Bill Hader) are left to push the buttons and turn the knobs.

Inside Out is the, um, brainchild of Pete Docter, the Pixar veteran behind the Oscar-winning Up, with its octogenarian hero and heartbreaking montage of a married couple's entire life. Sharing directing duty with Ronnie del Carmen and writing credits with Meg LeFauve and Josh Cooley, Docter and his gang have produced another gem, a boldly conceived film that refuses to follow box-office formula and doesn't condescend.

Are five-year-olds going to get the joke about non-objective fragmentation? Not likely. (Hey, can somebody tell me what that is?) But they're going to get what's going on with Riley, the conflicting feelings ricocheting around in her head.

And if Inside Out sometimes gets dark and scary (scary corners of the mind, scary corners of San Francisco), it's balanced with just the right mix of wit and whimsy, with a sense of the absurd.

Pivotal to the plot is an imaginary friend from Riley's toddler days, whom Joy and Sadness encounter while they're trekking through the recesses of their girl's memories. Its name is Bing Bong (the voice of Richard Kind) and it is made of pink cotton candy, with the trunk of an elephant, the tail of a cat and - Bing Bong proudly proclaims - the brains of a dolphin. Bing Bong gets to cry in the movie, and Inside Out gets a laugh when the creature starts to bawl.

How Docter and company pull off this feat is a testament to the nutty spirit at work - and at play.