/* ============================================
   QUIZ / FUNIL (quiz.html)
   ============================================ */

/* -------- Etapa 10: Sucesso + cronômetro -------- */
.etapa-icone-sucesso {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.check-circle {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--verde-primario) 0%, var(--verde-escuro) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 800;
  box-shadow:
    0 0 0 8px rgba(37, 211, 102, 0.12),
    0 12px 32px rgba(37, 211, 102, 0.3);
  animation: checkIn 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}

@keyframes checkIn {
  0% { transform: scale(0) rotate(-180deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(0); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

.cronometro-container {
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  border: 1px solid rgba(255, 179, 0, 0.25);
  border-radius: 16px;
  padding: 22px 20px;
  text-align: center;
  margin-bottom: 20px;
}

.cronometro-label {
  font-size: 13px;
  font-weight: 600;
  color: #8a6d00;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.cronometro-tempo {
  font-family: 'Courier New', 'Monaco', monospace;
  font-size: 48px;
  font-weight: 800;
  color: #6b4f00;
  line-height: 1;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

@media (min-width: 480px) {
  .cronometro-tempo { font-size: 56px; }
}

.cronometro-barra {
  height: 8px;
  background-color: rgba(255, 179, 0, 0.2);
  border-radius: 999px;
  overflow: hidden;
}

.cronometro-progresso {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ffb300, #ff9800);
  border-radius: 999px;
  transition: width 1s linear;
}

.pix-info {
  background-color: var(--cinza-claro);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 18px;
}

.pix-info-titulo {
  font-size: 14px;
  font-weight: 700;
  color: var(--texto-principal);
  margin-bottom: 12px;
}

.pix-info-linha {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

.pix-info-linha:last-child { border-bottom: none; }

.pix-info-label {
  color: var(--texto-secundario);
  font-weight: 600;
}

.aviso-final {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background-color: #fff0f0;
  border: 1px solid #fac8c8;
  border-radius: 10px;
  font-size: 13px;
  color: #8a1f1f;
  line-height: 1.4;
}

.aviso-icone {
  font-size: 18px;
  flex-shrink: 0;
}


body.quiz-body {
  background: linear-gradient(180deg, #f7faf9 0%, #eef4f2 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Padrão decorativo discreto no fundo */
body.quiz-body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(37, 211, 102, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(18, 140, 126, 0.05) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.quiz-topo, .quiz-main { position: relative; z-index: 1; }

/* -------- Topo do quiz (logo + voltar + progresso) -------- */
.quiz-topo {
  background-color: var(--branco);
  padding: 14px 0;
  box-shadow: var(--sombra-suave);
  position: sticky;
  top: 0;
  z-index: 10;
}

.quiz-topo-interno {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  max-width: 720px;
  margin: 0 auto;
}

.btn-voltar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--texto-secundario);
  background-color: var(--cinza-claro);
  transition: all 0.2s;
}

.btn-voltar:hover {
  background-color: var(--verde-claro);
  color: var(--verde-escuro);
}

.btn-voltar.invisivel {
  visibility: hidden;
}

/* Logo real (quando substituir o placeholder) */
.quiz-topo-interno .logo {
  height: 44px;
  width: auto;
}

/* -------- Container principal do quiz -------- */
.quiz-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.quiz-conteudo {
  width: 100%;
  max-width: 520px;
}

/* -------- Etapas (uma por vez) -------- */
.etapa {
  background-color: var(--branco);
  padding: 36px 28px 32px;
  border-radius: 16px;
  box-shadow:
    0 1px 3px rgba(17, 27, 33, 0.04),
    0 10px 30px rgba(17, 27, 33, 0.08);
  animation: fadeIn 0.4s ease;
  border: 1px solid rgba(37, 211, 102, 0.08);
}

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

.etapa h2 {
  font-size: 23px;
  font-weight: 700;
  margin-bottom: 10px;
  text-align: center;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.etapa-subtitulo {
  text-align: center;
  color: var(--texto-secundario);
  margin-bottom: 28px;
  font-size: 15px;
  line-height: 1.5;
}

/* -------- Selos de confiança (topo do quiz) -------- */
.selos-confianca {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 16px;
  background-color: var(--branco);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(17, 27, 33, 0.05);
  font-size: 12px;
  font-weight: 600;
  color: var(--texto-secundario);
  flex-wrap: wrap;
}

.selo-item {
  color: var(--verde-escuro);
  white-space: nowrap;
}

.selo-divisor {
  width: 1px;
  height: 14px;
  background-color: #e0e4e7;
}

/* Logo WhatsApp no topo de cada etapa (estática) */
.etapa-icone-topo {
  width: 84px;
  height: 84px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f0fff5 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1px rgba(37, 211, 102, 0.15),
    0 0 0 8px rgba(37, 211, 102, 0.06),
    0 8px 24px rgba(37, 211, 102, 0.18);
  position: relative;
}

.etapa-icone-topo img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

/* Pulso sutil ao redor da logo */
.etapa-icone-topo::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.2);
  animation: pulseRing 2.5s ease-out infinite;
}

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* Selo de segurança (etapa cadastro) */
.selo-seguro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--verde-claro) 0%, #c8f0d4 100%);
  color: var(--verde-escuro);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  margin: 0 auto 20px;
  border: 1px solid rgba(18, 140, 126, 0.15);
}

/* -------- Opções (botões de resposta) -------- */
.opcoes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.opcao {
  padding: 18px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fafcfb 100%);
  border: 2px solid #e8ecef;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 500;
  text-align: left;
  color: var(--texto-principal);
  min-height: 64px;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(17, 27, 33, 0.03);
}

.opcao-icone {
  font-size: 22px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f4f2 0%, #e4ebe8 100%);
  border-radius: 12px;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.opcao-texto {
  flex: 1;
}

.opcao-seta {
  color: var(--texto-secundario);
  font-size: 20px;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.2s ease;
}

.opcao:hover {
  border-color: var(--verde-primario);
  background: linear-gradient(180deg, #ffffff 0%, #f0fff5 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.18);
}

.opcao:hover .opcao-icone {
  background: linear-gradient(135deg, var(--verde-claro) 0%, #b8ecc6 100%);
  transform: scale(1.08);
}

.opcao:hover .opcao-seta {
  opacity: 1;
  transform: translateX(0);
  color: var(--verde-escuro);
}

.opcao:active {
  transform: scale(0.98);
}

/* Animação de seleção ao clicar */
.opcao.selecionada {
  border-color: var(--verde-primario);
  background-color: var(--verde-claro);
  animation: pulseSelecao 0.5s ease;
}

.opcao.selecionada .opcao-icone {
  background-color: var(--verde-primario);
  color: var(--branco);
  transform: scale(1.15);
}

.opcao.selecionada .opcao-seta {
  opacity: 1;
  color: var(--verde-escuro);
}

@keyframes pulseSelecao {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3); }
  100% { transform: scale(1); }
}

/* Efeito ripple ao clicar */
.opcao::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background-color: rgba(37, 211, 102, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
  opacity: 1;
  pointer-events: none;
}

.opcao.clicada::after {
  width: 500px;
  height: 500px;
  opacity: 0;
}

/* Animação cards dispositivo */
.card-dispositivo.selecionada {
  border-color: var(--verde-primario);
  background-color: var(--verde-claro);
  animation: pulseSelecao 0.5s ease;
}

.card-dispositivo::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background-color: rgba(37, 211, 102, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
  opacity: 1;
  pointer-events: none;
}

.card-dispositivo {
  position: relative;
  overflow: hidden;
}

.card-dispositivo.clicada::after {
  width: 500px;
  height: 500px;
  opacity: 0;
}

/* -------- Campos de formulário -------- */
.campo {
  margin-bottom: 18px;
}

.campo label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--texto-principal);
}

.campo input,
.campo select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e8ecef;
  border-radius: 12px;
  background-color: #fafcfb;
  color: var(--texto-principal);
  min-height: 54px;
  transition: all 0.2s;
}

