:root {
  --bg: #fbfbfb;
  --card: #ffffff;
  --muted: #9aa3a6;
  --accent: #1f3b75;
  --marker: #f7a701;
  --radius: 10px;
}

html {
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

.header>div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

* {
  box-sizing: border-box
}

.logo {
  max-width: 200px;
  height: auto;
  display: block;
  margin: 0 auto;
  margin: 0;
  background: var(--bg);
  color: #0b1a1a;
}

.ux-card {
  max-width: 420px;
  margin: 48px auto;
  background: var(--card);
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid rgba(11, 91, 91, 0.06);
  box-shadow: none;
  position: relative;
  /* para posicionar las imágenes en las esquinas */
  overflow: visible;
}

/* Imágenes posando (reglas globales) */
.corner {
  position: absolute;
  width: 180px;
  height: auto;
  pointer-events: none;
  opacity: 0.95;
}

.corner.left {
  left: -180px;
  top: 85%;
  transform: translateY(-50%);
}

.corner.right {
  right: -180px;
  top: 85%;
  transform: translateY(-50%);
}

/* Header */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px
}

.header h1 {
  font-size: 24px;
  margin: 0;
  font-weight: 600;
  color: #061b1b;
}

/* base para el marcador: posicionar el pseudo-elemento sobre el texto */

.marker {
  position: relative;
  display: inline-block;
  padding: 0 0.04em;
  z-index: 0;
}

.marker::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 22%;
  bottom: 8%;
  background: var(--marker);
  z-index: -1;
  transform-origin: left center;
  transform: scaleX(0) skewX(-10deg);
  border-radius: 3px;

  animation: markerDraw 3000ms cubic-bezier(.2,.9,.3,1) forwards;
}

@keyframes markerDraw {
  to {
    transform: scaleX(1) skewX(-10deg);
  }
}

/* Progress: thin, minimal */
.progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0
}

.step {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid #e6e9ea;
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px
}

.step.active {
  background: var(--accent);
  border-color: transparent
}

.line {
  flex: 1;
  height: 1px;
  background: #e6e9ea
}

/* Steps visibility */
.ux-step {
  display: none
}

.ux-step.active {
  display: block
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

h2 {
  font-size: 16px;
  margin: 10px 0 18px;
  font-weight: 600;
  color: #061b1b
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e6e9ea;
  background: transparent;
  font-size: 14px;
  color: inherit;
  margin-bottom: 14px
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(11, 91, 91, 0.04);
  border-color: var(--accent)
}

.pregunta {
  display: block;
  text-align: center;
  margin-bottom: 10px;
  color: var(--accent)
}

.rating {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 14px
}

.rating label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid #f0f3f3;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px
}

.rating input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0
}

/* Caritas (reemplazan el texto de la opción) */
.face {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  color: white;
  flex: 0 0 auto;
}

