/*
 * 乘式空间领导驾驶舱视觉增强
 * 提升远距离可读性，并增加能量流、光扫、图表绘制与交互景深。
 */
:root {
  --dashboard-caption: 12px;
  --dashboard-body: 13px;
  --dashboard-panel-title: 16px;
  --pointer-x: 50%;
  --pointer-y: 30%;
}

body {
  font-size: var(--dashboard-body);
}

/* 动态环境光与缓慢移动的数字网格 */
.dashboard-shell::before {
  opacity: 0.32;
  background-size: 56px 56px;
  animation: gridDrift 18s linear infinite;
}

.dashboard-shell::after {
  position: fixed;
  z-index: 1;
  inset: -25%;
  content: "";
  pointer-events: none;
  opacity: 0.7;
  background:
    radial-gradient(circle at var(--pointer-x) var(--pointer-y), rgba(36, 216, 255, 0.16), transparent 19%),
    conic-gradient(from 110deg at 50% 45%, transparent 0 32%, rgba(49, 92, 255, 0.1) 38%, transparent 45% 75%, rgba(36, 216, 255, 0.08) 82%, transparent 88%);
  filter: blur(30px);
  animation: auroraTurn 24s linear infinite;
}

@keyframes gridDrift {
  to { background-position: 56px 56px; }
}

@keyframes auroraTurn {
  to { transform: rotate(360deg) scale(1.06); }
}

/* 标题与全局最小字号 */
.dashboard-brand strong { font-size: 21px; }
.dashboard-brand small,
.header-title p,
.clock small,
.section-bar span,
.section-bar em,
.period-tabs button,
.summary-grid small,
.summary-grid em,
.ribbon-title,
.ribbon-track span,
.ribbon-track b,
.ribbon-value span,
.ribbon-value em,
.panel-head small,
.axis-labels,
.x-labels,
.chart-legend,
.donut span,
.capability-list li,
.capability-list li b,
.park-node,
.park-node span,
.central-node span,
.ability-orbit span,
.visual-stats,
.task-table,
.rank-list em,
.rank-list strong,
.rank-list li > b,
.resource-numbers p,
.resource-bars p > span,
.gauge span,
.outcome-mini-grid span,
.insight-score span,
.insight-score em,
.insight-list p,
.goal-labels span,
.goal-labels b,
.milestone-line time,
.milestone-line strong,
.milestone-line span,
footer {
  font-size: var(--dashboard-caption);
}

.header-title h1 {
  font-size: 32px;
  letter-spacing: 3px;
  background: linear-gradient(90deg, #ffffff 10%, #8eeaff 45%, #9aa9ff 75%, #ffffff 100%);
  background-size: 220% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: none;
  animation: titleFlow 5s linear infinite;
}

@keyframes titleFlow {
  to { background-position: 220% center; }
}

.header-tools,
.section-bar h2,
.summary-grid p,
.solution-tabs button {
  font-size: var(--dashboard-body);
}

.section-bar h2 { font-size: 19px; }
.panel-head h2 { font-size: var(--dashboard-panel-title); }
.clock strong { font-size: 19px; }

.summary-grid strong { font-size: 32px; }
.summary-grid p { margin-bottom: 8px; }
.summary-grid em { margin-top: 7px; }

.ribbon-value strong { font-size: 17px; }
.donut strong,
.gauge strong { font-size: 21px; }
.central-node strong { font-size: 18px; }
.park-node strong { font-size: 13px; }
.visual-stats b { font-size: 17px; }
.chart-legend strong b { font-size: 16px; }
.outcome-mini-grid strong { font-size: 18px; }
.insight-score strong { font-size: 30px; }

/* 增加文字后的空间补偿 */
.dashboard-header { height: 94px; }
.section-bar { height: 42px; }
.summary-grid article { min-height: 116px; padding: 17px 18px; }
.panel-head { height: 48px; }
.table-row { min-height: 32px; padding-inline: 14px; }
.table-head { min-height: 31px; }
.rank-list li { min-height: 44px; }
.resource-numbers p { padding: 7px 0; }
.resource-bars p { margin: 8px 0; }
.goal-labels { gap: 7px; }
.goal-labels span { padding-bottom: 6px; }
.milestone-line strong { margin-top: 8px; }
.milestone-line span { line-height: 1.55; }
.ability-orbit { padding: 8px 10px; gap: 7px; }
.ability-orbit > div { padding: 4px 5px; gap: 7px; }
.ability-orbit img { width: 27px; height: 27px; }
.ability-orbit em { top: -12px; font-size: 9px; }
.visual-stats { height: 48px; }

/* 三列等高：最后一个面板承接剩余空间，避免中下部出现断层 */
.dashboard-grid {
  align-items: stretch;
}

.dashboard-grid > .column {
  height: 100%;
}

.left-column > .capability-panel,
.center-column > .live-panel,
.right-column > .outcome-panel {
  flex: 1 1 auto;
}

.left-column > .capability-panel,
.center-column > .live-panel {
  display: flex;
  flex-direction: column;
}

.left-column > .capability-panel .capability-content,
.center-column > .live-panel .task-table {
  flex: 1 1 auto;
}

/* 卡片逐层入场、光边与指针景深 */
.summary-grid article,
.panel {
  --rx: 0deg;
  --ry: 0deg;
  --lift: 0px;
  isolation: isolate;
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--lift));
  transform-style: preserve-3d;
  transition: transform 180ms ease, border-color 220ms ease, box-shadow 220ms ease;
  animation: panelReveal 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: var(--delay, 0ms);
}

