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

/* ---------- Layout ---------- */
.pad {
  width: 100%; height: 100%;
  padding: 40px 44px;
  display: flex; flex-direction: column;
  gap: 26px;
}
.center { align-items: center; justify-content: center; }
.accent { color: var(--accent); }

/* ---------- Home ---------- */
.brand {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.title { font-size: 40px; font-weight: 800; letter-spacing: 1px; text-align: center; }
.subtitle {
  font-size: 19px; color: var(--text-secondary);
  text-align: center; max-width: 380px; line-height: 1.45;
}
.hint { font-size: 13px; color: var(--text-muted); text-align: center; letter-spacing: 0.5px; }

/* ---------- Buttons ---------- */
.actions {
  width: 100%; max-width: 420px;
  display: flex; flex-direction: column; gap: 16px;
}
.btn {
  width: 100%; min-height: 78px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.btn--ghost { background: var(--bg-secondary); color: var(--text-secondary); }
.focusable:focus.btn { background: var(--bg-tertiary); color: var(--text-primary); }

/* ---------- Orb ---------- */
.orb {
  width: 172px; height: 172px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.06);
  background: var(--bg-secondary);
}
.orb-text { font-size: 48px; font-weight: 800; letter-spacing: 1px; }

.orb--idle {
  background: radial-gradient(circle at 35% 30%, rgba(0, 212, 255, 0.28), #14141f 72%);
  box-shadow: 0 0 46px rgba(0, 212, 255, 0.28);
  color: var(--accent);
  animation: breathe 4s ease-in-out infinite;
}
.orb--thinking {
  background: radial-gradient(circle at 35% 30%, rgba(0, 212, 255, 0.35), #14141f 70%);
  box-shadow: 0 0 52px rgba(0, 212, 255, 0.38);
  color: var(--accent);
  animation: breathe 1.3s ease-in-out infinite;
}
.orb--yes {
  background: radial-gradient(circle at 35% 30%, rgba(0, 255, 136, 0.42), #14141f 72%);
  box-shadow: 0 0 62px rgba(0, 255, 136, 0.45);
  color: var(--accent-secondary);
  animation: pop 0.42s ease;
}
.orb--no {
  background: radial-gradient(circle at 35% 30%, rgba(255, 68, 102, 0.42), #14141f 72%);
  box-shadow: 0 0 62px rgba(255, 68, 102, 0.45);
  color: var(--danger);
  animation: pop 0.42s ease;
}
.orb--maybe {
  background: radial-gradient(circle at 35% 30%, rgba(0, 212, 255, 0.42), #14141f 72%);
  box-shadow: 0 0 62px rgba(0, 212, 255, 0.45);
  color: var(--accent);
  animation: pop 0.42s ease;
}

@keyframes breathe {
  0%, 100% { transform: scale(0.94); opacity: 0.82; }
  50%      { transform: scale(1.04); opacity: 1; }
}
@keyframes pop {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- Result ---------- */
.result-text {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; min-height: 124px; justify-content: center;
}
.answer-label { font-size: 64px; font-weight: 800; letter-spacing: 3px; line-height: 1; }
.answer-label--yes   { color: var(--accent-secondary); }
.answer-label--no    { color: var(--danger); }
.answer-label--maybe { color: var(--accent); }
.answer-flavor {
  font-size: 22px; color: var(--text-secondary);
  text-align: center; max-width: 440px; line-height: 1.35;
}
#result.is-thinking #resultActions { display: none; }
#result.is-thinking .answer-label { display: none; }

/* ---------- History ---------- */
.hist-header { display: flex; align-items: center; }
.hist-title { font-size: 30px; font-weight: 700; }
.history-list {
  flex: 1; display: flex; flex-direction: column;
  gap: 10px; overflow: hidden;
}
.history-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 12px 16px; min-height: 54px;
}
.dot { width: 13px; height: 13px; border-radius: 50%; flex: none; }
.dot--yes   { background: var(--accent-secondary); }
.dot--no    { background: var(--danger); }
.dot--maybe { background: var(--accent); }
.history-label { font-weight: 700; min-width: 70px; font-size: 18px; }
.history-flavor {
  flex: 1; color: var(--text-secondary); font-size: 16px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.history-time { color: var(--text-muted); font-size: 14px; white-space: nowrap; }
.history-empty {
  color: var(--text-muted); text-align: center;
  margin-top: 48px; font-size: 18px; line-height: 1.4;
}
