How to Solve the Mirror Modifier Error In Blender 2.82? How to Solve the Mirror Modifier Error In Blender 2.82 ?

Hi guys I am now making the Zeta Gundam and I was creating a left leg of it.I was planning to make right leg with mirror modifier.So I moved all of origins in left leg into the cursor that's place at world origin to make sure that if i add mirror modifier, it will flip to became a right leg. But it doesn't work as I think. It only flip the foot to the right place but the rest parts of leg are flip into unusual sides. I changed the X,Y,Z in modifier but still doesn't work.As you can see in image,

leg flipped to top.

thigh and knee joint flipped to aside but

only foot flipped into right place.

Any idea or suggest to filp normally? Thank for the answer.
Press Ctrl + A to apply rotation, your rotations are wrong.