Basics of Thermodynamics and Phase Transitions in Complex In