.campo input:focus,
.campo select:focus {
  outline: none;
  border-color: var(--verde-primario);
  background-color: var(--branco);
  box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.12);
}

/* Placeholder com tom bem claro para não ser confundido com valor preenchido */
.campo input::placeholder {
  color: #b3bac0;
  font-weight: 400;
  opacity: 1;
}

.campo-pix {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 480px) {
  .campo-pix {
    grid-template-columns: 2fr 1fr;
  }
}

.campo-erro {
  color: #e63946;
  font-size: 14px;
  margin-top: 6px;
  min-height: 18px;
}

.texto-auxiliar {
  font-size: 13px;
  color: var(--texto-secundario);
  margin-top: 8px;
  margin-bottom: 4px;
  line-height: 1.4;
}

/* -------- Cards de dispositivo (Android / iPhone) -------- */
.cards-dispositivo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 480px) {
  .cards-dispositivo {
    grid-template-columns: 1fr 1fr;
  }
}

.card-dispositivo {
  background: linear-gradient(180deg, #ffffff 0%, #fafcfb 100%);
  border: 2px solid #e8ecef;
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  transition: all 0.25s ease;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(17, 27, 33, 0.03);
}

.card-dispositivo:hover {
  border-color: var(--verde-primario);
  background: linear-gradient(180deg, #ffffff 0%, #f0fff5 100%);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.18);
}

.card-dispositivo-icone {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.card-dispositivo-icone img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-dispositivo-nome {
  font-size: 17px;
  font-weight: 600;
  color: var(--texto-principal);
  letter-spacing: -0.01em;
}

/* -------- Carregamento fake (spinner) -------- */
.etapa-carregamento {
  text-align: center;
  padding: 60px 20px;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 5px solid var(--verde-claro);
  border-top-color: var(--verde-primario);
  border-radius: 50%;
  animation: girar 1s linear infinite;
  margin: 0 auto 24px;
}

@keyframes girar {
  to {
    transform: rotate(360deg);
  }
}

.carregamento-texto {
  font-size: 18px;
  font-weight: 500;
  color: var(--texto-principal);
}

.sucesso-icone {
  font-size: 64px;
  margin-bottom: 14px;
  animation: aparecer 0.4s ease;
}

@keyframes aparecer {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* -------- Vídeo -------- */
.video-container {
  margin: 20px 0;
  border-radius: var(--raio-borda);
  overflow: hidden;
  background-color: #000;
}

.video-container video {
  width: 100%;
  display: block;
}

.video-aviso {
  font-size: 14px;
  color: var(--texto-secundario);
  text-align: center;
  margin-top: 10px;
}

/* -------- Ações (botão continuar) -------- */
.acoes {
  margin-top: 24px;
}

/* -------- Código de pareamento -------- */
.codigo-container {
  background: linear-gradient(135deg, #f0fff5 0%, #e0fae8 100%);
  border: 2px dashed var(--verde-primario);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  margin-bottom: 20px;
}

.codigo-pareamento {
  font-family: 'Courier New', 'Monaco', monospace;
  font-size: 38px;
  font-weight: 800;
  color: var(--verde-escuro);
  letter-spacing: 4px;
  margin-bottom: 16px;
  user-select: all;
  word-break: break-all;
  line-height: 1.1;
}

@media (min-width: 480px) {
  .codigo-pareamento { font-size: 44px; }
}

.btn-copiar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background-color: var(--verde-primario);
  color: var(--branco);
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
}

.btn-copiar:hover {
  background-color: var(--verde-escuro);
  transform: translateY(-1px);
}

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

.btn-copiar.copiado {
  background-color: var(--verde-escuro);
  animation: copiadoPulse 0.4s ease;
}

@keyframes copiadoPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.btn-copiar-icone {
  font-size: 18px;
}

/* Loader do código */
.codigo-carregando {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 20px;
  background-color: var(--cinza-claro);
  border-radius: 16px;
  color: var(--texto-secundario);
  font-size: 15px;
  margin-bottom: 20px;
}

.spinner-pequeno {
  width: 24px;
  height: 24px;
  border: 3px solid var(--verde-claro);
  border-top-color: var(--verde-primario);
  border-radius: 50%;
  animation: girar 1s linear infinite;
}

.codigo-erro {
  background-color: #fff0f0;
  color: #c62828;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  text-align: center;
  margin-bottom: 20px;
  border: 1px solid #fac8c8;
}

/* Passos de conexão */
.passos-conexao {
  background-color: var(--cinza-claro);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.passos-titulo {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--texto-principal);
}

.passos-lista {
  padding-left: 22px;
  color: var(--texto-secundario);
  font-size: 14px;
  line-height: 1.7;
}

.passos-lista li {
  margin-bottom: 4px;
}

.passos-lista strong {
  color: var(--texto-principal);
  font-weight: 600;
}

/* Status da conexão (com bolinha piscando) */
.status-conexao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background-color: #fff8e1;
  border-radius: 10px;
  font-size: 14px;
  color: #8a6d00;
  font-weight: 600;
}

.status-indicador {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ffb300;
  animation: piscar 1.2s ease-in-out infinite;
}

.status-indicador.conectado {
  background-color: var(--verde-primario);
  animation: none;
}

@keyframes piscar {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.status-conexao:has(.status-indicador.conectado) {
  background-color: var(--verde-claro);
  color: var(--verde-escuro);
}

/* -------- Modal (pop-up pagamento) -------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(17, 27, 33, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeInOverlay 0.25s ease;
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background-color: var(--branco);
  border-radius: 18px;
  padding: 32px 24px 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@keyframes modalIn {
  from { transform: scale(0.85) translateY(20px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-icone {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--verde-claro) 0%, #b8ecc6 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.25);
}

.modal-titulo {
  font-size: 21px;
  font-weight: 700;
  color: var(--texto-principal);
  margin-bottom: 10px;
  line-height: 1.3;
}

.modal-texto {
  font-size: 16px;
  color: var(--texto-secundario);
  line-height: 1.5;
  margin-bottom: 22px;
}

.modal-texto strong {
  color: var(--verde-escuro);
  font-weight: 700;
}

/* -------- Rodapé de confiança -------- */
.rodape-confianca {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 24px;
  padding: 16px 12px;
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  border: 1px solid rgba(17, 27, 33, 0.04);
}

.rodape-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--texto-secundario);
  line-height: 1.3;
}

.rodape-icone {
  font-size: 20px;
}
