Refactor and improve CSS styling