#assistantWidgetRoot {
  position: fixed;
  left: 16px;
  bottom: 18px;
  z-index: 1400;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}
.assistant-wrap {
  position: relative;
  width: 84px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.assistant-figure {
  position: relative;
  width: 84px;
  height: 92px;
  animation: assistantPopIn 0.55s ease both, assistantFloat 3.4s 0.55s ease-in-out infinite;
  transform-origin: center bottom;
  perspective: 900px;
  filter: drop-shadow(0 14px 18px rgba(2, 12, 24, 0.28));
}
.assistant-turn {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: assistantTurn 7s ease-in-out infinite;
}
.assistant-turn::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(11, 21, 33, 0.9), rgba(2, 12, 24, 0.96));
  border: 2px solid rgba(225, 187, 140, 0.28);
  transform: translateZ(-22px) scale(1.02);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.42);
}
@keyframes assistantPopIn {
  0% { transform: scale(0.6) translateY(22px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.assistant-figure img,
.assistant-figure svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.assistant-figure img {
  position: relative;
  border: 2px solid rgba(225, 187, 140, 0.45);
  border-radius: 50%;
  background: rgba(6, 16, 31, 0.72);
  box-shadow:
    0 0 0 4px rgba(76, 141, 255, 0.1),
    0 22px 44px rgba(0, 0, 0, 0.36),
    inset 0 -18px 30px rgba(0, 0, 0, 0.16),
    inset 0 10px 22px rgba(255, 255, 255, 0.1);
  object-fit: cover;
  transform: translateZ(24px);
}
@keyframes assistantTurn {
  0%, 100% { transform: rotateY(-9deg) rotateX(2deg); }
  50% { transform: rotateY(9deg) rotateX(-2deg); }
}
.assistant-wrap:hover .assistant-turn {
  animation-play-state: paused;
  transform: rotateY(0deg) rotateX(0deg) scale(1.02);
}
.assistant-hairpin {
  position: absolute;
  top: 16px;
  right: 7px;
  width: 28px;
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, #D64545, #E1BB8C, #C7A45F);
  transform: rotate(34deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  z-index: 2;
}
.assistant-hairpin::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 50%;
  width: 9px;
  height: 9px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFD9A0, #D64545 70%);
  box-shadow: 0 0 6px rgba(214, 69, 69, 0.65);
}
.assistant-knot {
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 14px;
  height: 14px;
  transform: translateX(-50%) rotate(45deg);
  border: 2px solid #D64545;
  border-radius: 3px;
  background: linear-gradient(135deg, #E1BB8C, #D64545);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  z-index: 2;
}
.assistant-knot::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 2px;
  height: 14px;
  transform: translateX(-50%);
  background: #D64545;
}
.assistant-knot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 14px);
  width: 7px;
  height: 7px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFD9A0, #D64545 70%);
}
.assistant-halo {
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 74px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(76, 141, 255, 0.28), transparent 72%);
  animation: assistantHalo 3.4s ease-in-out infinite;
}
.assistant-hand {
  transform-origin: 78% 78%;
  animation: assistantWave 2.6s ease-in-out infinite;
}
.assistant-eye {
  animation: assistantBlink 4.2s ease-in-out infinite;
  transform-origin: center;
}
.assistant-bubble {
  position: absolute;
  left: 72px;
  bottom: 22px;
  width: 172px;
  padding: 11px 14px;
  border: 1px solid rgba(76, 141, 255, 0.32);
  border-radius: 10px;
  background: rgba(6, 16, 31, 0.94);
  color: rgba(244, 232, 215, 0.9);
  font-size: 13px;
  line-height: 1.6;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  pointer-events: none;
}
.assistant-bubble::before {
  content: "";
  position: absolute;
  left: -7px;
  bottom: 18px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: rgba(6, 16, 31, 0.94);
  border-left: 1px solid rgba(76, 141, 255, 0.32);
  border-bottom: 1px solid rgba(76, 141, 255, 0.32);
}
.assistant-wrap:hover .assistant-bubble,
.assistant-wrap.open .assistant-bubble {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}
.assistant-bubble strong {
  display: block;
  margin-bottom: 4px;
  color: #F0D8AC;
  font-size: 14px;
}
.assistant-actions {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}
.assistant-actions a {
  display: block;
  padding: 7px 10px;
  border: 1px solid rgba(76, 141, 255, 0.28);
  border-radius: 6px;
  background: rgba(11, 21, 33, 0.8);
  color: #9CC4FF;
  font-size: 12px;
  text-align: center;
  text-decoration: none;
  transition: 0.18s;
}
.assistant-actions a:hover {
  border-color: rgba(225, 187, 140, 0.6);
  color: #F0D8AC;
}
@keyframes assistantFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-9px) rotate(1deg); }
}
@keyframes assistantHalo {
  0%, 100% { opacity: 0.65; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}
@keyframes assistantWave {
  0%, 55%, 100% { transform: rotate(0deg); }
  62%, 72% { transform: rotate(-16deg); }
  66% { transform: rotate(14deg); }
  69% { transform: rotate(-10deg); }
}
@keyframes assistantBlink {
  0%, 46%, 50%, 100% { transform: scaleY(1); }
  48% { transform: scaleY(0.08); }
}
@media (max-width: 640px) {
  #assistantWidgetRoot {
    left: 10px;
    bottom: calc(78px + env(safe-area-inset-bottom));
  }
  .assistant-wrap {
    width: 72px;
  }
  .assistant-figure {
    width: 72px;
    height: 80px;
  }
  .assistant-bubble {
    left: 62px;
    bottom: 18px;
    width: 168px;
  }
}
