/* ==========================================================
   财富的深渊 — 场景区样式
   ========================================================== */

#scene-wrap {
  position: absolute; inset: 0;
  background: #06080d;
}
.scene-view {
  position: absolute; inset: 0;
  overflow: hidden;
}
.scene-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity .9s ease;
  opacity: 0;
}
.scene-bg.visible { opacity: 1; }
.scene-darken {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(5, 8, 13, .42) 0%, rgba(5, 8, 13, 0) 22%, rgba(5, 8, 13, 0) 68%, rgba(5, 8, 13, .66) 100%);
  pointer-events: none;
}

/* ============ 交互热区 ============ */
.scene-hotspots { position: absolute; inset: 0; z-index: 20; }
.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform .15s ease;
}
.hotspot .hs-ring {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(240, 180, 41, .85);
  background: rgba(240, 180, 41, .1);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  box-shadow: 0 0 14px rgba(240, 180, 41, .4);
  animation: hsPulse 2.2s ease-in-out infinite;
}
.hotspot .hs-label {
  font-size: 11.5px;
  letter-spacing: 1px;
  color: #f6d98a;
  background: rgba(10, 14, 20, .82);
  border: 1px solid rgba(240, 180, 41, .35);
  padding: 2px 9px;
  border-radius: 10px;
  white-space: nowrap;
  backdrop-filter: blur(3px);
}
.hotspot:hover .hs-ring { transform: scale(1.22); border-color: #ffd75e; box-shadow: 0 0 22px rgba(240, 180, 41, .65); }
.hotspot:hover .hs-label { color: #ffe9ad; border-color: rgba(240, 180, 41, .7); }
.hotspot.discovered .hs-ring { border-color: rgba(139, 152, 169, .4); background: rgba(139, 152, 169, .08); box-shadow: none; animation: none; }
.hotspot.discovered .hs-label { color: var(--text-faint); border-color: rgba(139, 152, 169, .25); }
.hotspot .hs-new {
  position: absolute; top: -6px; right: -6px;
  width: 9px; height: 9px;
  background: var(--danger);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--danger);
}
@keyframes hsPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(240, 180, 41, .3); }
  50% { box-shadow: 0 0 22px rgba(240, 180, 41, .7); }
}

/* 停留过久提示闪烁 */
.scene-view.idle-glint .hotspot:not(.discovered) .hs-ring {
  animation: glint 1.1s ease-in-out infinite;
}
@keyframes glint {
  0%, 100% { box-shadow: 0 0 10px rgba(240, 180, 41, .3); }
  50% { box-shadow: 0 0 34px rgba(240, 180, 41, .95); border-color: #ffe9ad; }
}

/* ============ 场景内NPC立绘 ============ */
.scene-npc-avatar {
  position: absolute;
  right: 5%;
  bottom: 56px;
  height: 56%;
  z-index: 15;
  pointer-events: none;
}
.scene-npc-avatar img {
  height: 100%;
  filter: drop-shadow(0 0 24px rgba(0, 0, 0, .6));
  border-radius: 6px;
  opacity: .96;
  animation: npcFloat 4s ease-in-out infinite;
}
.scene-npc-avatar .npc-tag {
  position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%);
  background: rgba(10, 14, 20, .85);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 11.5px;
  padding: 3px 12px;
  border-radius: 12px;
  white-space: nowrap;
  letter-spacing: 1px;
}
@keyframes npcFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ============ 场景字幕 ============ */
.scene-caption {
  position: absolute;
  left: 50%; bottom: 70px;
  transform: translateX(-50%);
  z-index: 15;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 3px;
  color: rgba(230, 237, 243, .75);
  background: rgba(8, 11, 17, .72);
  border: 1px solid rgba(38, 50, 68, .7);
  padding: 6px 20px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: blur(3px);
}

/* ============ 监控回放 ============ */
.cctv-overlay {
  position: absolute; inset: 0; z-index: 40;
  background: rgba(3, 5, 8, .85);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
.cctv-frame {
  width: min(720px, 90vw);
  background: #05070a;
  border: 1px solid #1d3a2c;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cctv-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #7ee2a8;
  background: #081009;
  padding: 8px 14px;
  letter-spacing: 1px;
  border-bottom: 1px solid #15301f;
}
.cctv-body {
  min-height: 320px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
  padding: 26px;
  color: #6f8d7a;
  font-size: 13px;
  position: relative;
  background:
    repeating-linear-gradient(0deg, rgba(126, 226, 168, .05) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at center, #0a120c, #04070a 80%);
  font-family: var(--font-mono);
}
.cctv-body .cctv-time { font-size: 12px; color: #4d6b57; letter-spacing: 2px; }
.cctv-body .cctv-text { text-align: center; line-height: 2; }
.cctv-frame .btn { margin: 12px auto 14px; display: flex; }
.cctv-rect {
  border: 1.5px solid rgba(126, 226, 168, .6);
  position: absolute;
  animation: rectBlink 1s steps(2) infinite;
}
@keyframes rectBlink { 50% { opacity: .25; } }
.cctv-body .cctv-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 26px;
  background: linear-gradient(90deg, transparent, rgba(126, 226, 168, .12));
  border-top: 1px solid rgba(126, 226, 168, .15);
}
.cctv-overlay .btn { z-index: 2; position: relative; }

/* ============ 章节转场 ============ */
.chapter-transition {
  position: absolute; inset: 0; z-index: 50;
  background: #04060a;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .7s ease;
}
.chapter-transition.show { opacity: 1; pointer-events: auto; }
.ct-inner { text-align: center; }
.ct-chapter {
  font-family: var(--font-mono);
  font-size: 14px; letter-spacing: 10px; text-indent: 10px;
  color: var(--amber);
  opacity: 0;
  transform: translateY(14px);
}
.ct-title {
  font-family: var(--font-serif);
  font-size: clamp(34px, 6vw, 60px);
  letter-spacing: 14px; text-indent: 14px;
  margin: 14px 0 10px;
  color: #f0f5f9;
  text-shadow: 0 0 34px rgba(77, 208, 225, .3);
  opacity: 0;
  transform: translateY(18px);
}
.ct-sub {
  font-size: 13.5px; letter-spacing: 2px;
  color: var(--text-dim);
  opacity: 0;
  transform: translateY(14px);
}
.chapter-transition.show .ct-chapter { animation: ctIn .7s ease .25s forwards; }
.chapter-transition.show .ct-title { animation: ctIn .8s ease .5s forwards; }
.chapter-transition.show .ct-sub { animation: ctIn .8s ease .8s forwards; }
@keyframes ctIn { to { opacity: 1; transform: none; } }

/* 场景切换淡入 */
.scene-switch .scene-bg { transition: opacity .2s ease; }
