After doing some reading on the Soviet War In Afghanistan, it seems that the Soviets were indiscriminately killing civilians. They shelled villages, burned people alive, maimed children with toy shaped grenades, etc. By the end of the war, it is estimated that at least 1,000,000 Afghan civilians were killed. Can this be considered an act of genocide?
That seems a very lurid account. Civilian casualties are all too common in war, especially such bitter and protracted civil conflicts complicated by foreign involvement.
The UN definition of genocide presupposes "intent to destroy, in whole or in part, a national, ethnical, racial or religious group, as such". The Soviet purpose in Afghanistan wasn't to wipe out Afghans, it was to support one side in a civil war. It was a very brutal conflict on both sides, but that doesn't make it genocide.
And you seem to assume that all of the dead were fault of the Soviet forces. Anyone who recalls the violence by rival Mujahidin factions after their departure will know that's not so. (Things were so bad that many welcomed the Taliban as restorers of peace - that says a lot.) Not only rebels but Afghan government forces were also party to the conflict.
The death toll itself seems suspect, based as it seems to be on surveys conducted in refugee camps whose occupants were by definition more likely have been close to violence.
It was a horrible, brutal conflict that the USSR should never have become entangled in. But to accuse it of genocide would be to stretch the concept far beyond its meaning.