/* ==========================================================================
   值不值得做 · AI场景8维度验证 —— 未来艺术装置 UI
   功能逻辑与 API 调用完全不变，仅重写视觉层
   ========================================================================== */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #020612;
  --cyan: #00d4ff;
  --green: #00ffc8;
  --wait: #4da3ff;
  --warn: #ffb020;
  --danger: #ff4d6d;
  --t1: #e0f0ff;
  --t2: #7ba3cc;
  --t3: #3d6080;
  --panel: rgba(6, 16, 38, 0.75);
  --line: rgba(0, 212, 255, 0.2);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- 基础 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--t1);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

::selection { background: rgba(0, 212, 255, 0.35); color: #fff; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, 0.3); border-radius: 3px; }

/* ==========================================================================
   背景层（全屏）
   ========================================================================== */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(0, 102, 255, 0.10), transparent 60%),
    radial-gradient(900px 500px at 85% 110%, rgba(0, 212, 255, 0.05), transparent 60%),
    var(--bg);
}

/* 巨大八边形能量阵：占屏幕70%，缓慢旋转 */
.bg-octagon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70vmin;
  height: 70vmin;
  transform: translate(-50%, -50%);
  animation: bgSpin 40s linear infinite;
}

@keyframes bgSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.bg-octagon svg { width: 100%; height: 100%; }

.bg-octa {
  fill: none;
  stroke: rgba(0, 212, 255, 0.06);
  stroke-width: 0.2;
}

.bg-octa-lines line {
  stroke: rgba(0, 212, 255, 0.04);
  stroke-width: 0.15;
}

/* 径向体积光（中心偏上，像一束光从上方照下） */
.bg-beam {
  position: absolute;
  inset: 0;
  background: radial-gradient(70% 55% at 50% 18%, rgba(0, 102, 255, 0.08), transparent 70%);
}

/* 粒子星云（JS 注入 .p） */
.bg-particles { position: absolute; inset: 0; }

.bg-particles .p {
  position: absolute;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.7);
  will-change: transform;
}

/* 极淡扫描线 */
.bg-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.018) 0px,
    rgba(255, 255, 255, 0.018) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.5;
}

/* ==========================================================================
   应用主体
   ========================================================================== */
.app {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 40px 56px;
  min-height: 100vh;
}

/* ---------- 页面切换 ---------- */
.page { display: none; }

.page.active {
  display: block;
  animation: pageIn 0.5s var(--ease-out) both;
}

@keyframes pageIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---------- 切角面板 ---------- */
.cut {
  clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
}

.panel {
  position: relative;
  background: var(--panel);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
}

/* 切角处的能量发光线（左上角斜段） */
.panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
  z-index: 2;
}

/* ---------- 区域标签 ---------- */
.zone-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 4px;
  color: var(--t3);
  text-transform: uppercase;
  font-weight: 600;
}

.zone-label::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.9);
}

/* ---------- 入场动画（分方向 + 错落延迟） ---------- */
.slide-left  { animation: slideLeft  0.6s var(--ease-out) both; animation-delay: var(--ad, 0s); }
.slide-right { animation: slideRight 0.6s var(--ease-out) both; animation-delay: var(--ad, 0s); }
.slide-up    { animation: slideUp    0.6s var(--ease-out) both; animation-delay: var(--ad, 0s); }

