The Democratic Party faced a situation on Tuesday that has traditionally been disastrous: a non-presidential election — and not just a midterm, but an off-year. The electorate at such times has usually been far whiter, older, and more Republican.

But the result this time was overwhelming Democratic victory across the country, from Virginia to Washington state. It's great news, especially given the vile race-baiting campaign that Virginia GOP gubernatorial candidate Ed Gillespie ran.

But Democrats can't just sit on their heels and ride the anti-Trump backlash. Being in power in a hideously unequal and fraying society is a great political danger. If they want to not only win, but then remain in power, they should cement their political footing and fix the problems afflicting the nation.

First of all, we should be clear that this victory was quite ideologically diverse. Centrists crowed at the victory of Northam, a moderate candidate who defeated more lefty Tom Perriello in the primary — and improved on Hillary Clinton's 2016 margin of victory in the state by 5 percentage points.

But downballot, the results were even more impressive. In District 50, Democratic Socialists of America member and Marine Corps veteran Lee Carter (who got no help from the party) won in the House of Delegates by 9 points — a swing of over26 points from 2015. In District 13, Danica Roem, an openly transgender woman, trounced Republican Bob Marshall (a 26-year incumbent who called himself Virginia's "chief homophobe" and introduced a bathroom bill) by almost 9 points — a swing of over 17 points. In District 12, Chris Hurst, a journalist and boyfriend of Alison Parker, a TV reporter who was shot to death on live television in 2015, ran a strongly pro-gun control campaign and won by 9 points — a swing of over 26 points.

Overall, Democrats ran far ahead of projections in the House of Delegates. Depending on the result of recounts in several extremely close races, they may actually take control of the chamber. In Washington state, they took control of the state senate, and in New Jersey, they won the governorship — giving the party two more states where they have full control of government. In Maine, a ballot initiative to take the ObamaCare expansion of Medicaid passed comfortably.

A few initial conclusions are safe to draw. First, about every competitive House of Delegates race showed a hugeincrease in turnout from the 2015 elections, while uncontested ones generally showed a smaller increase — a sort of reverse coattails effect that helped cement Northam's victory. Second, Virginia Gov. Terry McAullife's restoration of voting rights to over 150,000 ex-convicts also undoubtedly helped cement victory. Third, expanding Medicaid is popular.

Democrats should learn from this by contesting as many state and local elections as possible (ideally running attention-grabbing candidates) and immediately seizing any opportunity to shore up their political support by extending democratic liberties. Automatic voter registration, voting rights protections, and making D.C. and Puerto Rico states would simultaneously protect democracy while also electing a lot of Democrats. What's not to like?

More fundamentally, Democrats should recognize the high importance of fixing the deep problems in American society. In 2008, Democrats won a landslide victory on the strength of backlash against George W. Bush's disastrous failure of a presidency. They lost their House majority only two years later, because they did not solve the economic crisis.

Economic times are better now than they were in 2010. But they are not that much better; the Great Recession has not been remotely ended. ObamaCare, while an improvement, did not completely fix the health-care system — and things are getting worse. Inequality and monopoly power are not just boutique issues — they are experienced as brutal oppression by tens of millions of people every day, people who are struggling to get a decent job, or are buried under student loans or medical debt, or juggling child care and work, or simply being jacked around by the cable company.

Simply a return to the pre-Trump status quo is not going to be good enough. And an authoritarian successor who fills Trump's shoes might not be nearly so incompetent as he is. Democrats need to recognize that fundamental reform is needed if they want to keep power and preserve American democracy.