/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body Background */
body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
  background-size: 400% 400%;
  animation: gradientBG 12s ease infinite;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* Gradient animation */
@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Container */
.container {
  width: 90%;
  max-width: 450px;
  text-align: center;
}

/* Title */
.title {
  margin-bottom: 20px;
  font-size: 2.2rem;
  font-weight: 600;
  text-shadow: 0 0 20px rgba(255,255,255,0.6);
}

/* Search Box */
.search-box {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 25px;
}

.search-box input {
  padding: 12px;
  border: none;
  border-radius: 10px;
  width: 70%;
  font-size: 1rem;
  outline: none;
  background: rgba(255,255,255,0.2);
  color: #fff;
  backdrop-filter: blur(5px);
}

.search-box input::placeholder {
  color: #ddd;
}

.search-box button {
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  background: #ff9800;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.search-box button:hover {
  background: #ff5722;
  transform: scale(1.05);
}

/* Weather Card */
.weather-card {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
  animation: fadeIn 0.8s ease-in-out;
}

.weather-main {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 15px 0;
}

.weather-main img {
  width: 80px;
  height: 80px;
  animation: float 3s ease-in-out infinite;
}

.temp-box h3 {
  font-size: 2.5rem;
  margin-bottom: 5px;
}

.details {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
}

.detail-item span {
  font-size: 0.9rem;
  opacity: 0.8;
}

.detail-item p {
  font-size: 1.2rem;
  font-weight: 600;
}

/* Error */
.error {
  margin-top: 15px;
  color: #ff4d4d;
  font-weight: bold;
  font-size: 1.1rem;
}

/* Footer */
footer {
  margin-top: 25px;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Hidden */
.hidden { display: none; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
