/**
 * Diagnósticos Interativos Be Mersion - Redesign
 * Layout: Landing Page / Quiz Full-Screen estilo Typeform
 * Versão: 2.0
 */

/* ================================================
   VARIÁVEIS
   ================================================ */
:root {
  --color-primary: #A59FE2;
  --color-secondary: #6C57E5;
  --color-text: #351F65;
  --color-accent: #FF808B;
  --color-green: #34B78F;
  --color-white: #FFFFFF;
  --color-gray-light: #D7D8D9;
  
  --font-primary: 'Roboto', sans-serif;
  --font-secondary: 'ABeeZee', sans-serif;
  
  --transition-fast: 0.2s ease;
  --transition-default: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  background: var(--color-text);
  color: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Garantir que todos os textos principais sejam brancos */
.quiz-container p, 
.quiz-container h1, 
.quiz-container h2, 
.quiz-container h3, 
.quiz-container h4, 
.quiz-container h5, 
.quiz-container h6, 
.quiz-container span:not(.option-card span):not(.form-content span), 
.quiz-container div:not(.option-card):not(.form-content) {
  color: var(--color-white) !important;
}

/* ================================================
   TOP HEADER COM LOGO
   ================================================ */
.top-header {
  background: var(--color-secondary);
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1000;
}

.logo-container {
  max-width: 200px;
  margin: 0 auto;
}

.logo-container img {
  max-width: 100%;
  height: auto;
}

/* ================================================
   BARRA DE PROGRESSO
   ================================================ */
.progress-bar-fixed {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  margin-bottom: 20px;
  border-radius: 3px;
  overflow: hidden;
}

/* Responsividade do Header */
@media (max-width: 768px) {
  .top-header {
    padding: 15px;
  }
  
  .btn-success {
    font-size: 14px;
    padding: 16px 24px;
    flex-wrap: wrap;
  }
  
  .btn-success i {
    font-size: 16px;
  }
  
  .logo-container {
    max-width: 180px;
  }
}

@media (max-width: 480px) {
  .top-header {
    padding: 10px;
  }
  
  .logo-container {
    max-width: 150px;
  }
}

.progress-fill {
  height: 100%;
  background: var(--color-secondary);
  width: 0%;
  transition: width 0.5s ease;
}

/* ================================================
   CONTAINER PRINCIPAL
   ================================================ */
.quiz-container {
  min-height: 100vh;
  position: relative;
}

/* ================================================
   TELA DE PERGUNTA (Full Screen)
   ================================================ */
.question-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 40px 20px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: opacity 0.5s ease;
}

.question-screen.active {
  opacity: 1;
  pointer-events: all;
  position: relative;
}

.question-screen.fade-out {
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* ================================================
   CONTEÚDO DA PERGUNTA
   ================================================ */
.question-content {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

/* ================================================
   TÍTULO DA PERGUNTA
   ================================================ */
.question-title {
  font-size: 48px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 60px;
  line-height: 1.3;
  animation: slideDown 0.6s ease;
}

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

/* ================================================
   GRADE DE OPÇÕES
   ================================================ */
.options-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
  animation: fadeIn 0.6s ease 0.2s both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ================================================
   CARDS DE OPÇÃO
   ================================================ */
.option-card {
  background: var(--color-white);
  padding: 24px 32px;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition-default);
  border: 3px solid transparent;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  text-align: left;
  position: relative;
  overflow: hidden;
}

.option-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 5px;
  height: 100%;
  background: var(--color-secondary);
  transform: scaleY(0);
  transition: transform var(--transition-default);
}

.option-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(108, 87, 229, 0.15);
  border-color: var(--color-secondary);
}

.option-card:hover::before {
  transform: scaleY(1);
}

.option-card:active {
  transform: translateY(-2px);
}

.option-card.selected {
  background: var(--color-secondary);
  color: var(--color-white);
  border-color: var(--color-secondary);
  pointer-events: none;
}

/* Numeração das opções (opcional) */
.option-card::after {
  content: '';
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--color-gray-light);
  transition: all var(--transition-default);
}

.option-card:hover::after {
  border-color: var(--color-secondary);
  background: rgba(108, 87, 229, 0.1);
}

.option-card.selected::after {
  border-color: var(--color-white);
  background: var(--color-white);
}

/* ================================================
   INDICADOR DE PERGUNTA
   ================================================ */
.question-indicator {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
  animation: fadeIn 0.6s ease 0.4s both;
}

