: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;
  --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; }

/* ---- Top bar ---- */
.topbar {
  flex: 0 0 auto;
  padding: 22px 26px 16px;
  background: var(--bg-primary);
  border-bottom: 1px solid #20202c;
}
.topbar-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--text-primary);
}
.topbar-sub {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  color: var(--accent);
  font-weight: 600;
}

/* ---- Content ---- */
.content {
  flex: 1 1 auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}

/* ---- Home cards ---- */
.card {
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 132px;
  padding: 0 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  text-align: left;
  color: var(--text-primary);
  font-family: inherit;
}
.card-icon { font-size: 44px; line-height: 1; flex: 0 0 auto; }
.card-text { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.card-title { font-size: 26px; font-weight: 700; }
.card-sub { font-size: 17px; color: var(--text-secondary); }
.card-chev { font-size: 40px; color: var(--text-muted); flex: 0 0 auto; }

/* ---- Swap button ---- */
.swap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 21px;
  font-weight: 600;
}
.swap-icon { font-size: 26px; color: var(--accent); }

/* ---- Readout ---- */
.readout {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 18px 26px;
}
.readout-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
}
.readout-value {
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}
.readout-unit {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-secondary);
}
.readout-row.out .readout-value { color: var(--accent-secondary); }
.readout-row.out .readout-unit { color: var(--accent-secondary); opacity: 0.85; }
.readout-arrow {
  text-align: center;
  font-size: 26px;
  color: var(--text-muted);
  line-height: 1;
}

/* ---- Steppers ---- */
.steppers {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
}
.step {
  flex: 1 1 0;
  min-height: 88px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 28px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.step-minus { color: #ff8aa0; }
.step-plus { color: var(--accent-secondary); }

/* ---- Hint bar ---- */
.hintbar {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  gap: 26px;
  padding: 14px;
  background: var(--bg-primary);
  border-top: 1px solid #20202c;
  font-size: 15px;
  color: var(--text-muted);
}
