Inside Erin Morgenstern's head is a lush, fantastic world, one with bonfires and candles, ice sculptures and clocks, moonlight on snow, fortunetellers and contortionists, velvet gowns and disappearing umbrellas.

This world appeared to her fully formed, she says, while she was laboring on a manuscript that was going nowhere. "I had been writing this vague, Edward Gorey-inspired thing that had men in fur coats being mysterious, and that's essentially all that was going on, for pages and pages and pages," she said. "I needed to do something different, and so I sent the characters to the circus."

When she did, "It just appeared in my head, this traveling carnival idea." But seeing it and writing it down are two very different things, and it took her five more years to get the circus onto paper -- to make it, as she says, "book-shaped." In the end, it was not just book-shaped, it was a book -- a best-selling book.

"The Night Circus," which tick-tocks between the 1890s and the early 1900s and between Europe and the United States, is the story of Celia and Marco, two magicians who are forced into a lifelong competition and end up falling in love.

Now out in paperback, it has been an enormous success, reaching the bestseller lists of the New York Times (where it stayed for seven weeks), USA Today, the Wall Street Journal and Publishers Weekly. It was translated into more than 30 languages and won the 2011 Alex Award from the American Library Association, which honors a book for adults that crosses over to a young-adult audience. The Washington Post compared it to Steven Millhauser's Pulitzer Prize-winning "Martin Dressler"; other critics called it enchanting and spellbinding, fantastically imagined, exquisite and dreamlike.

But, oh, it was agony to write. For years, Morgenstern had only a few, thinly sketched characters. She had no plot. All she had was this vivid, mysterious world.

A deep love of fantasy

Morgenstern, 34, grew up in Marshfield, Mass., the daughter of an elementary school teacher and an accountant. Her sister was nearly six years younger, and young Erin spent a lot of time alone, wandering the woods behind the house ("horror movie-looking woods," she said), daydreaming and reading. Her favorite books were romantic fantasies -- Zilpha Keatley Snyder's "The Velvet Room" and "The Egypt Game," and Beatrice Gormley's "Mail-Order Wings," about a girl who sees an ad in a comic book for a pair of wings, buys them and flies away.

"That was the kind of thing that really captured my imagination: almost fantasy, but real-world," Morgenstern said.

She was not a writer, early on; in high school, when she wasn't watching lush Merchant-Ivory period dramas on DVD, she was busy with the theater: "It's like playing dress-up, but doing it in public."

All of this eventually made its way into "The Night Circus" -- the real-world fantasy, the exquisiteness of period films, the black-and-white color scheme (with a dash of red) of a play she produced at school.

At Smith College, where she majored in theater, she took two semesters of lighting design. "For class, I kept a lighting journal, observations about light in everyday life and how it affects mood." Those lessons stayed with her, and illumination in "The Night Circus," is always dramatic: candles, bonfires, the moon.

A novel in a month?

After college, Morgenstern drifted. She got married (she is now divorced), moved to Salem, Mass., worked a series of "very generic office jobs," spent her time painting and writing, finishing nothing.

It was NaNoWriMo that got her going. National Novel Writers Month is an annual Internet-based project in which participants attempt to write a novel during the month of November; to earn a badge (the only reward), they must write 50,000 words in 30 days.

"It was great for me," Morgenstern said. "I had done a little bit of play-writing in college, but I didn't really finish anything.

"National Novel Writing Month was a great tool for me. I'd write that page and still hate it, and then I'd have to write another."

Writing "The Night Circus" took much longer than a month. When the next November rolled around, she was still working on it, and the November after that, as well. "I had that thing where places and entire worlds appeared in my head, and I was trying to figure out how to make it story-shaped."

Eventually, she sent her big sprawling manuscript to agents, "and then I got lots of rejections because, of course, it had no plot."

In 2009, she took part in NanNoWriMo again, but this time she worked on an entirely different book. "The Night Circus" -- still unfocused, unplotted and untitled -- had been stuffed into a drawer.

"And then I pulled it back out in January and spent the winter and spring of 2010 rewriting the entire thing," she said. "That's when the competition [between magicians Celia and Marco] was added. I had kind of thought that the real appeal was the circus and the atmosphere because that was what I was most comfortable doing. I didn't think character or plot was my strong suit."

She resubmitted the book, and this time all of the agents who had rejected her the first time clamored to sign her. She chose one, and began work on his suggested revisions.

"I sent it back again at the end of the summer, and I was getting good at this whole revising thing," she said. "I was all excited to get more notes. And he said, 'Great job. I'm going to find you a publisher.'

"All I could think about was getting the story right. I'd worked so long trying to get it to the point where it was a story! I'd forgotten the purpose was to get it published." In the end, her book sold in a bidding war for a six-figure advance.

Life-changing success

On Halloween 2010, Morgenstern was milling around Salem when she struck up a conversation with a woman. "She was a psychic on her smoke break, and she was like, 'What do you do?' and I said, 'I'm a writer and I just sold my first book,' and she said, 'It's going to be big. It's going to be really big. It's going to be a movie. And it's going to have gorgeous cinematography.'"

The book's immediate and overwhelming success was a huge, unsettling surprise. Film rights were, indeed, optioned. Book tours went on and on, all over the United States, in England, in Canada. She was mobbed for interviews. Now when she wants a free day, she alerts her publicist.

"I don't know if it's changed me, but it's changed everything around me," she said. "It's a big adjustment. I keep waiting for things to calm down. So far, it isn't happening."

In November, Morgenstern is moving from Boston to New York City to be near her sister. She plans to hole up over the winter and work on her second novel, a sort of film-noir-flavored detective novel.

This time, she is not watching Merchant-Ivory movies and reading fantasy. She's watching 1940s films, reading Raymond Chandler and Dashiell Hammett, and "drinking a lot of classic cocktails, because it's book research."

She is confident that this second book won't be as hard to write as the first one.

"I know the characters. I have the world in my head. It's just a matter of getting it story-shaped."

Laurie Hertzel • 612-673-7302