The Ottoman Empire once ruled three continents, but its decline was long, complex, and filled with internal conflict.