Updated css code and added input validation