With Japan I don't think they beat Germany and Spain many times if they play the same games again. Germany missed so many chances, Japan had that one bad miss from the rebound, a good goal and the incredible second goal in the sense that the German right back plays Asano inside, and the finish has such a small window to beat Neuer. So many things went in their favour, even more so than the close decision against Spain who created much less.
They made their own luck of course but they happened to score in their windows of higher intensity and were poor against Costa Rica. They have a chance against Croatia but at times against Spain they were physically dominated and eased off the ball whenever they got possession. Tbh I thought they were pretty bad in the first half and didn't see the win coming at all.
Would have been interesting to see what Spain would do if they had a real chance of going out had Germany racked up the score or Costa Rica won.