:root {
  --bot-top: #34373b;
  --bot-base: #2f2b51;
  --bot-casual: #2b4451;
  --bot-error: #7f4a4a;
  --energy-blue: #2454f1;
  --energy-red: #e63131;
  --energy-light: #efefef;
  --text-bot: #dbf4fb;
  --mouth-light: #def0ff;
  --black: #000;
  --white: #fff;
}


.assistant {
  width: 108px;
  height: 205px;
  position: relative;
  overflow: visible;
  isolation: isolate;
  z-index: 3;
  filter: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.20));
  animation: bot-float 5.4s ease-in-out infinite;
}

.assistant::after {
  content: "";
  position: absolute;
  width: 72px;
  height: 12px;
  left: 18px;
  bottom: 8px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.25), transparent 72%);
  filter: blur(3px);
  opacity: 0.72;
  z-index: -1;
  pointer-events: none;
  animation: bot-shadow 5.4s ease-in-out infinite;
}

.body,
.body-casual,
.body-error,
.body-ok {
  width: 100px;
  height: 128px;
  position: absolute;
  top: 50px;
  left: 4px;
  overflow: hidden;
  z-index: 4;
  border-radius: 50% 50% 54% 54% / 46% 46% 56% 56%;
  transform-origin: center bottom;
  background:
    radial-gradient(circle at 30% 14%, rgba(255, 255, 255, 0) 0 7%, transparent 8%),
    linear-gradient(160deg, var(--bot-top) 22%, var(--bot-base) 100%);
  box-shadow:
    inset 8px 0 13px rgba(255, 255, 255, 0.045),
    inset -10px -16px 20px rgba(0, 0, 0, 0.36),
    inset 0 0 14px rgba(36, 84, 241, 0.10),
    0 10px 17px rgba(0, 0, 0, 0.17);
  animation: body-breath 5.2s ease-in-out infinite;
}

.body-casual {
  background:
    radial-gradient(circle at 30% 14%, rgba(255, 255, 255, 0.12) 0 7%, transparent 8%),
    linear-gradient(160deg, var(--bot-top) 22%, var(--bot-casual) 100%);
  animation-duration: 5.8s;
}

.body-error {
  background:
    radial-gradient(circle at 30% 14%, rgba(255, 255, 255, 0.10) 0 7%, transparent 8%),
    linear-gradient(160deg, var(--bot-top) 22%, var(--bot-error) 100%);
  animation-duration: 4s;
}

.body-ok {
  background:
    radial-gradient(circle at 30% 14%, rgba(255, 255, 255, 0.12) 0 7%, transparent 8%),
    linear-gradient(160deg, var(--bot-top) 22%, var(--bot-casual) 100%);
  animation-duration: 5.6s;
}


.body::after,
.body-casual::after,
.body-error::after,
.body-ok::after {
  content: "";
  position: absolute;
  width: 120%;
  height: 36%;
  left: -10%;
  bottom: -20%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(36, 84, 241, 0.12), transparent 72%);
  opacity: 0.78;
  pointer-events: none;
}

.energy,
.energy-error,
.energy-ok {
  width: 76px;
  height: 82px;
  position: absolute;
  top: 78px;
  left: 16px;
  z-index: 7;
  overflow: hidden;
  border-radius: 50%;
  opacity: 0.95;
  background-color: #254a7b;
  background-image:
    radial-gradient(ellipse at 38% 19%, rgba(255, 255, 255, 0.66) 0 5%, rgba(255, 255, 255, 0.22) 6% 13%, transparent 14%),
    radial-gradient(circle at 54% 47%, rgba(239, 239, 239, 0.62) 0 8%, rgba(112, 132, 255, 0.62) 20%, var(--energy-blue) 66%);
  background-size: 115% 205%;
  background-position: 44% 82%;
  border: 1px solid rgba(239, 239, 239, 0.35);
  box-shadow:
    inset 0 0 8px rgba(255, 255, 255, 0.30),
    inset 0 -15px 22px rgba(0, 0, 0, 0.27),
    inset 0 8px 13px rgba(255, 255, 255, 0.10),
    0 0 12px rgba(36, 84, 241, 0.36);
  animation:
    water-flow 4.8s linear infinite,
    energy-glow 3.8s ease-in-out infinite;
}

.energy-error {
  background-image:
    radial-gradient(ellipse at 38% 19%, rgba(255, 255, 255, 0.58) 0 5%, rgba(255, 255, 255, 0.18) 6% 13%, transparent 14%),
    radial-gradient(circle at 54% 47%, rgba(239, 239, 239, 0.50) 0 8%, rgba(230, 49, 49, 0.64) 24%, var(--energy-red) 70%);
  box-shadow:
    inset 0 0 8px rgba(255, 255, 255, 0.24),
    inset 0 -15px 22px rgba(0, 0, 0, 0.28),
    0 0 12px rgba(230, 49, 49, 0.34);
  animation-duration: 4s, 3.2s;
}

