/* ============================================
   RESET
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============================================
   BASE
   ============================================ */
body {
  font-family: 'Montserrat', sans-serif;
  background-color: #f4f4f4;
}

p {
  font-size: 16px;
  font-weight: 500;
}

/* ============================================
   HEADER (red bar at top)
   ============================================ */
.header {
  background-color: #e31a22;
  display: flex;
  justify-content: center;
  min-height: 35px;
  transition: opacity 0.3s ease;
  border-bottom: 1px solid #ffffff;
}

.header img {
  width: 80px;
  margin: 20px 0;
}

/* ============================================
   PAGE TITLE
   ============================================ */
.titllee {
  display: flex;
  margin-top: 25px;
  justify-content: center;
  margin-bottom: 20px;
  transition: opacity 0.3s ease;
}

.titllee img {
  width: min(175px, 52vw);
  height: auto;
}

/* ============================================
   MAIN CONTAINER & CONTENT CARD
   ============================================ */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px 30px;
  text-align: center;
}

.content {
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgb(114, 114, 114);
  transition: opacity 0.3s ease;
}

/* ============================================
   PROGRESS VALUES
   ============================================ */
.valor-desconto {
  display: flex;
  justify-content: flex-end;
  color: red;
}

.valor-desconto p {
  font-weight: bold;
}

.valor-total {
  display: flex;
  justify-content: flex-end;
  color: green;
}

.valor-total p {
  font-weight: bold;
  margin: 0;
}

/* ============================================
   UTILITY
   ============================================ */
.hidden {
  display: none;
}

.opacity {
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.footer {
  display: none;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes shake {
  0%, 100%                        { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90%         { transform: translateX(-5px); }
  20%, 40%, 60%, 80%              { transform: translateX(5px); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40%                     { transform: translateY(-10px); }
  60%                     { transform: translateY(-5px); }
}

@keyframes glow {
  0%   { box-shadow: 0 0 5px rgba(75, 75, 75, 0.5); }
  50%  { box-shadow: 0 0 20px rgba(52, 52, 52, 0.8); }
  100% { box-shadow: 0 0 5px rgba(49, 49, 49, 0.5); }
}

@keyframes popupIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================
   QUIZ SCREENS
   ============================================ */
.quiz-screen {
  animation: fadeIn 0.5s ease-out;
}

.quiz-screen.hidden {
  display: none;
}

.quiz-screen.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

/* ============================================
   BUTTONS (primary action)
   ============================================ */
.btn {
  background-color: #e31920;
  color: #fff;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 5px;
  transition: all 0.3s ease;
  font-size: 20px;
  font-weight: 400;
  margin-top: 20px;
  margin-bottom: 30px;
  width: 100%;
  font-family: 'Montserrat', sans-serif;
}

.btn:hover {
  background-color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Start quiz pulse animation */
#start-quiz {
  animation: pulse 2s ease infinite;
}

#start-quiz:hover {
  animation: none;
  transform: scale(1.02);
}

/* ============================================
   ANSWER OPTIONS
   ============================================ */
.options {
  margin-top: 20px;
}

.options button {
  display: block;
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #000000;
  background-color: #f1f1f1;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 20px;
  font-size: 17px;
  position: relative;
  overflow: hidden;
  outline: none;
  font-family: 'Montserrat', sans-serif;
}

/* Default option colours */
.option {
  background-color: #f4f4f4;
  color: black;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
}

.options button:hover {
  transform: translateX(5px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  background-color: #e8e8e8;
}

.options button:active {
  transform: scale(0.98);
}

/* Ripple effect */
.options button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.options button:active::after {
  width: 200px;
  height: 200px;
}

/* Correct option selected */
.options button.correct-selected {
  background-color: green;
  color: white;
  opacity: 0.6;
  animation: pulse 0.5s ease;
}

/* Incorrect option selected */
.options button.incorrect-selected {
  background-color: red;
  color: white;
  opacity: 0.4;
  animation: shake 0.5s ease;
}

/* Correct answer animation */
.options button.correct-animation {
  animation: pulse 0.5s ease, glow 1s ease infinite;
  background-color: rgba(0, 255, 0, 0.4);
}

/* Incorrect answer animation */
.options button.incorrect-animation {
  animation: shake 0.5s ease;
  background-color: rgba(0, 0, 0, 0.4);
}

/* ============================================
   END SCREEN
   ============================================ */
#end-screen {
  animation: fadeIn 0.8s ease-out;
}

#end-screen h2 {
  animation: bounce 1s ease;
}

#end-screen img {
  animation: fadeIn 1s ease-out 0.3s both;
}

.p-resgate {
  margin-bottom: 30px;
}

/* Redeem button bounces to attract attention */
.btn-resgate {
  text-decoration: none;
  display: inline-block;
  animation: bounce 2s ease infinite;
}

.btn-resgate:hover {
  animation: none;
  transform: scale(1.05);
}

/* ============================================
   POPUP: select an answer
   ============================================ */
.selecione-resposta {
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  z-index: 1000;
  max-width: 90%;
  width: 350px;
  animation: popupIn 0.3s ease-out;
}

.selecione-resposta.hidden {
  display: none;
}

.selecione-resposta-p {
  font-weight: 800;
}

/* ============================================
   POPUP: hints for wrong answers
   ============================================ */
.dica {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  pointer-events: none;
}

.dica.hidden {
  display: none;
}

.popUp-dica {
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  bottom: auto;
  margin: 20px;
  max-width: 90%;
  width: 350px;
  pointer-events: auto;
  animation: popupIn 0.3s ease-out;
}

.popUp-dica.hidden {
  display: none;
}

.dica-p {
  font-weight: 400;
}

.dica-errado {
  font-weight: 800;
}
