:root {
  --bg: #050816;
  --bg-grad-a: #162447;
  --glass: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.18);
  --text: #e9eefc;
  --muted: #b8c2e1;
  --accent: #7aa2ff;
  --tile: rgba(255, 255, 255, 0.08);
}

:root[data-theme='light'] {
  --bg: #edf2ff;
  --bg-grad-a: #d4e3ff;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(82, 111, 183, 0.2);
  --text: #1f2d57;
  --muted: #4c5f93;
  --accent: #2f66ff;
  --tile: rgba(255, 255, 255, 0.85);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, var(--bg-grad-a), var(--bg) 52%);
  overflow-x: hidden;
}

.bg-blur { position: fixed; border-radius: 50%; filter: blur(90px); z-index: -1; }
.bg-blur-1 { width: 340px; height: 340px; top: -100px; left: -80px; background: rgba(99, 148, 255, 0.35); }
.bg-blur-2 { width: 300px; height: 300px; right: -60px; bottom: -100px; background: rgba(64, 213, 255, 0.28); }

.app { max-width: 1040px; margin: 0 auto; padding: 40px 20px 64px; }
.hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hero h1 { margin: 8px 0 6px; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; }

.theme-toggle {
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.eyebrow { text-transform: uppercase; letter-spacing: 0.15em; font-weight: 700; font-size: 0.75rem; color: var(--accent); }
.subtle { color: var(--muted); margin: 0; }

.card {
  margin-top: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 22px;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.current { display: grid; grid-template-columns: 1fr; gap: 20px; }
.label { margin: 0; color: var(--accent); font-size: 0.9rem; }
.temp-row { display: flex; align-items: center; gap: 10px; }
.big-icon { font-size: 2.4rem; }
.current h2 { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1; margin: 8px 0; }

.current-meta { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 14px; }
.current-meta div { background: var(--tile); border: 1px solid var(--glass-border); border-radius: 14px; padding: 12px; }
.current-meta span { display: block; font-size: 0.78rem; color: var(--muted); }
.current-meta strong { font-size: 1.1rem; }

.rain-alert {
  margin-top: 12px;
  border: 1px solid rgba(255, 184, 102, 0.45);
  background: linear-gradient(90deg, rgba(255, 175, 84, 0.22), rgba(122, 162, 255, 0.2));
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 600;
}

.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.section-head h3 { margin: 0; }
.pill { font-size: 0.78rem; color: #10172f; background: linear-gradient(135deg, #95b4ff, #9ee8ff); padding: 6px 10px; border-radius: 999px; font-weight: 700; }
.subtle-pill { color: var(--text); background: var(--tile); }

.radar-wrap {
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  min-height: 340px;
}

.radar-wrap iframe {
  width: 100%;
  height: 380px;
  border: 0;
}

.timeline {
  position: relative;
  margin-left: 12px;
  padding-left: 18px;
  border-left: 2px solid var(--glass-border);
  display: grid;
  gap: 12px;
}

.tl-item {
  position: relative;
  background: var(--tile);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 10px 12px;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: -25px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(122, 162, 255, 0.2);
}

.tl-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.tl-time { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.tl-main { margin-top: 4px; font-weight: 700; display: flex; justify-content: space-between; gap: 10px; }
.tl-sub { margin-top: 3px; font-size: 0.86rem; color: var(--muted); }

.error {
  margin-top: 16px;
  color: #ffd7d7;
  background: rgba(255, 94, 94, 0.15);
  border: 1px solid rgba(255, 94, 94, 0.4);
  border-radius: 10px;
  padding: 10px 12px;
}

@media (min-width: 760px) {
  .current { grid-template-columns: 1fr 1fr; align-items: center; }
}
