Kohli smashed an unbeaten 82 runs off just 53 balls to help India beat Pakistan in the last ball of the game.