:root {
  --bg: #0f1828;
  --bg-2: #16233a;
  --card: #1c2c48;
  --line: #2b3d5e;
  --text: #f4efe4;
  --muted: #a7b2c6;
  --gold: #d9a548;
  --gold-ink: #241a06;
  --good: #3fb37f;
  --bad: #e0614b;
  --opt-0: #d9573f;
  --opt-1: #23927f;
  --opt-2: #d9a548;
  --opt-3: #5468d6;
  --radius: 14px;
  font-family: "Noto Sans", "Noto Sans Tamil", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #1f3256 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  border: 0; border-radius: 999px; padding: .75em 1.4em;
  background: var(--gold); color: var(--gold-ink); font-weight: 700; cursor: pointer;
  transition: transform .08s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.danger { background: transparent; color: #ff9c8a; box-shadow: inset 0 0 0 1.5px #6b3428; }
.btn.small { padding: .45em .9em; font-size: .9rem; }

.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field label { font-size: .85rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.input {
  width: 100%; padding: .85em 1em; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--bg-2); outline: none;
}
.input:focus { border-color: var(--gold); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.muted { color: var(--muted); }
.error { color: #ffb3a5; background: #3a1d1a; border-radius: 10px; padding: .6em .9em; margin: .5rem 0 1rem; }
.hidden { display: none !important; }

/* Answer option colors + shapes (shape helps colour-blind players) */
.opt { --c: var(--opt-0); }
.opt.o1 { --c: var(--opt-1); }
.opt.o2 { --c: var(--opt-2); }
.opt.o3 { --c: var(--opt-3); }
.shape { display: inline-grid; place-items: center; width: 1.8em; height: 1.8em; border-radius: 8px; background: rgba(0,0,0,.18); font-size: .9em; flex: none; }

/* Password overlay */
.overlay { position: fixed; inset: 0; background: rgba(8,12,22,.85); display: grid; place-items: center; z-index: 50; padding: 16px; }
.overlay .card { width: min(380px, 100%); }

/* Connection pill */
.conn { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); background: #3a1d1a; color: #ffcabd; padding: .35em .9em; border-radius: 999px; font-size: .85rem; z-index: 40; }
