* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  transition: background 0.6s ease;
}

body.sunny {
  background: linear-gradient(135deg, #0284c7, #38bdf8, #f59e0b);
}

body.cloudy {
  background: linear-gradient(135deg, #334155, #64748b);
}

body.rainy {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

body.snowy {
  background: linear-gradient(135deg, #1e293b, #475569, #94a3b8);
}

body.stormy {
  background: linear-gradient(135deg, #090d16, #311042);
}

.weather-card {
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 26px;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.search-box {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.search-box input {
  flex: 1;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #ffffff;
  font-size: 1rem;
  outline: none;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-box button {
  padding: 0 18px;
  background-color: #38bdf8;
  color: #0f172a;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, background-color 0.2s;
}

.search-box button:hover {
  background-color: #7dd3fc;
  transform: translateY(-1px);
}

.hidden {
  display: none;
}

.error {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.15);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.weather-info h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.scene-box {
  width: 100%;
  height: 165px;
  margin: 6px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.scene-box svg {
  width: 220px;
  height: 160px;
  overflow: visible;
}

.temp {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1;
  margin: 6px 0;
}

.description {
  font-size: 1.05rem;
  color: #e2e8f0;
  margin-bottom: 18px;
}

.details {
  display: flex;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.08);
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item span {
  font-size: 0.85rem;
  color: #cbd5e1;
}

.detail-item strong {
  font-size: 1.05rem;
}

.weekly-section {
  text-align: left;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 16px;
}

.weekly-section h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin-bottom: 10px;
}

.weekly-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.day-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.06);
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.95rem;
}

.day-name {
  width: 105px;
  font-weight: 500;
}

.day-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  font-size: 0.85rem;
}

.day-icon svg {
  width: 24px;
  height: 24px;
}

.day-temps {
  font-weight: 600;
  min-width: 72px;
  text-align: right;
}

.temp-min {
  color: #94a3b8;
  font-weight: 400;
  margin-right: 6px;
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes floatCloud {
  0%, 100% { transform: translateX(0px); }
  50% { transform: translateX(10px); }
}

@keyframes fallDrop {
  0% { transform: translateY(-10px); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateY(35px); opacity: 0; }
}

@keyframes flashBolt {
  0%, 90%, 100% { opacity: 0; }
  92%, 96% { opacity: 1; }
}

.sun-rays {
  transform-origin: 110px 80px;
  animation: spinSlow 18s linear infinite;
}

.cloud-move {
  animation: floatCloud 4s ease-in-out infinite;
}

.rain-drop-1 { animation: fallDrop 0.9s linear infinite; }
.rain-drop-2 { animation: fallDrop 0.9s linear infinite 0.3s; }
.rain-drop-3 { animation: fallDrop 0.9s linear infinite 0.6s; }

.snow-flake-1 { animation: fallDrop 2.2s linear infinite; }
.snow-flake-2 { animation: fallDrop 2.2s linear infinite 0.7s; }
.snow-flake-3 { animation: fallDrop 2.2s linear infinite 1.4s; }

.lightning-bolt {
  animation: flashBolt 3s infinite;
}
