Batik originated in Egypt and the Middle East and was brought to Indonesia where it developed into its most refined form. Batik involves applying wax to cloth to resist dye and creates distinctive patterns, and is traditionally done with cotton or silk. Indonesia has over 3000 unique dances representing its many ethnic groups and historical periods. Religious architecture from 8th-14th century Hindu-Buddhist kingdoms included ornate candi temples, though only 8 remain today from the original 400. The largest, Prambanan temple, became more extravagant over time.