Refactor CSS for best practices