I understand photon absorption/emission by electrons in atoms, that transition them between energy levels, producing sharp spectral lines. However, I am having difficulty understanding photon absorption/emission by the vibrational and rotational modes of molecules, with respect to black body radiation. In this case the spectrum is continuous, suggesting that the energy levels are all close together. What is it exactly within the molecules, that absorbs the photons? Is it: 1) The electrons again, this time with the same discrete energy levels, but broadened by the Doppler-shift of the vibrating/rotating molecules? 2) The electrons, with energy levels, unrelated to the atomic spectral lines? 3) Some other mechanism that doesn't directly involve electrons?