| 
 | 1 | +body {  | 
 | 2 | +  margin: 0; /* Reset default margin */  | 
 | 3 | +  font-family: "Montserrat", sans-serif; /* Use Montserrat font for all text */  | 
 | 4 | +  background-color: #f7f7f7; /* Set light gray background color */  | 
 | 5 | +}  | 
 | 6 | + | 
 | 7 | +.container {  | 
 | 8 | +  max-width: 600px; /* Set maximum width of container */  | 
 | 9 | +  margin: 0 auto; /* Center container horizontally */  | 
 | 10 | +  padding: 20px; /* Add padding inside container */  | 
 | 11 | +  border-radius: 5px; /* Add rounded corners to container */  | 
 | 12 | +  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); /* Add shadow effect to container */  | 
 | 13 | +  background-color: #fff; /* Set white background color for container */  | 
 | 14 | +  margin-top: 50px; /* Add margin to the top of the container */  | 
 | 15 | +  text-align: center; /* Center align the content inside container */  | 
 | 16 | +}  | 
 | 17 | + | 
 | 18 | +form {  | 
 | 19 | +  display: flex; /* Use flexbox for layout */  | 
 | 20 | +  justify-content: center; /* Center children horizontally */  | 
 | 21 | +  align-items: center; /* Center children vertically */  | 
 | 22 | +  margin-bottom: 20px; /* Add margin to bottom */  | 
 | 23 | +}  | 
 | 24 | + | 
 | 25 | +form input[type="text"] {  | 
 | 26 | +  padding: 10px; /* Add padding to all sides */  | 
 | 27 | +  border: none; /* Remove border */  | 
 | 28 | +  border-radius: 5px; /* Add rounded corners */  | 
 | 29 | +  font-size: 18px; /* Set font size */  | 
 | 30 | +  width: 60%; /* Set width */  | 
 | 31 | +  outline: none; /* Remove outline */  | 
 | 32 | +}  | 
 | 33 | + | 
 | 34 | +form input[type="submit"] {  | 
 | 35 | +  background-color: #007bff; /* set background color for the submit button */  | 
 | 36 | +  color: #fff; /* set text color for the submit button */  | 
 | 37 | +  border: none; /* remove border from the submit button */  | 
 | 38 | +  padding: 10px 20px; /* set padding for the submit button */  | 
 | 39 | +  border-radius: 5px; /* set border radius for the submit button */  | 
 | 40 | +  font-size: 18px; /* set font size for the submit button text */  | 
 | 41 | +  cursor: pointer; /* change cursor to pointer on hover */  | 
 | 42 | +  outline: none; /* remove outline on focus */  | 
 | 43 | +  transition: background-color 0.3s ease; /* add transition effect for background color change */  | 
 | 44 | +}  | 
 | 45 | + | 
 | 46 | +form input[type="submit"]:hover {  | 
 | 47 | +  background-color: #0062cc; /* set background color on hover */  | 
 | 48 | +}  | 
 | 49 | + | 
 | 50 | +.icon {  | 
 | 51 | +  width: 100px; /* set width of the icon */  | 
 | 52 | +  height: 100px; /* set height of the icon */  | 
 | 53 | +  margin: 0 auto; /* center the icon horizontally */  | 
 | 54 | +  background-size: contain; /* scale the background image to fit within the container */  | 
 | 55 | +  background-repeat: no-repeat; /* prevent the background image from repeating */  | 
 | 56 | +  background-position: center center; /* center the background image within the container */  | 
 | 57 | +}  | 
 | 58 | + | 
 | 59 | +.temperature {  | 
 | 60 | +  font-size: 48px; /* set font size for the temperature display */  | 
 | 61 | +  font-weight: bold; /* set font weight for the temperature display */  | 
 | 62 | +  margin: 20px 0; /* add margin to the top and bottom of the temperature display */  | 
 | 63 | +}  | 
 | 64 | + | 
 | 65 | +.description {  | 
 | 66 | +  font-size: 24px; /* set font size for the weather description */  | 
 | 67 | +  margin-bottom: 20px; /* add margin to the bottom of the weather description */  | 
 | 68 | +}  | 
 | 69 | + | 
 | 70 | +.details {  | 
 | 71 | +  display: flex; /* set display property to flex */  | 
 | 72 | +  justify-content: center; /* center the child elements horizontally */  | 
 | 73 | +  align-items: center; /* center the child elements vertically */  | 
 | 74 | +  flex-wrap: wrap; /* allow the child elements to wrap onto a new line if needed */  | 
 | 75 | +}  | 
 | 76 | + | 
 | 77 | +.details > div {  | 
 | 78 | +  flex: 1; /* Use the remaining available space for each div */  | 
 | 79 | +  margin: 10px; /* Add margin around each div */  | 
 | 80 | +  padding: 20px; /* Add padding inside each div */  | 
 | 81 | +  background-color: #f1f1f1; /* Set background color for each div */  | 
 | 82 | +  border-radius: 5px; /* Round the corners of each div */  | 
 | 83 | +  text-align: center; /* Center the content horizontally */  | 
 | 84 | +  min-height: 45px; /* Set a minimum height for each div */  | 
 | 85 | +  align-items: center; /* Center the content vertically */  | 
 | 86 | +  justify-content: center; /* Center the content horizontally */  | 
 | 87 | +}  | 
 | 88 | + | 
 | 89 | +.details > div > h3 {  | 
 | 90 | +  margin-top: 0; /* Remove the top margin of the heading */  | 
 | 91 | +  font-size: 18px; /* Set the font size for the heading */  | 
 | 92 | +  font-weight: bold; /* Set the font weight for the heading */  | 
 | 93 | +}  | 
 | 94 | + | 
 | 95 | +.details > div > p {  | 
 | 96 | +  margin-bottom: 0; /* Remove the bottom margin of the paragraph */  | 
 | 97 | +  font-size: 16px; /* Set the font size for the paragraph */  | 
 | 98 | +}  | 
 | 99 | + | 
 | 100 | +.details > div > p:first-child {  | 
 | 101 | +  font-weight: bold; /* Set the font weight for the first paragraph */  | 
 | 102 | +}  | 
 | 103 | + | 
 | 104 | +.details > div > p:last-child {  | 
 | 105 | +  margin-top: 10px; /* Add margin to the top of the last paragraph */  | 
 | 106 | +}  | 
 | 107 | + | 
 | 108 | +@media (max-width: 768px) {  | 
 | 109 | +  form {  | 
 | 110 | +    flex-direction: column; /* Change the direction of the flex items to column */  | 
 | 111 | +  }  | 
 | 112 | + | 
 | 113 | +  form input[type="text"] {  | 
 | 114 | +    width: 100%; /* Set the width of the input field to 100% */  | 
 | 115 | +    margin-bottom: 10px; /* Add margin to the bottom of the input field */  | 
 | 116 | +  }  | 
 | 117 | +}  | 
0 commit comments