1. It is okay for you to move and laugh now.

2. It is okay if you move and laugh now.
-------------------------
In sentence 1, 'It' refers to 'for you to move and laugh now'.
Is that right? What about in #2? Does 'It' refer to 'if you move and laugh now'? Or is 'it' the impersonal subject which means the situation or circumstances?

In both sentences, this is that impersonal "it" that is just used to start the sentence off. There is no other word or phrase that "it" refers to.

In sentence 1, "It" does not refer to "for you to move and laugh now." Instead, "It" serves as a placeholder subject known as an expletive. Expletive subjects are used in sentences for syntactic reasons or to introduce a clause. The actual subject of the sentence is the infinitive phrase "for you to move and laugh now."

So, if we were to rephrase sentence 1 without the expletive subject, it would be: "To move and laugh now is okay for you." Here, the subject is the infinitive phrase "To move and laugh now."

In sentence 2, "It" functions similarly as an expletive subject. "It" does not specifically refer to "if you move and laugh now" but rather serves as a placeholder subject for the whole clause "if you move and laugh now." The actual subject of the sentence is the entire condition or situation represented by the clause "if you move and laugh now."

Therefore, in both sentences, "It" is used as an impersonal subject representing the situation or circumstances, rather than directly referring to any specific part of the sentence.