So is the moon flat too?
No. As the light from the sun gets close to the earth it bends away.
This produces night when the sun is far enough away from a point.
The higher a thing is above the surface the further away it needs to be from the sun to be in the dark.
So if the moon is far enough away from the sun along the plane, then any light that would hit the moon is "pushed away" from the earths surface, and so non falls apon the moon. Thus lunar eclipse.