Elastic and inelastic O16+C12 rainbow scattering within the coupled-channels mechanism