Right? I always think of submarines as small and cramped, and while they are certainly cramped, they're not generally small. Lot of machinery goes into those beasts.
The very first sinking of a ship by a submarine occurred during the U.S. Civil War, in fact!
Both the Union and Confederacy operated submarines during the war.
The very first U.S. “submarine” was used during the Revolutionary War, but it was more of a one off novelty than a move forward in industrialized war like in the Civil War.
This also happened in conjunction with the rise of ironclads, with the first ironclad vs ironclad battle also occurring in the Civil War.
One of the key events that gave the United States the politically-charged push into the war was the sinking of the Lusitania, and it was done by a German u-boat.
Here's another weird one you didn't expect: Germans used zeppelins to bomb London.