A $400 gaming PC won't run all modern games well. You will need atleast $700 to run most modern games.
Here is a nice $500 gaming PC (without OS, monitor, keyboard, mouse, or optical drive) that will be able to run most games pretty well:
http://pcpartpicker.com/p/v3WwQ7