@keyframes slideLeft  { from { opacity: 0; transform: translateX(-32px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideRight { from { opacity: 0; transform: translateX(32px); }  to { opacity: 1; transform: translateX(0); } }
@keyframes slideUp    { from { opacity: 0; transform: translateY(32px); }  to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   首页
   ========================================================================== */
.home-flex {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: calc(100vh - 96px);
}

/* ---------- 左区 55% ---------- */
.home-left {
  flex: 0 0 55%;
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-octagon { position: relative; width: 480px; height: 480px; }

.home-octa-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 40px rgba(0, 102, 255, 0.25));
}

/* 3层同心八边形 */
.ho-grid {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1;
}

.ho-grid-1 { stroke-opacity: 0.08; }
.ho-grid-2 { stroke-opacity: 0.16; }
.ho-grid-3 { stroke-opacity: 0.3; }

/* 8条能量线：亮段沿中心→顶点循环流动 */
.ho-lines line {
  stroke: var(--cyan);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 40 200;
  animation: flowOut 3s linear infinite;
}

.ho-lines line:nth-child(2) { animation-delay: 0.375s; }
.ho-lines line:nth-child(3) { animation-delay: 0.75s; }
.ho-lines line:nth-child(4) { animation-delay: 1.125s; }
.ho-lines line:nth-child(5) { animation-delay: 1.5s; }
.ho-lines line:nth-child(6) { animation-delay: 1.875s; }
.ho-lines line:nth-child(7) { animation-delay: 2.25s; }
.ho-lines line:nth-child(8) { animation-delay: 2.625s; }

@keyframes flowOut {
  from { stroke-dashoffset: 240; stroke-opacity: 0; }
  25%  { stroke-opacity: 0.9; }
  to   { stroke-dashoffset: 0; stroke-opacity: 0; }
}

/* 8个顶点光点脉冲 */
.v-dot {
  fill: var(--cyan);
  transform-box: fill-box;
  transform-origin: center;
  animation: vPulse 3.5s ease-in-out infinite;
  animation-delay: var(--dl, 0s);
  filter: drop-shadow(0 0 5px rgba(0, 212, 255, 0.9));
}

@keyframes vPulse {
  0%, 100% { transform: scale(1);    opacity: 0.5; }
  50%      { transform: scale(1.5);  opacity: 1; }
}

/* 中心发光核心：脉冲呼吸 */
.ho-core-halo { animation: haloBreathe 3s ease-in-out infinite; }

.ho-core {
  filter: drop-shadow(0 0 14px rgba(0, 212, 255, 0.9));
  animation: haloBreathe 3s ease-in-out infinite;
}

@keyframes haloBreathe {
  0%, 100% { transform: scale(1);    opacity: 0.8; }
  50%      { transform: scale(1.15); opacity: 1; }
}

/* ---------- 标题块（浮在八边形前，偏左上） ---------- */
.home-title-block {
  position: absolute;
  left: -10px;
  top: 64px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  z-index: 3;
}

/* 竖排小字 */
.vertical-tag {
  writing-mode: vertical-rl;
  font-size: 11px;
  letter-spacing: 6px;
  color: var(--t3);
  font-weight: 200;
  padding-top: 6px;
  user-select: none;
}

.home-title-main { position: relative; }

.home-title {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.08;
  background: linear-gradient(135deg, #ffffff 0%, var(--cyan) 55%, #0066ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.5));
  user-select: none;
}

/* 标题下方短能量线 */
.title-line {
  width: 40px;
  height: 2px;
  margin: 14px 0 12px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.8);
}

.home-sub {
  font-size: 14px;
  color: var(--t2);
  letter-spacing: 2px;
  font-weight: 200;
}

/* 底部左侧档案入口 */
.archive-link {
  position: absolute;
  bottom: 4px;
  left: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--t3);
  letter-spacing: 1px;
  transition: color 0.25s, text-shadow 0.25s;
}

.archive-link-ico {
  color: var(--cyan);
  font-size: 11px;
  transition: transform 0.25s;
}

.archive-link:hover {
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
}

.archive-link:hover .archive-link-ico { transform: rotate(90deg); }

/* ---------- 右区 45%：接入端口 ---------- */
.home-right {
  flex: 0 0 45%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 40px;
}

.port-panel {
  width: 100%;
  max-width: 400px;
  padding: 26px 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

/* 能量端口输入框 */
.port-input {
  position: relative;
  padding: 6px 0 14px;
}

.port-input textarea {
  width: 100%;
  min-height: 52px;
  resize: none;
  background: transparent;
  border: none;
  outline: none;
  color: var(--t1);
  font-size: 16px;
  font-family: inherit;
  line-height: 1.5;
}

.port-input textarea::placeholder { color: var(--t3); }

/* 底部3px能量线（流动光点） */
.port-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(0, 212, 255, 0.3);
  overflow: hidden;
  transition: height 0.25s, background 0.25s;
}

.port-bottom::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.9);
  animation: portFlow 2.4s linear infinite;
}

