/* radarfx2 2026-11-12：在 radarfx1 上叠加虚线外环、加速扫描、更亮涟漪、节点光迹、事件卡发光边与数字回位。
 * 沿用 .radar-motion 现有色（--motion-ink、雷达盘绿、--gold），不改配色体系；减少动态效果时只留文字。 */

/* ---------- 扫描盘：虚线外环慢转；新建仓扫描加速 + 更亮涟漪 ---------- */
.radar-fx-orbit {
  position: absolute;
  inset: 3%;
  border-radius: 50%;
  border: 1.6px dashed #a8c56ccc;
  box-shadow: inset 0 0 18px #b6f96314, 0 0 10px #b6f96322;
  pointer-events: none;
  z-index: 0;
  animation: radar-fx-orbit-spin 18s linear infinite;
}
.radar-open-pulse .radar-fx-orbit {
  border-color: #d7fb83dd;
  animation-duration: 6s;
}
.radar-open-pulse .radar-motion-dial i { animation-duration: .72s !important; }
/* 在已有 ::after 扩散光波上加一层更亮、略晚的涟漪 */
.radar-motion.radar-open-pulse::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 118px;
  aspect-ratio: 1;
  border: 2px solid #f2ffcc;
  border-radius: 50%;
  box-shadow: 0 0 36px #dcff91, 0 0 8px var(--gold, #c9a227), inset 0 0 18px #f2ffcc88;
  pointer-events: none;
  animation: radar-fx-ripple 1s ease-out .16s 2;
  opacity: 0;
}
@keyframes radar-fx-orbit-spin { to { transform: rotate(360deg); } }
@keyframes radar-fx-ripple {
  from { transform: translate(-50%, -50%) scale(.55); opacity: .95; }
  to { transform: translate(-50%, -50%) scale(2.35); opacity: 0; }
}

