Mirages are due to the fact that the index of refraction in hot air is considerably less than the index of refraction in cool air.

Because the air is denser closer to the surface, objects near the horizon appear much higher in the sky than they actually are. The sun is still visible after it sets, for example. For objects with as large an apparent size as the sun and moon, the bottom of the image "looms" higher than the top, so the circular disk appears squashed.

Individual molecules scatter higher frequencies of light with greater and greater intensity, so that the open sky appears blue. However, small particles scatter all frequencies of light with equal intensity, so that clouds of water drops appear white. Fog is just a cloud at ground level. Because when we view the setting sun or moon we view it through the densest part of the atmosphere, almost all higher frequencies are scattered out so we see only the lowest, reddest frequencies.

Lord Rayleigh (1842 - 1919)

Gustav Mie (1868 - 1957)

On Mars, the sky is pale pink, and the sunset or sunrise are blue! Why?