@keyframes portFlow {
  from { transform: translateX(0); }
  to   { transform: translateX(350%); }
}

/* 两侧垂直发光线 */
.port-side {
  position: absolute;
  bottom: -2px;
  width: 2px;
  height: 20px;
  background: linear-gradient(to top, var(--cyan), transparent);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.8);
  transition: height 0.25s;
}

.port-side-l { left: -8px; }
.port-side-r { right: -8px; }

/* 聚焦态：底线上移变亮变粗、两侧线变长、外发光 */
.port-input:focus-within .port-bottom {
  height: 5px;
  background: rgba(0, 212, 255, 0.5);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.5), 0 0 40px rgba(0, 212, 255, 0.25);
}

.port-input:focus-within .port-side { height: 36px; }

.port-input:focus-within textarea {
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.35);
}

/* 示例标签（小切角） */
.home-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ex-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.18);
  padding: 6px 14px 6px 12px;
  font-size: 12px;
  color: var(--t2);
  transition: color 0.25s, border-color 0.25s, text-shadow 0.25s, background 0.25s;
}

.ex-tag i { font-style: normal; color: var(--cyan); font-size: 10px; }

.ex-tag:hover {
  color: var(--cyan);
  border-color: rgba(0, 212, 255, 0.5);
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.7);
  background: rgba(0, 212, 255, 0.1);
}

/* ---------- 六边形按钮 ---------- */
.hex-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 220px;
  height: 64px;
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%);
  background: linear-gradient(120deg, #003366 0%, #0066cc 55%, #00d4ff 100%);
  filter: drop-shadow(0 0 18px rgba(0, 102, 255, 0.5));
  transition: filter 0.25s, transform 0.25s;
}

.hex-btn:active { transform: scale(0.92); }

/* 按钮中心微小发光核心 */
.hex-core {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.9);
  transition: transform 0.25s, box-shadow 0.25s;
  pointer-events: none;
}

.hex-txt {
  position: relative;
  z-index: 1;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
}

.hex-btn:hover {
  filter: brightness(1.2) drop-shadow(0 0 30px rgba(0, 102, 255, 0.8));
  transform: rotate(2deg);
}

.hex-btn:hover .hex-core {
  transform: scale(2.2);
  box-shadow: 0 0 24px rgba(0, 212, 255, 1);
}

/* 小号六边形（结果页操作区） */
.hex-btn.small {
  width: auto;
  height: 44px;
  padding: 0 30px;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%);
  font-size: 14px;
  letter-spacing: 1px;
}

.hex-btn.small .hex-txt { font-size: 14px; }

/* 幽灵样式（再验证一个） */
.hex-btn.ghost {
  background: rgba(6, 16, 38, 0.6);
  border: 1px solid rgba(123, 163, 204, 0.5);
  filter: none;
}

.hex-btn.ghost .hex-txt { color: var(--t2); text-shadow: none; }

.hex-btn.ghost:hover {
  background: rgba(0, 212, 255, 0.12);
  filter: drop-shadow(0 0 14px rgba(123, 163, 204, 0.5));
  transform: none;
}

.hex-btn.ghost:hover .hex-txt { color: var(--t1); }

/* 亮青蓝强调（存入档案） */
.hex-btn.accent {
  background: linear-gradient(120deg, rgba(0, 66, 120, 0.9), rgba(0, 180, 255, 0.9));
  border: 1px solid rgba(0, 212, 255, 0.8);
  filter: drop-shadow(0 0 14px rgba(0, 212, 255, 0.5));
}

.hex-btn.accent:hover {
  filter: brightness(1.25) drop-shadow(0 0 24px rgba(0, 212, 255, 0.8));
  transform: rotate(2deg);
}

.hex-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ==========================================================================
   加载页（能量汇聚）
   ========================================================================== */
.load-wrap {
  min-height: calc(100vh - 96px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.load-svg {
  width: 320px;
  height: 320px;
  filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.3));
}

.load-grid {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1;
  stroke-opacity: 0.25;
}

