* {
  font-family: 'Nunito Sans', sans-serif;
}

body {
  margin: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.btn-verde {
  --cor1: #69d46f;
  --cor2: #1f9e0e;
  --cor-active: #10c710;
  --cor-shadow: #13971e;
}

.btn-azul {
  --cor1: #5dade2;
  --cor2: #1b4f72;
  --cor-active: #2e86c1;
  --cor-shadow: #154360;
}

.btn-vermelho {
  --cor1: #ec7063;
  --cor2: #922b21;
  --cor-active: #c0392b;
  --cor-shadow: #7b241c;
}

.pagina-home {
  background-color: #333333; /* mudar */
  background-image: url('/images/fabrica-inicial.png');
  background-size: cover;
  background-position: 80% center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.pagina-perguntas {
  background-color: #333333;
  background-image: var(--bg-pb);
  background-size: cover;
  background-position: 80% center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.fabrica-colorida {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: var(--bg-color);
  background-size: cover;
  background-position: 80% center;
  background-repeat: no-repeat;
  z-index: -1; 
  transition: clip-path 1s ease-in-out; 
  clip-path: inset(0 100% 0 0); 
}

#toast-aviso {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 25px;
  border-radius: 8px;
  color: white;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

#toast-aviso.mostrar {
  opacity: 1;
  transform: translateY(0);
}

.toast-sucesso { background-color: #198754; } /* Verde */
.toast-erro { background-color: #dc3545; }

.logo {
  background-size: contain;
  width: 95px;
  height: 80px;
}

.logo-nav {
  background-size: contain;
  width: 50px;
  height: 40px;
}

.header {
  display: flex;
  justify-content: flex-end;
  padding: 20px;
  padding-bottom: 0;
}

.card-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  width: 400px;
  max-width: 90%;
  background: rgba(70, 65, 67, 0.582);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.btn-padrao {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 100%;
  box-sizing: border-box;
  outline: 0;
  border: 0;
  margin-bottom: 10px;
  cursor: pointer;
  will-change: box-shadow, transform;
  background: radial-gradient(100% 100% at 100% 0%, var(--cor1) 0%, var(--cor2) 100%);
  padding: 0 2em;
  border-radius: 0.3em;
  color: #fff;
  height: 2.6em;
  text-shadow: 0 1px 0 rgb(0 0 0 / 40%);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.btn-padrao i {
    margin-right: 8px;
}

.btn-padrao:hover {
  box-shadow: 0px 0.1em 0.2em rgb(45 35 66 / 40%), 0px 0.4em 0.7em -0.1em rgb(45 35 66 / 30%), inset 0px -0.1em 0px var(--cor-shadow);
  transform: translateY(-0.1em);
}

.btn-padrao:active {
  box-shadow: inset 0px 0.1em 0.6em var(--cor-active);
  transform: translateY(0em);
}

.logout-button {
  background-color: #be3715;
  color: white;
  padding: 9px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 24px;
}

.logout-button:hover {
  background-color: #9b270b;
}

.titulo {
  font-weight: bold;
  color: white;
  font-size: 30px;
}

.sub-titulo {
  color: white;
  font-size: 17px;
}

.input-login {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  font-size: 14px;
  transition: 0.3s;
  width: 100%;
  margin-bottom: 15px;
  margin-top: 15px;
  box-sizing: border-box;
}

.input-login:focus {
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.alert-error {
  background-color: #ffe6e6;
  color: #b30000;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
  border: 1px solid #ff4d4d;
  transition: opacity 0.5s ease;
}

.title-login-adm {
  color: white;
  margin-top: 10px;
  text-decoration: none;
  cursor: pointer;
}

.quiz-container {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
}

.quiz-card {
  width: 100%;
  max-width: 500px; 
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-sizing: border-box; 
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 15px;
}

.question-number {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 600;
}

.timer-container {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #dc3545; 
  font-weight: bold;
  font-size: 1.1rem;
  background-color: #fff5f5;
  padding: 6px 12px;
  border-radius: 20px;
}

.card-body h2 {
  font-size: 1.25rem;
  color: #333333;
  line-height: 1.5;
  text-align: center;
  -webkit-user-select: none; 
  -ms-user-select: none;     
  user-select: none; 
  margin: 0;
}

.card-footer {
  display: flex;
  gap: 15px;
}

.btn-questions {
  flex: 1;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: white;
}

.btn-true {
  background-color: #198754; 
}

.btn-true:hover {
  background-color: #157347;
}

.btn-false {
  background-color: #dc3545; 
}

.btn-false:hover {
  background-color: #bb2d3b;
}

.btn-questions:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loader-animado {
  border: 4px solid #f3f3f3; 
  border-top: 4px solid #5dade2; 
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: girar 1s linear infinite;
  margin: 0 auto; 
}

@keyframes girar {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/* JORNADA */

.menu-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.menu-header {
  text-align: center;
  background: rgba(70, 65, 67, 0.582);
  backdrop-filter: blur(8px);
  padding: 15px 30px;
  border-radius: 12px;
  margin-bottom: 50px;
  color: white;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.titulo-jornada {
  margin: 0;
  font-size: 2rem;
  font-weight: bold;
}

.sub-titulo-jornada {
  margin: 5px 0 0 0;
  font-size: 1rem;
  opacity: 0.8;
}

.timeline-container {
  position: relative;
  width: 100%;
  max-width: 800px; 
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  top: 35px; 
  left: 5%;
  right: 5%;
  height: 6px;
  background: rgb(255, 253, 253);
  border-radius: 3px;
  z-index: 1;
}

.timeline-nodes {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.dia-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  transition: transform 0.3s ease;
  width: 80px;
}

.dia-node:hover:not(.bloqueado) {
  transform: translateY(-10px);
}

.dia-circulo {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  position: relative;
}

.dia-numero {
  position: absolute;
  font-size: 0.9rem;
  bottom: -10px;
  right: -5px;
  background: #333;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

.dia-label {
  margin-top: 15px;
  color: white;
  font-weight: bold;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* --- ESTADOS DOS DIAS --- */

.dia-node.concluido .dia-circulo {
  background: linear-gradient(135deg, #198754, #157347); 
  border: 4px solid #fff;
}

.dia-node.ativo .dia-circulo {
  background: linear-gradient(135deg, #5dade2, #2e86c1); 
  border: 4px solid #fff;
  animation: pulsar 2s infinite;
  transform: scale(1.1);
}

.dia-node.bloqueado {
  cursor: not-allowed;
  filter: grayscale(100%);
}

.dia-node.bloqueado .dia-circulo {
  background: linear-gradient(135deg, #888, #555);
  border: 4px solid #ccc;
}

.dia-node.esperando {
  cursor: not-allowed;
}

.dia-node.esperando .dia-circulo {
  background: linear-gradient(135deg, #3498db, #1f618d); 
  border: 4px solid #b3d7ff; 
  transform: scale(0.95); 
}

.dia-node.esperando:hover {
  transform: none; 
}

@keyframes pulsar {
  0% { box-shadow: 0 0 0 0 rgba(93, 173, 226, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(93, 173, 226, 0); }
  100% { box-shadow: 0 0 0 0 rgba(93, 173, 226, 0); }
}

@media (max-width: 768px) {
  .timeline-nodes {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }
  
  .timeline-line {
    top: 5%;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: auto;
  }
}

/* RANKING PARA O USUÁRIO */

.ranking-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.ranking-card {
  width: 100%;
  max-width: 500px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); 
  padding: 30px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.ranking-header {
  text-align: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.ranking-header h2 {
  margin: 10px 0 5px 0;
  color: #333;
  font-size: 1.5rem;
}

.ranking-header p {
  margin: 0;
  color: #6c757d;
  font-size: 0.9rem;
}

.icone-trofeu {
  font-size: 3rem;
  color: #FFD700; 
  text-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px; 
  overflow-y: auto;
  padding-right: 5px; 
}

.ranking-list::-webkit-scrollbar {
  width: 6px;
}
.ranking-list::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 10px;
}

.ranking-item {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border-radius: 10px;
  padding: 12px 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-left: 5px solid transparent;
}

.ranking-item:hover {
  transform: translateX(5px);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.ranking-pos {
  font-weight: bold;
  font-size: 1.2rem;
  color: #6c757d;
  width: 40px;
  text-align: center;
}

.ranking-info {
  flex: 1; 
  padding-left: 10px;
}

.ranking-nome {
  font-weight: bold;
  color: #333;
  font-size: 1.1rem;
}

.ranking-pontos {
  font-size: 0.9rem;
  color: #888;
  text-align: right;
}

.pontos-numero {
  font-weight: 900;
  font-size: 1.3rem;
  color: #198754; 
}


/* 1º Lugar - Ouro */
.ranking-item.posicao-1 {
  background: linear-gradient(to right, #fffdf0, #ffffff);
  border-left-color: #FFD700;
  border: 1px solid #ffeeba;
}
.ranking-item.posicao-1 .ranking-pos { color: #FFD700; font-size: 1.5rem; }

/* 2º Lugar - Prata */
.ranking-item.posicao-2 {
  background: linear-gradient(to right, #f8f9fa, #ffffff);
  border-left-color: #C0C0C0;
  border: 1px solid #e2e3e5;
}
.ranking-item.posicao-2 .ranking-pos { color: #A0A0A0; font-size: 1.3rem; }

/* 3º Lugar - Bronze */
.ranking-item.posicao-3 {
  background: linear-gradient(to right, #fffaf6, #ffffff);
  border-left-color: #CD7F32;
  border: 1px solid #f5e4d3;
}
.ranking-item.posicao-3 .ranking-pos { color: #CD7F32; font-size: 1.2rem; }

.meu-desempenho {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border: 2px solid #5dade2; 
  border-radius: 10px;
  padding: 15px;
  margin-top: 15px; 
  box-shadow: 0 4px 10px rgba(93, 173, 226, 0.2);
}

.meu-desempenho .ranking-nome {
  color: #1b4f72; 
}

.meu-desempenho .ranking-pos {
  color: #5dade2;
}

/* ---  BRINDES  --- */
.brindes-destaque {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px dashed #e0e0e0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.titulo-brindes {
  font-size: 0.95rem;
  font-weight: bold;
  color: #555;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.brindes-lista-vertical {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brinde-linha {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  transition: transform 0.2s ease;
}

.brinde-linha:hover {
  transform: translateX(5px);
}

.brinde-posicao {
  font-size: 1.1rem;
  font-weight: 900;
  color: #888;
  width: 35px; 
}

.brinde-nome {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
  text-align: left;
  flex: 1; 
  min-width: 0; 
  word-wrap: break-word;
  word-break: break-word; 
  white-space: normal; 
  line-height: 1.3;
}

.brinde-linha.podio-1 {
  background: linear-gradient(to right, #fffdf0, #ffffff);
  border-color: #ffeeba;
  border-left: 4px solid #FFD700;
}
.brinde-linha.podio-1 .brinde-icone { color: #FFD700; }
.brinde-linha.podio-1 .brinde-posicao { color: #d4af37; }

.brinde-linha.podio-2 {
  background: linear-gradient(to right, #f8f9fa, #ffffff);
  border-color: #e2e3e5;
  border-left: 4px solid #C0C0C0;
}
.brinde-linha.podio-2 .brinde-icone { color: #a0a0a0; }
.brinde-linha.podio-2 .brinde-posicao { color: #888; }

.brinde-linha.podio-3 {
  background: linear-gradient(to right, #fffaf6, #ffffff);
  border-color: #f5e4d3;
  border-left: 4px solid #CD7F32;
}
.brinde-linha.podio-3 .brinde-icone { color: #CD7F32; }
.brinde-linha.podio-3 .brinde-posicao { color: #a05a2c; }

/* Tela de instruções do quiz */
.instrucoes-botoes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.instrucoes-botoes .btn-padrao {
  margin-bottom: 0;
  font-size: 16px;
}

#tela-instrucoes {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.instrucoes-header {
  text-align: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.instrucoes-icone {
  font-size: 2.4rem;
  color: #27ae60;
}

.instrucoes-header h2 {
  margin: 8px 0 4px;
  font-size: 1.3rem;
  color: #222;
}

.instrucoes-header p {
  margin: 0;
  font-size: 0.85rem;
  color: #888;
}

.instrucoes-lista {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.instrucoes-lista li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f9f9f9;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.85rem;
  color: #444;
  line-height: 1.5;
}

.instrucoes-lista li i {
  font-size: 1.2rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.instrucoes-lista li strong {
  display: block;
  color: #222;
  margin-bottom: 2px;
  font-size: 0.88rem;
}

/* Critérios de classificação */
.criterios-ranking {
  margin: 12px 0 16px 0;
  border: 1px solid #d0e8ff;
  border-radius: 10px;
  background: #f0f7ff;
  overflow: hidden;
}

.criterios-ranking summary {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a6db5;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}

.criterios-ranking summary::-webkit-details-marker { display: none; }

.criterios-ranking[open] summary {
  border-bottom: 1px solid #d0e8ff;
}

.criterios-lista {
  margin: 0;
  padding: 12px 14px 12px 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.criterios-lista li {
  font-size: 0.82rem;
  color: #333;
  line-height: 1.4;
}

.criterios-lista li strong {
  display: block;
  color: #1a6db5;
  margin-bottom: 2px;
}

.criterios-lista li span {
  color: #555;
}

/* Timer bar */
.timer-bar-track {
  width: 100%;
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  overflow: hidden;
}

.timer-bar {
  height: 100%;
  width: 100%;
  background: #198754;
  border-radius: 3px;
  transition: width 1s linear, background-color 0.5s ease;
}

.timer-bar.timer-alerta {
  background: #e67e22;
}

.timer-bar.timer-critico {
  background: #e74c3c;
  animation: pulsar-timer 0.5s ease-in-out infinite alternate;
}

@keyframes pulsar-timer {
  from { opacity: 1; }
  to   { opacity: 0.5; }
}

/* Streak badge */
.streak-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #ff6b35, #f7c59f);
  color: white;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
  animation: streak-pop 0.3s ease;
}

@keyframes streak-pop {
  0%   { transform: scale(0.8); }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Card flash animations */
@keyframes flash-acerto-anim {
  0%   { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); background-color: #ffffff; }
  30%  { box-shadow: 0 0 0 8px rgba(25, 135, 84, 0.25); background-color: #d4edda; }
  100% { box-shadow: 0 8px 24px rgba(0,0,0,0.08); background-color: #ffffff; }
}

@keyframes flash-erro-anim {
  0%   { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); background-color: #ffffff; }
  30%  { box-shadow: 0 0 0 8px rgba(220, 53, 69, 0.25); background-color: #f8d7da; }
  100% { box-shadow: 0 8px 24px rgba(0,0,0,0.08); background-color: #ffffff; }
}

.quiz-card.flash-acerto {
  animation: flash-acerto-anim 0.6s ease forwards;
}

.quiz-card.flash-erro {
  animation: flash-erro-anim 0.6s ease forwards;
}

/* Floating points */
.pontos-flutuantes {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  font-weight: 900;
  color: #198754;
  text-shadow: 0 2px 6px rgba(0,0,0,0.15);
  pointer-events: none;
  animation: flutuar-pontos 0.9s ease forwards;
  z-index: 10;
}

@keyframes flutuar-pontos {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-60px); }
}

.quiz-card {
  position: relative;
}

/* Slide-in animation for new questions */
@keyframes slide-in-anim {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

.card-body.slide-in {
  animation: slide-in-anim 0.3s ease forwards;
}

/* End-of-day summary screen */
.resumo-dia {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
}

.resumo-estrelas {
  display: flex;
  gap: 6px;
}

.estrela {
  font-size: 2.8rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.estrela-ativa {
  color: #FFD700;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
  animation: estrela-brilha 0.5s ease forwards;
}

.estrela-vazia {
  color: #ddd;
}

@keyframes estrela-brilha {
  0%   { transform: scale(0.5) rotate(-15deg); opacity: 0; }
  70%  { transform: scale(1.2) rotate(5deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.resumo-mensagem {
  font-size: 1rem;
  font-weight: 700;
  color: #333;
  text-align: center;
  margin: 0;
}

.resumo-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 14px 28px;
}

.resumo-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.resumo-stat-valor {
  font-size: 2rem;
  font-weight: 900;
  color: #198754;
  line-height: 1;
}

.resumo-stat-label {
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.resumo-stat-sep {
  font-size: 1rem;
  color: #aaa;
  font-weight: 600;
}

/* Contagem regressiva */
#tela-contagem {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.numero-contagem {
  font-size: 6rem;
  font-weight: 900;
  line-height: 1;
  user-select: none;
}

.numero-contagem.animar {
  animation: contagem-pop 0.7s ease forwards;
}

@keyframes contagem-pop {
  0%   { transform: scale(0.3); opacity: 0; }
  50%  { transform: scale(1.3); opacity: 1; }
  80%  { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

/* Bônus de velocidade */
.bonus-velocidade {
  position: absolute;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  font-weight: 900;
  color: #f39c12;
  text-shadow: 0 2px 6px rgba(0,0,0,0.2);
  pointer-events: none;
  animation: flutuar-bonus 1.2s ease forwards;
  z-index: 11;
  white-space: nowrap;
  letter-spacing: 1px;
}

@keyframes flutuar-bonus {
  0%   { opacity: 1; transform: translateX(-50%) translateY(0) scale(0.8); }
  30%  { transform: translateX(-50%) translateY(-10px) scale(1.1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-50px) scale(1); }
}

/* Confete */
.confete {
  position: fixed;
  top: -12px;
  pointer-events: none;
  z-index: 9999;
  animation: cair-confete linear forwards;
}

@keyframes cair-confete {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

/* Pulso da fábrica ao acertar */
.fabrica-colorida.fabrica-pulso {
  animation: fabrica-pulso-anim 0.5s ease;
}

@keyframes fabrica-pulso-anim {
  0%   { transform: scale(1); filter: brightness(1); }
  40%  { transform: scale(1.03); filter: brightness(1.3); }
  100% { transform: scale(1); filter: brightness(1); }
}

/* Replay de erros na tela final */
.resumo-erros {
  width: 100%;
  margin-top: 4px;
}

.resumo-erros-titulo {
  font-size: 0.78rem;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px 0;
  text-align: center;
}

.resumo-erro-item {
  background: #fff5f5;
  border: 1px solid #f5c6cb;
  border-left: 4px solid #dc3545;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 0.82rem;
  color: #333;
  line-height: 1.4;
}

.resumo-erro-resposta {
  font-size: 0.78rem;
  color: #198754;
  font-weight: 700;
  margin-top: 4px;
}

/* Toast hidden initial state */
.toast-escondido {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

@media (max-width: 480px) {
  .quiz-card {
    padding: 16px;
    gap: 14px;
  }

  .instrucoes-header h2 {
    font-size: 1.1rem;
  }

  .instrucoes-header p {
    font-size: 0.8rem;
  }

  .instrucoes-lista {
    gap: 8px;
  }

  .instrucoes-lista li {
    padding: 10px 12px;
    gap: 10px;
    font-size: 0.82rem;
  }

  .instrucoes-lista li i {
    font-size: 1rem;
  }

  .instrucoes-icone {
    font-size: 1.8rem;
  }

  .estrela {
    font-size: 2.2rem;
  }

  .resumo-stat-valor {
    font-size: 1.6rem;
  }

  .resumo-stats {
    padding: 12px 20px;
    gap: 12px;
  }
}