/* 5LAOBAN-1781 产品演示场景加亮点（仁洲 10-27「太过直白没亮点」「对这些很空的部分做优化即可」）。
   只加装饰、不加字也不改原有内容：① 画布背后的光晕与点阵 ② 连接各元素的流光轨道 ③ 主体蓝卡／设备上扫过的光
   ④ 箭头脉冲；「CPQ 智能选配」一帧另加扫描光带与选中勾。
   约束（来自 home.js 的场景引擎）：
   - 动画只挂在当前帧（.sc-frame.is-current）上，其余帧只是隐身、仍在渲染；
   - 鼠标停在场景上时引擎会冻结全部动画：会移动的光（扫光、流光、扫描带）冻结时隐藏，静态装饰照常显示，原有内容一律不藏；
   - 引擎把当前帧的动画统一放快 1.8 倍，下面写的时长按 1.8 倍预留；
   - 「减少动态效果」时全部不动。 */

/* ---------- ① 画布背后的浅蓝圆角舞台：光晕＋点阵＋地面光 ---------- */
.ss-canvas, .es-body, .cq-payment { isolation: isolate; }
.es-body, .cq-payment { position: relative; }
.ss-canvas::before, .es-body::before, .cq-payment::before {
  content: "";
  position: absolute;
  inset: 6px -14px 0;
  z-index: -1;
  border-radius: 22px;
  pointer-events: none;
  border: 1px solid rgba(79, 107, 255, .1);
  background:
    radial-gradient(30% 50% at 50% 50%, rgba(79, 107, 255, .2), transparent 70%),
    radial-gradient(26% 46% at 12% 62%, rgba(34, 184, 255, .16), transparent 70%),
    radial-gradient(26% 46% at 88% 38%, rgba(123, 92, 255, .16), transparent 70%),
    radial-gradient(44% 10% at 50% 92%, rgba(59, 107, 255, .2), transparent 70%),
    radial-gradient(circle, rgba(79, 107, 255, .22) 1px, transparent 1.4px) 0 0 / 20px 20px,
    linear-gradient(180deg, #f8faff, #eef3ff);
}
.es-body::before { inset: -14px -16px; }
.cq-context {
  background-image:
    radial-gradient(70% 50% at 0% 100%, rgba(79, 107, 255, .12), transparent 70%),
    radial-gradient(60% 40% at 100% 0%, rgba(123, 92, 255, .08), transparent 70%),
    radial-gradient(circle, rgba(79, 107, 255, .14) 1px, transparent 1.4px);
  background-size: auto, auto, 20px 20px;
}

/* ---------- ② 流光：插画场景三件物品之间的弧线（scenes-fx.js 按位置画），付款一帧三段卡片之间一条中线 ---------- */
.scx-links { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.scx-rail { fill: none; stroke: rgba(79, 107, 255, .55); stroke-width: 1.6; stroke-dasharray: 2 7; stroke-linecap: round; }
.scx-pulse {
  fill: none;
  stroke: #4f6bff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 40 1400;
  stroke-dashoffset: 40;
  filter: drop-shadow(0 0 6px rgba(79, 107, 255, .8));
  opacity: 0;
}
.scx-links path:nth-of-type(4) { stroke: #22b8ff; }
.sc-frame.is-current .scx-pulse { animation: scx-pulse 5.4s cubic-bezier(.45, .05, .35, 1) infinite; }
.sc-frame.is-current .scx-links path:nth-of-type(4) { animation-delay: 2.7s; }
@keyframes scx-pulse {
  0% { stroke-dashoffset: 40; opacity: 0; }
  8%, 80% { opacity: 1; }
  100% { stroke-dashoffset: calc(-1 * var(--scx-len, 300px)); opacity: 0; }
}
.scx-node { fill: #fff; stroke: #4f6bff; stroke-width: 2; filter: drop-shadow(0 1px 3px rgba(79, 107, 255, .5)); }

.cq-payment::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 10%;
  right: 10%;
  bottom: 4%;
  height: 3px;
  border-radius: 3px;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, #4f6bff 40%, #22b8ff 60%, transparent) 0 0 / 26% 100% no-repeat,
    repeating-linear-gradient(90deg, rgba(79, 107, 255, .32) 0 8px, transparent 8px 15px);
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.cq-payment::after { top: 50%; bottom: auto; left: 6%; right: 6%; }
.sc-frame.is-current .cq-payment::after { animation: scx-flow 5.4s linear infinite; }
@keyframes scx-flow { from { background-position: -60% 0, 0 0; } to { background-position: 160% 0, 0 0; } }

/* 主体设备轻微发蓝光，从白底上浮起来 */
.ss-main, .es-center { filter: drop-shadow(0 22px 26px rgba(59, 107, 255, .16)); }

/* ---------- ③ 扫光：主体蓝卡与设备屏幕 ---------- */
.ss-monitor-shell, .es-monitor, .es-preview, .cq-inline-result, .cq-client-head, .cq-payment-destination, .cq-action-label {
  position: relative;
  overflow: hidden;
}
.ss-phone::after, .ss-monitor-shell::after, .es-monitor::after, .es-preview::after,
.cq-inline-result::after, .cq-client-head::after, .cq-payment-destination::after, .cq-action-label::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -70%;
  width: 45%;
  z-index: 2;
  pointer-events: none;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
  opacity: 0;
}
.ss-phone::after, .ss-monitor-shell::after, .es-monitor::after, .es-preview::after {
  background: linear-gradient(90deg, transparent, rgba(79, 107, 255, .12), rgba(255, 255, 255, .7), rgba(79, 107, 255, .12), transparent);
}
.sc-frame.is-current :is(.ss-phone, .ss-monitor-shell, .es-monitor, .es-preview, .cq-inline-result, .cq-client-head, .cq-payment-destination, .cq-action-label)::after {
  animation: scx-sheen 7.2s ease-in-out 1s infinite;
}
@keyframes scx-sheen {
  0% { left: -70%; opacity: 1; }
  32% { left: 130%; opacity: 1; }
  33%, 100% { left: 130%; opacity: 0; }
}

/* 蓝色主卡：底色缓慢流动的蓝紫青渐变＋外发光 */
.cq-inline-result, .cq-client-head, .cq-payment-destination {
  background-image: linear-gradient(120deg, #3b6bff, #5a5cff 30%, #2f8bff 55%, #22b8ff 75%, #3b6bff);
  background-size: 260% 100%;
  box-shadow: 0 18px 36px -16px rgba(59, 107, 255, .7);
}
.sc-frame.is-current :is(.cq-inline-result, .cq-client-head, .cq-payment-destination) { animation: scx-tide 14s ease-in-out infinite alternate; }
@keyframes scx-tide { to { background-position: 100% 0; } }
.cq-inline-result::before, .cq-client-head::before, .cq-payment-destination::before {
  content: "";
  position: absolute;
  right: -30px;
  top: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 65%);
}

/* ---------- ④ 箭头脉冲 ---------- */
.sc-frame.is-current .es-flow-arrow { animation: scx-nudge 2.9s ease-in-out infinite; }
.sc-frame.is-current .cq-path i { display: inline-block; animation: scx-nudge 2.9s ease-in-out infinite; }
@keyframes scx-nudge { 0%, 100% { transform: translateX(-3px); opacity: .55; } 50% { transform: translateX(4px); opacity: 1; } }

/* 企业平台场景：两张来源卡依次亮一圈，右侧表格有一道扫描带逐行扫过 */
.es-paper::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(79, 107, 255, .0);
}
.sc-frame.is-current .es-paper::after { animation: scx-ring 5.4s ease-in-out infinite; }
.sc-frame.is-current .es-paper:nth-child(2)::after { animation-delay: 1.4s; }
@keyframes scx-ring {
  0%, 40%, 100% { box-shadow: 0 0 0 2px rgba(79, 107, 255, 0); }
  12%, 24% { box-shadow: 0 0 0 2px rgba(79, 107, 255, .55), 0 10px 24px -10px rgba(79, 107, 255, .6); }
}
.es-mini-table { position: relative; overflow: hidden; }
.es-mini-table::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 26%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(79, 107, 255, .1) 40%, rgba(79, 107, 255, .1) 60%, transparent);
  border-top: 1px solid rgba(79, 107, 255, .18);
  border-bottom: 1px solid rgba(79, 107, 255, .18);
  opacity: 0;
}
.sc-frame.is-current .es-mini-table::after { animation: scx-rows 6.3s ease-in-out 1.2s infinite; }
@keyframes scx-rows {
  0% { transform: translateY(-100%); opacity: 1; }
  55% { transform: translateY(390%); opacity: 1; }
  56%, 100% { transform: translateY(390%); opacity: 0; }
}