.energy-ok {
  background-image:
    radial-gradient(ellipse at 38% 19%, rgba(255, 255, 255, 0.66) 0 5%, rgba(255, 255, 255, 0.22) 6% 13%, transparent 14%),
    radial-gradient(circle at 54% 47%, rgba(239, 239, 239, 0.62) 0 8%, rgba(112, 132, 255, 0.62) 20%, var(--energy-blue) 66%);
}

.energy::before,
.energy-error::before,
.energy-ok::before {
  content: "";
  position: absolute;
  inset: 10px 16px 16px 13px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 38%),
    radial-gradient(ellipse at 34% 19%, rgba(255, 255, 255, 0.20) 0 10%, transparent 11%);
  opacity: 0.74;
  mix-blend-mode: screen;
  pointer-events: none;
}

.energy::after,
.energy-error::after,
.energy-ok::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 9%;
  height: 18%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.17), transparent 72%);
  opacity: 0.54;
  pointer-events: none;
}

.nameBot {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 7.6px;
  line-height: 1;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: rgba(219, 244, 251, 0.96);
  text-transform: uppercase;
  text-shadow:
    0 0 3px rgba(219, 244, 251, 0.78),
    0 1px 2px rgba(0, 0, 0, 0.58);
  pointer-events: none;
}

.head {
  width: 50px;
  height: 50px;
  position: absolute;
  left: 29px;
  top: 4px;
  z-index: 9;
  overflow: hidden;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.14) 0 8%, transparent 9%),
    linear-gradient(160deg, var(--bot-top) 20%, #202226 100%);
  box-shadow:
    inset 7px 0 10px rgba(255, 255, 255, 0.055),
    inset -8px -11px 14px rgba(0, 0, 0, 0.42),
    0 7px 12px rgba(0, 0, 0, 0.20);
  animation: head-bob 5.8s ease-in-out infinite;
}

.head::before {
  content: "";
  position: absolute;
  inset: 6px;
  z-index: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.12) 0 11%, transparent 12%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 48%);
  pointer-events: none;
}

.eyes {
  width: 31px;
  height: 31px;
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
}

.eye,
.eye-casual {
  width: 31px;
  height: 31px;
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 50%;
  transform-origin: center;
  background:
    radial-gradient(circle at 33% 24%, rgba(255, 255, 255, 0.90) 0 8%, transparent 9%),
    radial-gradient(circle at 50% 52%, #ffffff 0 32%, #e9eef2 33% 57%, #cfd6dd 58% 100%);
  border: 2px solid rgba(0, 0, 0, 0.28);
  box-shadow:
    inset 0 -5px 8px rgba(0, 0, 0, 0.16),
    inset 0 3px 5px rgba(255, 255, 255, 0.62),
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 2px 4px rgba(0, 0, 0, 0.28);
}

.eye {
  animation: eye-look 6s ease-in-out infinite;
}

.eye-casual {
  animation: eye-look-soft 10s ease-in-out infinite;
}

.pupil,
.pupil-casual {
  width: 12px;
  height: 12px;
  position: absolute;
  top: 52%;
  left: 52%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center;
  background:
    radial-gradient(circle at 35% 27%, rgba(255, 255, 255, 0.56) 0 13%, transparent 14%),
    radial-gradient(circle, #050505 0 58%, #1c1f24 59% 100%);
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.08),
    0 1px 2px rgba(0, 0, 0, 0.35);
}

.pupil {
  animation: blink-clean 4.4s ease-in-out infinite;
}

.pupil-casual {
  animation: blink-clean 6.8s ease-in-out infinite;
}

.mouth,
.mouth-casual {
  width: 13px;
  height: 2px;
  position: absolute;
  top: 43px;
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
  border-radius: 18px;
  background-color: var(--mouth-light);
  border-left: 2px solid rgba(255, 255, 255, 0.68);
  border-right: 2px solid rgba(255, 255, 255, 0.68);
  opacity: 0.82;
}

.mouth {
  animation: talk 1.5s ease-in-out infinite;
}

.mouth-casual {
  height: 1px;
  background-color: var(--white);
  opacity: 0.72;
}

.limb-left,
.limb-right,
.limb-left-casual,
.limb-right-casual,
.limb-left-ok,
.limb-right-ok,
.limb-left-error,
.limb-right-error {
  width: 10px;
  height: 76px;
  position: absolute;
  top: 90px;
  z-index: 3;
  border-radius: 999px;
  transform-origin: top center;
  background:
    radial-gradient(circle at 35% 12%, rgba(255, 255, 255, 0.10) 0 9%, transparent 10%),
    linear-gradient(180deg, var(--bot-top) 8%, #2d3035 48%, #202226 100%);
  box-shadow:
    inset 2px 0 4px rgba(255, 255, 255, 0.055),
    inset -3px -6px 6px rgba(0, 0, 0, 0.38),
    0 4px 8px rgba(0, 0, 0, 0.18);
}

.limb-left,
.limb-left-casual,
.limb-left-ok,
.limb-left-error {
  left: 2px;
  border-radius: 70% 45% 60% 80% / 30% 40% 90% 90%;
  transform: rotate(13deg);
}

.limb-right,
.limb-right-casual,
.limb-right-ok,
.limb-right-error {
  right: 3px;
  border-radius: 45% 70% 80% 60% / 40% 30% 90% 90%;
  transform: rotate(-13deg);
}

.limb-left {
  animation: wave-limb-left 3.2s ease-in-out infinite;
}

.limb-right {
  animation: wave-limb-right 3.2s ease-in-out infinite;
}

.limb-left-casual,
.limb-left-ok,
.limb-left-error {
  animation: wave-limb-left-soft 9s ease-in-out infinite;
}

.limb-right-casual,
.limb-right-ok,
.limb-right-error {
  animation: wave-limb-right-soft 9s ease-in-out infinite;
}

@keyframes bot-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

@keyframes bot-shadow {

  0%,
  100% {
    transform: scaleX(1);
    opacity: 0.72;
  }

  50% {
    transform: scaleX(0.84);
    opacity: 0.42;
  }
}

@keyframes body-breath {

  0%,
  100% {
    transform: scaleY(1);
    filter: brightness(1);
  }

  50% {
    transform: scaleY(1.035);
    filter: brightness(1.035);
  }
}

@keyframes head-bob {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

@keyframes water-flow {
  0% {
    background-position: 44% 82%;
    transform: translate(0, 0) scale(1);
  }

  25% {
    background-position: 48% 78%;
    transform: translate(-1px, -1px) scale(1.01);
  }

  50% {
    background-position: 52% 72%;
    transform: translate(1px, 1px) scale(1.025);
  }

  75% {
    background-position: 45% 80%;
    transform: translate(1px, -1px) scale(1.01);
  }

  100% {
    background-position: 44% 82%;
    transform: translate(0, 0) scale(1);
  }
}

@keyframes energy-glow {

  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.08);
  }
}

@keyframes eye-look {

  0%,
  100% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(-2px, -1px);
  }

  50% {
    transform: translate(2px, 1px);
  }

  75% {
    transform: translate(1px, -2px);
  }
}

