/* ═══════════ Pogodix v3 — Light / Dark Theme ═══════════ */

/* ── CSS Variables ───────────────────────────────────────────── */
:root {
  --bg:        #eef2f7;
  --bg2:       #ffffff;
  --bg3:       #e2e8f0;
  --card:      #ffffff;
  --border:    rgba(0, 0, 0, 0.08);
  --border2:   rgba(0, 0, 0, 0.15);
  --text:      #1a2132;
  --text2:     #4a5568;
  --text3:     #8a9ab5;
  --accent:    #4f46e5;
  --accent2:   #6366f1;
  --red:       #ef4444;
  --sh:        0 2px 12px rgba(0, 0, 0, 0.07);
  --sh-lg:     0 8px 30px rgba(0, 0, 0, 0.12);
  --r:         14px;
  --r-sm:      9px;
}
[data-theme="dark"] {
  --bg:        #0d1120;
  --bg2:       #131929;
  --bg3:       #1a2236;
  --card:      #1e2a42;
  --border:    rgba(255, 255, 255, 0.08);
  --border2:   rgba(255, 255, 255, 0.16);
  --text:      #e8edf5;
  --text2:     #8fa3c0;
  --text3:     #5a7090;
  --sh:        0 4px 20px rgba(0, 0, 0, 0.4);
  --sh-lg:     0 12px 40px rgba(0, 0, 0, 0.5);
}

/* ── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  transition: background 0.3s, color 0.3s;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }

/* ── Layout ──────────────────────────────────────────────────── */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ── Generic card ────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
  box-shadow: var(--sh);
  transition: background 0.3s, border-color 0.3s;
}