/* ---------- 「CPQ 智能选配」一帧的突出点 ---------- */
/* 客户头像外一圈呼吸光，回复气泡伸出一道流光接进右侧配置面板（需求与配置同步） */
.sc-frame.is-current .cq-customer > span { animation: scx-halo 4.3s ease-in-out infinite; }
@keyframes scx-halo { 50% { box-shadow: 0 0 0 7px rgba(59, 107, 255, .14), 0 10px 22px -8px rgba(59, 107, 255, .7); } }
.cq-message--reply { position: relative; }
.cq-message--reply::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  width: 68px;
  height: 2px;
  margin-top: -1px;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, #4f6bff, #22b8ff, transparent) 0 0 / 40% 100% no-repeat,
    repeating-linear-gradient(90deg, rgba(79, 107, 255, .45) 0 5px, transparent 5px 10px);
}
.sc-frame.is-current .cq-message--reply::after { animation: scx-flow 3.6s linear infinite; }
/* 方案字段上一道扫描光带：看起来是按客户需求「识别」出来的 */
.cq-fields { position: relative; }
.cq-fields::after {
  content: "";
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: 0;
  width: 22%;
  pointer-events: none;
  border-radius: 8px;
  background: linear-gradient(90deg, transparent, rgba(79, 107, 255, .16), rgba(34, 184, 255, .28), rgba(79, 107, 255, .16), transparent);
  border-right: 2px solid rgba(34, 184, 255, .7);
  opacity: 0;
}
.sc-frame.is-current .cq-fields::after { animation: scx-scan 6.3s ease-in-out .6s infinite; }
@keyframes scx-scan {
  0% { left: -22%; opacity: 1; }
  40% { left: 100%; opacity: 1; }
  41%, 100% { left: 100%; opacity: 0; }
}
/* 选中的两项：描一圈蓝边、右上角一个勾 */
.cq-option-grid > .selected {
  position: relative;
  border-color: rgba(79, 107, 255, .55);
  background-image: linear-gradient(160deg, rgba(255, 255, 255, .9), rgba(232, 238, 255, .9));
  box-shadow: 0 0 0 3px rgba(79, 107, 255, .08), 0 14px 26px -16px rgba(59, 107, 255, .55);
}
.cq-option-grid > .selected::after {
  content: "✓";
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, #4f6bff, #22b8ff);
  box-shadow: 0 6px 14px -4px rgba(59, 107, 255, .7);
}
.sc-frame.is-current .cq-option-grid > .selected::after { animation: scx-pop 5.4s ease-in-out infinite; }
.sc-frame.is-current .cq-option-grid > .selected:nth-child(2)::after { animation-delay: .5s; }
@keyframes scx-pop { 0%, 30%, 100% { transform: scale(1); } 10% { transform: scale(1.22); } }
/* 配置清单一帧：合计金额加一层底色 */
.cq-total { border-radius: 9px; background: linear-gradient(90deg, rgba(79, 107, 255, .06), rgba(34, 184, 255, .1)); }

