:root {
  --zmvr-gold: #e1bb8c;
  --zmvr-blue: #4c8dff;
  --zmvr-panel: rgba(6, 16, 31, 0.95);
}

.zmvr-root {
  position: fixed;
  left: 16px;
  bottom: 18px;
  z-index: 1400;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

.zmvr-wrap {
  position: relative;
  width: 84px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

.zmvr-figure {
  position: relative;
  width: 84px;
  height: 92px;
  transform-origin: center bottom;
  filter: drop-shadow(0 14px 18px rgba(2, 12, 24, 0.28));
  animation: zmvr-float 3.4s ease-in-out infinite;
}

.zmvr-figure::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 2px solid rgba(225, 187, 140, 0.28);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(11, 21, 33, 0.9), rgba(2, 12, 24, 0.96));
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.42);
}

.zmvr-avatar {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  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);
  object-fit: cover;
}

.zmvr-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: zmvr-halo 3.4s ease-in-out infinite;
}

.zmvr-bubble {
  position: absolute;
  left: 72px;
  bottom: 22px;
  width: 210px;
  padding: 12px 14px;
  border: 1px solid rgba(76, 141, 255, 0.32);
  border-radius: 12px;
  background: var(--zmvr-panel);
  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);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-8px) scale(0.96);
  transition: 0.22s ease;
  pointer-events: none;
}

.zmvr-bubble::before {
  content: "";
  position: absolute;
  left: -7px;
  bottom: 18px;
  width: 12px;
  height: 12px;
  border-left: 1px solid rgba(76, 141, 255, 0.32);
  border-bottom: 1px solid rgba(76, 141, 255, 0.32);
  background: var(--zmvr-panel);
  transform: rotate(45deg);
}

.zmvr-wrap.open .zmvr-bubble {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.zmvr-close {
  position: absolute;
  right: 6px;
  top: 6px;
  z-index: 2;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(240, 216, 172, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(244, 232, 215, 0.9);
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.zmvr-bubble strong {
  display: block;
  margin-bottom: 4px;
  color: #f0d8ac;
  font-size: 14px;
}

.zmvr-actions {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.zmvr-actions a,
.zmvr-actions button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(76, 141, 255, 0.28);
  border-radius: 7px;
  background: rgba(11, 21, 33, 0.8);
  color: #9cc4ff;
  font: inherit;
  font-size: 12px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.zmvr-actions a:hover,
.zmvr-actions button:hover {
  border-color: rgba(225, 187, 140, 0.6);
  color: #f0d8ac;
}

@keyframes zmvr-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-9px) rotate(1deg); }
}

@keyframes zmvr-halo {
  0%, 100% { opacity: 0.65; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}

@media (max-width: 640px) {
  .zmvr-root {
    left: 10px;
    bottom: calc(78px + env(safe-area-inset-bottom));
  }
  .zmvr-wrap,
  .zmvr-figure {
    width: 72px;
  }
  .zmvr-figure {
    height: 80px;
  }
  .zmvr-bubble {
    left: 62px;
    width: 200px;
  }
}
