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

body {
  background: #dce6f0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.card {
  width: 90%;
  max-width: 400px;
  background: linear-gradient(135deg, #74ebd5, #acb6e5);
  border-radius: 20px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  color: #fff;
}

.search {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.search input {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 10px;
  outline: none;
  font-size: 16px;
  background: #ebfffc;
  color: #333;
}

.search button {
  background: #ebfffc;
  border: none;
  border-radius: 50%;
  width: 55px;
  height: 55px;
  cursor: pointer;
  transition: 0.3s;
}

.search button:hover {
  background: #d6f9f4;
}

.search button img {
  width: 20px;
}

.weather {
  display: none;
}

.weather img.weather-icon {
  width: 120px;
  margin-bottom: 10px;
}

.weather h1 {
  font-size: 60px;
  margin: 10px 0;
}

.weather h2 {
  font-size: 30px;
  font-weight: 400;
  margin-bottom: 5px;
}

.weather .description {
  font-size: 16px;
  color: #fff;
  margin-bottom: 5px;
}

.weather .date,
.weather .time {
  font-size: 14px;
  color: #fff;
  opacity: 0.9;
  margin-bottom: 6px;
}

.loader {
  display: none;
  margin-top: 20px;
  text-align: center;
  color: #fff;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.5);
  border-top: 4px solid #0078ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error {
  display: none;
  color: #ffdddd;
  font-weight: 500;
  margin-top: 10px;
  background: rgba(255, 0, 0, 0.3);
  padding: 5px;
  border-radius: 10px;
}

.details {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
}

.col {
  display: flex;
  align-items: center;
  gap: 5px;
}

.col img {
  width: 30px;
}

.humidity,
.wind {
  font-size: 18px;
  font-weight: 500;
}

.sun-info {
  display: flex;
  justify-content: space-around;
  margin-top: 15px;
}

.sun {
  display: flex;
  align-items: center;
  gap: 5px;
}

.sun img {
  width: 30px;
}

.sun p {
  font-size: 14px;
}
