:root {
  --primary-color: #6B4CE6;
  --secondary-color: #FFD166;
  --text-color: #4A4A68;
  --light-bg: #F5F6FA;
  --progress-bg: #E0E0E0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, sans-serif;
}

body {
  background-color: #f8faff;
  min-height: 100vh;
}

/* Header Styles */
header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem;
  border-bottom: solid 1px #4477FF;
  background-color: #f8faff;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-text {
  font-size: 1.8rem;
  font-weight: bold;
  line-height: 1;
}

.stars {
  color: #FFD700;
  font-size: 0.75rem;
  letter-spacing: -0.1em;
  margin-bottom: -0.37rem;
  margin-left: -30px;
}

.blue {
  color: #4477FF;
}

.red {
  color: #FF4444;
}

.yellow {
  color: #FFBB44;
}

.green {
  color: #38A169;
}

.balance-header {
  background-color: #EEF3FF;
  color: #4477FF;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 500;
  font-size: 1.125rem;
  padding-top: 1.1em;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

.bonus-message {
  background-color: var(--secondary-color);
  padding: 15px;
  border-radius: 15px;
  text-align: center;
  margin-bottom: 30px;
  font-size: 0.8em;
  font-weight: bold;
}

.progress-container {
  display: none;
  margin-bottom: 30px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background-color: var(--progress-bg);
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  margin-top: 8px;
  font-size: 0.9em;
  color: var(--text-color);
  display: none;
}

.quiz-container {
  background: white;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.question-section h2 {
  color: var(--text-color);
  margin-bottom: 20px;
}

.question {
  margin-bottom: 30px;
}

.question img {
  width: 76%;
  max-width: 400px;
  margin: 10px auto;
  display: block;
  border-radius: 10px;
}

.question h3 {
  text-align: center;
  margin: 15px 0;
  color: var(--text-color);
  font-size: 1.1em;
}

.rating-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 15px 0;
}

.rating-button {
  width: 60px;
  height: 60px;
  border: 2px solid var(--rating-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--light-bg);
  position: relative;
}

.rating-button svg {
  width: 32px;
  height: 32px;
  transition: transform 0.2s ease;
}

.rating-button:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--rating-color);
}

.rating-button.selected {
  background-color: var(--rating-color);
  border-color: var(--rating-color);
}

.choice-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 15px 0;
}

.choice-button {
  padding: 15px;
  border: none;
  background-color: var(--light-bg);
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  transition: all 0.3s ease;
  color: #000;
}

.choice-button:hover {
  background-color: #E8E9ED;
  transform: translateY(-2px);
}

.choice-button.selected {
  background-color: #007BFF;
  color: white;
}

.text-input {
  width: 100%;
  padding: 15px;
  border: 2px solid var(--light-bg);
  border-radius: 5px;
  margin: 15px 0;
  font-size: 1em;
  transition: border-color 0.3s ease;
}

.text-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.submit-button {
  width: 100%;
  padding: 15px;
  background-color: #007BFF;
  border: none;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #ffffff;
}

.submit-button:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.submit-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.71);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal {
  background-color: white;
  padding: 30px;
  border-radius: 15px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
  transform: scale(0.9);
  animation: modalPop 0.5s forwards;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  display: none;
}

.modal-title {
  font-size: 24px;
  color: #333;
  margin-bottom: 20px;

}

.modal-check {
  width: 60px;
  height: 60px;
  background-color: #4CAF50;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  transform: scale(0.5);
  animation: checkPop 0.5s 0.2s forwards;
}

.modal-check svg {
  width: 30px;
  height: 30px;
  fill: white;
}

.modal-reward {
  font-size: 36px;
  font-weight: bold;
  margin: 20px 0;
  transform: scale(0.8);
  animation: rewardPop 0.5s 0.4s forwards;
}

.modal-message {
  color: #666;
  margin-bottom: 30px;
  opacity: 0;
  animation: fadeIn 0.5s 0.6s forwards;
}

