/* ==========================================================================
   Clone estático — Quiz "Desparasitação Kids" (base pra tradução/adaptação)
   Valores de cor/fonte extraídos ao vivo do original via getComputedStyle().
   ========================================================================== */

:root {
  --color-primary: #17A34A;       /* rgb(23,163,74) — verde botão/progresso */
  --color-primary-border: #0E9542; /* rgb(14,149,66) — borda do botão */
  --color-primary-light: #E8F5E9;  /* fundo dos cards de opção selecionáveis */
  --color-text: #1F2937;
  --color-text-muted: #6B7280;     /* rgb(107,114,128) — subtítulos */
  --color-bg: #FFFFFF;
  --color-danger: #EF4444;         /* usado nos indicadores de risco / tabela X */
  --radius: 16px;
  --font-main: Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 470px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  display: flex;
  justify-content: center;
}

.quiz-container {
  width: 100%;
  max-width: var(--max-width);
  min-width: 0;
  min-height: 100vh;
  padding: 16px 16px 20px;
  position: relative;
}

/* Botão voltar */
.btn-back {
  background: none;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  font-size: 20px;
  color: var(--color-text);
  padding: 8px;
  position: absolute;
  top: 16px;
  left: 8px;
}

/* Logo */
.quiz-logo {
  display: block;
  margin: 0 auto 8px;
  max-width: 84px;
}

/* Barra de progresso */
.progress-track {
  width: 100%;
  height: 6px;
  background: var(--color-primary-light);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 999px;
  transition: width .3s ease;
}

/* Título / subtítulo */
.screen-title {
  font-size: 19px;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
  margin: 0 0 6px;
}
.screen-title .accent { color: var(--color-primary); }
.screen-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  text-align: center;
  margin: 0 0 12px;
}

/* Imagem de tela cheia (hook, notícia fake etc.) */
.screen-image {
  width: 100%;
  border-radius: var(--radius);
  display: block;
  margin-bottom: 16px;
}

/* Opções (lista single/multi-select) */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}
.option-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: var(--color-primary-light);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: var(--font-main);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s ease, border-color .2s ease;
}
/* :hover só em dispositivos com mouse de verdade — em touch, um elemento com :hover
   costuma precisar de 2 toques (o 1º só "ativa" o hover, o 2º clica de fato). */
@media (hover: hover) and (pointer: fine) {
  .option-card:hover { border-color: var(--color-primary); }
}
.option-card.selected {
  background: var(--color-primary);
  color: #fff;
}
.option-card .emoji { font-size: 20px; flex-shrink: 0; }
.option-card small { display: block; font-weight: 400; opacity: .85; }
.option-card > span:last-child { flex: 1; min-width: 0; word-wrap: break-word; }

/* Itens meramente ilustrativos (ex.: lista de sintomas da tela 1) — não são clicáveis,
   então não devem herdar cursor/hover de opção selecionável, senão parecem interativos. */
.option-card.option-static {
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}
.option-card.option-static:hover { border-color: transparent; }

/* Grid 2 colunas (sintomas) */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.options-grid .option-card { align-items: center; text-align: left; padding: 10px 12px; }
.options-grid .dot {
  width: 20px; height: 20px; border-radius: 50%;
  background: #F5B5B5; flex-shrink: 0;
}

/* Botão principal (CTA) */
.btn-primary {
  width: 100%;
  background: var(--color-primary);
  color: #fff;
  border: 1px solid var(--color-primary-border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

/* Chamada pulsante — só no CTA da 1ª tela, pra chamar atenção sem poluir o resto do quiz */
.btn-pulse { animation: btnPulse 1.6s ease-in-out infinite; }
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(23,163,74,.55); }
  50% { box-shadow: 0 0 0 10px rgba(23,163,74,0); }
}

/* Tabela comparativa / imagens auxiliares */
.comparison-table-img { width: 100%; border-radius: var(--radius); margin: 16px 0; }

.comparison-table-wrap { position: relative; margin: 40px 0 20px; }
.comparison-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}
.ct-head {
  padding: 16px 8px;
  text-align: center;
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 14.5px;
  line-height: 1.3;
  background: #cfdfc0;
  color: #1f2937;
}
.ct-cell {
  padding: 16px 10px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
  color: #1a1a1a;
}
.ct-cell-bad { background: #b8392e; }
.ct-cell-good { background: #8bc34a; }
.ct-icon {
  position: absolute;
  top: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,.18);
  z-index: 2;
}
.ct-icon-bad { left: 25%; transform: translate(-50%, -55%); background: #e0607a; }
.ct-icon-good { left: 75%; transform: translate(-50%, -55%); background: #8bc34a; }

/* Bloco de texto legal (termos) */
.legal-text {
  font-size: 10px;
  color: var(--color-text-muted);
  text-align: center;
  margin: 10px 0 0;
}
.legal-text strong { font-weight: 600; }

/* Formulário (tela 18 — simplificada, não precisa ser fiel) */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--color-text-muted); }
.form-group input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid #D1D5DB;
  font-family: var(--font-main);
  font-size: 15px;
}

/* Cards de indicador (tela de resultado) */
.result-alert {
  background: #FEE2E2;
  color: #B91C1C;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
}
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.result-card {
  border: 1px solid #E5E7EB;
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.result-ring-wrap { position: relative; width: 96px; height: 96px; margin: 0 auto; }
.result-ring { width: 100%; height: 100%; }
.result-ring-text {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 20px; font-weight: 700; color: var(--color-text);
}
.result-card .label { font-size: 12px; color: var(--color-text-muted); margin-top: 8px; }

/* Player de áudio (tela 17) */
.audio-card {
  background: #1F2937;
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  margin-bottom: 16px;
}
.audio-card .avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.audio-card audio { flex: 1; }

.wa-voicenote { display: flex; align-items: center; gap: 8px; }
.wa-play-btn {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: #25D366; color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; cursor: pointer; padding: 0 0 0 2px;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.wa-waveform { display: flex; align-items: center; justify-content: space-between; flex: 1; height: 24px; }
.wa-waveform span { width: 2.5px; border-radius: 2px; background: rgba(255,255,255,.35); display: block; }
.wa-duration { font-size: 11px; color: rgba(255,255,255,.6); flex-shrink: 0; }

/* Comentários estilo WhatsApp/Instagram */
.comment-card {
  background: #1F2937;
  color: #fff;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.comment-card .comment-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.comment-card .comment-header img { width: 32px; height: 32px; border-radius: 50%; }
.comment-card .comment-header .name { font-weight: 600; font-size: 13px; }
.comment-card .comment-header .time { font-size: 11px; opacity: .6; }
.comment-card p { font-size: 14px; margin: 0; }

/* Tela de "processando..." (fake load) */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--color-primary-light);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 24px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  min-height: 22px;
}
.loading-screen .progress-track { width: 100%; }

/* TSL placeholder */
.tsl-placeholder {
  border: 3px dashed var(--color-primary);
  background: var(--color-primary-light);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  color: var(--color-primary-border);
  font-weight: 700;
}
