Phase transitions for the long-time behavior of interacting diffusions