Media playback is unsupported on your device Media caption Some Chinese views of Donald Trump

He may have won at home, but on the level where great nations contend, President-elect Trump's campaign slogan "Make America Great Again" now goes head to head with China's favourite catchphrases, the great rejuvenation of the Chinese nation and the China dream.

At precisely the moment Mr Trump was giving his victory speech, Chinese TV channels were running extensive coverage of a space mission and President Xi even chose US results day to talk to China's astronauts by satellite link.

It was hard to escape the sense that this was his version of the John F Kennedy "we choose to go to the Moon" moment, a message to remind his public that whatever is going on elsewhere in the world, the narrative of rising Chinese might is on course.

Image copyright AFP Image caption China's space ambitions underline its rising global power

In private, President Xi is probably celebrating a win in the US too.

As I and many others have noted before, the American election race has been a gift to the Chinese Communist Party. In a giant one-party state which enjoys no public discussion of the strengths and weaknesses of its own system, the United States has often been the unspoken benchmark of all that is most materially, culturally and politically advanced.

It's no accident that President Xi's China dream slogan echoes the American dream. For a rising superpower, the United States is the nation to beat.

Over recent years, Chinese commentators have often said that American wars in Afghanistan and Iraq damaged Chinese faith that the US could be trusted to lead on the world's geopolitics, and that the 2008 financial crisis damaged Chinese faith that the US could be trusted to lead on the global economy.

Now a bitter and scandal-ridden presidential race has damaged Chinese confidence that Americans can be trusted to run themselves.

Image copyright Reuters Image caption Beijing is unclear about the president-elect's policy towards China

Although the Chinese government has been careful to avoid direct comment on the candidates or the campaign, its tightly-controlled media have given full play to the rancour and division of the race. The president-elect has repeatedly echoed Beijing's argument that the American system is rigged in favour of moneyed elites.

And Chinese media have discussed at length the experience and meritocratic advance of public servants in their own one-party pyramid as a comment on shallow demagogues in electoral democracies.

For a nation which within living memory has suffered civil war and the terrors of the fanatical Cultural Revolution, the bitterness of the US campaign has tarnished any fairytale that American democracy once represented.

But on the president-elect himself, the public view is mixed.

Many Chinese admire Mr Trump as a businessman, a straight talker and an outsider. If in four years from now, he has "made America great again", then the political system which produced him will regain some credibility.

But if the team behind "the China Dream" are making the Chinese public rich, sending rockets to Mars and dominating Asia, then 9 November 2016 may mark the moment when China left the American Dream behind forever.

Image copyright EPA Image caption Donald Trump's slogans resonate with many China

And in the meantime, the Chinese government has to come to terms with a US president who has no track record, no known team and no concrete China policy.

We'll get along great with China, said Mr Trump on the campaign trail. But he also said: "They come in, they take our jobs, they make a fortune. We are living through the greatest jobs theft in the history of the world."

And occasionally he also seemed to find a middle way.

"I have done great deals in China. China is wonderful. I'm not angry at China. I'm angry at our people for allowing them to get away with this... China is wonderful, but they are getting away with murder."

As part of Mr Trump's promise to "Make America Great Again" he's often said the US must "win" in its economic relations with China.

But over the past four decades, the leaders of the Chinese Communist Party have learned to take US campaign promises with a pinch of salt.

They've watched many American presidents come and go, making fierce threats against China on the campaign trail, and then quietly returning to a policy of engagement after their first few months in office.

At a time when China's economic growth is faltering, access to US markets remains vital and protectionism from an incoming Trump administration would alarm Beijing.

But its trade negotiators have had many months to game every possible Trump move on tariffs, market access or exchange rates. And Beijing will have logged that many of the long-time Asia experts in the Republican Party have already ruled out working for a Trump presidency. When it comes to fighting Mr Trump's economic game, Beijing will be ready for him.

It may also calculate that trade is a game in which it can afford to give Mr Trump some wins in exchange for its own coveted wins in the great game of geopolitics in Asia.

Image copyright Reuters Image caption Chinese claims to almost all of the South China Sea could provide the spark for conflict

This is where Mr Trump represents opportunity for China. On the campaign trail, the president-elect sounded much cooler on US commitments in Asia than his rival.

He was fiercely hostile to the economic dimension of the Obama administration's effort to pivot to Asia.

And even in the military dimension, Mr Trump has said that longstanding US allies like Japan and South Korea should pay more to maintain a US military presence.

Critics in the region warn that any increase in US isolationism or protectionism, or any grand bargain with Beijing, will make Taiwan and the South China Sea vulnerable, and diminish American leadership in Asia at a time when states like the Philippines, Malaysia and Thailand are all calculating where their strategic interests lie.

China's geostrategists will now hope that a Trump presidency plays into their ambitious plans to diminish American power and remake the map of Asia. They may well be right.