Refactor main.css to improve layout