/* ===========================
   ClimaCore – Smart Climate Dashboard
   Stylesheet v1.0
   =========================== */

/* ── Variables & Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font-main: 'Outfit', sans-serif;
  --font-mono: 'Space Grotesk', sans-serif;

  /* Sunny Theme */
  --sunny-bg1: #0f0c29;
  --sunny-bg2: #1a1a4e;
  --sunny-accent: #facc15;
  --sunny-accent2: #f97316;

  /* Rainy Theme */
  --rainy-bg1: #0d1b2a;
  --rainy-bg2: #1b2a3b;
  --rainy-accent: #60a5fa;
  --rainy-accent2: #3b82f6;

  /* Cloudy Theme */
  --cloudy-bg1: #1c1c2e;
  --cloudy-bg2: #2d2d44;
  --cloudy-accent: #a8b3c9;
  --cloudy-accent2: #94a3b8;

  /* Stormy Theme */
  --stormy-bg1: #0a0a14;
  --stormy-bg2: #161625;
  --stormy-accent: #c084fc;
  --stormy-accent2: #7c3aed;

  /* Snowy Theme */
  --snowy-bg1: #0d1b2a;
  --snowy-bg2: #1a2f45;
  --snowy-accent: #bae6fd;
  --snowy-accent2: #7dd3fc;

  /* Default (Sunny) */
  --bg1: var(--sunny-bg1);
  --bg2: var(--sunny-bg2);
  --accent: var(--sunny-accent);
  --accent2: var(--sunny-accent2);

  --glass: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.12);
  --glass-hover: rgba(255,255,255,0.09);
  --text-primary: #f0f4ff;
  --text-secondary: rgba(240,244,255,0.6);
  --text-muted: rgba(240,244,255,0.35);
  --card-radius: 20px;
  --card-shadow: 0 8px 40px rgba(0,0,0,0.4);
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Body & Background ── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: linear-gradient(135deg, var(--bg1) 0%, var(--bg2) 100%);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 1.2s var(--transition);
}

/* Theme classes */
body.weather-sunny  { --bg1: var(--sunny-bg1);  --bg2: var(--sunny-bg2);  --accent: var(--sunny-accent);  --accent2: var(--sunny-accent2); }
body.weather-rainy  { --bg1: var(--rainy-bg1);  --bg2: var(--rainy-bg2);  --accent: var(--rainy-accent);  --accent2: var(--rainy-accent2); }
body.weather-cloudy { --bg1: var(--cloudy-bg1); --bg2: var(--cloudy-bg2); --accent: var(--cloudy-accent); --accent2: var(--cloudy-accent2); }
body.weather-stormy { --bg1: var(--stormy-bg1); --bg2: var(--stormy-bg2); --accent: var(--stormy-accent); --accent2: var(--stormy-accent2); }
body.weather-snowy  { --bg1: var(--snowy-bg1);  --bg2: var(--snowy-bg2);  --accent: var(--snowy-accent);  --accent2: var(--snowy-accent2); }

