Birds evolved from gliding four-legged dinosaurs