Lego posted a record profit in 2020 as pandemic lockdowns around the world left people whiling away their time indoors playing games and buying online, the Danish company said on Wednesday.

The unlisted family business registered a 19 percent rise in net profit to 9.9 billion kroner (1.3 billion euros, $1.6 billion), its biggest profit ever.

Sales jumped by 13 percent, to 43.7 billion kroner.

The maker of colourful plastic bricks said it had increased its global market share even though it was forced to temporarily close its plants in China and Mexico due to the pandemic, which led to higher supply costs.

Sales rose across the board, thanks to growing online shopping and a doubling of visits to its websites, as well as the opening of 134 stores, including 91 in China where the group intends to expand further.

Despite the rise in online sales, Lego, based in Billund in western Denmark, plans to open 120 new stores in 2021, including 80 in China.

In addition to its classic bricks, which remain among its most sold products, the company has in recent years moved strongly into areas such as video games, movies, cartoons and Legoland amusement parks.

Lego — a contraction of the Danish ‘Leg godt’ or ‘Play well’ — noted in particular the success of its Super Mario game collaboration with Nintendo launched in August, where players can build real life versions of 2D Super Mario levels.

After a vast restructuring in 2017, Lego turned its focus to multimedia games and sustainability.

While Lego’s iconic bricks are virtually unbreakable and reusable for generations, plastic is increasingly shunned due to the lasting harms its chemical components do to the planet. Lego has therefore vowed that its bricks will be 100 percent sustainable by 2030.

The company also aims for its manufacturing plants to be carbon neutral by 2022, and is gradually phasing out its plastic bags separating pieces and replacing them with recycled paper.