/* =========================================================
   NeuroBrincadeiras Game Design System — v1
   Shared tokens and components for every game.
   ========================================================= */
:root {
  --nb-blue: #0A68FF;
  --nb-blue-700: #0752D6;
  --nb-blue-900: #103A80;
  --nb-navy: #111957;
  --nb-turquoise: #0CC8BA;
  --nb-green: #1BAF72;
  --nb-yellow: #FFC51A;
  --nb-orange: #FF7B37;
  --nb-coral: #FF5B67;
  --nb-pink: #F53D8B;
  --nb-purple: #7547DC;

  --nb-bg: #F5F9FD;
  --nb-surface: #FFFFFF;
  --nb-surface-soft: #F8FBFE;
  --nb-text: #111957;
  --nb-text-2: #465278;
  --nb-muted: #66718E;
  --nb-border: #DCE8F2;
  --nb-border-strong: #C7D7E7;
  --nb-focus-color: rgba(10, 104, 255, .24);

  --nb-success-bg: #EAF8F1;
  --nb-success: #177F58;
  --nb-warning-bg: #FFF7D9;
  --nb-warning: #936200;
  --nb-error-bg: #FFF0F1;
  --nb-error: #B73242;
  --nb-info-bg: #EBF5FF;

  --nb-radius-xs: 10px;
  --nb-radius-sm: 14px;
  --nb-radius-md: 18px;
  --nb-radius-lg: 24px;
  --nb-radius-xl: 32px;
  --nb-radius-pill: 999px;

  --nb-shadow-xs: 0 4px 14px rgba(25, 61, 105, .06);
  --nb-shadow-sm: 0 10px 28px rgba(25, 61, 105, .08);
  --nb-shadow-md: 0 18px 48px rgba(25, 61, 105, .11);
  --nb-shadow-lg: 0 30px 80px rgba(25, 61, 105, .14);

  --nb-font: Inter, Aptos, "Segoe UI", Roboto, Helvetica, Arial, system-ui, sans-serif;
  --nb-ease: cubic-bezier(.2, .75, .2, 1);
  --nb-focus: 0 0 0 4px var(--nb-focus-color);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--nb-bg);
  color: var(--nb-text);
  font-family: var(--nb-font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
svg { display: block; width: 1em; height: 1em; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.is-hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 3000;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--nb-navy);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: transform .15s ease;
}
.skip-link:focus { transform: translateY(0); }

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: var(--nb-focus);
}

button:disabled { cursor: not-allowed; }

.primary-button,
.secondary-button,
.continue-button,
.text-button,
.icon-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform .16s var(--nb-ease), box-shadow .16s var(--nb-ease), background .16s var(--nb-ease), border-color .16s var(--nb-ease), opacity .16s ease;
}

.primary-button,
.secondary-button,
.continue-button {
  min-height: 52px;
  padding: 0 20px;
  border-radius: var(--nb-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: .98rem;
  text-decoration: none;
}
.primary-button svg,
.secondary-button svg,
.continue-button svg { width: 21px; height: 21px; flex: 0 0 auto; }

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--nb-blue) 0%, #3764EA 58%, var(--nb-purple) 125%);
  box-shadow: 0 12px 26px rgba(10, 104, 255, .22);
}
.primary-button:hover { box-shadow: 0 16px 32px rgba(10, 104, 255, .25); transform: translateY(-1px); }
.primary-button:active { transform: translateY(1px) scale(.99); }
.primary-button--full { width: 100%; }

.secondary-button {
  color: var(--nb-blue-700);
  background: #fff;
  border: 1.5px solid #CFE0F0;
}
.secondary-button:hover { border-color: #AFC8DF; background: #F9FCFF; transform: translateY(-1px); }
.secondary-button:active { transform: translateY(1px) scale(.99); }
.secondary-button--full { width: 100%; }

.continue-button {
  color: var(--nb-blue-700);
  background: #F4F9FF;
  border: 1px solid #CFE3F7;
}

.text-button {
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 10px;
  background: transparent;
  color: var(--nb-blue-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.text-button svg { width: 18px; height: 18px; }
.text-button:hover { background: #F2F7FD; }
.text-button--danger { color: #A73848; }

.icon-button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--nb-blue-700);
  background: #F8FBFE;
  border: 1px solid var(--nb-border);
}
.icon-button svg { width: 20px; height: 20px; }
.icon-button:hover { background: #EEF6FE; transform: translateY(-1px); }
.icon-button:active { transform: scale(.96); }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  padding: 20px;
  display: grid;
  place-items: center;
  overflow: auto;
  background: rgba(12, 23, 62, .54);
  backdrop-filter: blur(8px);
}
.modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: min(90vh, 780px);
  overflow: auto;
  padding: 32px;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 28px;
  background: rgba(255,255,255,.98);
  box-shadow: var(--nb-shadow-lg);
  text-align: center;
  animation: nbModalIn .2s var(--nb-ease);
}
.modal-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--nb-muted);
  background: #F4F7FA;
  font-size: 1.6rem;
  line-height: 1;
}
.modal-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--nb-blue-700);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .14em;
}
.modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: var(--nb-blue-700);
  background: var(--nb-info-bg);
}
.modal-icon svg { width: 26px; height: 26px; }
.modal-card h2 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -.035em;
}
.modal-card > p { margin: 10px auto 20px; max-width: 46ch; color: var(--nb-text-2); }

.toast {
  position: fixed;
  z-index: 2500;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: max-content;
  max-width: min(92vw, 560px);
  padding: 12px 16px;
  border-radius: 14px;
  background: #111957;
  color: #fff;
  box-shadow: var(--nb-shadow-md);
  font-size: .9rem;
  font-weight: 750;
  text-align: center;
  animation: nbToastIn .16s ease both;
}

@keyframes nbModalIn {
  from { opacity: 0; transform: translateY(8px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes nbToastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (hover: hover) {
  .continue-button:hover { transform: translateY(-1px); background: #EEF7FF; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
.icon-button:disabled { opacity: .35; cursor: not-allowed; transform: none; }
body.has-modal { overflow: hidden; }
