/* Shared look for the Brain Games: Globle's light palette, Nunito, soft
   cards and gentle motion. Globle keeps its own copy inline. */
:root {
  --bg1: #e6f1fc;
  --bg2: #f7fafd;
  --panel: #ffffff;
  --panel-soft: #f4f7fb;
  --text: #1e2a3b;
  --muted: #6b7a90;
  --border: #e2e8f0;
  --accent: #2f6fde;
  --accent-soft: rgba(47, 111, 222, 0.12);
  --shadow: 0 10px 30px rgba(30, 60, 110, 0.10), 0 2px 6px rgba(30, 60, 110, 0.06);
  --shadow-lg: 0 24px 60px rgba(30, 60, 110, 0.16), 0 4px 12px rgba(30, 60, 110, 0.08);
  --err: #d14343;
  --win: #0e9f5a;
  --warn: #e08a1e;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; min-height: 100dvh;
  background: radial-gradient(1200px 800px at 30% 20%, var(--bg2), var(--bg1)) fixed;
  color: var(--text);
  font: 15px/1.45 Nunito, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }

header.bar { display: flex; align-items: center; gap: 10px; padding: 12px 20px; }
header.bar h1 { font-size: 24px; margin: 0; font-weight: 800; letter-spacing: .3px; display: flex; align-items: center; gap: 8px; }
header.bar h1 small { color: var(--muted); font-weight: 600; font-size: 13px; }
header.bar .spacer { flex: 1; }

button {
  font: inherit; font-weight: 700; cursor: pointer;
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
  border-radius: 10px; padding: 7px 14px;
  transition: transform .12s, border-color .15s, background-color .15s, box-shadow .15s, opacity .15s;
}
button:hover:not(:disabled) { border-color: var(--accent); box-shadow: 0 2px 8px var(--accent-soft); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.big { padding: 12px 22px; font-size: 16px; border-radius: 12px; }
button.icon { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; font-size: 17px; }
button.ghost { background: transparent; }

.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); }

input[type=text] {
  width: 100%; font: inherit; font-weight: 700; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--panel-soft); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
input[type=text]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

dialog {
  border: 1px solid var(--border); border-radius: 18px; background: var(--panel); color: var(--text);
  padding: 22px 24px; width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow-lg);
}
dialog[open] { animation: pop .25s ease-out; }
dialog::backdrop { background: rgba(10, 20, 40, 0.35); backdrop-filter: blur(2px); }
.dlgHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.dlgHead b { font-size: 19px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; text-align: center; margin: 16px 0; }
.stats div { background: var(--panel-soft); border-radius: 12px; padding: 10px 4px; }
.stats div b { display: block; font-size: 22px; font-weight: 800; }
.stats div span { font-size: 12px; color: var(--muted); font-weight: 600; }

.toast {
  position: fixed; left: 50%; top: 18px; transform: translate(-50%, -20px); opacity: 0; z-index: 100;
  background: var(--text); color: var(--panel); font-weight: 800; padding: 9px 16px; border-radius: 999px;
  box-shadow: var(--shadow-lg); pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

@media (max-width: 760px) {
  header.bar { padding: 10px 14px; }
  header.bar h1 small { display: none; }
}