/* 8条能量线：从顶点向中心依次点燃流动 */
.load-line {
  stroke: var(--cyan);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 70 220;
  animation: lineIn 1.5s linear infinite;
  animation-delay: var(--dl, 0s);
  filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.8));
}

@keyframes lineIn {
  from { stroke-dashoffset: 290; stroke-opacity: 0; }
  30%  { stroke-opacity: 1; }
  to   { stroke-dashoffset: 0; stroke-opacity: 0.6; }
}

/* 中心核心越来越亮 */
.load-core {
  animation: coreCharge 1.6s ease-in-out infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 0 18px rgba(0, 212, 255, 0.9));
}

@keyframes coreCharge {
  from { transform: scale(0.6); opacity: 0.4; }
  to   { transform: scale(1.3); opacity: 1; }
}

.load-text {
  font-size: 14px;
  color: var(--t2);
  letter-spacing: 3px;
  animation: loadTextBlink 1.6s ease-in-out infinite;
}

@keyframes loadTextBlink {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; text-shadow: 0 0 16px rgba(0, 212, 255, 0.5); }
}

/* ==========================================================================
   白光爆发（验证完成）
   ========================================================================== */
#flash {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(circle at 50% 50%, #fff 0%, rgba(0, 212, 255, 0.4) 40%, transparent 75%);
  opacity: 0;
  pointer-events: none;
}

#flash.on { animation: flashOn 0.32s ease-out; }

@keyframes flashOn {
  0%   { opacity: 0; }
  35%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ==========================================================================
   结果页（全屏沉浸式仪表盘）
   ========================================================================== */
#page-result { position: relative; }

/* 顶部体积光束（照在结论区） */
.result-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 46%;
  height: 520px;
  background: linear-gradient(to bottom, rgba(0, 102, 255, 0.09), transparent 85%);
  clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%);
  filter: blur(2px);
  pointer-events: none;
}

/* 区域连接能量线 */
.flow-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.flow-lines path {
  fill: none;
  stroke: rgba(0, 212, 255, 0.07);
  stroke-width: 1.5;
  stroke-dasharray: 6 10;
  animation: flowDash 3s linear infinite;
}

@keyframes flowDash {
  to { stroke-dashoffset: -32; }
}

/* ---------- 三区布局 ---------- */
.result-grid {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 36px;
  align-items: flex-start;
}

.result-left  { flex: 0 0 42%; }
.result-right { flex: 1 1 58%; }

/* ---------- 结论全息投影 ---------- */
.verdict-holo {
  position: relative;
  margin: 18px 0 22px;
}

/* 舞台追光 */
.verdict-holo::before {
  content: "";
  position: absolute;
  left: 6%;
  top: -34px;
  width: 88%;
  height: 140px;
  background: linear-gradient(to bottom, currentColor, transparent 90%);
  opacity: 0.12;
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  pointer-events: none;
}

.verdict-text {
  font-size: 60px;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--vc, var(--cyan));
  text-shadow: 0 0 40px currentColor;
  animation: holoIn 0.8s 0.6s var(--ease-out) both;
  display: inline-block;
  user-select: none;
}

@keyframes holoIn {
  from { opacity: 0; transform: scale(0.8); filter: blur(10px); }
  to   { opacity: 1; transform: scale(1);   filter: blur(0); }
}

/* hover 全息故障：色偏抖动 */
.verdict-text:hover {
  animation: holoIn 0.8s 0.6s var(--ease-out) both, glitch 0.9s steps(2, jump-none) infinite;
}

@keyframes glitch {
  0%   { text-shadow: 0 0 40px currentColor; }
  20%  { text-shadow: 2px 0 0 rgba(255, 0, 128, 0.7), -2px 0 0 rgba(0, 212, 255, 0.7), 0 0 40px currentColor; }
  40%  { text-shadow: -1px 0 0 rgba(255, 0, 128, 0.7), 1px 0 0 rgba(0, 255, 200, 0.7), 0 0 40px currentColor; }
  60%  { text-shadow: 0 0 40px currentColor; }
  80%  { text-shadow: 2px 0 0 rgba(0, 212, 255, 0.8), -2px 0 0 rgba(255, 0, 128, 0.6), 0 0 40px currentColor; }
  100% { text-shadow: 0 0 40px currentColor; }
}

