0: if/when/unless + present simple . If/when you study harder, you get better marks.(present simple)
I can't drive unless i've got my glasses. (modal + base form)
1: if/unless + present simple. If she cracks the code, she'll undestand the message (future simple), If the website isn't reliable, don't buy anything (imperative), If you forget the password, you can't get into your e-mail (modal+base form).
2: if/unless +past simple. If I had more time, i would crack this code. (would + base form), If he applied for the job, he might get it. (could/might + Base form).
3: if + past perfect simple. If he had worn a disguise, the enemy wouldn't have recognised him (would have + past participle), If I had taken the underground, I might have arrived on time. (Could/might have + past participle)