:root {
  --fondo: #000;
  --cara: #7fe3ff;
  --cara-escuchando: #9dffb0;
  --cara-pensando: #ffd37f;
  --cara-error: #ff8f8f;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--fondo);
  overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

#app {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  --color: var(--cara);
}

#app[data-estado="escuchando"] { --color: var(--cara-escuchando); }
#app[data-estado="pensando"]   { --color: var(--cara-pensando); }
#app[data-estado="error"]      { --color: var(--cara-error); }

#cara {
  width: min(92vw, 70vh * 1.33);
  max-height: 70vh;
}

.ojo {
  fill: var(--color);
  transform-box: fill-box;
  transform-origin: center;
  animation: parpadeo 5s infinite;
  transition: fill 0.3s;
}

#boca {
  stroke: var(--color);
  transition: stroke 0.3s;
}

#app[data-estado="escuchando"] .ojo { transform: scale(1.12); animation: none; }
#app[data-estado="pensando"] #ojos { animation: mirar 2.4s ease-in-out infinite; }
#app[data-estado="error"] .ojo { transform: scaleY(0.4); animation: none; }

@keyframes parpadeo {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.08); }
}

@keyframes mirar {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-14px); }
  70% { transform: translateX(14px); }
}

#texto {
  margin: 12px 0 0;
  max-width: 90vw;
  min-height: 2.6em;
  text-align: center;
  font-size: 1.15rem;
  line-height: 1.3;
  color: #8a8f98;
}

#tocar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  border: 0;
  padding: 0;
}
