/* ==========================================================================
   scene.css —— 场景相关：房间定位、可交互物体、hover、高亮、模态检视弹窗
   ========================================================================== */

/* ---------- 房间 stage（与背景图等纵横比，居中） ---------- */
.scene-stage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* 宽高由 utils.fitBackground 按背景图原始尺寸计算，保证 hotspot 百分比对齐 */
}

/* ---------- 房间背景 ---------- */
.room-background {
  display: block;
  width: 100%;
  height: 100%;
  background: #050505;
}

/* ---------- 可交互物体（hotspot） ---------- */
.object {
  position: absolute;
  cursor: pointer;
  /* x/y/w/h 由 scene-manager 按数据里的百分比换算成 left/top/width/height */
}

.object .object-sprite {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* 悬停：轻微高亮 + 光标提示 */
.object:hover .object-sprite {
  filter: brightness(1.35) drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
}

/* 高亮（当前可交互/正在检视） */
.object.highlight {
  outline: 2px solid #cbb78b;
  outline-offset: 2px;
  border-radius: 4px;
}

/* 悬停时显示标签气泡 */
.object .object-label {
  position: absolute;
  left: 50%;
  bottom: 105%;
  transform: translateX(-50%);
  padding: 2px 8px;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid #555;
  border-radius: 4px;
  font-size: 12px;
  color: #ddd;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.object:hover .object-label {
  opacity: 1;
}

/* 可拾取物体的特殊提示 */
.object.pickup-available .object-sprite {
  filter: brightness(1.2);
}

/* 干扰物（decoy）：视觉上降低存在感，但可点击 */
.object.decoy {
  opacity: 0.85;
}

/* 拖拽中的物体 */
.object.dragging {
  z-index: 30;
  cursor: grabbing;
  transition: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
}

/* 「检视」按钮触发的白色粒子提示 */
.hint-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.85);
  pointer-events: none;
  animation: hint-particle 0.8s ease-out forwards;
}
@keyframes hint-particle {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 0)) scale(0.2); }
}
