/* ===========================================================
   NEXO — character sprite (CSS-only, scales by container size)
   =========================================================== */

.nx-char, .nx-mini {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.nx-char { animation: nxfloat 3.5s ease-in-out infinite; }

/* ── ANTENNA ── */
.nx-antenna {
  position: absolute;
  top: 0;
  left: 50%;
  margin-left: -1.5%;          /* center without using transform */
  width: 3%;
  min-width: 2px;
  height: 14%;
  background: var(--bc);
  border-radius: 100px;
  opacity: .82;
  transform-origin: center bottom;
  animation: nxsway 3s ease-in-out infinite;
}
/* antenna ball */
.nx-antenna::after {
  content: "";
  position: absolute;
  top: -65%;
  left: 50%;
  transform: translateX(-50%);
  width: 300%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--bl);
  box-shadow: 0 0 9px var(--bl);
}

/* ── BODY ── */
.nx-body {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 14%;
  bottom: 4%;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 34%, var(--bl) 0%, var(--bc) 50%, var(--bd) 100%);
  box-shadow: inset 0 -8px 20px rgba(0,0,0,.14), 0 6px 20px rgba(0,0,0,.07);
}

/* ── GROUND SHADOW ── */
.nx-ground {
  position: absolute;
  bottom: -7%;
  left: 50%;
  transform: translateX(-50%);
  width: 52%;
  height: 6%;
  background: rgba(0,0,0,.12);
  border-radius: 50%;
  filter: blur(4px);
  z-index: -1;
}

/* ── EYES ── */
.nx-char .nx-eye {
  position: absolute;
  top: 36%;
  width: 21%;
  aspect-ratio: 1 / 1;
  background: #fff;
  border-radius: 50%;
  transform-origin: center center;
  animation: nxblink 4.8s ease-in-out infinite;
}
.nx-char .nx-eye.l { left: 20%; }
.nx-char .nx-eye.r { right: 20%; animation-delay: .18s; }

.nx-pupil {
  position: absolute;
  width: 54%;
  height: 54%;
  background: #1C1B16;
  border-radius: 50%;
  left: 23%;
  top: 23%;
  transition: transform .1s ease-out;
}

/* ── CHEEKS ── */
.nx-cheek {
  position: absolute;
  top: 55%;
  width: 16%;
  height: 10%;
  border-radius: 50%;
  background: rgba(255,100,88,.44);
  filter: blur(6px);
}
.nx-cheek.l { left: 12%; }
.nx-cheek.r { right: 12%; }

/* ── MOUTH ── */
.nx-mouth {
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translateX(-50%);
  width: 25%;
  height: 13%;
  border: 2.5px solid #1C1B16;
  border-top: 0;
  border-radius: 0 0 100px 100px;
}

/* ── MINI ── */
.nx-mini .nx-body {
  top: 15%;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 34%, var(--bl), var(--bc) 55%, var(--bd) 100%);
  box-shadow: inset 0 -4px 8px rgba(0,0,0,.1);
}
.nx-mini .nx-eye {
  position: absolute;
  top: 42%;
  width: 14%;
  aspect-ratio: 1 / 1;
  background: #1C1B16;
  border-radius: 50%;
}
.nx-mini .nx-eye:nth-of-type(1) { left: 28%; }
.nx-mini .nx-eye:nth-of-type(2) { right: 28%; }

/* ── COLOR THEMES ── */
.c-blue  { --bc: #6878E8; --bl: #C4CCFF; --bd: #2030A8; }
.c-lav   { --bc: #9060E0; --bl: #DCC8FF; --bd: #4212A8; }
.c-amber { --bc: #F0A820; --bl: #FFE8A8; --bd: #A05800; }
.c-green { --bc: #44C065; --bl: #A8EAB8; --bd: #187035; }
.c-coral { --bc: #EF6347; --bl: #FFBFB0; --bd: #B83020; }
.c-cream { --bc: #D8C8B8; --bl: #FBF7EE; --bd: #907860; }

/* ── ANIMATIONS ── */
@keyframes nxfloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes nxblink {
  0%, 86%, 100% { transform: scaleY(1); }
  91%           { transform: scaleY(0.06); }
  94%           { transform: scaleY(1); }
}
@keyframes nxsway {
  0%, 100% { transform: rotate(0deg); }
  28%      { transform: rotate(7deg); }
  72%      { transform: rotate(-7deg); }
}

[data-float] { animation: nxfloat 3.6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .nx-char, [data-float], .nx-antenna { animation: none; }
}
