/* ---------- 镜头与画面特效（作用于 .stage） ---------- */
.fx-shake { animation: shake 0.5s linear; }
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-8px, 4px); }
  25% { transform: translate(7px, -5px); }
  40% { transform: translate(-6px, -3px); }
  55% { transform: translate(5px, 4px); }
  70% { transform: translate(-4px, 2px); }
  85% { transform: translate(3px, -2px); }
}

.fx-flash { position: absolute; inset: 0; background: #fff; opacity: 0.95; animation: flash 0.7s ease-out forwards; }
@keyframes flash { from { opacity: 0.95; } to { opacity: 0; } }

.fx-blackout { position: absolute; inset: 0; background: #000; opacity: 0; transition: opacity 0.9s; }
.fx-blackout.show { opacity: 1; }

.fx-glitch { animation: glitch 0.6s steps(2) 2; }
@keyframes glitch {
  0% { filter: none; transform: translate(0); }
  20% { filter: hue-rotate(30deg) contrast(1.2); transform: translate(-3px, 1px); }
  40% { filter: hue-rotate(-40deg) saturate(1.4); transform: translate(3px, -1px); }
  60% { filter: contrast(1.3) brightness(0.9); transform: translate(-2px, 0); }
  80% { filter: hue-rotate(15deg); transform: translate(2px, 1px); }
  100% { filter: none; transform: translate(0); }
}

.stage.fx-alert::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(224, 90, 106, 0.45) 100%);
  animation: alert-pulse 1.1s ease-in-out infinite;
}
@keyframes alert-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.9; } }

/* 立绘入场时轻微呼吸，仅说话者 */
.sprite.speaking .sprite-img { animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* ---------- 减少动态效果 ---------- */
body[data-reduce-motion="1"] *,
body[data-reduce-motion="1"] *::before,
body[data-reduce-motion="1"] *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}
body[data-reduce-motion="1"] .stage-scan { opacity: 0.3; }
body[data-reduce-motion="1"] .stage-scan::after { display: none; }

/* ---------- 滚动条 ---------- */
.modal-body::-webkit-scrollbar, .notebook-grid::-webkit-scrollbar, .backlog-list::-webkit-scrollbar, .deduce-grid::-webkit-scrollbar, .profile-text::-webkit-scrollbar, .gallery-body::-webkit-scrollbar, .profile-nav::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-thumb, .notebook-grid::-webkit-scrollbar-thumb, .backlog-list::-webkit-scrollbar-thumb, .deduce-grid::-webkit-scrollbar-thumb, .profile-text::-webkit-scrollbar-thumb, .gallery-body::-webkit-scrollbar-thumb, .profile-nav::-webkit-scrollbar-thumb { background: rgba(95, 211, 208, 0.3); border-radius: 3px; }
.modal-body::-webkit-scrollbar-track, .gallery-body::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.03); }