.modal-button {
  background-color: #007BFF;
  color: #fff;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
  opacity: 0;
  animation: buttonSlide 0.5s 0.8s forwards;

}

.modal-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-overlay.final-modal {
  background: #1a1a1a8f;
}

.modal.final {
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  color: white;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  animation: modalPop 0.5s forwards;
}

@keyframes modalPop {
  to {
    transform: scale(1);
  }
}

.modal.final .modal-title {
  color: white;
  font-size: 28px;
  margin-bottom: 30px;
}

.modal.final .modal-check {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #7096ff, #4477FF);
  margin-bottom: 30px;
  transform: scale(0.5);
  animation: checkPop 0.5s 0.2s forwards;
}

@keyframes checkPop {
  50% {
    transform: scale(1.2);
  }

  to {
    transform: scale(1);
  }
}

.modal.final .modal-reward {
  font-size: 48px;
  background: linear-gradient(135deg, #7096ff, #4477FF);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 30px 0;
  transform: scale(0.8);
  animation: rewardPop 0.5s 0.4s forwards;
}

@keyframes rewardPop {
  50% {
    transform: scale(1.1);
  }

  to {
    transform: scale(1);
  }
}

.modal.final .modal-message {
  color: #ffffff;
  font-size: 17px;
  line-height: 1.6;
  font-weight: bold;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeIn 0.5s 0.6s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.modal.final .modal-button {
  background: linear-gradient(135deg, #7096ff, #4477FF);
  color: #f3f3f3;
  font-weight: bold;
  padding: 18px 36px;
  border-radius: 30px;
  font-size: 20px;
  transform: translateY(20px);
  opacity: 0;
  animation: buttonSlide 0.5s 0.8s forwards;
}

@keyframes buttonSlide {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.confetti {
  width: 10px;
  height: 10px;
  background-color: rgb(0, 213, 255);
  position: fixed;
  top: -60px;
  z-index: 2000;
}

.star-rating-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 15px 0;
  position: relative;
}

.rating-label {
  font-size: 0.9rem;
  color: #666;
}

.left-label {
  margin-right: 5px;
}

.right-label {
  margin-left: 5px;
}

.stars-wrapper {
  display: flex;
  gap: 8px;
}

.star-button {
  background: none;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  transition: transform 0.2s ease;
}

.star-button svg {
  width: 36px;
  height: 36px;
  fill: #ccc;
}

.star-button:hover {
  transform: scale(1.2);
}

.star-button.selected svg {
  fill: #FFD700;
}

/* Remove o gradiente e aplica fundo branco no modal final */
.modal.final.new-final-style {
  background: #fff !important;
  color: #333 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  max-width: 350px;
  margin: 0 auto;
}

/* Título principal: "PARABÉNS!" */
.modal.final.new-final-style .final-title {
  font-size: 1.8rem;
  font-weight: bold;
  color: #1F4B99;
  margin-bottom: 0.5rem;
}

/* Subtítulo: "Seu saldo subiu!" */
.modal.final.new-final-style .final-subtitle {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 1.5rem;
}

/* Ícone de troféu */
.modal.final.new-final-style .final-trophy {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
}

.modal.final.new-final-style .final-trophy svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Valor do saldo: "R$ 100,00" */
.modal.final.new-final-style .final-amount {
  font-size: 2.4rem;
  color: #007BFF;
  font-weight: bold;
  margin-bottom: 1.5rem;
}

/* Texto de explicação e avisos */
.modal.final.new-final-style .final-description {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

/* Botão azul "ASSISTIR VÍDEO" */
.modal.final.new-final-style .final-video-button {
  display: inline-block;
  background-color: #007BFF;
  color: #fff;
  border: none;
  border-radius: 9999px;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

.modal.final.new-final-style .final-video-button:hover {
  background-color: #0056b3;
}