/* Dr What — estilos base partilhados (sem fontes externas: funciona sem internet) */
:root {
  --bg: #120d2b;
  --bg-2: #1c1544;
  --card: #241b56;
  --line: #3a2f7a;
  --text: #f5f3ff;
  --muted: #b3aade;
  --accent: #ffcc33;
  --accent-2: #ff5d8f;
  --ok: #2ecc71;
  --bad: #ff4d4d;
  --warn: #ffb020;
  --opt-a: #e74c3c;
  --opt-b: #3498db;
  --opt-c: #f1c40f;
  --opt-d: #2ecc71;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: radial-gradient(circle at 20% 0%, #2c1f73 0%, var(--bg) 55%) fixed;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); }
code { background: rgba(255,255,255,.08); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

.page-center { display: flex; align-items: center; justify-content: center; padding: 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
}
.card.narrow { width: 100%; max-width: 420px; }

.brand { font-weight: 900; letter-spacing: -1px; margin: 0 0 6px; font-size: 2rem; }
.brand span { color: var(--accent); }
.brand.big { font-size: 3rem; }
/* Logótipo (assets/img/logo.png, 3:1) */
.logo { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.logo.sm { height: 34px; width: auto; margin: 0; }
.logo.mid { width: 260px; }
.logo.big { width: 340px; }
.logo.huge { width: 42vw; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 700;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: transform .08s, filter .15s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); color: #1d1300; border-color: transparent; }
.btn.danger { background: var(--bad); border-color: transparent; }
.btn.small { padding: 6px 10px; font-size: .85rem; }
.btn.block { display: flex; width: 100%; }
.menu { display: grid; gap: 10px; margin-top: 18px; }

.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 5px; font-size: .9rem; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type=checkbox] { width: auto; }

.alert { padding: 10px 12px; border-radius: 10px; margin: 10px 0; }
.alert.error { background: rgba(255,77,77,.15); border: 1px solid var(--bad); }
.alert.ok { background: rgba(46,204,113,.15); border: 1px solid var(--ok); }
.alert.warn { background: rgba(255,176,32,.15); border: 1px solid var(--warn); }

#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 1000; width: min(92vw, 420px); }
.toast { background: #000c; border-left: 4px solid var(--accent); padding: 12px 14px; border-radius: 8px; transition: opacity .4s; }
.toast.error { border-color: var(--bad); }
.toast.ok { border-color: var(--ok); }
.toast.out { opacity: 0; }

.opt-A { --opt: var(--opt-a); }
.opt-B { --opt: var(--opt-b); }
.opt-C { --opt: var(--opt-c); }
.opt-D { --opt: var(--opt-d); }

/* Dificuldade da pergunta: verde, amarelo, vermelho */
.diff[data-level="1"] { color: #2ecc71; }
.diff[data-level="2"] { color: #f1c40f; }
.diff[data-level="3"] { color: #ff5c5c; }
.pill.diff { font-weight: 800; }

/* Janela de confirmação (DW.confirm / DW.prompt) */
.dw-modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); animation: dw-fade .15s ease-out; }
.dw-modal-box { width: min(100%, 420px); background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 22px 20px 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); animation: dw-pop .18s ease-out; }
.dw-modal-box h3 { margin: 0 0 8px; font-size: 1.3rem; color: var(--accent); }
.dw-modal-box p { margin: 0 0 18px; white-space: pre-line; line-height: 1.45; }
.dw-modal-box input { width: 100%; margin: 0 0 18px; }
.dw-modal-actions { display: flex; gap: 10px; }
.dw-modal-actions .btn { flex: 1; justify-content: center; }
@keyframes dw-fade { from { opacity: 0; } }
@keyframes dw-pop { from { transform: scale(.92); opacity: 0; } }
