:root {
  --bg: #0b0b0f;
  --panel: #16161d;
  --gold: #d4af37;
  --white: #f5f5f0;
  --muted: #8a8a94;
  --fato: #2f6fed;
  --interpretacao: #b25ce8;
  --medo: #e0433f;
  --green: #2ecc71;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  height: 100%;
  overscroll-behavior: none;
}

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

.screen.active { display: flex; }

.eyebrow {
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

h1 {
  font-size: clamp(22px, 6vw, 40px);
  margin: 0 0 12px;
  font-weight: 800;
}

h2.statement {
  font-size: clamp(20px, 5.5vw, 32px);
  line-height: 1.35;
  margin: 16px 0 28px;
  font-weight: 700;
  max-width: 640px;
}

p.sub {
  color: var(--muted);
  font-size: 16px;
  max-width: 480px;
  line-height: 1.5;
}

input[type="text"] {
  width: 100%;
  max-width: 340px;
  padding: 16px 18px;
  font-size: 18px;
  border-radius: 12px;
  border: 2px solid #33333d;
  background: var(--panel);
  color: var(--white);
  margin: 20px 0;
  text-align: center;
}
input[type="text"]:focus { outline: none; border-color: var(--gold); }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gold);
  color: #1a1a1a;
  font-size: 18px;
  font-weight: 800;
  padding: 16px 36px;
  border-radius: 999px;
  margin-top: 8px;
}
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.choices {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 420px;
}

.choice-btn {
  padding: 22px 16px;
  font-size: 20px;
  font-weight: 800;
  border-radius: 16px;
  color: white;
  transition: transform 0.1s ease, opacity 0.15s ease;
}
.choice-btn:active { transform: scale(0.97); }
.choice-btn:disabled { opacity: 0.35; }
.choice-btn.fato { background: var(--fato); }
.choice-btn.interpretacao { background: var(--interpretacao); }
.choice-btn.medo { background: var(--medo); }
.choice-btn.selected { outline: 4px solid var(--gold); }

.timer-bar-wrap {
  width: 100%;
  max-width: 420px;
  height: 10px;
  background: #26262f;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 22px;
}
.timer-bar {
  height: 100%;
  background: var(--gold);
  width: 100%;
  transition: width 0.2s linear;
}

.badge {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 6px;
}

.result-icon { font-size: 64px; margin-bottom: 8px; }
.result-correct { color: var(--green); }
.result-wrong { color: var(--medo); }

.points-pill {
  background: var(--panel);
  border: 1px solid #33333d;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  margin: 14px 0;
}

.explain-box {
  background: var(--panel);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 16px 18px;
  max-width: 480px;
  text-align: left;
  color: #d8d8de;
  font-size: 15px;
  line-height: 1.5;
  margin-top: 10px;
}

.rank-line { font-size: 18px; color: var(--muted); margin-top: 4px; }

.leaderboard {
  width: 100%;
  max-width: 460px;
  text-align: left;
  margin-top: 10px;
}
.leaderboard-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--panel);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 17px;
}
.leaderboard-row.me { border: 2px solid var(--gold); }
.leaderboard-row .pos { color: var(--gold); font-weight: 800; margin-right: 10px; }
.leaderboard-row .pts { color: var(--muted); }

/* ---- HOST ---- */
.host-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}
.qr-box {
  background: white;
  padding: 20px;
  border-radius: 16px;
  margin: 24px 0;
}
.qr-box img { display: block; width: 280px; height: 280px; }
.join-url {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.02em;
}
.player-count {
  font-size: 22px;
  margin: 18px 0;
  color: var(--muted);
}
.player-count b { color: var(--white); font-size: 30px; }

.bars {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 30px 0;
}
.bar-row { text-align: left; }
.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.bar-track {
  height: 44px;
  background: #1e1e26;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #2b2b35;
}
.bar-fill {
  height: 100%;
  width: 0%;
  transition: width 0.6s ease;
  display: flex;
  align-items: center;
  padding-left: 12px;
  font-weight: 800;
  color: white;
}
.bar-fill.fato { background: var(--fato); }
.bar-fill.interpretacao { background: var(--interpretacao); }
.bar-fill.medo { background: var(--medo); }
.bar-row.correct .bar-track { border-color: var(--green); box-shadow: 0 0 0 2px var(--green) inset; }

.host-controls { margin-top: 30px; display: flex; gap: 14px; }
.host-progress { color: var(--muted); font-size: 16px; margin-bottom: 10px; }

@media (min-width: 700px) {
  h2.statement { font-size: 38px; }
}
