* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: background 0.8s ease, color 0.5s ease;
}

/* --- Temi dinamici con gradienti dedicati --- */
body.theme-sunny {
  background: linear-gradient(135deg, #f59e0b, #38bdf8);
  color: #1e293b;
}

body.theme-cloudy {
  background: linear-gradient(135deg, #64748b, #cbd5e1);
  color: #0f172a;
}

body.theme-rain {
  background: linear-gradient(135deg, #1e3a8a, #475569);
  color: #f8fafc;
}

body.theme-snow {
  background: linear-gradient(135deg, #93c5fd, #e2e8f0);
  color: #1e293b;
}

body.theme-thunder {
  background: linear-gradient(135deg, #090d16, #4338ca);
  color: #f8fafc;
}

body.theme-fog {
  background: linear-gradient(135deg, #94a3b8, #64748b);
  color: #0f172a;
}

/* --- Card Meteo Responsive --- */
.weather-card {
  width: 100%;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  text-align: center;
}

.card-header select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
  margin-top: 6px;
  cursor: pointer;
  outline: none;
}

.weather-visual {
  margin: 30px 0;
}

.icon {
  font-size: 4.5rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
}

.temp-wrapper {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
}

.unit {
  font-size: 2rem;
  font-weight: 400;
  vertical-align: top;
}

#weather-desc {
  font-size: 1.25rem;
  font-weight: 500;
  margin-top: 10px;
}

.weather-details {
  display: flex;
  justify-content: space-around;
  border-top: 1px solid rgba(255, 255, 255, 0.3);
  padding-top: 18px;
  font-size: 0.9rem;
}

.detail-item span {
  display: block;
  opacity: 0.8;
  font-size: 0.8rem;
}