Why upper atmosphere is very cold
Without having an atmposhere, I guess, our earth might have been as hot as moon's surface in the day time (above 100C) and as cold as the same at night. My question is why up in the atmosphere, especially in the cloud level (for example cirrus clouds consists of ice crystals) the air is very cold (like -40 or above). Why does the sunshine not heating these ice crystals? How the temperature is maintained at very low temperature in this level? Second question is what is the temperatue in the upper space, due to direct solar radiation (for example on a satellite orbiting earth, when it is exposed to direct sunlight?