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

body {
  background: linear-gradient(135deg, #74ebd5, #9face6);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: background 0.8s ease;
  overflow: hidden;
}

h1 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 15px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.container {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  width: 340px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

input {
  width: 70%;
  padding: 10px;
  border: none;
  border-radius: 10px;
  outline: none;
  margin-bottom: 10px;
  font-size: 1rem;
}

button {
  padding: 10px 15px;
  border: none;
  border-radius: 10px;
  background-color: #3b82f6;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background-color: #2563eb;
}

#statusMessage {
  margin: 10px 0;
  font-size: 0.95rem;
  color: #2d6a4f;
  font-weight: 500;
}

#weather {
  margin-top: 15px;
  display: none;
  color: #fff;
}

#weather img {
  width: 80px;
}

#city-name {
  font-size: 1.5rem;
  font-weight: 600;
}

#temperature {
  font-size: 2rem;
  font-weight: bold;
  margin: 8px 0;
}

#condition {
  font-size: 1.1rem;
}

/* 🌤️ Background themes */
.bg-sunny {
  background: linear-gradient(135deg, #f6d365, #fda085);
}

.bg-clear-night {
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}

.bg-cloudy {
  background: linear-gradient(135deg, #d3cce3, #e9e4f0);
}

.bg-rainy {
  background: linear-gradient(135deg, #667db6, #0082c8, #0082c8, #667db6);
}

.bg-snowy {
  background: linear-gradient(135deg, #e6e9f0, #eef1f5);
}

.bg-storm {
  background: linear-gradient(135deg, #232526, #414345);
}

/* 🌤️ Animated Background Elements */
.animation-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

/* ☀️ Sun Animation */
.sun {
  position: absolute;
  top: 80px;
  right: 100px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle at 30% 30%, #ffecb3, #fbc02d);
  border-radius: 50%;
  box-shadow: 0 0 60px 20px rgba(255, 223, 0, 0.4);
  animation: pulse 5s infinite ease-in-out;
  display: none;
}

/* ☁️ Cloud Animation */
.cloud {
  position: absolute;
  background: #fff;
  border-radius: 100px;
  width: 160px;
  height: 60px;
  opacity: 0.9;
  animation: floatCloud 60s linear infinite;
  display: none;
}

.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  background: #fff;
  width: 100px;
  height: 80px;
  top: -30px;
  left: 10px;
  border-radius: 50%;
}

.cloud::after {
  width: 120px;
  height: 100px;
  top: -40px;
  left: auto;
  right: 15px;
}

.cloud1 { top: 120px; left: -200px; animation-delay: 0s; }
.cloud2 { top: 200px; left: -400px; animation-delay: 30s; }

/* 🌧️ Rain Animation */
.rain {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background-image: repeating-linear-gradient(180deg, rgba(255,255,255,0.3), rgba(255,255,255,0.3) 2px, transparent 2px, transparent 10px);
  animation: rainMove 0.4s linear infinite;
  display: none;
}

/* 🌤️ Animations */
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.9; }
}

@keyframes floatCloud {
  0% { transform: translateX(-200px); }
  100% { transform: translateX(120vw); }
}

@keyframes rainMove {
  0% { background-position: 0 0; }
  100% { background-position: 0 10px; }
}

/* 🌙 Moon & Stars Animation */
.moon {
  position: absolute;
  top: 80px;
  right: 100px;
  width: 90px;
  height: 90px;
  background: radial-gradient(circle at 30% 30%, #fffde7, #f5f3ce);
  border-radius: 50%;
  box-shadow: 0 0 60px 15px rgba(255, 255, 200, 0.3);
  animation: glowMoon 5s ease-in-out infinite;
  display: none;
  z-index: -1;
}

@keyframes glowMoon {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* 🌟 Stars */
.star {
  position: absolute;
  background: white;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  opacity: 0;
  animation: twinkle 3s infinite;
  display: none;
}

@keyframes twinkle {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.forecast {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.forecast-day {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 15px;
  text-align: center;
  width: 100px;
  backdrop-filter: blur(6px);
  transition: 0.3s;
}

.forecast-day:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.25);
}

.forecast-day img {
  width: 48px;
  height: 48px;
}

.forecast-day .cond {
  font-size: 0.8rem;
  opacity: 0.8;
}