/* ---------- 冻结时把会移动的光藏起来；减少动态效果时全部不动 ---------- */
.sc-scene:not(.sc-running) :is(.cq-payment, .cq-message--reply)::after,
.sc-scene:not(.sc-running) :is(.ss-phone, .ss-monitor-shell, .es-monitor, .es-preview, .cq-inline-result, .cq-client-head, .cq-payment-destination, .cq-action-label, .cq-fields, .es-mini-table)::after {
  animation: none;
  opacity: 0;
}
.sc-scene:not(.sc-running) :is(.cq-payment, .cq-message--reply)::after { opacity: 1; }
.sc-scene:not(.sc-running) .scx-pulse { animation: none; opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .sc-frame.is-current :is(.cq-payment, .cq-message--reply, .ss-phone, .ss-monitor-shell, .es-monitor, .es-preview, .cq-inline-result, .cq-client-head, .cq-payment-destination, .cq-action-label, .cq-fields, .es-mini-table, .es-paper, .cq-option-grid > .selected)::after,
  .sc-frame.is-current :is(.cq-inline-result, .cq-client-head, .cq-payment-destination, .es-flow-arrow, .cq-path i, .cq-customer > span, .scx-pulse) { animation: none; }
}
.sc-scene.is-reduced .sc-frame.is-current :is(.cq-payment, .cq-message--reply, .ss-phone, .ss-monitor-shell, .es-monitor, .es-preview, .cq-inline-result, .cq-client-head, .cq-payment-destination, .cq-action-label, .cq-fields, .es-mini-table, .es-paper, .cq-option-grid > .selected)::after,
.sc-scene.is-reduced .sc-frame.is-current :is(.cq-inline-result, .cq-client-head, .cq-payment-destination, .es-flow-arrow, .cq-path i, .cq-customer > span, .scx-pulse) { animation: none; }