/* ── Background Particles ── */
.bg-particles {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.08;
  animation: floatParticle linear infinite;
}
@keyframes floatParticle {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 0.08; }
  90% { opacity: 0.06; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* ── Weather BG Elements ── */
.weather-bg-elements {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}

/* Rain drops */
.rain-drop {
  position: absolute; top: -20px;
  width: 2px; border-radius: 2px;
  background: linear-gradient(to bottom, transparent, var(--rainy-accent));
  opacity: 0.4;
  animation: rainFall linear infinite;
}
@keyframes rainFall {
  to { transform: translateY(110vh) rotate(5deg); }
}

/* Snow flakes */
.snow-flake {
  position: absolute; top: -10px;
  font-size: 1rem; opacity: 0.4;
  animation: snowFall linear infinite;
}
@keyframes snowFall {
  to { transform: translateY(110vh) rotate(360deg); }
}

/* Lightning flash */
.lightning-flash {
  position: fixed; inset: 0; background: rgba(255,255,255,0.06);
  pointer-events: none; z-index: 1; opacity: 0;
  animation: lightningFlash 6s infinite;
}
@keyframes lightningFlash {
  0%,92%,96%,100% { opacity: 0; }
  93%,95% { opacity: 1; }
}

/* ── Navbar ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 2rem;
  background: rgba(10,10,20,0.6);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: background var(--transition);
}
.nav-brand {
  display: flex; align-items: center; gap: 0.6rem;
}
.brand-icon { font-size: 1.6rem; animation: spin 20s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand-name {
  font-size: 1.3rem; font-weight: 700; letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.brand-tag {
  font-size: 0.65rem; font-weight: 500; color: var(--text-muted);
  background: var(--glass); border: 1px solid var(--glass-border);
  padding: 0.15rem 0.5rem; border-radius: 20px; letter-spacing: 0.5px;
  text-transform: uppercase;
}
.nav-center {
  display: flex; flex-direction: column; align-items: center;
}
.clock-time {
  font-family: var(--font-mono); font-size: 1.1rem; font-weight: 600; letter-spacing: 2px;
  color: var(--accent);
}
.clock-date { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.5px; }
.nav-actions { display: flex; align-items: center; gap: 1rem; }
.unit-toggle {
  display: flex; border: 1px solid var(--glass-border); border-radius: 20px; overflow: hidden;
}
.unit-btn {
  padding: 0.3rem 0.8rem; border: none; cursor: pointer;
  font-family: var(--font-main); font-size: 0.8rem; font-weight: 600;
  background: transparent; color: var(--text-secondary);
  transition: all 0.2s;
}
.unit-btn.active { background: var(--accent); color: #000; }
.api-status {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.75rem; color: var(--text-secondary);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.4);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

/* ── Search Section ── */
.search-section {
  margin-top: 70px; padding: 1.5rem 2rem 0;
  max-width: 900px; margin-left: auto; margin-right: auto;
  position: relative; z-index: 50;
}
.search-container { position: relative; }
.search-box {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 16px; padding: 0.75rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-box:focus-within {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(250,204,21,0.15);
}
.search-icon { font-size: 1.1rem; flex-shrink: 0; }
#cityInput {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text-primary); font-family: var(--font-main); font-size: 0.95rem;
}
#cityInput::placeholder { color: var(--text-muted); }
.search-btn {
  padding: 0.45rem 1.2rem; border-radius: 10px; border: none; cursor: pointer;
  background: var(--accent); color: #000; font-weight: 700; font-size: 0.85rem;
  font-family: var(--font-main); transition: transform 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}
.search-btn:hover { transform: scale(1.03); box-shadow: 0 4px 20px rgba(250,204,21,0.4); }
.location-btn {
  padding: 0.45rem 1rem; border-radius: 10px; border: 1px solid var(--glass-border);
  cursor: pointer; background: var(--glass); color: var(--text-secondary);
  font-size: 0.8rem; font-family: var(--font-main); transition: all 0.2s;
  display: flex; align-items: center; gap: 0.3rem; flex-shrink: 0;
}
.location-btn:hover { border-color: var(--accent); color: var(--accent); }
.search-suggestions {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: rgba(15,12,41,0.95); border: 1px solid var(--glass-border);
  border-radius: 16px; overflow: hidden; display: none; z-index: 200;
}
.suggestion-item {
  padding: 0.7rem 1.2rem; cursor: pointer; transition: background 0.15s;
  font-size: 0.9rem; border-bottom: 1px solid var(--glass-border);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--glass-hover); }

