/* QuizRoom shared styles. System font stack, no external assets. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bg: #0e0e18;
  --bg-alt: #16162a;
  --panel: #1c1c34;
  --ink: #f5f5fa;
  --ink-dim: #a8a8c0;
  --accent: #6c5ce7;
  --accent-bright: #8b7bff;
  --good: #2ecc71;
  --bad: #e74c3c;
  --warn: #f5a623;

  --c-red: #e6483f;
  --c-blue: #2977e0;
  --c-yellow: #e8b323;
  --c-green: #26a65b;

  --radius: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
}

.hidden {
  display: none !important;
}

a {
  color: var(--accent-bright);
}

/* ---- generic layout helpers ---- */

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 480px;
}

.card {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 24px;
}

.muted {
  color: var(--ink-dim);
}

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--ink-dim);
  font-size: 0.85rem;
}

/* ---- buttons ---- */

.btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  background: var(--panel);
  transition: transform 0.08s ease, filter 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn-danger {
  background: var(--bad);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--bg-alt);
  color: var(--ink-dim);
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--ink-dim);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 8px;
}

/* ---- inputs ---- */

input[type="text"], input[type="number"], select, textarea {
  font-family: inherit;
  font-size: 1.05rem;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--bg-alt);
  background: var(--bg-alt);
  color: var(--ink);
  width: 100%;
}

input[type="text"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

/* ---- answer icon shapes (inline SVG paint via currentColor) ---- */

.shape {
  width: 1em;
  height: 1em;
  display: inline-block;
  fill: currentColor;
}

/* ---- toast / status feedback ---- */

.status-banner {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.95rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  z-index: 50;
}

/* ---- scrollbar ---- */

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-thumb {
  background: var(--panel);
  border-radius: 4px;
}
