That happened in 41, the bombs were dropped in 45.
Hardly any civilians died at Pearl Harbor, it was a military target. Hundreds of thousands civilians died after U.S. launched the bombs.
This was not a proportional response to Pearl Harbor or any other attack by the Japanese. There was no need for nukes to "defend" yourselves. In fact the U.S. was one of the least impacted countries of WWII among the major powers.
Statements at the time by U.S. officials indicate this was deliberate aggression to show the power of the bomb to the world as not to challenge U.S. dominance.