/* ================================================
   TELA DE FORMULÁRIO
   ================================================ */
.form-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 40px 20px;
}

/* Removido - definição movida para seção isolada */

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

.form-content h2 {
  font-size: 32px;
  color: #351F65 !important;
  margin-bottom: 16px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-primary);
}

.form-content h2 i {
  color: var(--color-green);
  font-size: 28px;
}

.form-content p {
  color: #351F65 !important;
  text-align: center;
  margin-bottom: 32px;
  font-size: 18px;
  opacity: 0.8;
  font-family: var(--font-primary);
}

/* ================================================
   FORMULÁRIO - ESTILOS ISOLADOS
   ================================================ */
.form-content {
  max-width: 600px;
  width: 100%;
  background: var(--color-white);
  padding: 48px;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  margin: 0 auto;
  position: relative;
  z-index: 10;
  animation: slideUp 0.6s ease;
}

.form-content * {
  box-sizing: border-box;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #351F65 !important;
  font-size: 15px;
  font-family: var(--font-primary);
}

.form-input {
  width: 100%;
  padding: 16px;
  border: 2px solid #D7D8D9;
  border-radius: 10px;
  font-family: var(--font-primary);
  font-size: 16px;
  color: #351F65 !important;
  transition: all var(--transition-default);
  background: #FFFFFF !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-input:hover {
  border-color: #A59FE2;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.form-input:focus {
  outline: none;
  border-color: #6C57E5;
  box-shadow: 0 0 0 4px rgba(108, 87, 229, 0.15);
  background: #FFFFFF !important;
  transform: translateY(-1px);
}

.form-input::placeholder {
  color: #666666 !important;
  font-weight: 500;
  opacity: 0.8;
}

/* ================================================
   BOTÕES
   ================================================ */
.btn {
  padding: 18px 40px;
  border: none;
  border-radius: 10px;
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-default);
  text-decoration: none;
  display: inline-block;
  text-align: center;
  width: 100%;
}

.btn-primary {
  background: var(--color-secondary);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(108, 87, 229, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 87, 229, 0.4);
}

.btn-success {
  background: var(--color-green);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(52, 183, 143, 0.3);
  font-size: 16px;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-success i {
  font-size: 18px;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 183, 143, 0.4);
  background: #2a9d7a;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn .loading {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--color-white);
  animation: spin 1s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ================================================
   TELA FINAL
   ================================================ */
.final-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 40px 20px;
  text-align: center;
}

.final-content {
  max-width: 700px;
  animation: zoomIn 0.6s ease;
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.final-icon {
  font-size: 80px;
  margin-bottom: 24px;
  animation: bounce 1s ease infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.final-content h2 {
  font-size: 42px;
  color: var(--color-white);
  margin-bottom: 20px;
}

.final-content p {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 16px;
  line-height: 1.6;
}

.final-buttons {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.final-buttons .btn {
  width: auto;
  min-width: 200px;
}

/* ================================================
   RESPONSIVIDADE
   ================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .question-title {
    font-size: 38px;
    margin-bottom: 50px;
  }
  
  .option-card {
    font-size: 18px;
    padding: 20px 28px;
  }
  
  .form-content {
    padding: 40px;
  }
  
  .form-content h2 {
    font-size: 28px;
  }
  
  .final-content h2 {
    font-size: 36px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .question-screen {
    padding: 80px 20px 40px 20px;
  }
  
  .question-title {
    font-size: 28px;
    margin-bottom: 40px;
  }
  
  .options-grid {
    gap: 12px;
  }
  
  .option-card {
    font-size: 16px;
    padding: 18px 24px;
  }
  
  .option-card::after {
    width: 20px;
    height: 20px;
    right: 20px;
  }
  
  .question-indicator {
    font-size: 14px;
  }
  
  .form-content {
    padding: 32px 24px;
  }
  
  .form-content h2 {
    font-size: 24px;
  }
  
  .form-content p {
    font-size: 16px;
  }
  
  .btn {
    padding: 16px 32px;
    font-size: 16px;
  }
  
  .final-icon {
    font-size: 60px;
  }
  
  .final-content h2 {
    font-size: 28px;
  }
  
  .final-content p {
    font-size: 18px;
  }
  
  .final-buttons {
    flex-direction: column;
    gap: 12px;
  }
  
  .final-buttons .btn {
    width: 100%;
    min-width: auto;
  }
}

/* ================================================
   UTILITÁRIOS
   ================================================ */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}
