/* EVALUACIÓN - ESTILO TYPEFORM */

* { box-sizing: border-box; }

body { margin: 0; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }

/* Contenedor principal fullscreen */
.typeform-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Fondo animado */
.typeform-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  z-index: 0;
}

.typeform-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: bgMove 20s linear infinite;
}

@keyframes bgMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Contenedor del formulario */
.form-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 800px;
  min-height: 500px;
}

/* Progress bar fijo arriba */
.progress-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.2);
  z-index: 100;
}

.progress-fill {
  height: 100%;
  background: white;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Botón Volver al Inicio */
.back-home-button {
  position: fixed;
  top: 20px;
  left: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.3s ease;
  z-index: 100;
  letter-spacing: 0.01em;
}

.back-home-button:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.35);
}

.back-home-button span {
  font-size: 16px;
  line-height: 1;
}

/* Responsive para mobile */
@media (max-width: 768px) {
  .back-home-button {
    top: 10px;
    left: 10px;
    padding: 0.625rem 1rem;
    font-size: 13px;
  }
  
  .step-indicator {
    top: 10px;
    right: 10px;
    font-size: 13px;
  }
}

/* Indicador de paso */
.step-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.8;
  z-index: 100;
}

/* Pregunta (una a la vez) */
.question-slide {
  background: white;
  border-radius: 20px;
  padding: 60px 50px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  min-height: 450px;
  display: none;
  opacity: 0;
  transform: translateY(30px);
  animation: slideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.question-slide.active {
  display: block;
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.question-slide.slide-out {
  animation: slideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Número de pregunta */
.question-number {
  font-size: 14px;
  font-weight: 600;
  color: #667eea;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.question-number::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  background: #667eea;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Título de pregunta */
.question-title {
  font-size: 32px;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.question-subtitle {
  font-size: 16px;
  color: #718096;
  margin: 0 0 40px 0;
}

/* Opciones */
.options-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.option-button {
  background: #f7fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 500;
  color: #2d3748;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.option-button::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: #667eea;
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.option-button:hover {
  background: #edf2f7;
  border-color: #667eea;
  transform: translateX(4px);
}

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

.option-button.selected {
  background: #f0f4ff;
  border-color: #667eea;
  color: #667eea;
}

.option-button.selected::before {
  transform: scaleY(1);
}

.option-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.option-text {
  flex: 1;
}

/* Checkbox personalizado */
.option-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e0;
  border-radius: 4px;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s ease;
}

.option-button.selected .option-checkbox {
  background: #667eea;
  border-color: #667eea;
}

.option-button.selected .option-checkbox::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 14px;
  font-weight: 700;
}

/* Radio personalizado */
.option-radio {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e0;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s ease;
}

.option-button.selected .option-radio {
  border-color: #667eea;
}

.option-button.selected .option-radio::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #667eea;
  border-radius: 50%;
}

/* Textarea */
.textarea-input {
  width: 100%;
  min-height: 150px;
  padding: 20px;
  font-size: 18px;
  font-family: 'Inter', sans-serif;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  resize: vertical;
  transition: all 0.2s ease;
  margin-bottom: 20px;
}

.textarea-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.textarea-hint {
  font-size: 14px;
  color: #a0aec0;
  margin-top: 8px;
}

/* Contador de selecciones */
.selection-counter {
  font-size: 14px;
  color: #718096;
  margin-top: 16px;
  font-weight: 500;
}

/* Botones de navegación */
.nav-buttons {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 40px;
}

.btn-nav {
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-back {
  background: transparent;
  color: #718096;
}

.btn-back:hover {
  background: #f7fafc;
  color: #2d3748;
}

.btn-next {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  margin-left: auto;
}

.btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-next:active {
  transform: translateY(0);
}

/* Loading estado */
.loading-fullscreen {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: white;
}

.loading-fullscreen.active {
  display: flex;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  margin-top: 24px;
  font-size: 18px;
  font-weight: 500;
  opacity: 0.9;
}

/* Resultados */
.results-fullscreen {
  display: none;
  min-height: 100vh;
  background: #f7fafc;
  padding: 60px 20px;
}

.results-fullscreen.active {
  display: block;
}

.results-container {
  max-width: 900px;
  margin: 0 auto;
}

.results-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 40px;
  border-radius: 20px;
  text-align: center;
  margin-bottom: 40px;
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

.results-hero h1 {
  font-size: 42px;
  font-weight: 700;
  margin: 0 0 16px 0;
}

.results-hero p {
  font-size: 18px;
  opacity: 0.9;
  margin: 0;
}

/* Cards de resultados */
.result-cards {
  display: grid;
  gap: 24px;
  margin-bottom: 40px;
}

.result-card-clean {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: transform 0.2s ease;
}

.result-card-clean:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.result-card-clean h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-icon {
  font-size: 28px;
}

/* Botón de acción final */
.cta-final-clean {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 48px 40px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

.cta-final-clean h3 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 16px 0;
}

.cta-final-clean p {
  font-size: 18px;
  opacity: 0.9;
  margin: 0 0 32px 0;
}

.cta-button-clean {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 40px;
  font-size: 18px;
  font-weight: 600;
  background: white;
  color: #667eea;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cta-button-clean:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .typeform-container {
    padding: 10px;
  }

  .question-slide {
    padding: 40px 30px;
    min-height: auto;
  }

  .question-title {
    font-size: 24px;
  }

  .question-subtitle {
    font-size: 14px;
  }

  .option-button {
    padding: 16px 20px;
    font-size: 15px;
  }

  .nav-buttons {
    flex-direction: column-reverse;
  }

  .btn-next {
    margin-left: 0;
    width: 100%;
  }

  .btn-back {
    width: 100%;
  }

  .results-hero h1 {
    font-size: 32px;
  }

  .step-indicator {
    top: 10px;
    right: 10px;
    font-size: 12px;
  }
}

/* Animaciones de entrada para los resultados */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.result-card-clean {
  animation: fadeInUp 0.5s ease-out backwards;
}

.result-card-clean:nth-child(1) { animation-delay: 0.1s; }
.result-card-clean:nth-child(2) { animation-delay: 0.2s; }
.result-card-clean:nth-child(3) { animation-delay: 0.3s; }
.result-card-clean:nth-child(4) { animation-delay: 0.4s; }
.result-card-clean:nth-child(5) { animation-delay: 0.5s; }

.cta-final-clean {
  animation: fadeInUp 0.5s ease-out 0.6s backwards;
}
