/* Variáveis CSS para cores e fontes */
:root {
  --background-color: #000;
  --text-color: #ffffff;
  --accent-color: #ffff00;
  --button-bg-color: #333;
  --option-bg-color: #d4d4d4;
  --option-hover-bg-color: #ffff00;
  --selected-border-color: var(--accent-color);
}

/* Importação da fonte Inter */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap");

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1000px;
  background-color: var(--background-color);
  padding: 3rem;
  box-sizing: border-box;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh; /* Para garantir que ocupa espaço vertical */
  position: relative;
}

.screen {
  width: 100%;
}

.screen-hidden {
  display: none;
}

.fade-in-up {
  animation: fadeInUp 0.45s ease forwards;
}

.fade-out-up {
  animation: fadeOutUp 0.35s ease forwards;
}

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

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

#quiz-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Cabeçalho principal */
h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 2rem;
  position: relative; /* Para a linha inferior do H1 */
  padding-bottom: 15px; /* Espaço para a linha */
}

/* Container das perguntas e opções */
#question-container {
  width: 100%;
  margin-bottom: 2rem;
  flex-grow: 1; /* Permite que ocupe o espaço disponível */
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centraliza verticalmente o conteúdo da pergunta */
}

#question-container h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 0;
  color: var(--accent-color);
  line-height: 1.4; /* Espaçamento de linha para refrões */
}
.subtext {
  margin-bottom: 4rem;
  font-size: 1.4rem;
  margin-top: 0;
}

.option {
  background-color: var(--option-bg-color);
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
  text-align: center;
  min-height: 80px;
  align-content: center;
  color: #000;
  font-weight: 700;
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
  font-size: clamp(1.5rem, 2vw, 1.4rem);
  white-space: pre-wrap; /* Preserva quebras de linha para os refrões */
}

.option:hover {
  background-color: var(--option-hover-bg-color);
  transform: translateY(-2px);
}

.option.selected {
  border-color: var(--selected-border-color);
  background-color: var(--option-hover-bg-color); /* Mantém o fundo escuro mas com a borda amarela */
}

.option h3 {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 0;
}

.option p {
  font-size: 14px;
  font-weight: 400;
}

#start-btn {
  background-color: transparent;
  color: var(--accent-color); /* Texto escuro no botão amarelo */
  border: 1px solid var(--accent-color);
  border-radius: 50px;
  padding: 1rem 3rem;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease, opacity 0.3s ease;
  min-width: 200px;
  text-transform: uppercase;
}
#start-btn:not(:disabled):hover {
  background-color: var(--accent-color);
  color: #000; /* Um leve brilho ao passar o rato */
}

/* Botão "Próxima" */
#next-btn {
  background-color: transparent;
  color: var(--accent-color); /* Texto escuro no botão amarelo */
  border: 1px solid var(--accent-color);
  border-radius: 50px;
  padding: 1rem 3rem;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.3s ease, opacity 0.3s ease;
  min-width: 200px;
  text-transform: uppercase;
}

#next-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  border: 1px solid transparent;
  background-color: var(--button-bg-color); /* Cor de fundo para botão desativado */
  color: #bbb; /* Cor do texto para botão desativado */
}

#next-btn:not(:disabled):hover {
  background-color: var(--accent-color);
  color: #000;
  /* Um leve brilho ao passar o rato */
}

/* Mensagem final de agradecimento */
.final-message {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--accent-color); /* Cor de destaque para a mensagem final */
}

.final-text {
  font-size: clamp(1.4rem, 4vw, 2.735rem);
  font-weight: 600;
  margin-bottom: 2.5rem;
  color: var(--text-color); /* Cor de destaque para a mensagem final */
}

/* Responsividade básica para margens em ecrãs pequenos */
@media (max-width: 768px) {
  body {
    align-items: flex-start;
  }
  .container {
    padding: 2rem 1.75rem 2.5rem;
    min-height: auto;
    align-self: center;
    justify-content: flex-start;
  }
  #question-container {
    margin-bottom: 1.5rem;
  }
  .subtext {
    margin-bottom: 2.5rem;
  }
  h1 {
    margin-bottom: 1.5rem;
  }
  .header-tag,
  .bottom-line {
    left: 1.5rem;
    right: 1.5rem;
  }
  .bottom-line {
    width: calc(100% - 3rem);
  }
}

@media (max-width: 520px) {
  .container {
    padding: 1.75rem 1.5rem 2.25rem;
    justify-content: flex-start;
    align-self: center;
  }
  #question-container {
    margin-bottom: 1.25rem;
  }
  .subtext {
    margin-bottom: 2rem;
    font-size: 1.2rem;
  }
  body {
    align-items: flex-start;
  }
}
