:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #14141f;
  --bg-tertiary: #1e1e2e;
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  --accent: #00d4ff;
  --accent-secondary: #00ff88;
  --danger: #ff4466;
  --sun: #ffcf5c;
  --sun-glow: rgba(255, 180, 80, 0.55);
  --focus-ring: #00d4ff;
  --focus-glow: rgba(0, 212, 255, 0.4);
  --radius-md: 12px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 600px; height: 600px; overflow: hidden;
  background: #000;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#app { width: 100%; height: 100%; position: relative; }
.screen { width: 100%; height: 100%; position: absolute; top: 0; left: 0; display: flex; flex-direction: column; }
.screen.hidden { display: none; }
.focusable { transition: all 0.15s ease; border: 2px solid transparent; cursor: pointer; outline: none; }
.focusable:focus { border-color: var(--focus-ring); box-shadow: 0 0 20px var(--focus-glow); }
.hidden { display: none !important; }

/* Header */
.hdr {
  flex: 0 0 auto;
  padding: 20px 28px 14px;
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid #1c1e2a;
}
.loc { font-size: 30px; font-weight: 700; letter-spacing: -0.4px; }
.date { font-size: 18px; color: var(--text-secondary); }

/* Arc visualization */
.arcWrap {
  flex: 1 1 auto;
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 8px 14px 0;
}
#arc { width: 540px; height: 280px; }
.horizon { stroke: #2a2c3a; stroke-width: 2; stroke-dasharray: 4 6; }
.arcTrack { fill: none; stroke: #25283a; stroke-width: 6; stroke-linecap: round; }
.arcFill {
  fill: none; stroke: url(#fillGrad); stroke-width: 6; stroke-linecap: round;
  transition: stroke-dashoffset 0.4s ease, opacity 0.3s ease;
}
.sunDot {
  fill: url(#sunGrad);
  filter: drop-shadow(0 0 14px var(--sun-glow));
  transition: cx 0.4s ease, cy 0.4s ease, opacity 0.3s ease;
}
.sunDot.below { opacity: 0.32; filter: none; }
.nowStat {
  position: absolute; bottom: 6px; left: 0; right: 0;
  text-align: center; font-size: 19px; color: var(--text-secondary);
}

/* Times row */
.times {
  flex: 0 0 auto;
  display: flex; align-items: stretch; justify-content: space-between;
  gap: 12px; padding: 6px 24px 4px;
}
.timeBox, .dayLen {
  flex: 1 1 0;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.dayLen { background: var(--bg-tertiary); }
.lbl { font-size: 14px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; }
.val { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.timeBox:first-child .val { color: var(--sun); }
.timeBox:last-child .val { color: #ff7a59; }
.dayLen .val { color: var(--accent-secondary); font-size: 24px; }

/* Lists (details + cities) */
.list {
  flex: 1 1 auto;
  padding: 14px 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.list.scroll { overflow-y: auto; }
.row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 0 18px;
  min-height: 52px;
}
.rlbl { font-size: 19px; color: var(--text-secondary); }
.rval { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* City buttons */
.city {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 0 18px;
  min-height: 52px;
}
.city .cname { font-size: 20px; font-weight: 600; }
.city .ctz { font-size: 15px; color: var(--text-muted); }
.city.active { background: var(--bg-tertiary); }
.city.active .cname::after { content: " ✓"; color: var(--accent-secondary); }
.city.geo .cname { color: var(--accent); }

/* Nav */
.nav {
  flex: 0 0 auto;
  display: flex; gap: 14px; padding: 14px 24px 22px;
}
.navBtn {
  flex: 1 1 0;
  min-height: 64px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 20px; font-weight: 600;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
.navBtn.wide { flex: 1 1 100%; }
