Earthquakes are the brittle breaking of the lithosphere. There is no sharp boundary between the lithosphere and asthenosphere. The Earth gets gradually hotter as you go deeper, so the viscosity of rocks gradually gets smaller. On the other hand, the crust and mantle are different rock types.
Hope this helps!