The first birds inherited teeth and long, bony tails from their dinosaur ancestors, but some had developed horny, toothless beaks by the very Late Jurassic and short pygostyle tails by the Early Cretaceous. Mammals While the archosaurs and dinosaurs were becoming more dominant in the Triassic, the mammaliaform successors of the therapsids evolved into small, mainly nocturnal insectivores. This ecological role may have promoted the evolution of mammals, for example nocturnal life may have accelerated the development of endothermy ("warm-bloodedness") and hair or fur. By in the Early Jurassic there were animals that were very like today's mammals in a number of respects. Unfortunately, there is a gap in the fossil record throughout the Middle Jurassic. However, fossil teeth discovered in Madagascar indicate that the split between the lineage leading to monotremes and the one leading to other living mammals had occurred by . After dominating land vertebrate niches for about 150 Ma, the non-avian dinosaurs perished in the Cretaceous–Paleogene extinction event () along with many other groups of organisms. Mammals throughout the time of the dinosaurs had been restricted to a narrow range of taxa, sizes and shapes, but increased rapidly in size and diversity after the extinction, with bats taking to the air within 13 million years, and cetaceans to the sea within 15 million years. Flowering plants The first flowering plants appeared around 130 Ma. The 250,000 to 400,000 species of flowering plants outnumber all other ground plants combined, and are the dominant vegetation in most terrestrial ecosystems. There is fossil evidence that flowering plants diversified rapidly in the Early Cretaceous, from , and that their rise was associated with that of pollinating insects. Among modern flowering plants Magnolia are thought to be close to the common ancestor of the group. However, paleontologists have not succeeded in identifying the earliest stages in the evolution of flowering plants. Social insects The social insects are remarkable because the great majority of individuals in each colony are sterile. This appears contrary to basic concepts of evolution such as natural selection and the selfish gene. In fact, there are very few eusocial insect species: only 15 out of approximately 2,600 living families of insects contain eusocial species, and it seems that eusociality has evolved independently only 12 times among arthropods, although some eusocial lineages have diversified into several families. Nevertheless, social insects have been spectacularly successful; for example although ants and