I am often confused about the usage of "it" and "that".
"Hey, why don't we go to the movies on Sunday?"
"It's a good idea." / "That's a good idea."
"Did you know John had a car accident yesterday?"
"I didn't know it." / "I didn't know that."
"You said you didn't like pizza."
"No, I didn't say it." / "No, I didn't say that."
In the cases above, which one should I use, it or that?
I heard that "it" generally refers to one word while "that" can refer to more than two words or a whole phrase, so I guess I should use "that" in all the three cases above. Am I correct? Isn't it possible to use "it" to refer to a phrase?