/* 小机器人彩蛋：随机从屏幕边缘走进来，冒一句俏皮话，点它会蹦 */
#museBot {
  position: fixed;
  bottom: 22px;
  z-index: 15;
  width: 96px;
  pointer-events: none;
  opacity: 0;
  transition:
    left 0.9s cubic-bezier(0.34, 1.3, 0.64, 1),
    right 0.9s cubic-bezier(0.34, 1.3, 0.64, 1),
    opacity 0.35s ease;
}
#museBot.show {
  opacity: 1;
}
#museBot img {
  position: relative;
  z-index: 1;
  display: block;
  width: 96px;
  height: 96px;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  animation: museBob 1.15s ease-in-out infinite;
}
/* 进出场时的机械行走步态：大步伐 + 身体摇摆 */
#museBot.walking img {
  animation: museWalk 0.42s ease-in-out 2;
}
#museBot.walking .muse-shadow {
  animation: museShadowWalk 0.42s ease-in-out 2;
}
#museBot.jump img {
  animation: museJump 0.45s ease;
}
@keyframes museBob {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-6px) rotate(2deg);
  }
}
@keyframes museWalk {
  0%,
  100% {
    transform: translateY(0) rotate(-7deg);
  }
  25% {
    transform: translateY(-14px) rotate(5deg);
  }
  50% {
    transform: translateY(0) rotate(7deg);
  }
  75% {
    transform: translateY(-14px) rotate(-5deg);
  }
}
@keyframes museJump {
  0%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-30px) rotate(-6deg);
  }
  70% {
    transform: translateY(-30px) rotate(6deg);
  }
}
/* 脚下阴影：随跳动缩放，行走时加快 */
#museBot .muse-shadow {
  position: absolute;
  z-index: 0;
  bottom: -4px;
  left: 50%;
  width: 72px;
  height: 14px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 70%);
  animation: museShadow 1.15s ease-in-out infinite;
  pointer-events: none;
}
@keyframes museShadow {
  0%,
  100% {
    transform: translateX(-50%) scaleX(1);
    opacity: 0.85;
  }
  50% {
    transform: translateX(-50%) scaleX(0.76);
    opacity: 0.5;
  }
}
@keyframes museShadowWalk {
  0%,
  100% {
    transform: translateX(-50%) scaleX(1);
    opacity: 0.9;
  }
  50% {
    transform: translateX(-50%) scaleX(0.68);
    opacity: 0.45;
  }
}
#museBot .muse-bubble {
  position: absolute;
  bottom: 104px;
  left: 50%;
  transform: translateX(-50%) scale(0.6);
  transform-origin: bottom center;
  max-width: 210px;
  min-width: 120px;
  padding: 9px 30px 9px 12px;
  background: #fff;
  border: 1px solid #e3e6e8;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
  font-size: 13px;
  line-height: 1.5;
  color: #20262c;
  opacity: 0;
  transition:
    opacity 0.3s ease 0.35s,
    transform 0.3s ease 0.35s;
  pointer-events: auto;
  text-align: left;
}
#museBot .muse-bubble::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  background: #fff;
  border-right: 1px solid #e3e6e8;
  border-bottom: 1px solid #e3e6e8;
  transform: translateX(-50%) rotate(45deg);
}
#museBot.show .muse-bubble {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
#museBot .muse-bubble-close {
  position: absolute;
  top: 2px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  color: #9aa1a8;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
#museBot .muse-bubble-close:hover {
  color: #c8102e;
}
@media (max-width: 760px) {
  #museBot {
    width: 72px;
    bottom: 14px;
  }
  #museBot img {
    width: 72px;
    height: 72px;
  }
  #museBot .muse-shadow {
    width: 54px;
    height: 11px;
  }
  #museBot .muse-bubble {
    bottom: 80px;
    font-size: 12px;
    max-width: 170px;
  }
}