.face--1 { background: #e03131; } /* rojo */
.face--2 { background: #f08a24; } /* naranja */
.face--3 { background: #f6c744; color: #2b2b2b; } /* amarillo */
.face--4 { background: #8fd19e; color: #0b2a10; } /* verde claro */
.face--5 { background: #2ea44f; } /* verde */
.face--0 { background: #c1121f; } /* no / negativo */
.face--half { background: #f6a623; } /* parcial */
.face--yes { background: #2ea44f; }
.face--neutral { background: #9aa3a6; }

/* Label seleccionado */
.rating label.selected {
  border-color: rgba(11,59,117,0.18);
  box-shadow: 0 6px 18px rgba(11,59,117,0.06);
  background: rgba(11,59,117,0.03);
}

/* Ocultar texto original dentro del label y mantenerlo para accesibilidad */
.rating label .option-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

button {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(11, 91, 91, 0.12);
  background: var(--accent);
  color: white;
  font-weight: 600;
  cursor: pointer
}

button[disabled] {
  opacity: 0.56;
  cursor: not-allowed
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  z-index: 1200
}

.spinner {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center
}

.egg {
  width: 120px
}

/* GIF de carga centrado */
.loading-gif {
  display: block;
  max-width: 220px;
  width: 34vw;
  max-height: 40vh;
  object-fit: contain
}

/* permitir que la gallina salga del contenedor y animaciones */
.spinner {
  overflow: visible
}

.egg {
  position: relative;
  transform-origin: 50% 50%
}

.egg.run {
  animation: runAcross 3s linear forwards
}

@keyframes runAcross {
  0% {
    transform: translateX(-30vw) rotate(0deg)
  }

  100% {
    transform: translateX(130vw) rotate(720deg)
  }
}

/* alas y patas en movimiento solo mientras corre */
.egg .wing {
  transform-origin: 60px 30px
}

.egg .leg {
  transform-origin: 58px 54px
}

.egg.run .wing {
  animation: flap 300ms linear infinite
}

.egg.run .leg {
  animation: runLegs 200ms linear infinite
}

@keyframes flap {
  0% {
    transform: rotate(0deg)
  }

  50% {
    transform: rotate(-20deg)
  }

  100% {
    transform: rotate(0deg)
  }
}

@keyframes runLegs {
  0% {
    transform: translateY(0) rotate(0deg)
  }

  50% {
    transform: translateY(6px) rotate(12deg)
  }

  100% {
    transform: translateY(0) rotate(0deg)
  }
}

.loading-text {
  color: var(--muted);
  font-weight: 600
}

/* Confirm message */
.confirm-message {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1600;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.confirm-inner {
  background: var(--card);
  padding: 40px;
  border-radius: 14px;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  position: relative;
}

.confirm-gif {
  width: min(86vw, 300px);
  height: auto;
  display: block;
  max-height: 30vh;
  object-fit: contain;
}

.confirm-close {
  position: absolute;
  top: 10px;
  background: transparent;
  color: var(--muted);
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px
}

/* Imagen móvil: huevito sobre el aviso de privacidad (solo en móvil) */
.mobile-egg {
  display: none;
  position: relative;
  margin: 8px auto 0;
  width: 300px;
  max-width: auto;
  height: auto;
  pointer-events: none;
  z-index: 60;
}

@media (max-width: 600px) {
  .mobile-egg {
    display: block;
  }
  .corner {
    display: none;
  }
}

.confirm-message.show {
  display: flex
}

.confirm-text {
  font-weight: 700;
  font-size: 20px;
  color: var(--accent);
  text-align: center
}

/* GIF de confirmación */
/* removed smaller fixed-size confirm-gif rule to prefer responsive sizing above */

@media (max-width:480px) {
  .ux-card {
    margin: 20px;
    padding: 18px
  }

  /* ocultar las imágenes decorativas en pantallas pequeñas */
  .corner {
    display: none
  }


  .rating {
    flex-direction: column;
    align-items: stretch
  }

  .rating label {
    width: 100%;
    justify-content: flex-start
  }
}

/* Confetti pieces */
.confetti-piece {
  position: fixed;
  top: -10vh;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 1700;
  opacity: 0.95;
  will-change: transform, opacity;
  box-shadow: 0 1px 1px rgba(0,0,0,0.08);
  transform: rotate(0deg);
  animation-name: confetti-fall;
  animation-timing-function: linear;
  animation-iteration-count: 1;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-10vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(540deg);
    opacity: 0.85;
  }
}

/* Footer - aviso de privacidad */
.footer-privacy {
  text-align: center;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--muted);
  background: transparent;
}

.footer-privacy a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}

.footer-privacy a:hover,
.footer-privacy a:focus {
  color: #0b2a52;
  border-color: rgba(11,59,117,0.12);
  outline: none;
}

@media (max-width:480px) {
  .footer-privacy { font-size: 12px; padding: 10px 12px; }
}
