/* AI-Safe Kids game engine, prototype styles.
   Brand-neutral, high contrast, large readable type for ages 7 to 11. */

:root {
  --bg: #0f2740;
  --surface: #ffffff;
  --ink: #14233a;
  --ink-soft: #4a5a70;
  --accent: #1d6fb8;
  --accent-ink: #ffffff;
  --safe: #147a4a;
  --safe-bg: #e3f5ec;
  --think: #b26a00;
  --think-bg: #fdf1de;
  --treasure: #c8901a;
  --focus: #ffbf3f;
  --radius: 16px;
  --font: "Trebuchet MS", "Segoe UI", Verdana, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Keyboard focus is always clearly visible. */
:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--focus);
  color: var(--ink);
  padding: 12px 18px;
  z-index: 10;
  font-weight: bold;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

.site-header {
  text-align: center;
  padding: 24px 16px 8px;
  color: #fff;
}
.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  color: var(--focus);
  font-weight: bold;
}
#page-title {
  margin: 6px 0 0;
  font-size: 1.7rem;
  line-height: 1.2;
}

.game {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
  flex: 1;
}

/* Status bar */
.status-bar {
  display: flex;
  gap: 16px;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 12px 18px;
  margin-bottom: 18px;
  color: #fff;
}
.status-item { display: flex; align-items: center; gap: 8px; }
.status-item.power { flex: 1; flex-direction: column; align-items: stretch; gap: 4px; }
.status-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }
.status-value {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--focus);
}
.power-meter {
  height: 16px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 999px;
  overflow: hidden;
}
.power-fill {
  height: 100%;
  width: 0%;
  background: var(--focus);
  transition: width 0.4s ease;
}

/* Scene card */
.scene {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 26px 32px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
.scene:focus { outline: none; }

.scene-progress {
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 10px;
}

.scene-text {
  font-size: 1.2rem;
  margin: 0 0 22px;
}

/* Message card, styled so the scam "message" reads like a screen bubble */
.message-card {
  background: #eef3f8;
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 22px;
  font-style: italic;
}

.choices {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.choice-btn {
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 1.1rem;
  padding: 16px 18px;
  border: 3px solid var(--accent);
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
.choice-btn:hover { background: #eaf3fb; }
.choice-btn:active { transform: translateY(1px); }
.choice-btn[disabled] { cursor: default; opacity: 0.55; }
.choice-btn.picked-correct {
  border-color: var(--safe);
  background: var(--safe-bg);
}
.choice-btn.picked-wrong {
  border-color: var(--think);
  background: var(--think-bg);
}

/* Feedback panels */
.feedback {
  margin: 20px 0 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  font-size: 1.1rem;
}
.feedback.correct {
  background: var(--safe-bg);
  border-left: 8px solid var(--safe);
}
.feedback.think {
  background: var(--think-bg);
  border-left: 8px solid var(--think);
}
.feedback-title {
  margin: 0 0 6px;
  font-weight: bold;
  font-size: 1.15rem;
}
.feedback.correct .feedback-title { color: var(--safe); }
.feedback.think .feedback-title { color: var(--think); }
.feedback-text { margin: 0; }

.reward {
  margin: 16px 0 0;
  font-weight: bold;
  color: var(--treasure);
  font-size: 1.15rem;
}

.actions {
  margin-top: 22px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.action-btn {
  font: inherit;
  font-size: 1.1rem;
  font-weight: bold;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 3px solid transparent;
  cursor: pointer;
}
.action-btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.action-btn.primary:hover { background: #17588f; }
.action-btn.secondary {
  background: #fff;
  color: var(--accent);
  border-color: var(--accent);
}
.action-btn.secondary:hover { background: #eaf3fb; }

/* End screen */
.end-screen { text-align: center; }
.end-screen h2 { font-size: 1.6rem; margin: 0 0 12px; }
.end-badge {
  font-size: 3.4rem;
  margin: 8px 0 4px;
}
.end-stats {
  font-size: 1.2rem;
  margin: 10px 0 22px;
}
.end-lesson {
  background: var(--safe-bg);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-align: left;
  margin: 0 auto 22px;
  max-width: 520px;
}

.site-footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
  padding: 18px 16px 28px;
}

.loading { color: var(--ink-soft); font-style: italic; }
.error { color: #b00020; font-weight: bold; }

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media (max-width: 520px) {
  body { font-size: 18px; }
  #page-title { font-size: 1.4rem; }
  .scene { padding: 22px 18px 26px; }
}
