/* ============================================================
 * 璐宝 3D 别墅 · 新手导航指引（v1.1.83）
 * 仅做高亮展示引导：遮罩变暗 + 聚光灯挖孔 + 气泡介绍 + 跳过/上一步/下一步
 * 依赖：villa-user-guide.js
 * ============================================================ */

/* 全屏遮罩：透明变暗层，仅作视觉聚焦，不拦截指针（引导期间模型/界面仍可直接交互，
   避免首次用户误以为「点不中模型」；气泡与按钮位于更高 z-index 且 pointer-events:auto，照常可点） */
#ug-blocker {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 9998;
  display: none;
  pointer-events: none;
}

/* 聚光灯：透明显示框 + 巨大外阴影形成「挖孔」效果，其余区域变暗 */
#ug-spot {
  position: fixed;
  display: none;
  border: 2px solid #2f6bff;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.58),
    0 0 0 2px rgba(47, 107, 255, 0.35);
  pointer-events: none;
  z-index: 9999;
  transition: left 0.18s ease, top 0.18s ease, width 0.18s ease, height 0.18s ease;
}

/* 气泡文本框：半透明毛玻璃底（深色文字保证对比度） */
#ug-bubble {
  position: fixed;
  display: none;
  width: 300px;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  background: rgba(255, 255, 255, 1);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  color: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.28);
  padding: 16px 16px 14px;
  z-index: 10000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.6;
}

#ug-bubble .ug-step {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #2356e0;
  background: rgba(47, 107, 255, 0.14);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 8px;
}

#ug-bubble .ug-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px;
}

#ug-bubble .ug-body {
  margin: 0;
  color: #334155;
}

#ug-bubble .ug-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

#ug-bubble .ug-actions .ug-right {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

#ug-bubble button {
  font-family: inherit;
  font-size: 13px;
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

#ug-bubble .ug-skip {
  background: transparent;
  color: #64748b;
  border-color: transparent;
}
#ug-bubble .ug-skip:hover {
  color: #475569;
  background: rgba(15, 23, 42, 0.08);
}

#ug-bubble .ug-prev {
  background: rgba(255, 255, 255, 0.65);
  color: #334155;
  border-color: rgba(100, 116, 139, 0.38);
}
#ug-bubble .ug-prev:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(100, 116, 139, 0.55);
}

#ug-bubble .ug-next {
  background: #2f6bff;
  color: #fff;
  font-weight: 600;
}
#ug-bubble .ug-next:hover {
  background: #2356e0;
}

/* 小尖角（指向高亮元素的一侧，与气泡同为半透明底） */
#ug-bubble .ug-arrow {
  position: absolute;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 1);
  transform: rotate(45deg);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04);
}

/* 帮助菜单（点击顶栏右上角「帮助」弹出） */
#ug-help-menu {
  position: fixed;
  display: none;
  min-width: 180px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.22);
  padding: 6px;
  z-index: 10001;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}
#ug-help-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 13px;
  color: #1f2937;
  cursor: pointer;
}
#ug-help-menu button:hover {
  background: #eaf0ff;
  color: #2f6bff;
}
#ug-help-menu .ug-menu-sep {
  height: 1px;
  background: #eef2f7;
  margin: 4px 2px;
}
