/* Aurora Watch - dark space-weather dashboard */
:root {
  --bg: #070b16;
  --card: rgba(18, 24, 40, 0.66);
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8ecf4;
  --dim: #8893a7;
  --accent: #00e5ff;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5; }

/* Aurora glow backdrop */
#bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 20% 0%, rgba(0,229,155,0.16), transparent 70%),
    radial-gradient(55% 45% at 85% 5%, rgba(120,90,255,0.16), transparent 70%),
    radial-gradient(70% 40% at 50% 100%, rgba(0,200,255,0.10), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translateY(-2%) scale(1.02); } to { transform: translateY(2%) scale(1.06); } }

#app { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding: 26px 18px 40px; display: flex; flex-direction: column; gap: 14px; }

header { display: flex; align-items: center; gap: 13px; margin-bottom: 4px; }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: sonar 2.4s ease-out infinite; flex-shrink: 0; }
@keyframes sonar { 0% { box-shadow: 0 0 0 0 rgba(0,229,255,0.6); } 70% { box-shadow: 0 0 0 13px rgba(0,229,255,0); } 100% { box-shadow: 0 0 0 0 rgba(0,229,255,0); } }
header h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; color: #fff; line-height: 1.1; }
header .sub { font-size: 13px; color: var(--dim); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.v-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--dim); margin-bottom: 8px; }

/* Verdict */
.v-text { font-size: 24px; font-weight: 800; letter-spacing: -0.4px; line-height: 1.15; }
.v-sub { font-size: 13px; color: var(--dim); margin-top: 7px; }
.kp-wrap { margin-top: 16px; }
.kp-now { font-size: 13px; color: var(--dim); margin-bottom: 6px; }
.kp-now span { font-size: 20px; font-weight: 800; color: #fff; }
.kp-scale { display: flex; gap: 3px; }
.kp-seg { flex: 1; height: 26px; border-radius: 4px; display: flex; align-items: flex-end; justify-content: center; transition: opacity 0.3s; }
.kp-seg span { font-size: 9px; color: #00000099; font-weight: 700; padding-bottom: 2px; }

/* 24h Kp history sparkline */
.kp-history { margin-top: 14px; }
.kh-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--dim); margin-bottom: 6px; }
.kh-bars { display: flex; align-items: flex-end; gap: 4px; height: 38px; }
.kh-bar { flex: 1; height: 100%; display: flex; align-items: flex-end; background: rgba(255,255,255,0.04); border-radius: 3px; overflow: hidden; }
.kh-fill { width: 100%; border-radius: 3px; transition: height 0.4s; }

/* Regions */
.regions { display: flex; flex-direction: column; gap: 2px; }
.region { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--border); }
.region:last-child { border-bottom: none; }
.r-name { flex: 1; font-weight: 600; }
.r-need { font-size: 11px; color: var(--dim); }
.r-chip { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 20px; border: 1px solid; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile { padding: 14px; text-align: center; }
.tk { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--dim); }
.tv { font-size: 24px; font-weight: 800; color: #fff; margin: 4px 0 1px; }
.tu { font-size: 10px; color: var(--dim); }

/* Forecast */
.forecast { display: flex; flex-direction: column; gap: 9px; }
.fc-day { display: flex; align-items: center; gap: 11px; }
.fc-label { width: 110px; font-size: 12px; color: var(--dim); flex-shrink: 0; }
.fc-track { flex: 1; height: 10px; background: rgba(255,255,255,0.06); border-radius: 6px; overflow: hidden; }
.fc-fill { height: 100%; border-radius: 6px; transition: width 0.5s; }
.fc-kp { width: 46px; text-align: right; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.fc-empty { color: var(--dim); font-size: 13px; }

footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 11px; color: var(--dim); padding: 6px 4px; }
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .v-text { font-size: 20px; }
  .fc-label { width: 90px; }
  .r-need { display: none; }
}
