/* ============================================================
   囍事台 · 3D『Q版手办』场景样式
   深酒红舞台 + 金色装饰，与 style.css 设计令牌同源
   ============================================================ */

.scene3d-root {
  position: relative;
  width: 100%;
  height: 420px;
  border-radius: 20px;
  overflow: hidden;
  /* 透明 canvas 叠在深酒红渐变背景上 */
  background:
    radial-gradient(120% 92% at 50% 18%, rgba(139, 38, 53, 0.55) 0%, rgba(74, 21, 32, 0.88) 55%, rgba(36, 8, 15, 0.97) 100%),
    linear-gradient(180deg, #4A1520 0%, #2A0B14 100%);
  box-shadow: 0 18px 50px rgba(74, 21, 32, 0.22);
  /* 拖拽旋转时禁止页面跟着滚动 */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.scene3d-root .scene3d-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  outline: none;
}

.scene3d-root .scene3d-canvas:active {
  cursor: grabbing;
}

/* ---------- 降级静态卡片（Three.js 不可用时） ---------- */
/* 不放照片：纯 CSS 囍庆卡片，避免图丑土的问题 */
.scene3d-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background:
    radial-gradient(90% 80% at 50% 25%, rgba(139, 38, 53, 0.5) 0%, rgba(42, 11, 20, 0.95) 70%),
    #2A0B14;
}

.scene3d-fb-xi {
  font-family: var(--font-display, "Noto Serif SC", "Songti SC", serif);
  font-size: 68px;
  line-height: 1;
  background: linear-gradient(160deg, #F6E7C0, #C49A5B 52%, #9A7038);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 12px 34px rgba(196, 154, 91, 0.32);
  animation: fbFloat 5.2s ease-in-out infinite;
}

.scene3d-fallback-rings {
  position: relative;
  width: 184px;
  height: 74px;
}

.scene3d-fb-ring {
  position: absolute;
  top: 0;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 5px solid var(--gold, #C49A5B);
  background: radial-gradient(circle at 32% 28%, rgba(232, 213, 168, 0.28), transparent 62%);
  box-shadow:
    0 0 0 1px rgba(232, 213, 168, 0.35),
    0 10px 30px rgba(196, 154, 91, 0.35),
    inset 0 0 18px rgba(232, 213, 168, 0.25);
}

.scene3d-fb-ring:first-child {
  left: 18px;
  transform: rotate(-8deg);
}

.scene3d-fb-ring:last-child {
  right: 18px;
  transform: rotate(8deg);
}

.scene3d-fallback-names {
  font-family: var(--font-display, "Noto Serif SC", "Songti SC", serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.3;
  background: linear-gradient(
    120deg,
    var(--gold-light, #E8D5A8),
    var(--gold, #C49A5B) 55%,
    var(--gold-light, #E8D5A8)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.scene3d-fallback-sub {
  font-size: 12px;
  letter-spacing: 0.35em;
  color: rgba(232, 213, 168, 0.62);
}

@keyframes fbFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------- 点击人物弹出的动作菜单：一条胶囊工具条 ---------- */
.scene3d-actions {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 10;
  max-width: 94%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 999px;
  background:
    radial-gradient(120% 180% at 50% -40%, rgba(196, 154, 91, 0.22) 0%, rgba(92, 22, 34, 0) 62%),
    linear-gradient(160deg, rgba(84, 20, 31, 0.96) 0%, rgba(42, 9, 16, 0.96) 100%);
  border: 1px solid rgba(232, 213, 168, 0.34);
  box-shadow:
    0 18px 44px rgba(18, 4, 8, 0.45),
    0 1px 0 rgba(255, 244, 218, 0.12) inset;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: saIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.sa-bar {
  display: flex;
  align-items: center;
  gap: 9px;
}

.sa-kicker {
  flex: 0 0 auto;
  padding: 0 4px 0 6px;
  font-size: 9.5px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: rgba(232, 213, 168, 0.55);
  white-space: nowrap;
}

.sa-list {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 5px;
}

.sa-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 5px;
  border-radius: 999px;
  border: 1px solid rgba(232, 213, 168, 0.16);
  background: rgba(255, 253, 248, 0.055);
  color: #F6E7C6;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  white-space: nowrap;
}

.sa-btn:hover {
  background: rgba(232, 213, 168, 0.13);
  border-color: rgba(232, 213, 168, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(12, 3, 6, 0.3);
}

.sa-ico {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(150deg, #E8D5A8 0%, #C49A5B 100%);
  color: #5C1622;
  font-family: var(--font-display, serif);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 3px 9px rgba(196, 154, 91, 0.28);
}

.sa-label {
  font-size: 12px;
  letter-spacing: 0.03em;
  color: #FFF6E4;
}

.sa-close {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  margin-left: 2px;
  border-radius: 50%;
  border: 1px solid rgba(232, 213, 168, 0.24);
  background: rgba(255, 253, 248, 0.05);
  color: rgba(246, 231, 198, 0.75);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sa-close:hover {
  background: rgba(232, 213, 168, 0.16);
  color: #FFF6E4;
  transform: rotate(90deg);
}

@keyframes saIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px) scale(0.94); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@media (max-width: 720px) {
  .scene3d-root {
    height: 320px;
    border-radius: 16px;
  }

  .scene3d-fallback {
    gap: 8px;
  }

  .scene3d-fb-xi {
    font-size: 52px;
  }

  .scene3d-fallback-rings {
    width: 150px;
    height: 58px;
  }

  .scene3d-fb-ring {
    width: 58px;
    height: 58px;
    border-width: 4px;
  }

  .scene3d-fb-ring:first-child {
    left: 14px;
  }

  .scene3d-fb-ring:last-child {
    right: 14px;
  }

  .scene3d-fallback-names {
    font-size: 20px;
  }

  .scene3d-actions {
    bottom: 10px;
    padding: 7px 8px;
    border-radius: 18px;
  }

  .sa-bar {
    gap: 6px;
  }

  .sa-kicker {
    display: none;
  }

  .sa-list {
    flex-wrap: wrap;
    gap: 4px;
  }

  .sa-btn {
    gap: 5px;
    padding: 4px 9px 4px 4px;
  }

  .sa-ico {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .sa-label {
    font-size: 11px;
  }
}