/* ── Alert Banner ── */
.alert-banner {
  margin: 1rem 2rem;
  max-width: 900px; margin-left: auto; margin-right: auto;
  background: linear-gradient(135deg, rgba(239,68,68,0.2), rgba(239,68,68,0.08));
  border: 1px solid rgba(239,68,68,0.4);
  border-radius: 14px; padding: 0.9rem 1.2rem;
  animation: slideDown 0.4s ease;
}
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.alert-content { display: flex; align-items: center; gap: 0.8rem; }
.alert-icon { font-size: 1.3rem; }
.alert-message { flex: 1; font-size: 0.9rem; font-weight: 500; }
.alert-close {
  background: none; border: none; cursor: pointer; color: var(--text-secondary);
  font-size: 1rem; padding: 0.2rem 0.4rem; transition: color 0.2s;
}
.alert-close:hover { color: #ef4444; }

/* ── Dashboard Layout ── */
.dashboard {
  max-width: 1400px; margin: 0 auto; padding: 1.5rem 2rem 2rem;
  position: relative; z-index: 10;
}

/* ── Hero Card ── */
.hero-section { margin-bottom: 1.5rem; }
.hero-card {
  display: grid; grid-template-columns: 1fr auto;
  gap: 2rem; align-items: center;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--card-radius); padding: 2.5rem 3rem;
  box-shadow: var(--card-shadow);
  transition: background var(--transition), border-color var(--transition);
  backdrop-filter: blur(20px);
  position: relative; overflow: hidden;
}
.hero-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--accent) 0%, transparent 60%);
  opacity: 0.04; pointer-events: none;
}
.location-info {
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem;
}
.location-pin { font-size: 1.1rem; }
.city-name { font-size: 1.4rem; font-weight: 700; }
.country-name { font-size: 0.85rem; color: var(--text-secondary); padding: 0.15rem 0.5rem; background: var(--glass); border-radius: 8px; }
.weather-classification {
  display: flex; align-items: center; gap: 0.6rem; margin: 0.5rem 0;
}
.weather-emoji { font-size: 2rem; }
.weather-label {
  font-size: 1rem; font-weight: 600; padding: 0.3rem 0.9rem;
  border-radius: 20px; background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #000; letter-spacing: 0.3px;
}
.hero-temp {
  display: flex; align-items: flex-start; gap: 0.2rem; margin: 0.4rem 0;
}
.temp-value {
  font-size: 5.5rem; font-weight: 800; line-height: 1;
  background: linear-gradient(180deg, var(--text-primary) 50%, var(--text-secondary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.temp-unit { font-size: 2rem; font-weight: 600; margin-top: 0.8rem; color: var(--text-secondary); }
.feels-like { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 1.2rem; }
.hero-extra { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.hero-extra-item {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem; color: var(--text-secondary);
  background: var(--glass); border: 1px solid var(--glass-border);
  padding: 0.35rem 0.7rem; border-radius: 10px;
}
.hero-right { display: flex; align-items: center; justify-content: center; }
.weather-animation-container {
  width: 200px; height: 200px; position: relative;
  display: flex; align-items: center; justify-content: center;
}

/* ── Weather SVG Animations ── */
.svg-sun { animation: rotateSun 12s linear infinite; }
@keyframes rotateSun { to { transform: rotate(360deg); } }
.svg-ray { animation: rayPulse 2s ease-in-out infinite alternate; transform-origin: center; }
@keyframes rayPulse { from { opacity: 0.5; transform: scale(0.9); } to { opacity: 1; transform: scale(1.1); } }
.svg-cloud { animation: driftCloud 5s ease-in-out infinite alternate; }
@keyframes driftCloud { from { transform: translateX(0); } to { transform: translateX(8px); } }
.svg-drop { animation: dropFall 1.4s linear infinite; }
.svg-drop:nth-child(2n) { animation-delay: 0.3s; }
.svg-drop:nth-child(3n) { animation-delay: 0.6s; }
@keyframes dropFall { from { transform: translateY(-5px); opacity: 0; } 60% { opacity: 1; } to { transform: translateY(25px); opacity: 0; } }
.svg-lightning { animation: lightningZap 2s ease-in-out infinite; }
@keyframes lightningZap { 0%,70%,100% { opacity: 0.3; } 75%,80% { opacity: 1; filter: drop-shadow(0 0 6px #c084fc); } }
.svg-snowflake { animation: snowSpin 4s linear infinite; }
@keyframes snowSpin { to { transform: rotate(360deg); } }
.fog-line { animation: fogDrift 4s ease-in-out infinite alternate; }
.fog-line:nth-child(2n) { animation-delay: 1.5s; animation-direction: alternate-reverse; }
@keyframes fogDrift { from { transform: translateX(-10px); opacity: 0.5; } to { transform: translateX(10px); opacity: 0.9; } }

/* ── Stats Grid ── */
.stats-section { margin-bottom: 1.5rem; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.stat-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--card-radius); padding: 1.4rem 1.5rem;
  position: relative; overflow: hidden; cursor: default;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  backdrop-filter: blur(15px);
}
.stat-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0; transition: opacity 0.25s;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 16px 50px rgba(0,0,0,0.5); border-color: var(--accent); }
.stat-card:hover::after { opacity: 1; }
.stat-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.stat-body { display: flex; align-items: flex-end; gap: 0.3rem; margin-bottom: 0.8rem; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; display: block; margin-bottom: 0.2rem; }
.stat-value { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.stat-unit { font-size: 0.85rem; color: var(--text-secondary); padding-bottom: 0.3rem; }
.stat-bar-wrap { margin-top: 0.5rem; }
.stat-bar {
  height: 5px; background: rgba(255,255,255,0.08); border-radius: 5px; overflow: hidden; margin-bottom: 0.3rem;
}
.stat-bar-fill {
  height: 100%; border-radius: 5px;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}
.temp-fill { background: linear-gradient(90deg, #3b82f6, #f97316, #ef4444); }
.humidity-fill { background: linear-gradient(90deg, #38bdf8, #3b82f6); }
.aqi-fill { background: linear-gradient(90deg, #22c55e, #facc15, #ef4444); }
.pressure-fill { background: linear-gradient(90deg, #a78bfa, #c084fc); }
.visibility-fill { background: linear-gradient(90deg, #94a3b8, #e2e8f0); }
.uv-fill { background: linear-gradient(90deg, #86efac, #facc15, #ef4444); }
.stat-range { font-size: 0.68rem; color: var(--text-muted); }
.stat-badge {
  position: absolute; top: 1rem; right: 1rem;
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 0.2rem 0.6rem; border-radius: 20px;
  background: rgba(255,255,255,0.08); color: var(--text-secondary);
}

/* Badge color helpers (applied via JS) */
.badge-good { background: rgba(34,197,94,0.2) !important; color: #86efac !important; }
.badge-moderate { background: rgba(250,204,21,0.2) !important; color: #fde68a !important; }
.badge-poor, .badge-dangerous { background: rgba(239,68,68,0.2) !important; color: #fca5a5 !important; }
.badge-hot { background: rgba(249,115,22,0.2) !important; color: #fdba74 !important; }
.badge-cold { background: rgba(96,165,250,0.2) !important; color: #bfdbfe !important; }
.badge-normal { background: rgba(34,197,94,0.15) !important; color: #86efac !important; }

/* ── Section Title ── */
.section-title {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem;
  color: var(--text-secondary); letter-spacing: 0.3px;
}

/* ── Charts ── */
.charts-section { margin-bottom: 1.5rem; }
.charts-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.wide-card { grid-column: 1 / -1; }
.chart-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--card-radius); padding: 1.5rem;
  backdrop-filter: blur(15px); transition: border-color var(--transition);
}
.chart-card:hover { border-color: rgba(255,255,255,0.2); }
.chart-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem;
}
.chart-title { font-size: 0.95rem; font-weight: 600; color: var(--text-secondary); }
.chart-controls { display: flex; gap: 0.4rem; }
.chart-ctrl-btn {
  padding: 0.25rem 0.65rem; border-radius: 8px; border: 1px solid var(--glass-border);
  background: var(--glass); color: var(--text-secondary); cursor: pointer;
  font-size: 0.72rem; font-weight: 600; font-family: var(--font-main); transition: all 0.2s;
}
.chart-ctrl-btn.active {
  background: var(--accent); color: #000; border-color: transparent;
}
.chart-wrap { position: relative; height: 200px; }

/* ── 5-Day Forecast ── */
.forecast-section { margin-bottom: 1.5rem; }
.forecast-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem;
}
.forecast-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--card-radius); padding: 1.2rem 1rem;
  text-align: center; transition: transform 0.25s, border-color 0.25s;
  backdrop-filter: blur(15px); cursor: default;
}
.forecast-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.fc-day { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.5px; }
.fc-icon { font-size: 2.2rem; margin: 0.5rem 0; display: block; }
.fc-desc { font-size: 0.7rem; color: var(--text-secondary); margin-bottom: 0.6rem; }
.fc-temps { display: flex; justify-content: center; gap: 0.6rem; font-size: 0.9rem; font-weight: 700; }
.fc-high { color: var(--text-primary); }
.fc-low { color: var(--text-muted); }
.fc-rain { font-size: 0.68rem; color: #60a5fa; margin-top: 0.3rem; }

/* ── Hourly Strip ── */
.hourly-section { margin-bottom: 1.5rem; }
.hourly-strip {
  display: flex; gap: 0.8rem; overflow-x: auto; padding-bottom: 0.5rem;
  scrollbar-width: thin; scrollbar-color: var(--glass-border) transparent;
}
.hourly-strip::-webkit-scrollbar { height: 4px; }
.hourly-strip::-webkit-scrollbar-track { background: transparent; }
.hourly-strip::-webkit-scrollbar-thumb { background: var(--glass-border); border-radius: 2px; }
.hourly-item {
  flex-shrink: 0; background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 14px; padding: 0.8rem 1rem; text-align: center; min-width: 80px;
  transition: border-color 0.2s, transform 0.2s;
}
.hourly-item:hover { border-color: var(--accent); transform: translateY(-3px); }
.hourly-item.current { border-color: var(--accent); background: rgba(250,204,21,0.08); }
.hi-time { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.hi-icon { font-size: 1.5rem; display: block; margin: 0.3rem 0; }
.hi-temp { font-size: 0.9rem; font-weight: 700; }
.hi-rain { font-size: 0.65rem; color: #60a5fa; margin-top: 0.2rem; }

/* ── Details Grid ── */
.details-section { margin-bottom: 1.5rem; }
.details-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem;
}
.detail-card {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: var(--card-radius); padding: 1.5rem;
  backdrop-filter: blur(15px);
}
.detail-title {
  font-size: 0.9rem; font-weight: 700; margin-bottom: 1.2rem;
  color: var(--text-secondary); letter-spacing: 0.3px;
}

/* Wind compass */
.compass-container { display: flex; gap: 1.5rem; align-items: center; }
.compass {
  width: 110px; height: 110px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--glass-border); position: relative;
  background: radial-gradient(circle, rgba(255,255,255,0.04), transparent);
}
.compass-needle {
  position: absolute; top: 50%; left: 50%;
  width: 4px; height: 45px; margin-left: -2px; margin-top: -40px;
  background: linear-gradient(to bottom, #ef4444 50%, rgba(255,255,255,0.3) 50%);
  transform-origin: bottom center; border-radius: 2px;
  transition: transform 1s cubic-bezier(0.4,0,0.2,1);
}
.compass-labels {
  position: absolute; inset: 0;
  font-size: 0.6rem; font-weight: 700; color: var(--text-muted);
}
.cl-n { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); }
.cl-e { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); }
.cl-s { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); }
.cl-w { position: absolute; left: 5px; top: 50%; transform: translateY(-50%); }
.wind-stats { display: flex; flex-direction: column; gap: 0.7rem; }
.ws-item { display: flex; flex-direction: column; }
.ws-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.ws-value { font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.ws-unit { font-size: 0.7rem; color: var(--text-secondary); }

/* Sun arc */
.sun-arc-container { display: flex; flex-direction: column; gap: 1rem; }
.sun-arc { width: 100%; }
.sun-dot { filter: drop-shadow(0 0 6px #facc15); }
.sun-times { display: flex; justify-content: space-around; }
.st-item { text-align: center; display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.7rem; }
.st-label { color: var(--text-muted); }
.st-val { font-size: 0.9rem; font-weight: 700; }

/* AQI meter */
.aqi-meter { margin-bottom: 1rem; }
.aqi-scale {
  display: flex; height: 6px; border-radius: 6px; overflow: hidden; margin-bottom: 0.4rem;
}
.aqi-seg { flex: 1; }
.aqi-seg.good { background: #22c55e; }
.aqi-seg.moderate { background: #facc15; }
.aqi-seg.usg { background: #f97316; }
.aqi-seg.unhealthy { background: #ef4444; }
.aqi-seg.very-unhealthy { background: #a855f7; }
.aqi-seg.hazardous { background: #7f1d1d; }
.aqi-pointer-track { position: relative; height: 16px; }
.aqi-pointer {
  position: absolute; top: 0; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.5); margin-left: -7px;
  transition: left 1.2s cubic-bezier(0.4,0,0.2,1);
}
.pollutants-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.5rem;
}
.pollutant-item {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 10px; padding: 0.5rem 0.7rem;
}
.p-label { font-size: 0.65rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.p-value { font-size: 0.9rem; font-weight: 700; }
.p-unit { font-size: 0.6rem; color: var(--text-muted); }

/* ── Footer ── */
.footer {
  text-align: center; padding: 1.5rem 2rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.2); backdrop-filter: blur(10px);
  position: relative; z-index: 10;
}
.footer-content { display: flex; align-items: center; justify-content: center; gap: 0.8rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--text-muted); }
.footer-sep { color: rgba(255,255,255,0.15); }
.footer-note { color: rgba(255,255,255,0.2); font-style: italic; }

/* ── Loading Overlay ── */
.loading-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--sunny-bg1), var(--sunny-bg2));
  transition: opacity 0.5s, visibility 0.5s;
}
.loading-overlay.hidden { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; position: relative; }
.loader-globe {
  font-size: 4rem; display: block;
  animation: spin 3s linear infinite;
}
.loader-ring {
  width: 90px; height: 90px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #facc15;
  animation: spin 1s linear infinite;
  margin: -70px auto 1rem;
}
.loader-text {
  font-size: 0.9rem; color: var(--text-secondary); letter-spacing: 0.5px;
  animation: textBlink 2s ease-in-out infinite;
}
@keyframes textBlink {
  0%,100% { opacity: 0.5; } 50% { opacity: 1; }
}

/* ── Demo Mode Banner ── */
.demo-banner {
  background: linear-gradient(90deg, rgba(250,204,21,0.15), rgba(249,115,22,0.15));
  border: 1px solid rgba(250,204,21,0.3);
  border-radius: 10px; padding: 0.5rem 1rem;
  font-size: 0.78rem; color: #fde68a; text-align: center; margin-bottom: 1rem;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .details-grid { grid-template-columns: 1fr 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .wide-card { grid-column: auto; }
}
@media (max-width: 900px) {
  .hero-card { grid-template-columns: 1fr; text-align: center; }
  .weather-animation-container { margin: 1rem auto 0; }
  .location-info, .weather-classification, .hero-extra { justify-content: center; }
  .forecast-grid { grid-template-columns: repeat(3, 1fr); }
  .details-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 14px; }
  .navbar { padding: 0.6rem 1rem; }
  .brand-tag { display: none; }
  .nav-center { display: none; }
  .dashboard { padding: 1rem; }
  .search-section { padding: 1rem 1rem 0; }
  .forecast-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-card { padding: 1.5rem; }
  .temp-value { font-size: 4rem; }
}