/* ── Header ──────────────────────────────────────────────────── */
.top-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: var(--sh);
}
.header-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; flex-wrap: wrap;
}
.logo { font-size: 1.35rem; font-weight: 800; color: var(--accent); white-space: nowrap; display: flex; align-items: center; gap: 9px; text-decoration: none; }
.logo em { font-size: 0.66rem; color: var(--text3); font-style: normal; margin-left: 4px; font-weight: 400; }
.logo-text { color: var(--accent); font-weight: 800; font-size: 1.35rem; }
.logo-icon { flex-shrink: 0; filter: drop-shadow(0 2px 6px rgba(99,102,241,0.35)); transition: transform .3s ease; }
.logo:hover .logo-icon { transform: rotate(30deg) scale(1.08); }
.logo-icon .sun-ray { animation: logo-ray-spin 12s linear infinite; transform-origin: 18px 18px; }
.search-bar { display: flex; flex: 1; min-width: 180px; }
.search-bar input {
  flex: 1;
  background: var(--bg3);
  border: 1.5px solid var(--border2);
  border-right: none;
  border-radius: var(--r-sm) 0 0 var(--r-sm);
  color: var(--text);
  padding: 8px 14px;
  font-size: 0.93rem;
}
.search-bar input:focus { outline: none; border-color: var(--accent); }
.search-bar button {
  background: var(--accent); color: #fff; border: none;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 8px 16px; font-size: 1rem;
}
.search-bar button:hover { background: var(--accent2); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.ghost-btn {
  background: transparent;
  border: 1.5px solid var(--border2);
  color: var(--text2);
  border-radius: var(--r-sm);
  padding: 7px 13px;
  font-size: 0.84rem;
  transition: all 0.2s;
}
.ghost-btn:hover { background: var(--bg3); color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 0.78rem; }
.theme-btn {
  width: 36px; height: 36px;
  background: var(--bg3);
  border: 1.5px solid var(--border2);
  border-radius: 50%;
  color: var(--text2);
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.theme-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.lang-switcher { position: relative; }
.lang-btn { min-width: 68px; font-weight: 600; }
.lang-menu {
  display: none;
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--card);
  border: 1.5px solid var(--border2);
  border-radius: var(--r-sm);
  padding: 6px;
  width: 240px;
  z-index: 2000;
  flex-wrap: wrap;
  gap: 2px;
  box-shadow: var(--sh-lg);
}
.lang-menu.open { display: flex; }
.lang-item {
  padding: 6px 8px; border-radius: 6px;
  font-size: 0.8rem; color: var(--text2);
  flex: 0 0 calc(33% - 2px); text-align: center;
  transition: all 0.15s;
}
.lang-item:hover { background: var(--bg3); color: var(--text); text-decoration: none; }
.lang-item.active { background: var(--accent); color: #fff; }

/* ══════════════════════════════════════════════════════════════
   HERO CARD — gradient two-column layout
   ══════════════════════════════════════════════════════════════ */
.hero-card {
  /* Vibrant gradient — LIGHT MODE */
  background: linear-gradient(135deg, #4338ca 0%, #7c3aed 45%, #0ea5e9 100%);
  border-radius: var(--r);
  border: none;
  box-shadow: var(--sh-lg);
  overflow: hidden;
  position: relative;
}
[data-theme="dark"] .hero-card {
  background: linear-gradient(135deg, #1e1b5e 0%, #1e3060 50%, #0c2040 100%);
}
/* Animated glow orbs in background */
.hero-orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%;
  animation: orb-float 9s ease-in-out infinite;
  opacity: 0.13;
}
.orb1 { width: 240px; height: 240px; background: #fde68a; top: -80px; right: 20px; animation-delay: 0s; }
.orb2 { width: 180px; height: 180px; background: #a5f3fc; bottom: -60px; right: 180px; animation-delay: 3.5s; }
.orb3 { width: 130px; height: 130px; background: #c4b5fd; top: 30%; left: -50px; animation-delay: 6s; }
@keyframes orb-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-24px) scale(1.07); }
}
/* Two-column flex inside hero */
.hero-inner {
  display: flex;
  flex-wrap: wrap;
  min-height: 320px;
  position: relative;
  z-index: 2;
}
.hero-left {
  flex: 1;
  min-width: 260px;
  padding: 36px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
}
.hero-right {
  flex: 0 0 380px;
  padding: 36px 32px;
  background: rgba(0, 0, 0, 0.20);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}
[data-theme="dark"] .hero-right { background: rgba(0, 0, 0, 0.35); }

/* Breadcrumb */
.breadcrumb { font-size: 0.76rem; color: rgba(255,255,255,0.55); margin-bottom: 10px; }
.breadcrumb a { color: rgba(255,255,255,0.65); }
.breadcrumb a:hover { color: #fff; text-decoration: none; }

/* City name + description */
.hero-city {
  font-size: 2.7rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin-bottom: 6px;
}
.hero-desc { font-size: 0.95rem; color: rgba(255,255,255,0.7); margin-bottom: 6px; }
.hero-updated { font-size: 0.78rem; color: rgba(255,255,255,0.5); margin-bottom: 22px; }

/* Action buttons */
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--r-sm);
  padding: 8px 15px;
  font-size: 0.83rem;
  cursor: pointer;
  transition: background 0.2s;
  backdrop-filter: blur(6px);
}
.hero-btn:hover { background: rgba(255,255,255,0.28); text-decoration: none; }
.hero-btn.primary {
  background: rgba(255,255,255,0.92);
  color: #4338ca;
  border-color: transparent;
  font-weight: 700;
}
.hero-btn.primary:hover { background: #fff; }

/* Big temperature */
.hero-temp-row { display: flex; align-items: flex-start; gap: 14px; }
.hero-temp {
  font-size: 6rem;
  font-weight: 900;
  color: #fff;
  line-height: 0.95;
  letter-spacing: -4px;
}
.hero-icon-big { font-size: 4rem; line-height: 1; margin-top: 6px; }
.hero-feels { font-size: 0.85rem; color: rgba(255,255,255,0.6); }

/* Stats grid */
.hero-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.hero-stat {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-sm);
  padding: 11px 13px;
}
.hero-stat-label { font-size: 0.66rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.hero-stat-value { font-size: 1rem; font-weight: 700; color: #fff; }
.hero-stat-sub { font-size: 0.68rem; color: rgba(255,255,255,0.45); margin-top: 1px; }

/* ── Billboard Ad ────────────────────────────────────────────── */
.billboard-large {
  display: flex; gap: 20px; align-items: center;
  background: linear-gradient(135deg, rgba(79,70,229,0.04), rgba(14,165,233,0.04));
  border: 1.5px solid rgba(79,70,229,0.12);
}
[data-theme="dark"] .billboard-large { background: rgba(79,70,229,0.08); }
.billboard-text { flex: 1; }
.ad-kicker { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text3); margin-bottom: 4px; }
.ad-headline { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.ad-copy { font-size: 0.83rem; color: var(--text2); margin-bottom: 14px; }
.ad-button {
  display: inline-block; background: var(--accent); color: #fff;
  border-radius: var(--r-sm); padding: 8px 20px; font-size: 0.85rem;
  transition: background 0.2s;
}
.ad-button:hover { background: var(--accent2); text-decoration: none; }
.theme-blue .ad-headline  { color: #4338ca; }
.theme-green .ad-headline { color: #059669; }
.theme-gold .ad-headline  { color: #d97706; }
[data-theme="dark"] .theme-blue .ad-headline  { color: #93c5fd; }
[data-theme="dark"] .theme-green .ad-headline { color: #86efac; }
[data-theme="dark"] .theme-gold .ad-headline  { color: #fde68a; }

/* ── Forecast tabs ───────────────────────────────────────────── */
.section-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.section-title-row h2 { font-size: 1.02rem; font-weight: 700; }
.section-actions { display: flex; gap: 6px; }
.tab-btn {
  background: var(--bg3); border: 1.5px solid var(--border);
  color: var(--text2); border-radius: var(--r-sm);
  padding: 5px 14px; font-size: 0.82rem; transition: all 0.2s;
}
.tab-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.tab-btn:hover:not(.active) { background: var(--card); color: var(--text); }
.hidden-block { display: none !important; }
.active-panel { display: block; }
.row-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.row-scroll::-webkit-scrollbar { height: 4px; }
.row-scroll::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
.top-day-card {
  flex: 0 0 118px; text-align: center;
  background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); padding: 16px 8px 14px;
  transition: all 0.2s; cursor: pointer;
}
.top-day-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--sh); }
.top-day-card.active-day { border-color: var(--accent); background: rgba(79,70,229,0.09); box-shadow: 0 0 0 3px rgba(79,70,229,0.15); }
.top-day-name { font-size: 0.75rem; color: var(--text3); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.top-day-date { font-size: 0.78rem; color: var(--text2); margin: 3px 0 10px; }
.top-day-icon { font-size: 2.8rem; margin-bottom: 10px; line-height: 1; }
.top-day-temps { font-size: 0.95rem; display: flex; gap: 7px; justify-content: center; align-items: baseline; }
.top-day-temps span { color: var(--text3); }
.top-day-temps b { color: var(--text); font-size: 1.08rem; font-weight: 700; }
.month-grid { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.month-card {
  flex: 0 0 148px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 13px; font-size: 0.82rem;
  display: flex; flex-direction: column; gap: 4px;
}
.month-card strong { color: var(--text); font-size: 0.87rem; }
.month-card span { color: var(--text2); }

/* ── Day detail panel (below forecast ribbon) ────────────────── */
.day-detail-panel {
  display: block;
  margin-top: 18px;
  border-top: 2px solid rgba(79,70,229,0.15);
  padding-top: 18px;
  animation: ddp-in 0.25s ease;
}
@keyframes ddp-in { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
.ddp-heading {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.ddp-label {
  font-size: 0.82rem; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.06em;
  background: rgba(79,70,229,0.08); border-radius: 20px;
  padding: 3px 14px;
}
.ddp-body {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}
.ddp-left { text-align: center; }
.ddp-day-num { font-size: 2.4rem; font-weight: 900; line-height: 1; color: var(--accent); }
.ddp-weekday { font-size: 0.7rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.ddp-month   { font-size: 0.72rem; color: var(--text3); }
.ddp-center  { text-align: center; }
.ddp-icon    { font-size: 3.2rem; line-height: 1; }
.ddp-desc    { font-size: 0.9rem; color: var(--text2); margin-top: 6px; font-weight: 500; }
.ddp-stats   { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.ddp-stat    { background: var(--bg3); border-radius: var(--r-sm); padding: 9px 12px; border: 1px solid var(--border); }
.ddp-stat span { font-size: 0.67rem; color: var(--text3); display: block; margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.04em; }
.ddp-stat b    { color: var(--text); font-size: 0.93rem; font-weight: 700; }
.ddp-summary   { font-size: 0.84rem; color: var(--text2); line-height: 1.7; border-top: 1px solid var(--border); padding-top: 12px; }

/* ── Animated SVG weather icon ───────────────────────────────── */
.wx-anim-wrap {
  width: 120px; height: 100px;
  margin: 0 auto 8px;
  position: relative;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.12));
}
#ddpAnimSvg { overflow: visible; }

/* Sun pulse */
.wa-sun-core { animation: sun-pulse 3s ease-in-out infinite; transform-origin: 60px 50px; }
@keyframes sun-pulse {
  0%, 100% { opacity: 1; r: 22px; }
  50%       { opacity: 0.85; r: 24px; }
}
/* Sun rays rotate */
.wa-sun-rays { animation: rays-spin 12s linear infinite; transform-origin: 60px 50px; }
@keyframes rays-spin { to { transform: rotate(360deg); } }

/* Cloud float */
.wa-cloud-grp, .wa-cloud-front { animation: cloud-drift 4s ease-in-out infinite; }
.wa-cloud-back { animation: cloud-drift 5s ease-in-out infinite reverse; }
@keyframes cloud-drift {
  0%, 100% { transform: translateX(0); }
  50%       { transform: translateX(4px); }
}

/* Rain drops fall */
.wa-drop { animation: drop-fall 1.4s linear infinite; }
.d1 { animation-delay: 0s; }
.d2 { animation-delay: 0.3s; }
.d3 { animation-delay: 0.6s; }
.d4 { animation-delay: 0.15s; }
.d5 { animation-delay: 0.45s; }
@keyframes drop-fall {
  0%   { transform: translateY(0); opacity: 1; }
  80%  { opacity: 0.7; }
  100% { transform: translateY(16px); opacity: 0; }
}

/* Snow flakes drift */
.wa-flake { animation: flake-fall 2.2s ease-in-out infinite; }
.sf1 { animation-delay: 0s; }
.sf2 { animation-delay: 0.8s; }
.sf3 { animation-delay: 1.4s; }
@keyframes flake-fall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(14px) rotate(180deg); opacity: 0; }
}

/* Lightning bolt flash */
.wa-bolt { animation: bolt-flash 2.8s ease-in-out infinite; }
@keyframes bolt-flash {
  0%, 40%, 100% { opacity: 1; }
  20%, 60%      { opacity: 0.2; }
}

/* Fog lines drift */
.wa-fog-line { animation: fog-drift 3s ease-in-out infinite; }
.fl1 { animation-delay: 0s; }
.fl2 { animation-delay: 1s; }
.fl3 { animation-delay: 2s; }
@keyframes fog-drift {
  0%, 100% { transform: translateX(0); opacity: 0.8; }
  50%       { transform: translateX(6px); opacity: 1; }
}

/* ── Solar Activity card ──────────────────────────────────────── */
.solar-card { }
.solar-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.solar-header h3 { font-size: 1rem; font-weight: 700; }
.solar-badge {
  font-size: 0.78rem; font-weight: 700; padding: 3px 13px;
  border-radius: 20px; color: #fff;
}
.sb-0 { background: #10b981; }
.sb-1 { background: #84cc16; }
.sb-2 { background: #f59e0b; }
.sb-3 { background: #f97316; }
.sb-4 { background: #ef4444; }
.sb-5 { background: #dc2626; }
.sb-6 { background: #9f1239; }
.sb-7 { background: #7c3aed; animation: badge-pulse 1s ease-in-out infinite; }
@keyframes badge-pulse { 0%,100%{opacity:1} 50%{opacity:0.65} }

.kp-scale-wrap { margin-bottom: 18px; }
.kp-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 0.83rem; color: var(--text2); }
.kp-val { font-size: 1.3rem; font-weight: 900; color: var(--accent); }
.kp-bar-track {
  position: relative; height: 14px; border-radius: 7px;
  background: linear-gradient(to right, #10b981, #84cc16, #f59e0b, #f97316, #ef4444, #9f1239, #7c3aed);
  margin-bottom: 6px;
}
.kp-bar-fill {
  position: absolute; top: 0; left: 0; height: 100%;
  background: rgba(255,255,255,0.25); border-radius: 7px;
  transition: width 1s cubic-bezier(.4,0,.2,1);
}
.kp-bar-pointer {
  position: absolute; top: -5px;
  width: 22px; height: 22px;
  background: var(--card); border: 3px solid var(--accent);
  border-radius: 50%; transform: translateX(-11px);
  transition: left 1s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.kp-zones { display: flex; justify-content: space-between; font-size: 0.62rem; color: var(--text3); margin-top: 2px; }
.kpz { flex: 1; text-align: center; }

.solar-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 14px; }
.solar-metric { background: var(--bg3); border-radius: var(--r-sm); padding: 11px 12px; border: 1px solid var(--border); text-align: center; }
.solar-metric-label { font-size: 0.66rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 5px; }
.solar-metric-val { font-size: 1rem; font-weight: 700; color: var(--text); }
.solar-note { font-size: 0.73rem; color: var(--text3); line-height: 1.5; border-top: 1px solid var(--border); padding-top: 10px; }

@media (max-width: 680px) {
  .solar-metrics { grid-template-columns: 1fr 1fr; }
  .ddp-body { grid-template-columns: 70px 1fr; }
  .ddp-stats { display: none; }
}

/* ── Main grid: left col + right sidebar ─────────────────────── */
.main-grid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.left-col { display: flex; flex-direction: column; gap: 20px; }
.right-col { display: flex; flex-direction: column; gap: 20px; }

/* Today detail */
.today-grid { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; margin-bottom: 14px; align-items: center; }
.today-date-box { text-align: center; }
.today-weekday { font-size: 0.7rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.today-day { font-size: 2.6rem; font-weight: 900; line-height: 1; color: var(--accent); }
.today-month { font-size: 0.73rem; color: var(--text3); }
.today-center { text-align: center; }
.today-icon { font-size: 3rem; }
.today-desc { font-size: 0.88rem; color: var(--text2); margin-top: 5px; font-weight: 500; }
.today-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; font-size: 0.82rem; }
.today-stats > div { background: var(--bg3); border-radius: var(--r-sm); padding: 9px 11px; border: 1px solid var(--border); }
.today-stats span { font-size: 0.67rem; color: var(--text3); display: block; margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.04em; }
.today-stats b { color: var(--text); font-size: 0.93rem; }
.day-summary { font-size: 0.85rem; color: var(--text2); line-height: 1.7; border-top: 1px solid var(--border); padding-top: 13px; }

/* Hourly */
.hourly-card h3 { font-size: 0.98rem; font-weight: 700; margin-bottom: 13px; }
.hourly-scroll { display: flex; gap: 9px; overflow-x: auto; padding-bottom: 6px; }
.hourly-scroll::-webkit-scrollbar { height: 4px; }
.hourly-scroll::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
.hour-item {
  flex: 0 0 82px; text-align: center;
  background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); padding: 8px 4px 6px; transition: all 0.2s;
}
.hour-item:hover { border-color: var(--accent); }
.hour-time { font-size: 0.71rem; color: var(--text3); font-weight: 600; }
.hour-icon { font-size: 1.2rem; margin: 3px 0; }
.hour-temp b { font-size: 0.9rem; font-weight: 700; }
.hour-detail { margin-top: 4px; display: flex; flex-direction: column; gap: 1px; font-size: 0.63rem; color: var(--text3); }

/* Sidebar ad */
.sidebar-ad { padding: 18px; }

/* AQI */
.aqi-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.aqi-header h3 { font-size: 0.98rem; font-weight: 700; }
.aqi-badge { font-size: 0.77rem; font-weight: 700; padding: 3px 11px; border-radius: 20px; color: #fff; }
.aqi-1 { background: #10b981; } .aqi-2 { background: #84cc16; }
.aqi-3 { background: #f59e0b; } .aqi-4 { background: #ef4444; } .aqi-5 { background: #7c3aed; }
.aqi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 14px; }
.aqi-metric { background: var(--bg3); border-radius: var(--r-sm); padding: 11px 9px; text-align: center; border: 1px solid var(--border); }
.aqi-metric-name { font-size: 0.68rem; color: var(--text3); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.aqi-metric-val { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.aqi-metric-unit { font-size: 0.62rem; color: var(--text3); }
.aqi-scale-bar { height: 8px; border-radius: 4px; position: relative; background: linear-gradient(to right, #10b981, #84cc16, #f59e0b, #ef4444, #7c3aed); margin: 8px 0 4px; }
.aqi-pointer { position: absolute; top: -4px; width: 14px; height: 14px; background: var(--card); border: 2px solid var(--text); border-radius: 50%; transform: translateX(-7px); transition: left 0.5s; }
.aqi-scale-labels { display: flex; justify-content: space-between; font-size: 0.62rem; color: var(--text3); }

/* Disasters */
.disasters-card h3 { font-size: 0.98rem; font-weight: 700; margin-bottom: 13px; }
.disaster-list { display: flex; flex-direction: column; gap: 9px; }
.disaster-item { display: flex; gap: 11px; align-items: flex-start; padding: 11px; background: var(--bg3); border-radius: var(--r-sm); border: 1.5px solid var(--border); }
.disaster-item:hover { border-color: var(--border2); }
.disaster-icon { font-size: 1.4rem; flex-shrink: 0; width: 34px; text-align: center; }
.disaster-body { flex: 1; }
.disaster-title { font-size: 0.84rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.disaster-meta { font-size: 0.7rem; color: var(--text3); line-height: 1.4; }
.disaster-severity { font-size: 0.67rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; align-self: flex-start; flex-shrink: 0; }
.sev-low  { background: rgba(16,185,129,0.12); color: #059669; }
.sev-med  { background: rgba(245,158,11,0.12); color: #d97706; }
.sev-high { background: rgba(239,68,68,0.12); color: #dc2626; }
.no-disasters { text-align: center; padding: 22px; color: var(--text3); font-size: 0.88rem; }

/* ══════════════════════════════════════════════════════════════
   WEATHER MAP — tiles visible, wind overlay on top
   ══════════════════════════════════════════════════════════════ */
.weather-map-card { padding: 0; overflow: hidden; }
.map-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 8px;
}
.map-header h2 { font-size: 1.02rem; font-weight: 700; }
.map-controls { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.map-layer-btn {
  background: var(--bg3); border: 1.5px solid var(--border);
  color: var(--text2); border-radius: var(--r-sm);
  padding: 5px 13px; font-size: 0.82rem; transition: all 0.2s;
}
.map-layer-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.map-layer-btn:hover:not(.active) { background: var(--card); color: var(--text); }
.map-speed-wrap {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.76rem; color: var(--text3);
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  padding: 4px 10px; background: var(--bg3);
}
.map-speed-wrap input[type=range] { width: 65px; accent-color: var(--accent); }
.map-container { position: relative; }
#weatherMap { height: 480px; width: 100%; }

/* Canvas sits ABOVE tiles but is transparent except for particles */
.wind-canvas {
  pointer-events: none;
  position: absolute;
  top: 0; left: 0;
  z-index: 400;
}
.map-spinner {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 18px 26px;
  font-size: 0.88rem; color: var(--text2); z-index: 500;
  box-shadow: var(--sh);
}
.spinner-ring {
  width: 34px; height: 34px;
  border: 3px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.map-legend {
  position: absolute; bottom: 18px; left: 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 9px 13px;
  font-size: 0.73rem; color: var(--text2); z-index: 500;
  box-shadow: var(--sh);
}
.legend-title { font-weight: 600; color: var(--text); font-size: 0.76rem; margin-bottom: 5px; }
.legend-bar { display: flex; align-items: center; gap: 7px; }
.legend-gradient { width: 90px; height: 9px; border-radius: 5px; }
.wind-gradient { background: linear-gradient(to right, #1dc8b4, #f0e040, #e02525); }
.temp-gradient { background: linear-gradient(to right, #7b2ff7, #4f7ae8, #52d68a, #f5d742, #e02525); }
.rain-gradient { background: linear-gradient(to right, rgba(96,165,250,0.2), rgba(96,165,250,1)); }
.cloud-gradient { background: linear-gradient(to right, rgba(200,220,255,0.2), rgba(100,150,230,0.9)); }
.legend-min, .legend-max { font-size: 0.68rem; color: var(--text3); }

.map-notice {
  position: absolute; bottom: 60px; right: 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 8px 13px;
  font-size: 0.78rem; color: var(--text2); z-index: 600;
  box-shadow: var(--sh);
}

/* City marker */


.temp-tooltip { background: var(--card) !important; border: 1.5px solid var(--border2) !important; color: var(--text) !important; font-weight: 700; font-size: 12px !important; box-shadow: var(--sh) !important; border-radius: 8px !important; padding: 3px 9px !important; }

/* ── Misc ─────────────────────────────────────────────────────── */
.flashes { padding: 10px 0; }
.flash { background: rgba(79,70,229,0.1); border: 1px solid var(--accent); border-radius: var(--r-sm); padding: 10px 15px; }
.loading-overlay { display: none; position: fixed; inset: 0; background: rgba(238,242,247,0.75); z-index: 9999; align-items: center; justify-content: center; backdrop-filter: blur(3px); }
[data-theme="dark"] .loading-overlay { background: rgba(13,17,32,0.75); }
.loading-spinner { width: 46px; height: 46px; border: 4px solid var(--border2); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }

/* Footer */
.site-footer { background: var(--card); border-top: 1px solid var(--border); padding: 16px 0; margin-top: 36px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--text3); flex-wrap: wrap; gap: 8px; }
.footer-langs { display: flex; gap: 5px; flex-wrap: wrap; }
.footer-lang { color: var(--text3); padding: 2px 5px; border-radius: 4px; font-size: 0.73rem; }
.footer-lang:hover { color: var(--accent); text-decoration: none; }
.footer-lang.active { color: var(--accent); font-weight: 600; }

/* Countries/Articles */
.cities-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 9px; }
.city-link-card { background: var(--bg3); border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 11px 14px; color: var(--text2); display: block; font-size: 0.88rem; transition: all 0.2s; }
.city-link-card:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.article-body { line-height: 1.8; color: var(--text2); }
.article-body p { margin-bottom: 1em; }
.article-body h2, .article-body h3 { color: var(--text); margin: 1.5em 0 0.5em; font-weight: 700; }

/* Admin */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.admin-table th, .admin-table td { padding: 9px 11px; border-bottom: 1px solid var(--border); text-align: left; }
.admin-table th { color: var(--text3); font-weight: 600; }
.admin-form { display: flex; flex-direction: column; gap: 13px; }
.form-row { display: flex; flex-direction: column; gap: 4px; }
.form-row label { font-size: 0.8rem; color: var(--text3); font-weight: 500; }
.form-row input, .form-row textarea, .form-row select { background: var(--bg3); border: 1.5px solid var(--border); border-radius: var(--r-sm); color: var(--text); padding: 8px 11px; font-size: 0.88rem; font-family: inherit; }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { outline: none; border-color: var(--accent); }
.btn-primary { background: var(--accent); color: #fff; border: none; border-radius: var(--r-sm); padding: 9px 20px; font-size: 0.88rem; transition: background 0.2s; }
.btn-primary:hover { background: var(--accent2); }
.btn-danger { background: var(--red); color: #fff; border: none; border-radius: var(--r-sm); padding: 5px 12px; font-size: 0.79rem; }

/* Leaflet overrides */
.leaflet-container { font-family: inherit; }
.leaflet-control-zoom a { background: var(--card) !important; color: var(--text) !important; border-color: var(--border) !important; }
.leaflet-control-attribution { background: rgba(255,255,255,0.82) !important; color: #555 !important; font-size: 10px !important; }
[data-theme="dark"] .leaflet-control-attribution { background: rgba(13,17,32,0.82) !important; color: #888 !important; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 920px) {
  .main-grid { grid-template-columns: 1fr; }
  .hero-right { flex: none; width: 100%; border-left: none; border-top: 1px solid rgba(255,255,255,0.12); }
  #weatherMap { height: 360px; }
  .aqi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .page { padding: 14px; gap: 14px; }
  .hero-left { padding: 22px 18px; }
  .hero-right { padding: 18px; }
  .hero-temp { font-size: 4.2rem; }
  .hero-city { font-size: 2rem; }
  .hero-inner { flex-direction: column; }
  .today-grid { grid-template-columns: auto 1fr; }
  .aqi-grid { grid-template-columns: 1fr 1fr; }
}
.city-marker-wrap { background: transparent !important; border: none !important; }
.city-pin { width: 14px; height: 14px; background: #4f46e5; border-radius: 50%; border: 2.5px solid #fff; position: absolute; top: 0; left: 0; box-shadow: 0 2px 8px rgba(79,70,229,0.55); z-index: 2; }
.city-pulse-ring { width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(79,70,229,0.45); position: absolute; top: -11px; left: -11px; animation: pulse-ring 2.2s ease-out infinite; z-index: 1; }
@keyframes pulse-ring { 0%{transform:scale(0.6);opacity:1} 100%{transform:scale(1.9);opacity:0} }
.city-lbl { position: absolute; left: 19px; top: -11px; white-space: nowrap; background: var(--card); border: 1px solid var(--border); border-radius: 7px; padding: 3px 9px; font-size: 12px; color: var(--text); font-weight: 700; box-shadow: var(--sh); z-index: 3; }

/* ── Hero live clock ─────────────────────────────────────────── */
.hero-clock {
  font-size: 0.95rem !important;
  color: rgba(255,255,255,0.75) !important;
  margin-top: 6px !important;
  margin-bottom: 22px !important;
  letter-spacing: 0.01em;
}
.hero-clock-time {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

/* ── Hourly card header with day label ───────────────────────── */
.hourly-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; flex-wrap: wrap; gap: 6px;
}
.hourly-card-header h3 { font-size: 0.98rem; font-weight: 700; }
.hourly-day-label {
  font-size: 0.8rem; font-weight: 600; color: var(--accent);
  background: rgba(79,70,229,0.09); border-radius: 16px;
  padding: 3px 12px;
}

/* ── GPT Chatbot Widget ──────────────────────────────────────── */
.chat-widget {
  position: fixed; bottom: 24px; right: 24px;
  width: 340px; z-index: 9000;
  border-radius: var(--r); overflow: hidden;
  box-shadow: var(--sh-lg); border: 1px solid var(--border);
  font-size: .88rem;
}
.chat-header {
  background: var(--accent); color: #fff;
  padding: 12px 16px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: .9rem;
}
.chat-body {
  display: none; flex-direction: column;
  background: var(--card); max-height: 420px;
}
.chat-messages {
  flex: 1; overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 8px;
  max-height: 260px;
}
.chat-msg { display: flex; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg span {
  max-width: 80%; padding: 8px 12px; border-radius: 12px;
  line-height: 1.5; font-size: .84rem;
}
.chat-msg.bot span  { background: var(--bg3); color: var(--text); border-radius: 0 12px 12px 12px; }
.chat-msg.user span { background: var(--accent); color: #fff; border-radius: 12px 0 12px 12px; }
.typing { font-size: 1.4rem; letter-spacing: 2px; }
.chat-quick-btns {
  display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 12px;
  border-top: 1px solid var(--border);
}
.chat-quick-btns button {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 20px; padding: 4px 10px; font-size: .75rem;
  color: var(--text2); cursor: pointer; transition: all .2s;
}
.chat-quick-btns button:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.chat-input-row {
  display: flex; gap: 6px; padding: 10px 12px;
  border-top: 1px solid var(--border);
}
.chat-input-row input {
  flex: 1; background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text);
  padding: 7px 11px; font-size: .84rem;
}
.chat-input-row input:focus { outline: none; border-color: var(--accent); }
.chat-input-row button {
  background: var(--accent); color: #fff; border: none;
  border-radius: var(--r-sm); padding: 7px 14px; font-size: 1rem;
}

/* Anomaly badge */
.anomaly-badge { font-size: .78rem; font-weight: 700; padding: 3px 12px; border-radius: 20px; }
.sev-high   { background: rgba(239,68,68,.12); color: #dc2626; }
.sev-medium { background: rgba(245,158,11,.12); color: #d97706; }
.sev-normal { background: rgba(16,185,129,.12); color: #059669; }

@media(max-width:480px) {
  .chat-widget { width: calc(100vw - 32px); right: 16px; bottom: 16px; }
}

/* ── City Autocomplete Dropdown ──────────────────────────────── */
.city-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-lg);
  z-index: 9999;
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}
.city-suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.city-suggest-item:last-child { border-bottom: none; }
.city-suggest-item:hover, .city-suggest-item.active {
  background: rgba(79,70,229,0.08);
}
.city-suggest-flag { font-size: 1.3rem; flex-shrink: 0; }
.city-suggest-main { flex: 1; min-width: 0; }
.city-suggest-name {
  font-size: .92rem; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.city-suggest-name b { color: var(--accent); }
.city-suggest-sub {
  font-size: .75rem; color: var(--text3); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.city-suggest-pop {
  font-size: .7rem; color: var(--text3); flex-shrink: 0;
}
.city-suggest-loading {
  padding: 12px 14px; text-align: center;
  font-size: .84rem; color: var(--text3);
}
