/* ═══════════════════════════════════════════════════════
   MosmanLAB · simulados.css
   CSS compartilhado de todos os simulados
   Prof. Edson Mosman · mosmanlab.com.br
═══════════════════════════════════════════════════════ */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── VARIÁVEIS ── */
:root {
  --green: #22c55e;
  --green-dark: #16a34a;
  --green-glow: rgba(34, 197, 94, 0.12);
  --bg: #0d0f10;
  --surface: #161a1d;
  --surface2: #1e2327;
  --surface3: #252b30;
  --border: rgba(255, 255, 255, 0.07);
  --border2: rgba(255, 255, 255, 0.13);
  --text: #e8eaed;
  --muted: #6b7280;
  --error: #f87171;
  --amber: #fbbf24;
}

/* ── BASE ── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  min-height: 100vh;
}

/* ── URGENCY BAR ── */
.urgency {
  background: #0057ff;
  color: #fff;
  text-align: center;
  padding: 10px 20px;
  font-size: 0.82rem;
  font-weight: 600;
}
.urgency strong { font-weight: 800; }
.urgency a { color: #fff; text-decoration: underline; }

/* ── NAV ── */
nav {
  background: rgba(13, 15, 16, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 32px;
  max-width: 900px;
  margin: 0 auto;
}
.nav-logo {
  font-family: 'Lora', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.nav-logo span { color: var(--green); }
.nav-back {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-back:hover { color: var(--text); }

/* ── CRONÔMETRO STICKY ── */
.timer-bar-wrap {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 52px;
  z-index: 90;
}
.timer-bar {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.timer-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.timer-value {
  font-family: 'Lora', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.04em;
  transition: color 0.3s;
}
.timer-value.urgent { color: var(--error); }

.progress-track {
  flex: 1;
  height: 4px;
  background: var(--surface3);
  border-radius: 2px;
  margin: 0 24px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  transition: width 1s linear, background 0.3s;
}
.progress-fill.urgent { background: var(--error); }

/* ── MAPA DE QUESTÕES ── */
.qmap { display: flex; gap: 6px; flex-wrap: wrap; }
.qmap-dot {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--surface3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.qmap-dot.answered {
  background: var(--green-glow);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--green);
}

/* ── MAIN ── */
main { max-width: 900px; margin: 0 auto; padding: 40px 32px 80px; }

/* ── CABEÇALHO DO SIMULADO ── */
.sim-header { margin-bottom: 36px; }
.sim-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.sim-tag::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--green);
}
.sim-header h1 {
  font-family: 'Lora', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 8px;
}
.sim-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.sim-meta-pill {
  font-size: 0.72rem;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 50px;
}

/* ── BLOCO DE QUESTÃO ── */
.question-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 28px 24px;
  margin-bottom: 20px;
  scroll-margin-top: 120px;
  transition: border-color 0.2s;
}
.question-block.answered { border-color: rgba(34, 197, 94, 0.2); }
.question-block.wrong    { border-color: rgba(248, 113, 113, 0.2); }

.q-num {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.q-text {
  font-family: 'Lora', serif;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 16px;
}
.q-text p { margin-bottom: 10px; }
.q-text p:last-child { margin-bottom: 0; }

/* ── FIGURA ── */
.fig-wrap {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  margin: 16px 0;
  display: flex;
  justify-content: center;
}
.fig-wrap img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* ── ALTERNATIVAS ── */
.options { display: flex; flex-direction: column; gap: 9px; margin-bottom: 20px; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
  text-align: left;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
}
.option:hover:not(:disabled) {
  border-color: rgba(34, 197, 94, 0.4);
  background: var(--surface3);
}
.option.selected {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.06);
}
.option.correct {
  border-color: rgba(34, 197, 94, 0.6);
  background: rgba(34, 197, 94, 0.1);
  color: var(--green);
}
.option.wrong-pick {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.08);
  color: var(--error);
}
.option:disabled { cursor: default; }

.opt-letter {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--surface3);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: 1px;
}
.option.correct    .opt-letter { background: var(--green); color: #000; border-color: var(--green); }
.option.wrong-pick .opt-letter { background: var(--error); color: #fff; border-color: var(--error); }

/* ── GABARITO ── */
.gabarito {
  display: none;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin-top: 4px;
  animation: fadeIn 0.3s ease;
}
.gabarito.wrong-gab { border-left-color: var(--error); }
.gabarito.show { display: block; }
.gab-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 10px;
}
.gabarito.wrong-gab .gab-title { color: var(--error); }
.gab-body { font-size: 0.88rem; line-height: 1.85; color: #9ca3af; }
.gab-body p { margin-bottom: 8px; }
.gab-body p:last-child { margin-bottom: 0; }
.gab-body strong { color: var(--text); }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── BOTÃO CONFIRMAR ── */
.btn-confirm {
  padding: 10px 24px;
  background: var(--green);
  color: #000;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-confirm:hover    { background: var(--green-dark); }
.btn-confirm:disabled { opacity: 0.4; cursor: default; }

/* ── BOTÃO FINALIZAR ── */
.btn-finalizar {
  padding: 14px 40px;
  background: var(--green);
  color: #000;
  border: none;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  display: block;
  margin: 32px auto 0;
}
.btn-finalizar:hover { background: var(--green-dark); }
.msg-pendentes {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
}

/* ── TELA DE RESULTADO ── */
#telaResultado { display: none; }
.resultado-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 48px 40px;
  text-align: center;
  max-width: 580px;
  margin: 40px auto 0;
}
.resultado-emoji  { font-size: 3.5rem; margin-bottom: 16px; }
.resultado-titulo {
  font-family: 'Lora', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.resultado-score {
  font-family: 'Lora', serif;
  font-size: 4rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
  margin-bottom: 4px;
}
.resultado-score.medio { color: var(--amber); }
.resultado-score.baixo { color: var(--error); }
.resultado-detalhe { font-size: 0.85rem; color: var(--muted); margin-bottom: 32px; }

.resultado-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}
.res-cell {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 10px;
}
.res-cell-val {
  font-family: 'Lora', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.res-cell-lbl {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── STATUS SALVAR ── */
.save-status {
  font-size: 0.78rem;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 6px;
  display: none;
}
.save-status.ok  { background: var(--green-glow); color: var(--green); border: 1px solid rgba(34,197,94,0.2); display: block; }
.save-status.err { background: rgba(248,113,113,0.08); color: var(--error); border: 1px solid rgba(248,113,113,0.2); display: block; }

/* ── BOTÕES RESULTADO ── */
.btn-revisar {
  display: block; width: 100%; padding: 13px;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 8px; color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 500;
  cursor: pointer; margin-bottom: 10px; transition: all 0.15s;
  text-decoration: none; text-align: center;
}
.btn-revisar:hover { background: var(--surface3); border-color: var(--green); }

.btn-novo {
  display: block; width: 100%; padding: 13px;
  background: var(--green); color: #000; border: none;
  border-radius: 8px; font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  text-decoration: none; text-align: center;
  transition: background 0.15s; margin-bottom: 10px;
}
.btn-novo:hover { background: var(--green-dark); }

/* ── LINK PRÓXIMO SIMULADO ── */
.next-sim {
  background: var(--surface2);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 10px;
  padding: 16px 20px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  transition: border-color 0.15s;
}
.next-sim:hover { border-color: var(--green); }
.next-sim-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 4px; }
.next-sim-title { font-size: 0.92rem; color: var(--text); font-weight: 500; }
.next-sim-arrow { color: var(--green); font-size: 1.2rem; flex-shrink: 0; margin-left: 12px; }

/* ── REVISÃO ── */
.revisao-header {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
  margin: 48px 0 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.revisao-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px 20px;
  margin-bottom: 10px; display: flex; align-items: center; gap: 14px;
}
.revisao-item.certo  { border-left: 3px solid var(--green); }
.revisao-item.errado { border-left: 3px solid var(--error); }
.revisao-icon { font-size: 1.1rem; flex-shrink: 0; }
.revisao-text { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.revisao-text strong { color: var(--text); }

/* ── FOOTER ── */
.sim-footer {
  border-top: 1px solid var(--border);
  padding: 28px 32px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}
.sim-footer a { color: var(--muted); text-decoration: none; }
.sim-footer a:hover { color: var(--text); }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .nav-inner      { padding: 12px 20px; }
  main            { padding: 28px 16px 60px; }
  .timer-bar      { padding: 10px 20px; }
  .question-block { padding: 20px 16px 16px; }
  .resultado-card { padding: 32px 20px; }
  .resultado-grid { grid-template-columns: 1fr 1fr; }
  .sim-footer     { padding: 24px 20px; }
}
