/* 网站语音介绍助手 - 前台讲解小人 */
.vg-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2147482000;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
}
.vg-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: block;
  position: relative;
  background: linear-gradient(135deg, #3C84F8, #2675EA);
  color: #fff;
  font-size: 26px;
  box-shadow: 0 10px 28px rgba(38, 117, 234, .38), 0 0 0 6px rgba(60, 132, 248, .12);
  transition: transform .2s ease, box-shadow .2s ease;
  padding: 0;
}
.vg-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(38, 117, 234, .46), 0 0 0 6px rgba(60, 132, 248, .16); }
.vg-btn .vg-ico { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.vg-fab.vg-speaking .vg-btn {
  background: linear-gradient(135deg, #35B95A, #2AA34E);
  box-shadow: 0 10px 28px rgba(53, 185, 90, .4), 0 0 0 6px rgba(53, 185, 90, .14);
}
.vg-btn .vg-stop { display: none; font-size: 22px; }
.vg-fab.vg-speaking .vg-ico-play { display: none; }
.vg-fab.vg-speaking .vg-stop { display: flex; }

/* 朗读中声波动画 */
.vg-wave {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(53, 185, 90, .55);
  opacity: 0;
  pointer-events: none;
}
.vg-fab.vg-speaking .vg-wave { animation: vgWave 1.6s ease-out infinite; }
.vg-fab.vg-speaking .vg-wave:nth-child(2) { animation-delay: .5s; }
@keyframes vgWave {
  0%   { transform: scale(1); opacity: .8; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* 提示气泡 */
.vg-tip {
  position: absolute;
  right: 70px;
  bottom: 8px;
  white-space: nowrap;
  background: #fff;
  color: #24364B;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid #E5EDF6;
  box-shadow: 0 8px 24px rgba(45, 100, 160, .16);
  opacity: 0;
  visibility: hidden;
  transform: translateX(6px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.vg-tip::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  margin-top: -5px;
  width: 10px;
  height: 10px;
  background: #fff;
  border-right: 1px solid #E5EDF6;
  border-top: 1px solid #E5EDF6;
  transform: rotate(45deg);
}
.vg-tip.vg-show { opacity: 1; visibility: visible; transform: translateX(0); }
.vg-tip-close {
  border: none;
  background: none;
  cursor: pointer;
  color: #9AA9B9;
  font-size: 13px;
  padding: 0 0 0 8px;
  line-height: 1;
}
.vg-tip-close:hover { color: #F05D68; }

/* 朗读状态条 */
.vg-status {
  position: absolute;
  right: 70px;
  bottom: 8px;
  white-space: nowrap;
  background: #fff;
  color: #24364B;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid #E5EDF6;
  box-shadow: 0 8px 24px rgba(45, 100, 160, .16);
  display: none;
  align-items: center;
  gap: 8px;
}
.vg-fab.vg-speaking .vg-status { display: flex; }
.vg-fab.vg-speaking .vg-tip { display: none; }
.vg-status .vg-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.vg-status .vg-eq i {
  width: 3px;
  background: #35B95A;
  border-radius: 2px;
  animation: vgEq 0.9s ease-in-out infinite;
}
.vg-status .vg-eq i:nth-child(1) { height: 6px; animation-delay: 0s; }
.vg-status .vg-eq i:nth-child(2) { height: 12px; animation-delay: .2s; }
.vg-status .vg-eq i:nth-child(3) { height: 8px; animation-delay: .4s; }
.vg-status .vg-eq i:nth-child(4) { height: 13px; animation-delay: .1s; }
@keyframes vgEq {
  0%, 100% { transform: scaleY(.5); }
  50%      { transform: scaleY(1); }
}

/* 移动端 */
@media (max-width: 640px) {
  .vg-fab { right: 14px; bottom: 14px; }
  .vg-btn { width: 52px; height: 52px; font-size: 23px; }
  .vg-tip, .vg-status { right: 62px; max-width: 62vw; white-space: normal; }
}