/* 一句话总结 */
.result-summary {
  font-size: 18px;
  line-height: 1.6;
  color: var(--t2);
  border-left: 2px solid var(--cyan);
  padding-left: 14px;
  margin-bottom: 20px;
  max-width: 420px;
}

/* WHY 面板 */
.why-panel {
  padding: 20px 22px;
  max-width: 420px;
}

.why-panel .zone-label { margin-bottom: 12px; }

.why-panel p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--t2);
}

/* ---------- 八边形雷达图 ---------- */
.radar-wrap {
  perspective: 800px;
  display: flex;
  justify-content: center;
}

.radar-tilt {
  position: relative;
  width: 420px;
  height: 420px;
  transform: rotateX(8deg);
  transform-style: preserve-3d;
}

#radar-svg { width: 100%; height: 100%; }

/* 4层同心八边形网格 */
.r-grid {
  fill: none;
  stroke: var(--cyan);
  stroke-width: 1;
  stroke-opacity: 0.08;
}

/* 8条轴线 */
.r-axis {
  stroke: var(--cyan);
  stroke-width: 1;
  stroke-opacity: 0.06;
}

/* 轴线末端刻度 */
.r-tick {
  stroke: var(--cyan);
  stroke-width: 1;
  stroke-opacity: 0.3;
}

/* 数据多边形（整体从中心缩放出现） */
.r-data-g {
  transform-box: fill-box;
  transform-origin: center;
  animation: radarIn 1.2s 0.3s var(--ease-out) both;
}

@keyframes radarIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.r-poly {
  stroke-width: 2;
  stroke: var(--vc, var(--cyan));
  animation: polyBreathe 4s ease-in-out infinite;
}

@keyframes polyBreathe {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

/* 数值点 */
.r-dot {
  stroke: none;
  fill: var(--c, var(--cyan));
  filter: drop-shadow(0 0 6px currentColor);
}

/* death 点裂痕 */
.r-crack {
  stroke: var(--danger);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-opacity: 0.9;
  animation: crackBlink 1.2s ease-in-out infinite;
}

@keyframes crackBlink {
  0%, 100% { stroke-opacity: 0.4; }
  50%      { stroke-opacity: 1; }
}

/* ---------- 维度标签（环绕八边形顶点） ---------- */
#radar-labels { position: absolute; inset: 0; }

.rl {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t2);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color 0.25s, text-shadow 0.25s;
  padding: 4px 8px;
}

.rl:hover {
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.7);
}

.rl-num {
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  color: var(--cyan);
  font-weight: 700;
}

.rl-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c, var(--t3));
  box-shadow: 0 0 6px currentColor;
}

.rl.death {
  color: var(--danger);
  animation: deathLabelPulse 1.4s ease-in-out infinite;
}

.rl.death .rl-num { color: var(--danger); }

@keyframes deathLabelPulse {
  0%, 100% { text-shadow: none; opacity: 0.75; }
  50%      { text-shadow: 0 0 14px var(--danger); opacity: 1; }
}

.rl.active {
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(0, 212, 255, 0.8);
}

/* ---------- 维度详情（雷达图下方） ---------- */
.radar-comments {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rcomment {
  padding: 14px 18px 14px 22px;
  border-left: 3px solid var(--c, var(--cyan));
  animation: commentIn 0.35s var(--ease-out) both;
}

@keyframes commentIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.rcomment header {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--t3);
  margin-bottom: 6px;
  font-weight: 600;
}

.rcomment header b { color: var(--c, var(--cyan)); }

.rcomment p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--t2);
}

/* ---------- 底部决策建议数据流 ---------- */
.result-bottom {
  position: relative;
  z-index: 1;
  margin-top: 30px;
}

.action-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 28px;
}

.action-text {
  flex: 1;
  border-left: 2px solid var(--green);
  padding-left: 16px;
}

.action-text .zone-label { margin-bottom: 8px; }

.action-text p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--t1);
}

.action-btns {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
}

/* ==========================================================================
   档案页（艺术化数据画廊）
   ========================================================================== */
