Updated CSS for better layout and behavior