: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;
  --rain: #00ff5f;
  --rain-dim: rgba(0, 255, 95, 0.18);
  --panel: rgba(8, 8, 12, 0.9);
}
* { 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;
}

/* Rain canvas sits behind everything; black canvas pixels = transparent on glasses */
#bg { position: fixed; inset: 0; width: 600px; height: 600px; z-index: 0; }

#app { width: 100%; height: 100%; position: relative; z-index: 1; }
.screen {
  width: 100%; height: 100%; position: absolute; top: 0; left: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.screen.hidden { display: none; }
.hidden { display: none !important; }

.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);
}

/* Panels float over the rain; near-opaque so text stays crisp, motion peeks at edges */
.panel {
  position: relative;
  width: calc(100% - 72px);
  max-width: 460px;
  background: var(--panel);
  border: 1px solid var(--rain-dim);
  border-radius: var(--radius-md);
  padding: 32px 30px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6), 0 0 60px rgba(0, 255, 95, 0.05);
}

/* ---- Home ---- */
.home-panel { text-align: center; }
.title {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 52px;
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: 6px;
  color: var(--rain);
  text-shadow: 0 0 18px rgba(0, 255, 95, 0.55), 0 0 4px rgba(0, 255, 95, 0.9);
}
.title-2 { display: block; color: var(--text-primary); text-shadow: 0 0 16px rgba(255,255,255,0.35); }
.tagline {
  margin: 14px 0 28px;
  color: var(--text-secondary);
  font-size: 16px;
  font-style: italic;
  letter-spacing: 0.5px;
}
.menu { display: flex; flex-direction: column; gap: 14px; }

.btn {
  width: 100%;
  min-height: 84px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 21px;
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.btn-primary {
  background: linear-gradient(180deg, rgba(0,255,95,0.16), rgba(0,255,95,0.06));
  border-color: var(--rain-dim);
  color: #d6ffe2;
}
.btn-glyph { color: var(--rain); font-size: 18px; }
.btn-sm { min-height: 60px; font-size: 17px; flex: 1; }

.home-status {
  margin-top: 26px;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---- Shared screen bits ---- */
.screen-title {
  font-size: 26px; font-weight: 700; margin-bottom: 22px;
  color: var(--text-primary); letter-spacing: 1px;
}
.hint { margin-top: 20px; color: var(--text-muted); font-size: 13px; text-align: center; }

/* ---- Settings ---- */
.rows { display: flex; flex-direction: column; gap: 10px; }
.row {
  min-height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 12px 18px;
}
.row-label { font-size: 18px; color: var(--text-primary); }
.row-ctrl { font-size: 16px; color: var(--text-muted); display: flex; align-items: center; gap: 12px; }
.row-ctrl .val {
  display: inline-block; min-width: 88px; text-align: center;
  color: var(--rain); font-weight: 700; letter-spacing: 0.5px;
}
.row-actions { display: flex; gap: 12px; margin-top: 18px; }

/* ---- About ---- */
.about-text { color: var(--text-secondary); font-size: 16px; line-height: 1.55; margin-bottom: 18px; }
.about-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.about-list li {
  font-size: 16px; color: var(--text-primary);
  background: var(--bg-secondary); border-radius: 10px;
  padding: 12px 16px; display: flex; align-items: center; gap: 14px;
}
.about-list b { color: var(--rain); min-width: 28px; text-align: center; font-size: 18px; }

/* ---- Rain HUD ---- */
.hud {
  position: absolute; left: 0; right: 0; bottom: 22px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.hud.faded { opacity: 0; }
.hud-row { display: flex; gap: 12px; }
.hud-chip {
  background: rgba(8, 8, 12, 0.78);
  border: 1px solid var(--rain-dim);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px; color: var(--text-secondary); letter-spacing: 0.5px;
}
.hud-chip b { color: var(--rain); margin-left: 6px; font-weight: 700; }
.hud-keys {
  background: rgba(8, 8, 12, 0.7);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 13px; color: var(--text-muted); letter-spacing: 0.5px;
}

.toast {
  position: absolute; top: 26px; left: 50%; transform: translateX(-50%) translateY(-8px);
  background: rgba(8, 8, 12, 0.92);
  border: 1px solid var(--rain-dim);
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 16px; font-weight: 600; color: #d6ffe2;
  opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.pause {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(8, 8, 12, 0.85);
  border: 1px solid var(--rain-dim);
  border-radius: var(--radius-md);
  padding: 22px 38px;
  font-size: 28px; font-weight: 800; letter-spacing: 4px;
  color: #d6ffe2;
  text-shadow: 0 0 16px rgba(0, 255, 95, 0.45);
}
