* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold: #c8860a;
  --gold-light: #e8a020;
  --bg: #050d2e;
  --panel: #080f1e;
  --text: #f0f0f0;
  --muted: #4a6080;
  --border-dim: #1e3060;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(circle, rgba(30, 80, 200, 0.28) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.tela { display: none; width: 100%; max-width: 700px; }
.tela.ativa { display: flex; justify-content: center; }

/* ── Card (nome, resultado, criar) ── */
.card {
  background: var(--panel);
  border: 1.5px solid var(--gold);
  padding: 40px 32px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.card p { color: var(--muted); font-size: 0.95rem; line-height: 1.5; }

.label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold);
  margin-bottom: -12px;
}

/* ── Inputs ── */
.input {
  background: #0a1228;
  border: 1.5px solid var(--border-dim);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  padding: 12px 16px;
  width: 100%;
  outline: none;
  transition: border-color .15s;
  border-radius: 0;
}
.input:focus { border-color: var(--gold); }
.textarea { resize: vertical; min-height: 80px; }

/* ── Buttons ── */
.btn {
  background: var(--gold);
  color: #000;
  border: none;
  padding: 15px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  display: block;
  text-decoration: none;
  text-align: center;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: all .15s;
  border-radius: 0;
}
.btn:hover { background: var(--gold-light); }
.btn:disabled { opacity: .3; cursor: default; }

.btn-secondary {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border-dim);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  padding: 12px;
}
.btn-secondary:hover { border-color: var(--muted); color: var(--text); background: transparent; }

/* ── Home ── */
.home-card {
  background: var(--panel);
  border: 1.5px solid var(--gold);
  padding: 52px 36px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

.home-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.foto-titulo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  border: 2px solid var(--gold);
  box-shadow: 0 0 24px rgba(200, 134, 10, 0.3);
}

.home-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .1em;
  text-align: center;
  text-shadow: 0 0 40px rgba(200, 134, 10, 0.35);
}

.home-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  align-items: stretch;
}

.btn-jogar {
  flex: 2;
  background: var(--gold);
  color: #000;
  border: none;
  padding: 20px;
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: all .15s;
  border-radius: 0;
}
.btn-jogar:hover { background: var(--gold-light); }

.btn-criar-quiz {
  flex: 1;
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border-dim);
  padding: 20px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: all .15s;
  border-radius: 0;
}
.btn-criar-quiz:hover { border-color: var(--gold); color: var(--gold); }

/* ── Quiz selection ── */
.quiz-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-item {
  background: #0a1228;
  border: 1.5px solid var(--border-dim);
  padding: 16px 18px;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.quiz-item:hover { border-color: var(--gold); background: #0d1635; }

.quiz-item-nome { font-weight: 700; font-size: 1rem; }
.quiz-item-data { font-size: 0.78rem; color: var(--muted); }

/* ── Game screen ── */
.game-screen {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.progresso {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: 0 2px;
}

/* Question panel with diamond decorations */
.question-panel {
  background: var(--panel);
  border: 1.5px solid var(--gold);
  padding: 24px 52px;
  text-align: center;
  position: relative;
}

.question-panel::before,
.question-panel::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background-color: var(--bg);
  background-image: radial-gradient(circle, rgba(30, 80, 200, 0.28) 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  border: 1.5px solid var(--gold);
  transform: rotate(45deg);
  top: 50%;
  margin-top: -7px;
}
.question-panel::before { left: -8px; }
.question-panel::after { right: -8px; }

.question-text {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text);
}

/* Answer options — 2×2 grid */
.opcoes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Arrow shape: outer = gold (acts as border), inner = dark */
.opcao-outer {
  background: var(--gold);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%);
  padding: 1.5px;
  transition: background .15s;
}

.btn-opcao {
  background: var(--panel);
  width: 100%;
  color: var(--text);
  border: none;
  font-family: inherit;
  font-size: 0.88rem;
  padding: 14px 38px 14px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  transition: background .15s;
  min-height: 52px;
}
.opcao-outer:hover .btn-opcao { background: #0d1635; }

.opcao-num {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--gold);
  min-width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* States */
.opcao-outer.selecionado { background: var(--gold-light); }
.opcao-outer.selecionado .btn-opcao { background: #1a1200; }
.opcao-outer.selecionado .opcao-num { color: var(--gold-light); }

.opcao-outer.certa { background: #22c55e; }
.opcao-outer.certa .btn-opcao { background: #061a0a; color: #22c55e; }
.opcao-outer.certa .opcao-num { color: #22c55e; }

.opcao-outer.errada { background: #ef4444; }
.opcao-outer.errada .btn-opcao { background: #1a0606; color: #ef4444; }
.opcao-outer.errada .opcao-num { color: #ef4444; }

/* ── Resultado ── */
.fim-emoji { font-size: 3rem; text-align: center; }

.score-display { text-align: center; }
.score-main { font-size: 3.2rem; font-weight: 800; color: var(--gold); }
.score-sub { font-size: 0.9rem; color: var(--muted); margin-top: 4px; }

.detalhes-lista { display: flex; flex-direction: column; gap: 8px; }

.detalhe-item {
  background: #0a1228;
  border: 1px solid var(--border-dim);
  padding: 12px 14px;
  font-size: 0.88rem;
  line-height: 1.6;
}
.detalhe-item .status { font-size: 0.78rem; margin-bottom: 4px; color: var(--muted); }
.detalhe-item .pergunta-texto { color: #aaa; margin-bottom: 4px; }
.detalhe-item .correta-txt { color: #22c55e; font-size: 0.82rem; }

/* ── Criar quiz ── */
.progresso-topo {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.numero-controle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.numero-controle span {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--gold);
  min-width: 60px;
  text-align: center;
}

.btn-num {
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold);
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all .15s;
  line-height: 1;
}
.btn-num:hover { background: var(--gold); color: #000; }

.opcoes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: -12px;
}
.toggle-opcoes { display: flex; gap: 6px; }

.btn-toggle {
  background: transparent;
  border: 1.5px solid var(--border-dim);
  color: var(--muted);
  padding: 4px 16px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all .15s;
}
.btn-toggle.ativo { background: var(--gold); color: #000; border-color: var(--gold); font-weight: 700; }

.opcao-row { display: flex; align-items: center; gap: 10px; }
.opcao-radio { width: 18px; height: 18px; accent-color: var(--gold); cursor: pointer; flex-shrink: 0; }
.opcao-letra { font-size: 0.85rem; color: var(--gold); width: 16px; flex-shrink: 0; font-weight: 700; }

.link-box {
  background: #0a1228;
  border: 1.5px solid var(--border-dim);
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--muted);
  word-break: break-all;
}

.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1fad54; }

@media (max-width: 500px) {
  .opcoes-grid { grid-template-columns: 1fr; }
  .home-actions { flex-direction: column; }
  .card, .home-card { padding: 28px 18px; }
  .question-panel { padding: 20px 36px; }
}