.summary-grid article:hover,
.panel:hover {
  --lift: -3px;
  border-color: rgba(71, 218, 255, 0.58);
  box-shadow: 0 22px 55px rgba(0, 7, 24, 0.35), 0 0 28px rgba(36, 216, 255, 0.1), inset 0 1px rgba(255, 255, 255, 0.06);
}

.summary-grid article.is-revealed,
.panel.is-revealed {
  animation: none;
}

.summary-grid article::before,
.panel > .panel-head::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.summary-grid article::before {
  z-index: 3;
  top: -70%;
  left: -40%;
  width: 34%;
  height: 240%;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(154, 239, 255, 0.18), transparent);
  transform: rotate(24deg);
  animation: cardSweep 6s ease-in-out infinite;
  animation-delay: calc(var(--delay, 0ms) + 1.2s);
}

.panel > .panel-head::after {
  left: 0;
  bottom: -1px;
  width: 32%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #24d8ff, transparent);
  filter: drop-shadow(0 0 5px #24d8ff);
  animation: edgeScan 4s ease-in-out infinite alternate;
}

@keyframes panelReveal {
  from { opacity: 0; transform: perspective(1100px) translateY(24px) scale(0.97); filter: blur(7px); }
  to { opacity: 1; transform: perspective(1100px) translateY(0) scale(1); filter: blur(0); }
}

@keyframes cardSweep {
  0%, 58% { left: -40%; opacity: 0; }
  66% { opacity: 1; }
  82%, 100% { left: 130%; opacity: 0; }
}

@keyframes edgeScan {
  from { transform: translateX(-25%); }
  to { transform: translateX(235%); }
}

/* 数字与状态呼吸 */
.summary-grid img {
  animation: iconHover 4.5s ease-in-out infinite;
  animation-delay: var(--delay, 0ms);
}

.summary-grid strong,
.clock strong,
.visual-stats b {
  text-shadow: 0 0 18px rgba(36, 216, 255, 0.28);
}

.status i,
.map-head small i,
.live-panel .panel-head small i,
.ability-orbit b {
  animation: statusBeacon 1.8s ease-in-out infinite;
}

@keyframes iconHover {
  50% { transform: translateY(-4px) scale(1.04); filter: saturate(1.25); }
}

@keyframes statusBeacon {
  50% { opacity: 0.45; transform: scale(0.72); box-shadow: 0 0 18px currentColor; }
}

/* 中央能量核心、轨道和节点 */
.central-node {
  overflow: visible;
  box-shadow: 0 0 55px rgba(36, 216, 255, 0.35), inset 0 0 35px rgba(36, 216, 255, 0.22);
  animation: coreFloat 4s ease-in-out infinite;
}

.central-node > div::before {
  position: absolute;
  z-index: -1;
  inset: -13px;
  content: "";
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 18%, #24d8ff 23%, transparent 28% 53%, #7c5cff 58%, transparent 63% 83%, #35e5b0 88%, transparent 93%);
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 61% 67%, transparent 68%);
  mask: radial-gradient(circle, transparent 60%, #000 61% 67%, transparent 68%);
  animation: coreSpin 5s linear infinite;
}

.orbit-one { animation: orbitSpin 18s linear infinite; }
.orbit-two { animation: orbitSpinReverse 25s linear infinite; }
.park-node { animation: nodeFloat 4.8s ease-in-out infinite; }
.node-b { animation-delay: -1.2s; }
.node-c { animation-delay: -2.4s; }
.node-d { animation-delay: -3.6s; }
.scan-light { height: 42%; animation-duration: 4.4s; }
.data-stream { height: 2px; animation-duration: 1.7s; }

@keyframes coreSpin { to { transform: rotate(360deg); } }
@keyframes coreFloat { 50% { margin-top: -6px; } }
@keyframes orbitSpin { to { transform: translate(-50%, -50%) rotate(352deg); } }
@keyframes orbitSpinReverse { to { transform: translate(-50%, -50%) rotate(-349deg); } }
@keyframes nodeFloat { 50% { translate: 0 -6px; border-color: rgba(36, 216, 255, 0.62); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 18px rgba(36, 216, 255, 0.11); } }

/* 图表绘制、雷达与进度条充能 */
.main-line {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: chartDraw 2.2s 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, lineGlow 3s 3s ease-in-out infinite;
}

.points circle {
  transform-box: fill-box;
  transform-origin: center;
  animation: pointPop 500ms ease-out both, pointPulse 2.4s 2.6s ease-in-out infinite;
}

.points circle:nth-child(2) { animation-delay: 1s, 2.8s; }
.points circle:nth-child(3) { animation-delay: 1.15s, 3s; }
.points circle:nth-child(4) { animation-delay: 1.3s, 3.2s; }
.points circle:nth-child(5) { animation-delay: 1.45s, 3.4s; }
.points circle:nth-child(6) { animation-delay: 1.6s, 3.6s; }
.points circle:nth-child(7) { animation-delay: 1.75s, 3.8s; }

.rank-list div i,
.resource-bars em {
  transform-origin: left;
  animation: barCharge 1.4s 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.radar-value {
  transform-box: fill-box;
  transform-origin: center;
  animation: radarBloom 1.5s 1.2s cubic-bezier(0.16, 1, 0.3, 1) both, radarGlow 3s 2.7s ease-in-out infinite;
}

.milestone-line .is-current i {
  animation: currentMilestone 1.7s ease-out infinite;
}

@keyframes chartDraw { to { stroke-dashoffset: 0; } }
@keyframes lineGlow { 50% { filter: drop-shadow(0 0 10px rgba(36, 216, 255, 0.9)); } }
@keyframes pointPop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes pointPulse { 50% { transform: scale(1.45); } }
@keyframes barCharge { from { transform: scaleX(0); filter: brightness(1.8); } to { transform: scaleX(1); filter: brightness(1); } }
@keyframes radarBloom { from { opacity: 0; transform: scale(0.15) rotate(-12deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes radarGlow { 50% { filter: drop-shadow(0 0 9px rgba(36, 216, 255, 0.9)); } }
@keyframes currentMilestone { 70% { box-shadow: 0 0 0 12px rgba(36, 216, 255, 0); } }

@media (max-width: 1500px) {
  :root {
    --dashboard-caption: 11px;
    --dashboard-body: 12px;
    --dashboard-panel-title: 15px;
  }

  .header-title h1 { font-size: 29px; }
  .summary-grid strong { font-size: 28px; }
  .ability-orbit img { width: 23px; height: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
