So I know that endothermic reaction is taking in heat and exothermic reaction is heat going out. Plus, my understand of equilibrium is if one molecule contains too much heat, then it lets out some to the environment. If environment has more heat, then molecules absorbs some. However, it may not be the case. For example, N2+3H2-->2NH3+Heat
In the change in temperature, if temperature is increasing, then it's from right to left, and it's endothermic. BUT WHY?! First, when it says temperature is increasing, does it mean temperature in the molecule? If so, then molecule will give out heat to the environment, and thus exothermic,from left to right. It's very common sense. But I just don't get why it's the other way around.
Thank you.