* {
  margin: 0;
  padding: 0;
  font-family: "Popins", sans-serif;
  box-sizing: border-box;
}

body {
  background-color: #222;
}

.card {
  width: 90%;
  max-width: 470px;
  background: linear-gradient(140deg, hsla(119, 67%, 53%, 0.584), hsla(296, 56%, 57%, 0.692));
  color: #fff;
  margin: 100px auto 0;
  border-radius: 20px;
  padding: 40px 35px;
  text-align: center;
}

.search {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search input {
  border: 0;
  outline: 0;
  background: hsla(120, 1%, 77%, 0.824);
  color: #ffffff;
  padding: 8px 25px;
  height: 50px;
  border-radius: 30px;
  flex: 1;
  margin-right: 16px;
  font-size: 18px;
  transition: background-color 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
   transition: all .7s ease-in-out;
}

.search input:hover {
  background-color: hsla(120, 1%, 77%, 0.9);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.search input:focus {
  background-color: hsla(120, 1%, 77%, 1);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  transform: scale(1.05);
}

.search input:active {
  background-color: hsla(120, 1%, 77%, 0.8);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
}

.search button {
  border: 0;
  outline: 0;
  background: hsla(120, 1%, 77%, 0.824);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: background-color 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.search button:hover {
  background-color: hsla(120, 1%, 77%, 0.9);
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.search button img {
  width: 16px;
}

.weather-icon {
  width: 170px;
  margin-top: 30px;
}

.weather h1 {
  font-size: 80px;
  font-weight: 500;
}

.weather h2 {
  font-size: 45px;
  font-weight: 400;
  margin-top: -10px;
}

.details {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  margin-top: 50px;
}

.col {
  display: flex;
  align-items: center;
  text-align: left;
}

.col img {
  width: 40px;
  margin-right: 10px;
}

.humidity,
.wind {
  font-size: 20px;
  margin-top: -6px;
}

.weather {
  display: none;
}

.error {
  text-align: left;
  margin-left: 10px;
  font-size: 14px;
  margin-top: 10px;
  display: none;
  color: red;
}

/* Media Queries */

/* Small screens (less than 768px) */
@media (max-width: 768px) {
  .card {
    padding: 20px 20px;
  }
  .search input {
    padding: 10px 15px;
    font-size: 16px;
  }
  .search button {
    width: 40px;
    height: 40px;
  }
  .weather-icon {
    width: 120px;
  }
  .weather h1 {
    font-size: 60px;
  }
  .weather h2 {
    font-size: 30px;
  }
  .details {
    padding: 0 10px;
  }
  .col img {
    width: 30px;
  }
  .humidity,
  .wind {
    font-size: 16px;
  }
}

/* Extra small screens (less than 480px) */
@media (max-width: 480px) {
  .card {
    padding: 10px 10px;
  }
  .search input {
    padding: 5px 10px;
    font-size: 14px;
  }
  .search button {
    width: 30px;
    height: 30px;
  }
  .weather-icon {
    width: 80px;
  }
  .weather h1 {
    font-size: 40px;
  }
  .weather h2 {
    font-size: 20px;
  }
  .details {
    padding: 0 5px;
  }
  .col img {
    width: 20px;
  }
  .humidity,
  .wind {
    font-size: 12px;
  }
}