/* Reset e configurações base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #000000;
  color: #ffffff;
}

/* Background 3D animado */
#background-3d {
  background: linear-gradient(-45deg, #000000, #1a0b00, #000000, #0d0400, #000000);
  background-size: 400% 400%;
  animation: gradientMove 15s ease infinite;
}

#background-3d::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(255, 165, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(255, 140, 0, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 165, 0, 0.05) 0%, transparent 50%);
  animation: floatingOrbs 20s ease-in-out infinite;
}

#background-3d::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 98px,
    rgba(255, 165, 0, 0.03) 100px
  );
  animation: gridMove 25s linear infinite;
}

@keyframes gradientMove {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes floatingOrbs {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(120deg); }
  66% { transform: translateY(10px) rotate(240deg); }
}

@keyframes gridMove {
  0% { transform: translateX(0); }
  100% { transform: translateX(100px); }
}

/* Animações do loader */
#loader {
  animation: fadeIn 0.4s ease-in-out;
}

#loader.fade-out {
  animation: fadeOut 0.4s ease-in-out forwards;
}

#quiz-app {
  transition: opacity 0.8s ease-in-out 0.4s;
}

#quiz-app.show {
  opacity: 1 !important;
}

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

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

/* Animações das telas do quiz */
.screen-enter {
  animation: slideInUp 0.6s ease-out forwards;
}

.screen-exit {
  animation: slideOutUp 0.4s ease-in forwards;
}

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

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

/* Estilos das opções do quiz */
.quiz-option {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.quiz-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 165, 0, 0.1), transparent);
  transition: left 0.5s ease;
}

.quiz-option:hover {
  background: rgba(255, 165, 0, 0.1);
  border-color: rgba(255, 165, 0, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 165, 0, 0.15);
}

.quiz-option:hover::before {
  left: 100%;
}

.quiz-option.selected {
  background: rgba(255, 165, 0, 0.2);
  border-color: #f97316;
  box-shadow: 0 0 20px rgba(255, 165, 0, 0.3);
}

.quiz-option .option-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 165, 0, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  transition: all 0.3s ease;
}

.quiz-option:hover .option-icon,
.quiz-option.selected .option-icon {
  background: #f97316;
  transform: scale(1.1);
}

/* Estilos do progresso */
#progress {
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Botões */
button {
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

button:hover::before {
  left: 100%;
}

/* Campos de input */
input[type="text"],
input[type="email"],
input[type="tel"] {
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
  box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.2);
  transform: translateY(-1px);
}

/* Responsividade */
@media (max-width: 768px) {
  .quiz-option {
    padding: 16px;
  }
  
  .quiz-option .option-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
  }
  
  h1 {
    font-size: 2.5rem !important;
  }
  
  h2 {
    font-size: 1.5rem !important;
  }
}

/* Animações customizadas */
.pulse-orange {
  animation: pulseOrange 2s infinite;
}

@keyframes pulseOrange {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 165, 0, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(255, 165, 0, 0);
  }
}

.glow-orange {
  box-shadow: 0 0 20px rgba(255, 165, 0, 0.5);
}

/* Efeitos de partículas (opcional) */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255, 165, 0, 0.6);
  border-radius: 50%;
  animation: floatUp 10s linear infinite;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Media queries para redução de movimento */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  #background-3d,
  #background-3d::before,
  #background-3d::after {
    animation: none;
  }
}