/* style.css */

/* ---------- BACKGROUND SUAVE ---------- */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background: linear-gradient(45deg, #ECE9E6 0%, #FFFFFF 100%);
  color: #333;
  box-sizing: border-box;
  position: relative;
}

/* ---------- TÍTULO ---------- */
h1 {
  text-align: center;
  margin-top: 0;
  padding-top: 20px;
  color: #333;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
  margin-bottom: 0;
}

/* ---------- BLOCO HERBERT ELETRICA ---------- */
#herbert-box {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  width: 200px;
  background: #ffffffcc;
  border: 2px solid #ccc;
  border-radius: 8px;
  color: #000;
  font-weight: bold;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  text-align: center;
  z-index: 1000;
}
.herbert-title {
  font-size: 1.1em;
  animation: pulseName 1.5s ease-in-out infinite;
}
.herbert-sub {
  font-size: 0.9em;
  margin-top: 5px;
  text-transform: lowercase;
}
.led-strip {
  width: 100%;
  height: 6px;
  margin-top: 8px;
  background: repeating-linear-gradient(
    to right,
    #007bff 0,
    #007bff 10px,
    transparent 10px,
    transparent 20px
  );
  background-size: 20px 6px;
  animation: ledRun 0.7s linear infinite;
}
@keyframes ledRun {
  0% { background-position: 0 0; }
  100% { background-position: 20px 0; }
}
@keyframes pulseName {
  0%, 100% { transform: scale(1); color: #000; }
  50% { transform: scale(1.1); color: #007bff; }
}

/* ---------- CONTAINER DO QUIZ ---------- */
#quiz {
  max-width: 900px;
  margin: 100px auto 20px auto;
  background: #ffffffcc;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  padding: 15px;
}

/* ---------- CONTAINER DO RESULTADO ---------- */
#result {
  max-width: 900px;
  margin: 20px auto;
  background: #f0fcfcdd;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  padding: 15px;
}

/* ---------- ANÚNCIO LATERAL ESQUERDO ---------- */
#ad-lateral-left {
  position: fixed;
  top: 160px;
  left: 20px;
  width: 180px;
  background: #ffffffcc;
  border: 2px solid #ccc;
  border-radius: 8px;
  color: #000;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  z-index: 999;
  padding-bottom: 10px;
  display: block;
  /* Nova animação "pulse" */
  animation: pulseAd 2s ease-in-out infinite;
}
@keyframes pulseAd {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 6px #ccc;
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 18px #aaa;
  }
}
/* REMOVIDO .led-strip-lateral E SUA KEYFRAME circleRun */

/* ---------- CRONÔMETRO ---------- */
#global-timer {
  text-align: center;
  font-size: 20px;
  margin-bottom: 10px;
  color: #333;
  font-weight: bold;
}
#timer-display {
  font-weight: bold;
  margin-left: 5px;
}
.status {
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 5px;
  color: #fff;
  margin-left: 10px;
}
.otimo { background-color: #28a745; }
.atencao { background-color: #ffc107; }
.correndo { background-color: #dc3545; }
.acabou { background-color: #6c757d; }

/* ---------- QUESTÕES ---------- */
.question-container {
  margin-bottom: 20px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 10px;
}
.q-category {
  font-size: 0.9em;
  font-weight: bold;
  color: #007bff;
  margin-bottom: 6px;
  display: inline-block;
}
.q-enunciado {
  font-size: 1.06em;
  font-weight: bold;
  line-height: 1.4;
  margin-top: 5px;
}
.placa-img {
  float: left;
  max-width: 120px;
  margin: 0 15px 10px 0;
}
.option {
  display: block;
  margin: 5px 0;
}
.option input[type="radio"] {
  margin-right: 6px;
}

/* ---------- FEEDBACK DE RESPOSTA ---------- */
.option.correct {
  color: #28a745;
  border: 2px solid #28a745;
}
.option.wrong {
  color: #dc3545;
  border: 2px solid #dc3545;
}

.navigation {
  text-align: center;
  margin-top: 20px;
}
button {
  padding: 10px 20px;
  margin: 5px;
  font-size: 14px;
  cursor: pointer;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  transition: background-color 0.3s, transform 0.3s;
}
button:hover {
  background: #0056b3;
  transform: scale(1.03);
}
.hidden {
  display: none;
}
.fade-in {
  animation: fadeIn 0.8s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
#timer-status {
  transition: background-color 0.5s, color 0.5s;
}
#score {
  font-weight: bold;
}
.restart {
  text-align: center;
  margin-top: 20px;
}

/* RODAPÉ ANÚNCIOS */
#footer-ads {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px auto;
}
.footer-ad-block {
  width: 180px;
  height: 180px;
}
.small-ad-block {
  margin: 0 auto;
  border: 2px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffffcc;
}
.ad-fallback-text {
  display: block !important;
  text-transform: uppercase;
  font-weight: bold;
  font-size: 1em;
  margin: 0;
  padding: 0;
  text-align: center;
  color: #00d9ff;
  background: linear-gradient(
    to left,
    #ff0000,
    #ffdd00,
    #00ff00,
    #00ffff,
    #0000ff,
    #ff00ff,
    #ff0000
  );
  background-size: 300% 100%;
  background-clip: text;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.8),
               0 0 10px rgba(255, 255, 255, 0.5);
  animation: movingColors 3s linear infinite;
}
@keyframes movingColors {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 0%;
  }
}