@keyframes eye-look-soft {

  0%,
  100% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(-1px, -1px);
  }

  50% {
    transform: translate(1px, 1px);
  }

  75% {
    transform: translate(1px, -1px);
  }
}

@keyframes blink-clean {

  0%,
  46%,
  52%,
  100% {
    transform: translate(-50%, -50%) scaleY(1);
  }

  49% {
    transform: translate(-50%, -50%) scaleY(0.18);
  }
}

@keyframes talk {

  0%,
  100% {
    height: 2px;
    width: 13px;
  }

  25% {
    height: 5px;
    width: 11px;
  }

  50% {
    height: 1px;
    width: 9px;
  }

  75% {
    height: 3px;
    width: 11px;
  }
}

@keyframes wave-limb-left {

  0%,
  100% {
    transform: rotate(13deg);
  }

  50% {
    transform: rotate(-6deg);
  }
}

@keyframes wave-limb-right {

  0%,
  100% {
    transform: rotate(-13deg);
  }

  50% {
    transform: rotate(6deg);
  }
}

@keyframes wave-limb-left-soft {

  0%,
  100% {
    transform: rotate(13deg);
  }

  50% {
    transform: rotate(5deg);
  }
}

@keyframes wave-limb-right-soft {

  0%,
  100% {
    transform: rotate(-13deg);
  }

  50% {
    transform: rotate(-5deg);
  }
}

@media (prefers-reduced-motion: reduce) {

  .assistant,
  .assistant *,
  .assistant::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
/* === NPC Aquabot clicable (UX: el personaje es la interfaz, sin boton adicional) === */
.assistant[data-aquabot-npc] {
  cursor: pointer;
}
.assistant[data-aquabot-npc]:hover,
.assistant[data-aquabot-npc]:focus-visible {
  transform: scale(1.04);
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.55));
  transition: transform 0.2s ease, filter 0.2s ease;
}
.assistant[data-aquabot-npc]:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 4px;
  border-radius: 12px;
}

/* TANDA 77: pausa la animacion ambiental eye-look-soft mientras el JS de
   seguimiento de mouse (aquabot-eye-tracking.js) controla la posicion del
   ojo via transform inline -- evita que el keyframe le gane la pelea al
   valor que pone el JS en cada frame. Si el JS no carga, esta clase nunca
   se agrega y la animacion de siempre sigue igual. */
.assistant.is-eye-tracking .eye-casual {
  animation-play-state: paused;
}