/* ---------- 1) 扫描盘节点 + 光迹 ---------- */
.radar-fx-layer { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.radar-fx-links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.radar-fx-links line {
  stroke: var(--motion-ink, #d7fb83);
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-width: 1.6px;
  filter: drop-shadow(0 0 3px var(--motion-ink, #d7fb83));
  stroke-dasharray: 60;
  animation: radar-fx-link .5s ease-out both;
}
.radar-fx-trail {
  position: absolute;
  left: var(--x1, 50%);
  top: var(--y1, 50%);
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: #f2ffcc;
  box-shadow: 0 0 8px #dcff91, 0 0 16px #c5ff73, 0 0 2px var(--gold, #c9a227);
  pointer-events: none;
  animation: radar-fx-trail .56s cubic-bezier(.2, .7, .2, 1) both;
  z-index: 2;
}
.radar-fx-trail::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 6px;
  margin: -3px 0 0 -18px;
  border-radius: 4px;
  background: linear-gradient(90deg, transparent, #dcff91cc);
  filter: blur(.4px);
}
@keyframes radar-fx-trail {
  from { left: var(--x1, 50%); top: var(--y1, 50%); opacity: 1; transform: scale(1.15); }
  to { left: var(--x2, 50%); top: var(--y2, 50%); opacity: .15; transform: scale(.55); }
}
.radar-fx-node {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #9fbe68;
  border: 1px solid #0b130e;
  opacity: .82;
}
.radar-fx-node.is-open { background: var(--motion-ink, #d7fb83); opacity: 1; box-shadow: 0 0 6px #c5ff7366; }
.radar-fx-node.is-pass { background: #647b44; opacity: .7; }
.radar-fx-node.is-sel {
  width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
  background: #f2ffcc; opacity: 1;
  box-shadow: 0 0 0 2px #0b130e, 0 0 0 3px var(--motion-ink, #d7fb83), 0 0 12px var(--motion-ink, #d7fb83);
}
.radar-fx-node.is-hot { background: #f2ffcc; opacity: 1; animation: radar-fx-node-pulse .9s ease-out 5; }
.radar-fx-node.is-hot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--motion-ink, #d7fb83);
  animation: radar-fx-node-ring .9s ease-out 5;
  opacity: 0;
}
@keyframes radar-fx-node-pulse {
  0% { box-shadow: 0 0 0 0 #dcff91cc, 0 0 10px #c5ff73; }
  100% { box-shadow: 0 0 0 9px #dcff9100, 0 0 4px #c5ff7300; }
}
@keyframes radar-fx-node-ring { from { transform: scale(.6); opacity: .95; } to { transform: scale(2.6); opacity: 0; } }
@keyframes radar-fx-link { from { stroke-dashoffset: 60; opacity: 0; } to { stroke-dashoffset: 0; opacity: .95; } }

/* ---------- 2) 事件卡：锚定扫描盘正下方（absolute，不占文档流）；落下带发光边 ---------- */
.radar-pulse-notice.radar-fx-anchored:not([hidden]) {
  position: absolute;
  z-index: 6;
  top: var(--fx-top, 50%);
  left: var(--fx-left, 50%);
  right: auto;
  bottom: auto;
  width: min(340px, calc(100% - 24px));
  margin: 0;
  padding: 9px 12px 10px;
  transform: translateX(-50%);
  background: #213414;
  border: 1px solid #8baf4e;
  box-shadow: 0 8px 24px #0009, 0 0 20px #b5fb5540;
  text-align: center;
  pointer-events: auto;
}
.radar-pulse-notice.radar-fx-anchored:not([hidden])::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  right: auto;
  width: 2px;
  height: 11px;
  margin-left: -1px;
  background: linear-gradient(180deg, transparent, #d7fb83);
  transform: none;
  transform-origin: top;
  animation: none;
  pointer-events: none;
}
.radar-pulse-notice.radar-fx-drop:not([hidden]) {
  animation: radar-fx-drop .38s cubic-bezier(.2, .9, .3, 1.15) both, radar-fx-glow .8s ease-out both;
}
.radar-pulse-notice.radar-fx-drop:not([hidden])::before { animation: radar-fx-stem .3s ease-out both; }
.radar-pulse-notice .radar-fx-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.radar-pulse-notice .radar-fx-meta i { font-style: normal; white-space: nowrap; display: inline-block; }
.radar-pulse-notice .radar-fx-meta i:empty, .radar-pulse-notice .fx-vs:empty { min-height: 1em; }
.radar-pulse-notice .radar-fx-meta i.radar-fx-pop { animation: radar-fx-pop .35s ease-out both; }
.radar-pulse-notice.radar-fx-anchored button,
.radar-pulse-notice .radar-fx-pos-btn {
  margin: 6px auto 0;
  pointer-events: auto;
  position: relative;
  z-index: 1;
  cursor: pointer;
}
@keyframes radar-fx-drop {
  from { opacity: 0; transform: translate(-50%, -16px) scale(.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@keyframes radar-fx-stem { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes radar-fx-glow {
  0% { box-shadow: 0 8px 24px #0009, 0 0 8px #c5ff73, 0 0 0 1px #dcff91; border-color: #dcff91; }
  45% { box-shadow: 0 8px 24px #0009, 0 0 32px #c5ff73, 0 0 0 2px #f2ffcc, 0 0 6px var(--gold, #c9a227); border-color: #f2ffcc; }
  100% { box-shadow: 0 8px 24px #0009, 0 0 18px #b5fb5566, 0 0 0 1px #a4ce59; border-color: #8baf4e; }
}
@keyframes radar-fx-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.2); color: #f2ffcc; text-shadow: 0 0 8px #c5ff73; }
  100% { transform: scale(1); }
}

/* ---------- 3) 周边联动：边框闪一下，不整行狂闪 ---------- */
table.desk-matrix tr.desk-matrix-row.radar-fx-linked > td { background-color: #a5e54c18; }
table.desk-matrix tr.desk-matrix-row.radar-fx-linked { box-shadow: inset 3px 0 0 #b6f963; }
table.desk-matrix tr.desk-matrix-row.radar-fx-flash {
  animation: radar-fx-row-flash .45s ease-out 1;
}
@keyframes radar-fx-row-flash {
  0% { outline: 1px solid #dcff91; outline-offset: -1px; }
  100% { outline: 1px solid transparent; outline-offset: -1px; }
}
[data-rolling-tab="pos"].radar-fx-pos-hot {
  box-shadow: 0 0 0 1px #b6f963, 0 0 12px #b6f96355;
  transition: box-shadow .3s;
}
[data-rolling-tab="pos"].radar-fx-pos-flash {
  animation: radar-fx-tab-flash .4s ease-out 1;
}
@keyframes radar-fx-tab-flash {
  0% { box-shadow: 0 0 0 2px #f2ffcc, 0 0 16px #c5ff73; }
  100% { box-shadow: 0 0 0 1px #b6f963, 0 0 8px #b6f96355; }
}
.rolling-pos-count.radar-fx-bump, #navPosBadge.radar-fx-bump { display: inline-block; animation: radar-fx-bump .42s ease-out 1; }
@keyframes radar-fx-bump {
  0%, 100% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-3px) scale(1.1); }
}

/* ---------- 手机竖屏 ≤720：节点更少（JS 封顶 8 / 2 圈），只留脉冲不画连线、不跑光迹；两列信息卡不变 ---------- */
@media (max-width: 720px) {
  .radar-fx-links, .radar-fx-trail { display: none; }
  .radar-fx-node { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; }
  .radar-pulse-notice.radar-fx-anchored:not([hidden]) { width: min(320px, calc(100% - 20px)); padding: 8px 10px; }
  .radar-pulse-notice .radar-fx-meta { font-size: 12px; gap: 2px 8px; }
  .radar-fx-orbit { inset: 2%; }
}

/* ---------- 减少动态效果：只直接显示完整文字卡；行/页签可留静态底色或边框，不闪不跳 ---------- */
@media (prefers-reduced-motion: reduce) {
  .radar-fx-orbit,
  .radar-fx-links,
  .radar-fx-trail,
  .radar-motion.radar-open-pulse::before { display: none !important; animation: none !important; }
  .radar-open-pulse .radar-motion-dial i { animation: none !important; }
  .radar-fx-node.is-hot, .radar-fx-node.is-hot::after,
  .radar-pulse-notice.radar-fx-drop:not([hidden]),
  .radar-pulse-notice.radar-fx-drop:not([hidden])::before,
  .radar-pulse-notice .radar-fx-meta i.radar-fx-pop,
  table.desk-matrix tr.desk-matrix-row.radar-fx-flash,
  [data-rolling-tab="pos"].radar-fx-pos-flash,
  .rolling-pos-count.radar-fx-bump, #navPosBadge.radar-fx-bump { animation: none !important; }
  .radar-fx-node.is-hot::after { display: none; }
  .radar-fx-node.is-hot { box-shadow: none; }
  .radar-pulse-notice.radar-fx-anchored:not([hidden])::before { display: none; }
}
