BEIJING (BLOOMBERG) - For Linda Li, supporting her favourite boy band entails more than just buying music and attending concerts: She's also regularly posting nationalist pro-China slogans on social media.
The 19-year-old student is a mega-fan of the Chinese pop sensation TFBOYS, which in 2015 had a member attend a conference of "excellent youth" organised by the Communist Youth League - a party organisation that has produced top leaders like former President Hu Jintao.
Since then the band regularly attends party events, gets featured in state-run media and released a pop remake of the anthem "We are the Heirs of Communism" that includes a cameo from basketball star Yao Ming.
"The Communist Youth League has been using idols to appeal to young people and we know that," said Li, who attends college in Sydney, Australia.
"But for my idols to survive in the market and prosper, this is what they have to do. So we will comment patriotically under their posts."
The Communist Party's success in stoking nationalism among its youth is borne in part from years of finding ways to co-opt the nation's obsessive celebrity culture.
The strategy is among several the Chinese government has used to indoctrinate young people, helping power one of its most useful tools in shaping public opinion: an army of online warriors who help stoke nationalism at home, and cross the Great Firewall to post pro-China messages on platforms banned on the mainland.
Those efforts are now paying off as China comes under international scrutiny over its handling of pro-democracy protests in Hong Kong, mass detention of Muslims in Xinjiang and moves to punish the National Basketball Association along with companies that fail to adhere to Beijing's worldview.
But for Beijing, the strategy also carries risks backfiring if not properly handled.
"The party has worked hard to equate patriotism with support for the CCP, but there is always a risk that nationalist anger turns against the government for failing to serve the people's interests effectively," said Jessica Chen Weiss, an associate professor at Cornell University and author of "Powerful Patriots: Nationalist Protest in China's Foreign Relations".
Surveys show that younger generations are more hawkish but not necessarily more nationalistic, she said, adding: "They are less likely to say that China is superior to other countries, but more likely to support tough measures to combat foreign pressure."
Inspired by patriotic celebrities, young Chinese like Li are flooding Facebook, Twitter and Instagram with posts defending China against attacks and supporting those like Brooklyn Nets owner Joe Tsai, who wrote an open letter calling the Hong Kong protests "a separatist movement".
Some Chinese students have organised pro-China demonstrations on campuses in the US, UK, New Zealand, Australia and Germany.
"My patriotism has been greatly stirred up, and I can feel the patriotic enthusiasm of the Chinese people on Weibo," said 24-year-old Crystal Wang, who moved back to Beijing after six years in the US as a student.
Instagram took down her account with almost 35,000 followers after it said her pro-China posts went against guidelines, and restored it after reporters asked the company about her account.
"At least I feel safe at home. I felt nervous every day abroad."
For 20-year-old Jessie Sun, studying in California, it was the growing anti-China discourse in America that propelled her to write a statement defending her country's actions in Hong Kong. She pinned the note to a bulletin board at her school, where it was quickly torn down.
Sun hadn't thought much of the protests happening halfway around the world until she saw footage of a Chinese reporter tied to a luggage cart and assaulted by protesters.
The video had gone viral on WeChat, a messaging app that's the primary means for overseas Chinese to stay in touch with news from home.
After that, she began speaking out on social media and got into heated arguments with her peers from Hong Kong.
"They assumed that young people from the mainland are brainwashed, so there was no way for a rational discussion," said Sun.
"Loving your country isn't equivalent to supporting the government, but it's hard to differentiate between the two sometimes."
Sun, Li and the members of TFBOYS are all part of the same generation born after 1995, where school children are taught about China's "century of humiliation" at the hands of colonial powers. Under Xi, that propaganda has intensified, rallying the party and country behind the idea of the Chinese Dream.
In 2014, the Communist Youth League laid out a five-year plan to groom opinion leaders and online commentators that can be "owned and used" by the organisation.
The proposal also called for a new communication model that was more "attractive, appealing and influential".
Time Fengjun Entertainment, which manages TFBOYS, did not immediately respond to an e-mail sent to its business development department about its relationship with the Communist Youth League. The Communist Youth League did not immediately respond to a fax seeking comment.
To celebrate the 70th anniversary of Communist Party rule on Oct 1, China's top leaders ordered renewed focus on "patriotic education," emphasising a programme first enacted in 1994 and calling for "deep, lasting and vivid patriotic education among the young people".
Patriotic films featuring the accomplishments of ordinary Chinese made close to 5 billion yuan (S$970 million) at the box office over the holiday week.
China's leaders have seen rampant nationalism backfire before. In September 2012 - months before Xi took power - a wave of anti-Japanese protests broke out in major cities after Japan's government bought islands China claims are its territory. Protesters marched in the streets calling to expel Japanese from the country. Some turned violent, overturning Japanese cars, vandalising stores and assaulting civilians.
CONTAINED, FOR NOW
These days the Communist Party maintains better control over public opinion by using big data to detect and analyse sentiment, said Deng Yuwen, former deputy editor of the Study Times, a prominent Party journal.
"This empowers the party with a tool to mobilize public opinion and then precisely control it."
Government procurement notices show that agencies from the Public Security Ministry to the Jining Intermediate Court in Shandong all sought services from companies that help monitor public opinion online.
Still, the danger remains that emotions spiral out of control and spur anger at the government for failing to defend China's rights.
One of the biggest sticking points in trade negotiations with the US has been China's reluctance to accept anything that could be perceived as an "unequal treaty" reminiscent of those China signed with colonial powers.
As the two sides neared an agreement in May, some online commentators began comparing top negotiator Liu He to the Qing dynasty official who signed a much maligned treaty with Japan more than a century ago. Talks fell apart soon after.
In the case of the NBA, the government has taken steps to tone down its rhetoric. Authorities let an NBA pre-season game go ahead on Thursday amid the firestorm.
Hu Xijin, the prominent state media editor who has become China's biggest online advocate on Twitter, said on Weibo that there shouldn't be a "wave" of companies cutting ties with the organisation.
"The government under Xi Jinping has done an unprecedented job managing the nationalist rhetoric to suit their interests while preventing them from turning into real-life action," said Suisheng Zhao, executive director of the Center for China-US Cooperation at the University of Denver's Graduate School of International Studies.
Still, he said, "in the harsh environment of China-US relations, it is true that nationalism is being used by the government and, in some cases, holding the government hostage."