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

body {
  background-color: rgba(0, 0, 0, 0.658);
}

.card {
  width: 90%;
  max-width: 470px;
  background: linear-gradient(135deg, #00f6fe, #d334d8);
  color: #fff;
  margin: 6.5rem auto 0;
  border-radius: 20px;
  padding: 40px 35px;
  text-align: center;
}

.search {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.search input {
  border: 0;
  outline: 0;
  background: #ebfffc;
  color: #555;
  padding: 10px 25px;
  height: 60px;
  border-radius: 30px;
  flex: 1;
  min-width: 240px;
  font-size: 18px;
}

.search input::placeholder {
  font-family: 'Segoe UI', sans-serif;
}

.search button {
  height: 3.8rem;
  width: 3.8rem;
  border-radius: 50%;
  border: 0;
  outline: 0;
  background: #ebfffc;
  cursor: pointer;
}

.search button img {
  height: 2.5rem;
  width: 2.5rem;
}

.search button:hover {
  box-shadow: 0 0 0 3px black;
}

.weather-icon {
  height: 15rem;
  width: 15rem;
  margin: 7% auto;
  transition: transform 0.3s ease-in-out;
  cursor: pointer;
}

.weather-icon:hover {
  transform: rotateY(360deg);
}

.weather h1 {
  font-size: 5rem;
  font-weight: 400;
  margin-top: -2rem;
}

.weather h2 {
  font-size: 3rem;
  font-weight: 400;
  margin-top: -9px;
}

.details {
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  margin-top: 3rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.col {
  flex: 1 1 45%;
  display: flex;
  align-items: center;
  text-align: left;
  min-width: 150px;
}

.col img {
  height: 2rem;
}

.col .para-wrapper {
  margin-left: 0.7rem;
}

.perc,
.wind-speed {
  font-size: 1.6rem;
}

.name {
  margin-top: 0.2rem;
}

.weather {
  display: none;
}

.error {
  text-align: left;
  margin: 1rem;
  font-size: x-large;
  font-weight: 700;
  display: none;
}

/* ------------------ Responsive Media Queries ------------------ */
@media (max-width: 768px) {
  .card {
    padding: 30px 20px;
  }

  .weather h1 {
    font-size: 4rem;
  }

  .weather h2 {
    font-size: 2.5rem;
  }

  .weather-icon {
    height: 12rem;
    width: 12rem;
  }

  .perc,
  .wind-speed {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .search {
    flex-direction: column;
    gap: 12px;
  }

  .search input {
    width: 100%;
    font-size: 16px;
  }

  .search button {
    width: 60px;
    height: 60px;
  }

  .search button img {
    height: 2rem;
    width: 2rem;
  }

  .weather h1 {
    font-size: 3.2rem;
  }

  .weather h2 {
    font-size: 2rem;
  }

  .weather-icon {
    height: 10rem;
    width: 10rem;
  }

  .details {
    flex-direction: column;
    align-items: center;
  }

  .col {
    justify-content: center;
    text-align: center;
  }
}
