(CNN) Just when it seemed that the election could not get any crazier, it has.

A month ago, it seemed that the Democrats were sitting pretty. Republicans were in disarray. All the talk revolved around a contested convention in Cleveland as Sen. Ted Cruz kept winning delegates in state conventions who would vote for him on the second round. The #Never Trump Movement was gaining steam as prominent members of the GOP announced that they would not be able to support the New York billionaire's candidacy.

In contrast, the Democrats had themselves an apparently solid nominee. After a series of strong wins, including in New York and Pennsylvania, it looked like Hillary Clinton would finally bring her competition with Bernie Sanders to an end. Clinton, it appeared, was poised to run a campaign that could replicate the events of 1964 when Lyndon Johnson trounced Barry Goldwater in a landslide victory that produced huge liberal majorities in the House and Senate.

Yet only a few weeks later, the story looks very different. Now it is the Democrats who are struggling through some fierce internecine divisions. Sanders' attacks have intensified in recent weeks. He has raised the volume of his comments about Clinton and charged that the entire nomination process has been problematic and unfair. His supporters have flooded the airwaves to complain about the superdelegates, while Sanders announced he would support Democratic National Committee Chairwoman Debbie Wasserman Schultz's primary opponent given her alleged favoritism toward Clinton. Sanders warned that the convention could be "messy," adding, "Democracy is not always nice and gentle."

Trump clinches

On the GOP side, Donald Trump has clinched the nomination by reaching the required number of 1,237 convention delegates. Republicans are uniting around him. The Never Trump Movement has vanished almost as quickly as it started. House Speaker Paul Ryan, who began with some harsh words about Trump, mellowed soon after the two had their meeting on Capitol Hill.

While there are some Republicans like Mitt Romney who are still standing firm in their opposition, a significant number of prominent Republicans, including Senate Majority Leader Mitch McConnell, have announced their support.

Even Sen. Lindsey Graham, who was extremely harsh about Trump in recent weeks, allegedly told donors to stand behind their nominee (Graham disputed the account). Republican mega-donor Sheldon Adelson penned an op-ed proclaiming that Trump was the Republican candidate and thus his man.

Most ominously for Democrats, a number of recent polls are showing the gap between Clinton and Trump has been shrinking, with Trump actually taking the lead in some of them. "As we near the close of the primary season, Hillary Clinton has somehow succeeded in turning the election into a close contest that she could conceivably lose," wrote Thomas Edsall in The New York Times. What's going on? How and why did the situation change so dramatically within such a short period?

For Democrats, a battle on the issues

For Democrats, those who were hoping the tensions between Sanders and Clinton would dissipate greatly underestimated how serious the tensions are between Sanders, his supporters and the Clinton campaign.

The energy that has been moving his candidacy is much more than a cult of personality or a quixotic hope for socialism in America. Sanders and many of his supporters have been motivated by a principled argument about the problems with the Democratic Party and American politics.

In their minds, Hillary Clinton — and her husband — are symbols and leaders of a damaging development that has taken place since the 1970s. They argue that since Ronald Reagan was President, the Democratic Party decided to embrace the basic arguments of the conservative movement.

Democrats, they say, started to champion free markets, deregulation, nonunionized workplaces and a militaristic approach to foreign policy. As Democratic candidates catered to wealthier suburban voters, they left behind working-class Americans, unions, African-Americans, the poor and other disadvantaged groups.

JUST WATCHED Why California matters ... for the Dems at least Replay More Videos ... MUST WATCH Why California matters ... for the Dems at least 02:38

Democrats, according to the Sanders campaign, have also agreed to work in a campaign finance system that ensures wealthier Americans as well as business and financial institutions will always win out in debates over public policy. Voters thus face a choice between Tweedledee and Tweedledum. Unless progressive forces fight for fundamental change, each election will involve a pragmatic decision that leaves the underlying status quo in place, they argue. The 2016 primaries are thus a battle for the soul of the Democratic Party and the future of American politics.

The fact that Hillary Clinton has continued to lose primaries and caucuses to Sanders fuels this narrative, that somehow even the Democratic Party's nomination process is also corrupt. When you have a debate that revolves so much around fundamental principles it is difficult to persuade your opponent to gracefully concede. It is unlikely that this is going to happen. Not only does this force Clinton to keep focusing on the primaries, rather than Trump, but the ongoing attacks on her keep hurting her standing and image in the polls.

Trump said Thursday that "Bernie has given me some great lines" to use against her. Polls are now showing that the June 7 primary in California is neck and neck, and a loss there would be a huge blow to Clinton's campaign, even if she could have enough votes to win the nomination at the convention in Philadelphia, given support from superdelegates. The State Department Inspector General's report on Clinton's email provides more fodder for Trump in his attacks on "Crooked Hillary" with the imprimatur of a nonpartisan body.

Trump and Sanders have even traded challenges to debate each other, at a time when Clinton has opted not to engage in a debate with Sanders before the California vote.

GOP focus on personality

In contrast, much of the Republican party's primary battle over Donald Trump was more about personality than policy. To be sure, Trump's eclectic and unorthodox agenda has caused considerable consternation among many Republicans. The fact that he rejects reform of Social Security and Medicare doesn't sit well with many fiscal hawks, including Ryan.

Trump has lashed out against the free trade principles that Republican economists have been espousing. To have your front-runner support a higher minimum wage and agree that, at least sometimes, tax increases could be necessary is to utter words that are antithetical to what the party has been fighting for since Reagan.

Yet much of the real concern stemmed from who he was, not what he said. The truth is that his statements have been all over the place, other than his harsh stand toward immigrants, so Republicans can find reason to believe he might not be that serious about anything.

While Trump has said that some tax increases are acceptable, overall he remains an adherent of the supply side approach to the economy. Although he has argued that Planned Parenthood does good things for women, he has made some very tough statements against abortion.

Trump has also been increasingly shifting to the right in recent months. As a savvy political figure, he understands that his best bet as president would be to work closely with the party that brought him to the dance. And his harshest words, about immigrants and the need to build walls to stop them, have strong support in many parts of the GOP.

What has rubbed them the wrong way is who he is and what he says about the party. His crass mannerisms and harsh rhetoric don't make the party look serious. To have a bombastic television star at the head of the party ticket can make the GOP look silly, not like the party of governance.

With one party's civil war about personality and the other about principle, it is not that surprising that the Democrat Party fight is lasting longer than expected, and the Republicans battles are dying down. Julian Zelizer

But the reality is that the forces of partisanship are incredibly strong, particularly on the Republican side. It is difficult to dislodge voters in this day and age, as polls are showing. There are also many parts of the electorate in red states that are excited about Trump, and legislators are seeing this reality in the polls. This, combined with the intense antipathy toward Clinton and Barack Obama, has been enough to dampen the concerns that exist about Trump as a person.

If the Republicans see a winner, many are willing to line up behind whoever can bring them the White House even if they may find Trump's personality distasteful.

With one party's civil war about personality and the other about principle, it is not that surprising the Democrat Party fight is lasting longer than expected, and the Republican battles are dying down. This should cause concern for Democrats who might be looking at two more months, at a minimum, of bitter infighting, unless Clinton can find a way to win over Sanders supporters. While the Republican convention in Cleveland, once predicted to be a disorderly free-for-all, is looking more and more like it will be a well produced, sleek, televised coronation for the would-be king.