/* Base Styles */
body {
  text-align: center;
  font-family: 'Arial', sans-serif;
  background: linear-gradient(to bottom, #e0f2fe, #bbe1fa);
  min-height: 100vh;
  margin: 0;
  padding-top: 50px;
  transition: background 0.8s ease, color 0.5s ease; 
}

input {
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 25px;
  outline: none;
  width: 200px;
  text-align: center;
}

button {
  padding: 12px 20px;
  cursor: pointer;
  font-size: 16px;
  background-color: #3182ce;
  color: white;
  border: none;
  border-radius: 25px;
  margin-left: 10px;
  transition: transform 0.2s;
}

button:hover {
  transform: scale(1.05);
}

#result {
  margin-top: 30px;
  font-size: 20px;
  background: rgba(255, 255, 255, 0.2);
  display: inline-block;
  padding: 20px 40px;
  border-radius: 15px;
  backdrop-filter: blur(5px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.temp {
  font-size: 35px;
  font-weight: bold;
  margin: 10px 0;
}

/* ==========================================
   DYNAMIC WEATHER BACKGROUNDS & EFFECTS 
   ========================================== */

/* ☀️ HOT / CLEAR WEATHER */
body.hot {
  background: linear-gradient(to bottom, #ff7e5f, #feb47b);
  color: #fff;
}

body.hot::before {
  content: "☀️";
  font-size: 100px;
  position: absolute;
  top: 20px;
  right: 40px;
  animation: spin 20s linear infinite;
}

/* ❄️ COLD / SNOW / CLOUDS */
body.cold {
  background: linear-gradient(to bottom, #757f9a, #d7dde8);
  color: #2c3e50;
}
body.cold::before {
  content: "☁️❄️";
  font-size: 80px;
  position: absolute;
  top: 20px;
  right: 40px;
  opacity: 0.7;
}

/* 🌧️ RAINY WEATHER */
body.rainy {
  background: linear-gradient(to bottom, #4b6cb7, #182848);
  color: #fff;
}
body.rainy::before {
  content: "🌧️🌦️";
  font-size: 80px;
  position: absolute;
  top: 20px;
  right: 40px;
  animation: float 4s ease-in-out infinite;
}

/* Animations */
@keyframes spin {
  100% { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}
