/* ===== AI 共识推演动画（8 模型投票版） ===== */
.ai-show {
  position: relative;
  background: radial-gradient(120% 90% at 50% 0%, #17102a 0%, #0c0916 55%, #08060f 100%);
  border: 1px solid rgba(124,108,255,0.18);
  border-radius: 14px;
  padding: 14px 14px 18px;
  margin-bottom: 14px;
  overflow: hidden;
}
/* 四角科技边框 */
.ai-corner { position: absolute; width: 18px; height: 18px; border-color: rgba(214,179,108,0.5); border-style: solid; border-width: 0; z-index: 6; pointer-events: none; }
.ai-corner.tl { top: 6px; left: 6px; border-top-width: 2px; border-left-width: 2px; border-top-left-radius: 6px; }
.ai-corner.tr { top: 6px; right: 6px; border-top-width: 2px; border-right-width: 2px; border-top-right-radius: 6px; }
.ai-corner.bl { bottom: 6px; left: 6px; border-bottom-width: 2px; border-left-width: 2px; border-bottom-left-radius: 6px; }
.ai-corner.br { bottom: 6px; right: 6px; border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: 6px; }

.ai-show-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding-right: 64px; }
.ai-show-tag { font-size: 10px; letter-spacing: 2px; color: var(--accent-l); font-weight: 700; }
.ai-show-live { display: flex; align-items: center; gap: 5px; font-size: 9px; letter-spacing: 1px; color: #e0565b; font-weight: 700; }
.ai-live-dot { width: 6px; height: 6px; border-radius: 50%; background: #e0565b; box-shadow: 0 0 6px #e0565b; animation: aiBlink 1.2s infinite; }
@keyframes aiBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }
.ai-show-title {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  text-align: center; font-size: 18px; font-weight: 800; letter-spacing: 1px; margin-bottom: 10px;
  background: linear-gradient(90deg, #eef0ff 20%, #a79aff 50%, #eef0ff 80%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.ai-show-dash { color: var(--gdim); -webkit-text-fill-color: var(--gdim); margin: 0 2px; font-size: 13px; letter-spacing: 2px; }
/* 标题行小队标 */
.ai-title-logo {
  width: 26px; height: 26px; border-radius: 50%; overflow: hidden;
  border: 1.5px solid; position: relative; flex-shrink: 0;
  background: rgba(8,6,15,0.8);
  -webkit-text-fill-color: #fff;
}
.ai-title-logo.home { border-color: #3fb96f; box-shadow: 0 0 10px rgba(63,185,111,0.35); }
.ai-title-logo.away { border-color: #a79aff; box-shadow: 0 0 10px rgba(167,154,255,0.35); }
.ai-title-logo img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.ai-title-fb {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff; -webkit-text-fill-color: #fff;
}
.ai-title-logo.home .ai-title-fb { background: rgba(63,185,111,0.25); }
.ai-title-logo.away .ai-title-fb { background: rgba(167,154,255,0.25); }

.ai-stage { position: relative; height: 336px; border-radius: 12px; overflow: hidden; }
.ai-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(124,108,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,108,255,0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(70% 70% at 50% 50%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000 30%, transparent 100%);
}
.ai-radar {
  position: absolute; inset: 0;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(224,86,91,0.06) 40deg, transparent 80deg);
  animation: aiRadar 4s linear infinite;
  will-change: transform;
}
@keyframes aiRadar { to { transform: rotate(360deg); } }

/* 中央能量环 */
.ai-core { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 146px; height: 146px; z-index: 2; }
.ai-ring { position: absolute; border-radius: 50%; border: 1.5px solid transparent; will-change: transform; }
.ai-ring.r0 { inset: -8px; border: 1px dashed rgba(214,179,108,0.3); animation: aiSpin 14s linear infinite; }
.ai-ring.r1 { inset: 0; border-top-color: rgba(224,86,91,0.8); border-right-color: rgba(224,86,91,0.25); animation: aiSpin 2.6s linear infinite; }
.ai-ring.r2 { inset: 12px; border-bottom-color: rgba(124,108,255,0.7); border-left-color: rgba(124,108,255,0.2); animation: aiSpin 3.8s linear infinite reverse; }
.ai-ring.r3 { inset: 24px; border-top-color: rgba(214,179,108,0.6); animation: aiSpin 5s linear infinite; }
@keyframes aiSpin { to { transform: rotate(360deg); } }
.ai-core-inner {
  position: absolute; inset: 34px; border-radius: 50%;
  background: rgba(8,6,15,0.85);
  border: 1px solid rgba(224,86,91,0.3);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: inset 0 0 24px rgba(224,86,91,0.15);
  transition: border-color 0.8s, box-shadow 0.8s;
}
.ai-core-inner.done { border-color: rgba(63,185,111,0.55); box-shadow: inset 0 0 24px rgba(63,185,111,0.25), 0 0 20px rgba(63,185,111,0.2); }
.ai-core-inner.done .ai-core-val { color: #7dd8a0; text-shadow: 0 0 12px rgba(63,185,111,0.6); }
.ai-core-label { font-size: 7px; letter-spacing: 1px; color: var(--gdim); }
.ai-core-val { font-size: 21px; font-weight: 800; color: #ff6b6b; font-family: monospace; text-shadow: 0 0 12px rgba(224,86,91,0.6); transition: color 0.8s; }
.ai-core-sub { font-size: 8px; color: var(--gtext); }

/* 8 模型环绕（避开左右对阵卡） */
.ai-nodes { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.ai-node { position: absolute; text-align: center; opacity: 0.3; transition: opacity 0.4s; }
.ai-node.on { opacity: 1; }
.ai-node-orb {
  width: 34px; height: 34px; margin: 0 auto 2px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12,9,22,0.92);
  border: 1.5px solid var(--nc, var(--accent));
  transition: box-shadow 0.4s;
  position: relative;
}
.ai-node-orb svg { width: 18px; height: 18px; }
.ai-node.on .ai-node-orb { box-shadow: 0 0 14px var(--nc, var(--accent)); animation: aiPulse 1.8s ease-in-out infinite; }
@keyframes aiPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.ai-node-name { font-size: 8px; letter-spacing: 0.5px; color: var(--gtext); white-space: nowrap; font-weight: 600; }

/* 投票后指向中心的光线：闪过即淡出，不常驻（避免8线交叉杂乱） */
.ai-node::before {
  content: ''; position: absolute; left: 50%; top: 17px;
  width: 64px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--nc), transparent);
  transform-origin: left center;
  opacity: 0;
  z-index: -1;
}
.ai-node.voted::before { animation: aiBeam 1.3s ease-out forwards; }
@keyframes aiBeam {
  0% { opacity: 0; width: 0; }
  30% { opacity: 0.9; }
  60% { opacity: 0.45; width: 64px; }
  100% { opacity: 0; width: 64px; }
}
#ai-node-0::before { transform: rotate(90deg); }
#ai-node-1::before { transform: rotate(122deg); }
#ai-node-2::before { transform: rotate(152deg); }
#ai-node-3::before { transform: rotate(-150deg); }
#ai-node-4::before { transform: rotate(-115deg); }
#ai-node-5::before { transform: rotate(-65deg); }
#ai-node-6::before { transform: rotate(-30deg); }
#ai-node-7::before { transform: rotate(28deg); }

/* 投票标签 */
.ai-vote-tag {
  display: inline-block; margin-top: 2px;
  font-size: 8px; font-weight: 700; line-height: 1.4;
  padding: 1px 7px; border-radius: 9px;
  opacity: 0; transform: scale(0.5);
  transition: opacity 0.3s, transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  white-space: nowrap;
}
.ai-vote-tag.show { opacity: 1; transform: scale(1); }
.ai-vote-tag.vt-home { color: #7dd8a0; background: rgba(63,185,111,0.14); border: 1px solid rgba(63,185,111,0.45); }
.ai-vote-tag.vt-draw { color: #e8c87a; background: rgba(214,179,108,0.12); border: 1px solid rgba(214,179,108,0.4); }
.ai-vote-tag.vt-away { color: #b7aaff; background: rgba(167,154,255,0.14); border: 1px solid rgba(167,154,255,0.45); }

/* 节点位置（标准椭圆环绕，底部留白防溢出） */
#ai-node-0 { top: 1%;  left: 50%; transform: translateX(-50%); }
#ai-node-1 { top: 6%;  left: 76%; transform: translateX(-50%); }
#ai-node-2 { top: 26%; left: 89%; transform: translateX(-50%); }
#ai-node-3 { top: 64%; left: 85%; transform: translateX(-50%); }
#ai-node-4 { top: 78%; left: 63%; transform: translateX(-50%); }
#ai-node-5 { top: 78%; left: 37%; transform: translateX(-50%); }
#ai-node-6 { top: 64%; left: 15%; transform: translateX(-50%); }
#ai-node-7 { top: 26%; left: 11%; transform: translateX(-50%); }

/* 分析日志：终端面板 */
.ai-logs {
  margin-top: 10px;
  height: 92px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 3px;
  background: rgba(5,4,10,0.7);
  border: 1px solid rgba(124,108,255,0.12);
  border-radius: 8px;
  padding: 8px;
}
.ai-log-line {
  font-size: 9px; line-height: 1.5; color: #ff8585;
  background: rgba(224,86,91,0.05);
  border-left: 2px solid rgba(224,86,91,0.5);
  padding: 2px 8px; border-radius: 0 5px 5px 0;
  animation: aiLogIn 0.35s ease-out;
  transition: color 0.6s, background 0.6s, border-color 0.6s;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: monospace;
}
.ai-log-line.ok { color: #7dd8a0; background: rgba(63,185,111,0.05); border-left-color: rgba(63,185,111,0.6); }
@keyframes aiLogIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

/* 阶段流程 */
.ai-steps {
  display: flex; justify-content: space-between; gap: 4px;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid rgba(124,108,255,0.12);
}
.ai-step { flex: 1; text-align: center; opacity: 0.35; transition: opacity 0.3s; }
.ai-step i { display: block; font-size: 8px; color: var(--gdim); font-style: normal; letter-spacing: 1px; }
.ai-step span { font-size: 9px; color: var(--gtext); }
.ai-step.active { opacity: 1; }
.ai-step.active i { color: #e8a545; }
.ai-step.done { opacity: 1; }
.ai-step.done i { color: #3fb96f; }
.ai-step.done span::after { content: ' ✓'; color: #3fb96f; }

/* 完成态 */
.ai-show-done { display: none; text-align: center; margin-top: 12px; }
.ai-show-done.show { display: block; animation: aiLogIn 0.5s ease-out; }
.ai-done-badge {
  display: inline-block; font-size: 13px; font-weight: 800; color: #7dd8a0;
  background: rgba(63,185,111,0.1); border: 1px solid rgba(63,185,111,0.3);
  padding: 6px 16px; border-radius: 20px; margin-bottom: 8px;
}
.ai-done-hint { font-size: 11px; color: var(--gdim); animation: aiBounce 1.6s ease-in-out infinite; }
@keyframes aiBounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

.ai-skip {
  position: absolute; top: 10px; right: 10px; z-index: 7;
  font-size: 10px; color: var(--gdim); background: rgba(12,9,22,0.6);
  border: 1px solid var(--border); border-radius: 12px; padding: 3px 10px;
  cursor: pointer; touch-action: manipulation;
}
.ai-skip:hover { color: var(--white); border-color: var(--border-hover); }
.ai-show-finished .ai-radar { animation-play-state: paused; opacity: 0.3; }
.ai-show-finished .ai-ring { animation-duration: 8s; }

@media (max-width: 480px) {
  .ai-stage { height: 300px; }
  .ai-title-logo { width: 22px; height: 22px; }
  .ai-title-fb { font-size: 11px; }
  .ai-core { width: 118px; height: 118px; }
  .ai-core-inner { inset: 28px; }
  .ai-core-val { font-size: 17px; }
  .ai-show-title { font-size: 14px; gap: 6px; }
  .ai-show-tag { font-size: 8px; letter-spacing: 1px; }
  .ai-node-orb { width: 28px; height: 28px; }
  .ai-node-orb svg { width: 14px; height: 14px; }
  .ai-node-name { font-size: 7px; }
  .ai-vote-tag { font-size: 7px; padding: 1px 5px; }
  .ai-node::before { width: 46px; top: 14px; }
  .ai-step span { font-size: 8px; }
  .ai-logs { height: 82px; }
  .ai-log-line { font-size: 8px; }
}
