Lionel Messi played a central role as Argentina beat Costa Rica 3-0 on Monday to reach the quarter-finals of the Copa America.