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

body {
  position: relative;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 15px;
  overflow: hidden;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('bg.jpg') no-repeat center center fixed;
  background-size: cover;
  z-index: -1;
}

.card {
  background: linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.15)),
              url('default-bg.jpg');
  background-size: cover;
  background-position: center;
  transition: background 0.5s ease-in-out;
  padding: 20px;
  border-radius: 20px;
  backdrop-filter: blur(15px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  text-align: center;
  width: 100%;
  max-width: 400px;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
  animation: fadeIn 1s ease-in-out;
}

.search {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.search input {
  flex: 1;
  padding: 10px 15px;
  border-radius: 25px;
  outline: none;
  font-size: 1rem;
  background: rgba(8, 0, 0, 0.2);
  color: #fafbf9;
  min-width: 0;
}

.search input::placeholder {
  color: rgba(246, 249, 246, 0.88);
}

.search button {
  background: rgba(16, 0, 0, 0.387);
  border: none;
  border-radius: 50%;
  padding: 10px;
  cursor: pointer;
  transition: 0.3s ease;
  flex-shrink: 0;
}

.search button:hover {
  background: rgba(255, 255, 255, 0.801);
}

.weather-icon {
  width: 100px;
  max-width: 40%;
  margin: 20px auto;
}

.temp {
  font-size: 2.5rem;
  font-weight: bold;
}

.city {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 20px;
}

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

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

.col img {
  width: 25px;
}

.humidity, .wind {
  font-size: 1rem;
  font-weight: bold;
}

.error {
  display: none;
  background: rgba(255, 0, 0, 0.2);
  color: #f20202;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.zeesu {
  color: rgba(249, 246, 246, 0.791);
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.9rem;
  text-align: center;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .temp {
    font-size: 2rem;
  }

  .city {
    font-size: 1.2rem;
  }

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

  .weather-icon {
    width: 80px;
  }
}
