“Young people are taking over the Democratic Party, and that’s a very good thing,” the former Vermont governor said in an interview with Yahoo News’ “Bots & Ballots.”

“There’s a huge grassroots movement in this country run by people who are mostly under 35,” Dean said. “And they basically did all of the organization.”

That youth movement, according to Dean, puts the party in a much better position than the GOP.

“Republicans, I think, are going to have a terrible time because they’re getting older and whiter,” he said. “And that’s not the direction the country’s going in.”

Dean bristled at the notion that the younger crop of Democrats is pushing the party further left than some of his fellow older members are comfortable with.

“That’s complete crap,” Dean said. “This generation is much more inclusive than we are. They’re very progressive on gay rights and women’s rights. They care very deeply about immigration and inclusion and diversity. But they’re more conservative than we are about money. They also care less about ideology and more about the facts.”

Dean, who is credited for creating the archetype for the modern digital campaign when he ran for president in 2004, said Democrats failed to keep their eyes on the ball after Obama’s 2008 election victory — allowing the GOP to erase the party’s long-held tech advantage.

“The DNC fell apart — eight years of neglect and bad leadership,” Dean said. “And the Republicans got smart. Republicans may not be interested in democracy, but they’re not stupid. What they did was jump over us.”

“We’re way behind. Our tech is behind,” he continued. “There was a lot of infighting. The states had to fend for themselves. They developed their own way of doing things. And that just doesn’t really work. You really do need a centralized database. So while we’ve done everything right because young people have come in and taken over the functions from outside, we don’t have the tech thing down yet.”

Dean also said that Democrats need to spend more money on social media advertising than on television — something Republicans, and President Trump’s campaign in particular, did well.

“What we really need to do is what Republicans do and spend a lot more money on social media — which is very cheap — because it actually reaches more people,” Dean said. “Television is a tremendous waste of money.”

Looking ahead to 2020, Dean said he’d like the next Democratic nominee to “be under 55,” naming Sens. Chris Murphy, Kamala Harris, Kirsten Gillibrand and Cory Booker, Reps. Eric Swalwell and Seth Moulton, and Los Angeles Mayor Eric Garcetti on a long shortlist of possible candidates.

He stressed that Democrats need to find a candidate who can beat Trump — not, as some have suggested, a Trump-like candidate.

“He found a base that was more interested in electing an autocrat than they were in democracy,” Dean said. “I don’t find anything admirable about somebody who appeals to the worst in us, and that’s what he did.”

“I don’t think we should try to be like Donald Trump in order to beat Donald Trump,” he added. “I think we need to continue to use our brains and sense fairness.”

As for the GOP, Dean predicted a dire fate.

“The Republican Party has become Trump’s party. And I don’t respect Trump,” Dean said. “I don’t think he has any kind of moral constituency. And I think that’s important for raising children.”

He added, “I think the Republican party has been decimated by Trump. And it’s going to have to undergo incredibly painful changes. It may go even out of existence and be called something else.”