/* ============================================================
   3D 世界卡片 & 实时物理仿真样式
   ============================================================ */
.card.card-3d, .card. d {
  width: 640px;
  background: #0f131c;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.08);
  border-radius: 12px;
}

.card-3d-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.scene-3d-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.scene-3d-preset-sel {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
}
.scene-3d-preset-sel:hover {
  border-color: #38bdf8;
}

.scene-3d-actions {
  display: flex;
  gap: 6px;
}

.scene-3d-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.scene-3d-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}
.scene-3d-btn.active {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
}

.scene-3d-viewport {
  position: relative;
  width: 100%;
  height: 360px;
  border-radius: 8px;
  overflow: hidden;
  background: #090b10;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
}
.scene-3d-viewport:active {
  cursor: grabbing;
}

.scene-3d-canvas-box {
  width: 100%;
  height: 100%;
}
.scene-3d-canvas-box canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.scene-3d-hud {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  pointer-events: none;
  z-index: 5;
}

.scene-3d-hud-badge {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  font-family: monospace;
}

.scene-3d-phy-toolbar {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 5;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.phy-btn {
  background: transparent;
  color: #e2e8f0;
  border: 1px solid transparent;
  padding: 3px 8px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.phy-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}
.phy-btn.active {
  background: #f59e0b;
  color: #000;
  font-weight: 700;
}

.scene-3d-dropzone {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.88);
  color: #38bdf8;
  font-size: 13px;
  font-weight: 600;
  border: 2px dashed #38bdf8;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}
.scene-3d-viewport.drag-over .scene-3d-dropzone {
  opacity: 1;
  pointer-events: auto;
}

.scene-3d-footer {
  margin-top: 4px;
}

/* 3D 全屏沉浸模式 */
.card-3d-wrap.fullscreen-mode {
  position: fixed !important;
  inset: 20px !important;
  z-index: 9999 !important;
  background: #090b10 !important;
  padding: 16px !important;
  border-radius: 16px !important;
  border: 1px solid #38bdf8 !important;
  box-shadow: 0 0 50px rgba(0,0,0,0.9) !important;
}
.card-3d-wrap.fullscreen-mode .scene-3d-viewport {
  height: calc(100vh - 140px) !important;
}


/* 360° 全景取景运镜样式 */
.scene-3d-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  pointer-events: none;
  z-index: 4;
}
.scene-3d-crosshair::before, .scene-3d-crosshair::after {
  content: '';
  position: absolute;
  background: rgba(56, 189, 248, 0.7);
  box-shadow: 0 0 4px rgba(0,0,0,0.8);
}
.scene-3d-crosshair::before {
  top: 11px; left: 0; width: 24px; height: 2px;
}
.scene-3d-crosshair::after {
  left: 11px; top: 0; width: 2px; height: 24px;
}

.scene-3d-frame-16-9 {
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  pointer-events: none;
  z-index: 3;
}

.scene-3d-pano-toolbar {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 5;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}

.pano-ctrl-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
}

.pano-focal-slider {
  width: 70px;
  accent-color: #38bdf8;
  cursor: pointer;
}

.pano-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.pano-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.scene-3d-source-strip {
  font-size: 11px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   🎭 3D 导演台 (Mannequin Staging) 专属样式
   ============================================================ */
.stage-director-toolbar {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(14px);
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  z-index: 8;
  pointer-events: auto;
}

.stage-bar-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stage-bar-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  margin-right: 2px;
  white-space: nowrap;
  user-select: none;
}

.stage-bar-sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 4px;
}

.stage-btn {
  background: rgba(255, 255, 255, 0.07);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stage-btn:hover {
  background: rgba(56, 189, 248, 0.22);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.stage-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

/* 角色色彩专属按钮 */
.stage-btn.role-btn-a {
  border-color: rgba(59, 130, 246, 0.5);
  color: #93c5fd;
}
.stage-btn.role-btn-a:hover, .stage-btn.role-btn-a.selected {
  background: rgba(59, 130, 246, 0.25);
  color: #bfdbfe;
  border-color: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

.stage-btn.role-btn-b {
  border-color: rgba(236, 72, 153, 0.5);
  color: #f472b6;
}
.stage-btn.role-btn-b:hover, .stage-btn.role-btn-b.selected {
  background: rgba(236, 72, 153, 0.25);
  color: #fbcfe8;
  border-color: #ec4899;
  box-shadow: 0 0 8px rgba(236, 72, 153, 0.5);
}

.stage-btn.role-btn-c {
  border-color: rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}
.stage-btn.role-btn-c:hover, .stage-btn.role-btn-c.selected {
  background: rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
  border-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.stage-btn.role-btn-d {
  border-color: rgba(245, 158, 11, 0.5);
  color: #fcd34d;
}
.stage-btn.role-btn-d:hover, .stage-btn.role-btn-d.selected {
  background: rgba(245, 158, 11, 0.25);
  color: #fef3c7;
  border-color: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.stage-btn.danger {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}
.stage-btn.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: #ef4444;
}

/* 导演台底部快捷操作与选人提示条 */
.stage-active-hint {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  color: #cbd5e1;
  font-size: 11px;
  padding: 3px 12px;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  white-space: nowrap;
  pointer-events: none;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
}
.stage-active-hint b {
  color: #38bdf8;
}


