/* 
   ENCUESTA APP - hoja de estilo
   COLORES PRINCIPALES (para cambiar colores, modificar estos)
   1. fondo oscuro: #4a0e1a (vino oscuro)
   2. color tarjetas: #7b1832 (burdeo)
   3. color acento rosa: #f5c0cb (rosa claro)
   4. texto principal: #f5e6ea (blanco)
   5. fondo body movil: #7b1832 (igual que tarjetas)
   6. FUENTE: Nunito
*/

/* eliminar margenes por defecto*/
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* BODY: fondo con imagen y capa oscura */
body {
  font-family: 'Nunito', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  
  /* IMAGEN DE FONDO - puedes cambiar la URL por la que quieras */
  background-image: url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?q=80&w=2070&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}

/* Capa oscura semitransparente encima de la imagen */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 0;
}

/* Asegurar que todo el contenido esté por encima de la capa oscura */
body > * {
  position: relative;
  z-index: 1;
}

/*cada pagina: slide o paso de la encuesta*/
.slide {
  display: none;
  width: 100%;
  justify-content: center;
  align-items: center;
  min-height: auto;
  animation: fadeIn 0.35s ease;
}
.slide.active { display: flex; }

/*animacion de entrada de cada pagina*/
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/*CARD: tarjeta central que contiene cada pagina*/
.card {
  background: #7b1832;
  border-radius: 24px;
  padding: 36px 28px 28px;
  width: 100%;
  max-width: 480px;
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  position: relative;
}

/*LOGO: texto del logo de arriba de cada slide*/
.logo-text {
  font-size: 1.5rem;
  font-weight: 900;
  color: #f5e6ea;
  letter-spacing: -0.5px;
  text-align: center;
}

/*BARRA DE PROGRESO*/
.progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: #f5c0cb;
  border-radius: 99px;
  transition: width 0.4s ease;
}

/*PREGUNTA*/
.question {
  font-size: 1.25rem;
  font-weight: 800;
  color: #f5e6ea;
  text-align: center;
  line-height: 1.4;
  padding: 0 4px;
}

/*OPCIONES*/
.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/*Botón de opción individual*/
.opt-btn {
  width: 100%;
  padding: 14px 20px;
  border: 2.5px solid #f5c0cb;
  border-radius: 50px;
  background: transparent;
  color: #f5e6ea;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}

.opt-btn:hover {
  background: #f5c0cb;
  color: #7b1832;
  transform: scale(1.02);
}

.opt-btn.selected {
  background: #f5c0cb;
  color: #7b1832;
  border-color: #f5c0cb;
}

/*ESTRELLAS*/
.star-container {
  background: rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 24px 20px;
  width: 100%;
  text-align: center;
}
.stars-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}
.star {
  font-size: 2.8rem;
  color: rgba(255,255,255,0.2);
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
  user-select: none;
}
.star:hover, .star.active {
  color: #f5c0cb;
  transform: scale(1.15);
}
.star-hint {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
}

/*NAVEGACIÓN*/
.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: auto;
  padding-top: 8px;
}
.nav-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #f5e6ea;
  font-size: 1.6rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-btn:hover:not(:disabled) {
  background: #f5c0cb;
  color: #7b1832;
  transform: scale(1.08);
}
.nav-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/*CAJA DE COMENTARIOS*/
.comment-box {
  min-width: 0;
  flex: 1;
  height: 130px;
  border-radius: 14px;
  border: 2px solid #f5c0cb;
  background: rgba(255,255,255,0.08);
  padding: 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  resize: none;
  outline: none;
  color: #f5e6ea;
}
.comment-box::placeholder { 
  color: rgba(255,255,255,0.4); 
}
.comment-box:focus {
  border-color: #f5c0cb;
  box-shadow: 0 0 0 3px rgba(245,192,203,0.2);
}

/*BOTON FINALIZAR*/
.btn-finish {
  padding: 14px 28px;
  background: #f5c0cb;
  color: #7b1832;
  border: none;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}
.btn-finish:hover { background: white; transform: scale(1.04); }

/*PANTALLA DE BIENVENIDA*/
.welcome-card { 
  text-align: center; 
  gap: 22px; 
}

.welcome-oval {
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  width: 200px; 
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(245,192,203,0.4);
}
.oval-inner { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 4px; 
}
.company-name { 
  font-size: 1rem; 
  font-weight: 900; 
  color: #f5e6ea; 
}
.welcome-subtitle { 
  font-size: 1.15rem; 
  font-weight: 700; 
  color: #f5e6ea; 
  line-height: 1.5; 
}
.welcome-mini { 
  font-size: 0.9rem; 
  font-weight: 600; 
  color: rgba(255,255,255,0.65); 
  line-height: 1.5; 
}

/*botón empezar*/
.btn-start {
  padding: 15px 48px;
  background: #f5c0cb;
  color: #7b1832;
  border: none;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  margin-top: 6px;
}
.btn-start:hover { transform: scale(1.05); background: white; }

/*BOTONES DE REDES*/
.red-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(245,192,203,0.2);
  color: #f5e6ea;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.2s;
}
.red-btn:hover {
  background: rgba(255,255,255,0.18);
  border-color: #f5c0cb;
  transform: translateX(4px);
}
.red-btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.red-btn-text {
  flex: 1;
}
.red-btn-arrow {
  color: rgba(255,255,255,0.4);
  font-size: 1.1rem;
}

/*MICROFONO*/
.input-audio-row {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: flex-start;
  width: 100%;
  margin-top: 8px;
}
.input-audio-row .comment-box {
  margin-top: 0;
  flex: 1;
  width: auto;
  min-width: 0;
}

.mic-btn {
  width: 48px;
  min-width: 48px;
  height: 80px;
  border-radius: 12px;
  border: 2px solid rgba(245, 192, 203, 0.4);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mic-btn:hover {
  background: rgba(245,192,203,0.2);
  border-color: #f5c0cb;
}

.mic-btn.grabando {
  background: #c0392b;
  border-color: #e74c3c;
  animation: pulso 1s infinite;
}
@keyframes pulso {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

#slide-reseñas a:hover, #redes-final-container a:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: #f5c0cb !important;
}

/* RESPONSIVE MÓVIL - CENTRADO VERTICALMENTE */
@media (max-width: 520px) {
  body { 
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .card { 
    border-radius: 28px;
    min-height: auto;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 20px 24px; 
    box-shadow: 0 12px 40px rgba(0,0,0,0.45);
    margin: 0 auto;
  }
  
  /* Ajuste para que el contenido no se desborde */
  .slide {
    min-height: auto;
    padding: 0;
  }
  
  .star { 
    font-size: 2.2rem; 
  }
  
  .question { 
    font-size: 1.1rem; 
  }
  
  .nav-btn {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }
  
  .btn-start {
    padding: 12px 32px;
    font-size: 1rem;
  }
  
  .opt-btn {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
  
  .stat-card .value {
    font-size: 1.4rem;
  }
}