.arc-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 26px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  font-size: 12px;
  color: var(--t3);
  letter-spacing: 1px;
  transition: color 0.25s, text-shadow 0.25s;
}

.back-link span { color: var(--cyan); }

.back-link:hover {
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
}

.arc-title-row {
  display: flex;
  align-items: flex-end;
  gap: 20px;
}

.arc-title {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #fff 0%, var(--cyan) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.arc-total {
  font-size: 14px;
  color: var(--t3);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.arc-total b {
  font-size: 28px;
  font-weight: 800;
  color: var(--cyan);
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(0, 212, 255, 0.7);
  margin: 0 4px;
}

/* 统计区 */
.arc-stats {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  padding: 18px 0;
  border-top: 1px solid rgba(0, 212, 255, 0.08);
  border-bottom: 1px solid rgba(0, 212, 255, 0.08);
}

.arc-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.arc-stat:not(:last-child) {
  border-right: 1px solid rgba(0, 212, 255, 0.1);
}

.num {
  font-size: 40px;
  font-weight: 800;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow: 0 0 24px currentColor;
}

.lab {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--t3);
  text-transform: uppercase;
}

/* 洞察面板 */
.insight-panel {
  padding: 20px 22px;
  margin-bottom: 24px;
  border-left: 3px solid var(--cyan);
}

.insight-panel .zone-label { margin-bottom: 10px; }

.insight-panel p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--t2);
}

.insight-panel p b { color: var(--cyan); }

/* ---------- Tab（文字标签 + 能量下划线） ---------- */
.arc-tabs {
  display: flex;
  gap: 28px;
  margin-bottom: 22px;
}

.tab {
  position: relative;
  padding: 8px 2px;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--t3);
  transition: color 0.25s;
}

.tab:hover { color: var(--t2); }

.tab.active { color: var(--cyan); }

.tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan) 20%, var(--cyan) 80%, transparent);
  background-size: 200% 100%;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
  animation: tabFlow 2s linear infinite;
}

@keyframes tabFlow {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ---------- 瀑布流卡片 ---------- */
.arc-masonry {
  column-count: 2;
  column-gap: 16px;
}

.arc-card {
  break-inside: avoid;
  margin-bottom: 16px;
  padding: 20px 20px 18px 22px;
  border-left: 3px solid var(--c, var(--cyan));
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

/* 结论更重要的卡片稍大 */
.arc-card.big { padding: 26px 26px 24px 28px; }

.arc-card:hover {
  transform: translateY(-4px);
  border-color: var(--c, var(--cyan));
  background: rgba(8, 22, 50, 0.85);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 24px var(--c);
}

.arc-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 10px;
  line-height: 1.4;
}

.arc-card.big .arc-name { font-size: 16px; }

.arc-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--c, var(--cyan));
  border: 1px solid currentColor;
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 100%, 0 100%);
  padding: 3px 10px;
  margin-bottom: 10px;
  text-shadow: 0 0 8px currentColor;
}

.arc-summary {
  font-size: 12px;
  line-height: 1.6;
  color: var(--t2);
}

/* 空状态：虚线八边形 */
.empty-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 0;
  color: var(--t3);
}

.empty-octa {
  width: 150px;
  height: 150px;
  fill: none;
  stroke: rgba(0, 212, 255, 0.15);
  stroke-width: 1.5;
  stroke-dasharray: 8 6;
  animation: emptySpin 30s linear infinite;
}

.empty-octa line {
  stroke: rgba(0, 212, 255, 0.08);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.empty-octa circle {
  fill: rgba(0, 212, 255, 0.25);
}

@keyframes emptySpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.empty-text {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--t3);
}

/* 清空档案 */
.clear-link {
  display: block;
  margin: 18px auto 0;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--danger);
  opacity: 0.7;
  padding: 6px 14px;
  border: 1px solid rgba(255, 77, 109, 0.3);
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition: opacity 0.25s, background 0.25s;
}

.clear-link:hover {
  opacity: 1;
  background: rgba(255, 77, 109, 0.1);
  text-shadow: 0 0 10px rgba(255, 77, 109, 0.8);
}

/* ==========================================================================
   Toast
   ========================================================================== */
#toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 120px);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(6, 16, 38, 0.9);
  border: 1px solid rgba(0, 212, 255, 0.5);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.25);
  padding: 13px 24px;
  font-size: 13px;
  color: var(--t1);
  letter-spacing: 1px;
  opacity: 0;
  transition: transform 0.4s var(--ease-out), opacity 0.4s;
  pointer-events: none;
}

#toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.toast-check {
  color: var(--green);
  font-weight: 900;
  text-shadow: 0 0 10px rgba(0, 255, 200, 0.9);
}

/* ==========================================================================
   移动端适配
   ========================================================================== */
@media (max-width: 860px) {
  .app { padding: 28px 18px 40px; }

  .home-flex {
    flex-direction: column;
    min-height: auto;
    gap: 8px;
  }

  .home-left {
    flex: none;
    min-height: 0;
    width: 100%;
  }

  .home-octagon {
    width: 320px;
    height: 320px;
    margin-top: 10px;
  }

  .home-title-block {
    left: 50%;
    top: 100px;
    transform: translateX(-50%);
    gap: 10px;
  }

  .home-title { font-size: 48px; }

  .home-right {
    flex: none;
    width: 100%;
    justify-content: center;
    padding-bottom: 0;
  }

  .port-panel { max-width: 100%; }

  .archive-link { position: static; margin-top: 24px; align-self: flex-start; }

  /* 加载页 */
  .load-svg { width: 260px; height: 260px; }

  /* 结果页上下排列 */
  .result-grid {
    flex-direction: column;
    gap: 28px;
  }

  .result-left { flex: none; width: 100%; }
  .result-right { flex: none; width: 100%; }

  .verdict-text { font-size: 44px; }

  .radar-wrap { perspective: 700px; }

  .radar-tilt { width: 320px; height: 320px; }

  .action-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
  }

  .action-btns {
    justify-content: center;
  }

  /* 档案页 */
  .arc-stats { flex-wrap: wrap; }

  .arc-stat { min-width: 45%; padding: 12px 0; }

  .arc-stat:nth-child(2) { border-right: none; }

  .arc-masonry { column-count: 1; }
}

/* ==========================================================================
   维度专家 Tooltip（悬浮提示）
   ========================================================================== */
#dim-tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 400;
  background: rgba(8, 20, 45, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #d6ecff;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.15);
  pointer-events: none;
  max-width: min(340px, 74vw);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-5px);
  transition: opacity 0.15s ease-in, transform 0.15s ease-in, visibility 0s linear 0.15s;
}

#dim-tip.side-l { transform: translateX(5px); }

#dim-tip.on {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0s;
}

#dim-tip .tip-name {
  font-size: 15px;
  font-weight: 700;
  color: #00d4ff;
  letter-spacing: 1px;
  line-height: 1.2;
  margin-bottom: 4px;
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
}

#dim-tip .tip-role {
  font-size: 12px;
  color: #7ba3cc;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

@media (max-width: 480px) {
  #dim-tip .tip-role { white-space: normal; }
}

/* 小三角（旋转正方形，指向节点；上下边跟随 --ty） */
#dim-tip::before {
  content: "";
  position: absolute;
  top: var(--ty, 18px);
  width: 10px;
  height: 10px;
  background: rgba(8, 20, 45, 0.95);
}

/* tooltip 在节点右侧 → 三角朝左 */
#dim-tip.side-r::before {
  left: -5.5px;
  border-left: 1px solid rgba(0, 212, 255, 0.3);
  border-bottom: 1px solid rgba(0, 212, 255, 0.3);
  transform: rotate(45deg);
}

/* tooltip 在节点左侧 → 三角朝右 */
#dim-tip.side-l::before {
  right: -5.5px;
  border-top: 1px solid rgba(0, 212, 255, 0.3);
  border-right: 1px solid rgba(0, 212, 255, 0.3);
  transform: rotate(45deg);
}

/* 节点可交互 & 透明描边扩大命中热区 */
.v-dot,
.r-dot {
  cursor: pointer;
  stroke: rgba(0, 0, 0, 0);
}

.v-dot { stroke-width: 16; }

.r-dot { stroke-width: 13; }
