* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: #222;
}

.card {
  width: 90%;
  max-width: 470px;
  background: linear-gradient(135deg, #00feba, #5b548a);
  color: white;
  margin: 50px auto;
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
}

.search {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search input {
  flex: 1 1 60%;
  padding: 12px 20px;
  font-size: 18px;
  border: none;
  border-radius: 30px;
  outline: none;
  min-width: 120px;
}

.search button {
  flex: 1 1 30%;
  max-width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background: #ebfffc;
  cursor: pointer;
}

.search button img {
  width: 18px;
}

.weather-icon {
  margin-top: 20px;
  width: 170px;
}

.weather h1 {
  font-size: 45px;
  margin: -10px 0 10px;
}

.details {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.col {
  display: flex;
  align-items: center;
  gap: 10px;
}

.col img {
  width: 40px;
}

.humidity,
.wind {
  font-size: 28px;
}

.error {
  color: yellow;
  font-size: 14px;
  text-align: left;
  margin: 10px 0 0 5px;
  display: none;
}

.weather {
  display: none;
}

@media (max-width: 472px) {
  .search input {
    font-size: 16px;
    padding: 10px 15px;
    height: 50px;
  }

  .search button {
    width: 50px;
    height: 50px;
  }

  .weather-icon {
    width: 140px;
  }

  .weather h1 {
    font-size: 36px;
  }

  .humidity,
  .wind {
    font-size: 24px;
  }

  .details {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 380px) {
  .search input {
    font-size: 14px;
    padding: 8px 12px;
    height: 45px;
  }

  .search button {
    width: 45px;
    height: 57px;
  }

  .weather-icon {
    width: 120px;
  }

  .weather h1 {
    font-size: 28px;
  }

  .humidity,
  .wind {
    font-size: 20px;
  }
}

@media (max-width: 300px) {
  .card {
    padding: 20px 10px;
    margin: 20px auto;
  }

  .search {
    flex-direction: column;
    gap: 5px;
  }

  .search input, .search button {
    width: 100%;
    flex: unset;
  }

  .search button {
    width: 40px;
    height: 40px;
    border-radius: 50%; 
  }

  .search button img {
    width: 12px;
  }

  .weather-icon {
    width: 100px;
  }

  .weather h1 {
    font-size: 22px;
  }

  .details {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 15px;
  }

  .col img {
    width: 25px;
  }

  .humidity,
  .wind {
    font-size: 16px;
  }

  .error {
    font-size: 10px;
  }
}

