/* ============================================================
   五大核心解决方案 · 模拟数据看板动画
   纯 CSS/SVG 实现，无外部图片，性能友好
   ============================================================ */

/* ===== 通用：看板容器 ===== */
.solution-visual {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(34, 211, 238, 0.10), transparent 55%),
    radial-gradient(ellipse at 85% 90%, rgba(22, 101, 52, 0.25), transparent 60%),
    linear-gradient(160deg, #0B2230 0%, #0F3460 60%, #0A1F2E 100%);
}

.solution-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}

/* 覆盖 pages.css 中 svg 的 50% 尺寸规则，只作用于看板内部 */
.solution-visual .sol-dash svg {
  opacity: 1;
  overflow: visible;
}

.solution-visual .sol-flow {
  width: 100%;
  height: auto;
  flex-shrink: 0;
  margin-bottom: 6px;
}

.solution-visual .sol-temp-wrap svg {
  width: 100%;
  height: auto;
  min-height: 0;
  flex: 1;
}

.sol-dash {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 16px 56px;
  overflow: hidden;
  color: #E2F3FF;
  font-family: var(--font-body, 'PingFang SC', 'Microsoft YaHei', sans-serif);
}

/* 顶部状态条 */
.sol-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 10px;
  flex-shrink: 0;
}

.sol-ping {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: sol-ping 1.8s ease-out infinite;
}

@keyframes sol-ping {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.sol-live {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #22D3EE;
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 4px;
  padding: 2px 7px;
  animation: sol-blink 2.2s ease-in-out infinite;
}

@keyframes sol-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ============================================================
   方案 01 · 智慧水产养殖 —— 水质监测中心
   ============================================================ */
.sol-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.sol-metric {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  padding: 8px 10px;
  position: relative;
  overflow: hidden;
}

.sol-metric .m-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 1px;
  display: block;
}

.sol-metric .m-value {
  font-size: 20px;
  font-weight: 700;
  color: #7DE3FF;
  display: block;
  margin: 2px 0 6px;
  font-variant-numeric: tabular-nums;
  animation: sol-flick 3s steps(1) infinite;
}

.sol-metric .m-value.good { color: #34D399; }

@keyframes sol-flick {
  0%, 100% { opacity: 1; }
  42% { opacity: 1; }
  43% { opacity: 0.55; }
  46% { opacity: 1; }
  78% { opacity: 1; }
  80% { opacity: 0.7; }
  83% { opacity: 1; }
}

.sol-metric .m-bar {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, #22D3EE, #166534);
  width: 0;
  animation: sol-grow 2.4s ease-out infinite alternate;
}

.sol-metric .m-bar.good {
  background: linear-gradient(90deg, #34D399, #22D3EE);
}

@keyframes sol-grow {
  0% { width: 40%; }
  100% { width: var(--w, 85%); }
}

/* 塘口状态网格 */
.sol-ponds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
  flex: 1;
  min-height: 0;
}

.pond {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  border-radius: 6px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.35);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.75);
  position: relative;
  overflow: hidden;
}

.pond b {
  font-size: 13px;
  color: #34D399;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pond::after { /* 塘内水波 */
  content: '';
  position: absolute;
  left: -100%;
  top: 62%;
  width: 300%;
  height: 60%;
  background: repeating-linear-gradient(180deg,
    transparent 0 6px, rgba(34, 211, 238, 0.12) 6px 8px);
  animation: sol-wave-move 4s linear infinite;
}

@keyframes sol-wave-move {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

.pond.warn {
  background: rgba(248, 113, 113, 0.10);
  border-color: rgba(248, 113, 113, 0.6);
  animation: sol-warn 1.1s ease-in-out infinite;
}

.pond.warn b { color: #F87171; }

@keyframes sol-warn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(248, 113, 113, 0); }
}

/* 设备状态条 */
.sol-devices {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.dev {
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
}

.dev.on {
  color: #34D399;
  border-color: rgba(52, 211, 153, 0.4);
}

.dev.feed {
  color: #22D3EE;
  border-color: rgba(34, 211, 238, 0.5);
  animation: sol-blink 1.6s ease-in-out infinite;
}

/* ============================================================
   方案 02 · 全链 SaaS —— 经营驾驶舱
   ============================================================ */
.sol-count {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.sol-count b {
  font-size: 28px;
  font-weight: 800;
  color: #22D3EE;
  font-variant-numeric: tabular-nums;
  animation: sol-flick 2.8s steps(1) infinite;
}

.sol-count span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 1px;
}

.sol-flow {
  flex-shrink: 0;
  margin-bottom: 6px;
}

.flow-track {
  stroke: rgba(255, 255, 255, 0.10);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.flow-node {
  fill: #0B2230;
  stroke-width: 1.5;
}

.flow-node.done { stroke: #34D399; }
.flow-node.next { stroke: #22D3EE; }
.flow-node.next.active { animation: sol-node-pulse 1.6s ease-in-out infinite; }

@keyframes sol-node-pulse {
  0%, 100% { fill: #0B2230; }
  50% { fill: rgba(34, 211, 238, 0.35); }
}

.flow-label {
  font-size: 8.5px;
  fill: rgba(255, 255, 255, 0.6);
  text-anchor: middle;
  font-family: var(--font-body, 'PingFang SC', 'Microsoft YaHei', sans-serif);
}

.flow-label.hl { fill: #22D3EE; }

.flow-particle {
  fill: #22D3EE;
  filter: drop-shadow(0 0 3px rgba(34, 211, 238, 0.9));
}

.flow-particle.slow { opacity: 0.55; }

.sol-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex: 1;
  min-height: 0;
  padding: 0 2px;
}

.sol-bars i {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #22D3EE, rgba(34, 211, 238, 0.15));
  height: 0;
  animation: sol-bar 3.2s ease-in-out infinite alternate;
}

.sol-bars i:nth-child(2n) { background: linear-gradient(180deg, #34D399, rgba(52, 211, 153, 0.15)); }
.sol-bars i:nth-child(2) { animation-delay: .2s; }
.sol-bars i:nth-child(3) { animation-delay: .4s; }
.sol-bars i:nth-child(4) { animation-delay: .6s; }
.sol-bars i:nth-child(5) { animation-delay: .8s; }
.sol-bars i:nth-child(6) { animation-delay: 1s; }
.sol-bars i:nth-child(7) { animation-delay: 1.2s; }

@keyframes sol-bar {
  0% { height: 25%; }
  100% { height: var(--h, 80%); }
}

/* ============================================================
   方案 03 · 加工车间 —— 生产看板
   ============================================================ */
.sol-line {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  justify-content: center;
}

.sol-step {
  display: grid;
  grid-template-columns: 52px 1fr 44px;
  align-items: center;
  gap: 10px;
}

.sol-step .step-name {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  text-align: right;
}

.sol-step .progress {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.sol-step .progress i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #166534, #22D3EE);
  width: 0;
  animation: sol-grow 3s ease-out infinite alternate;
}

.sol-step .pct {
  font-size: 11px;
  font-weight: 700;
  color: #22D3EE;
  font-variant-numeric: tabular-nums;
  animation: sol-flick 3.4s steps(1) infinite;
}

/* 扫码光束 */
.sol-scan-zone {
  position: relative;
  height: 52px;
  border: 1px dashed rgba(34, 211, 238, 0.35);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.sol-scan-zone .scan-beam {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #22D3EE, transparent);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.8);
  animation: sol-scan 2.2s ease-in-out infinite;
}

@keyframes sol-scan {
  0%, 100% { top: 4%; opacity: 0; }
  10% { opacity: 1; }
  50% { top: 92%; }
  90% { opacity: 1; }
}

.sol-scan-zone .scan-txt {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1px;
}

.sol-scan-zone .scan-val {
  font-size: 16px;
  font-weight: 700;
  color: #34D399;
  font-variant-numeric: tabular-nums;
}

.sol-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  flex-shrink: 0;
  margin-top: 8px;
}

.sol-stat {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  padding: 7px 10px;
  text-align: center;
}

.sol-stat b {
  display: block;
  font-size: 15px;
  color: #7DE3FF;
  font-variant-numeric: tabular-nums;
  animation: sol-flick 3.6s steps(1) infinite;
}

.sol-stat span {
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 1px;
}

/* ============================================================
   方案 04 · 冷链溯源 —— 温控 + 一物一码 + 区块链
   ============================================================ */
.sol-cold-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 10px;
  flex: 1;
  min-height: 0;
}

.sol-temp-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sol-temp-line {
  stroke: #22D3EE;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  filter: drop-shadow(0 0 4px rgba(34, 211, 238, 0.6));
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: sol-draw 4s ease-out forwards;
}

@keyframes sol-draw {
  to { stroke-dashoffset: 0; }
}

.sol-temp-zone {
  fill: rgba(34, 211, 238, 0.08);
}

.sol-temp-dot {
  fill: #22D3EE;
  animation: sol-dot-move 4s ease-out forwards;
}

@keyframes sol-dot-move {
  0% { opacity: 0; }
  60% { opacity: 0; }
  100% { opacity: 1; }
}

.sol-temp-label {
  font-size: 10px;
  font-weight: 700;
  color: #22D3EE;
  font-variant-numeric: tabular-nums;
}

.sol-cold-temp {
  font-size: 22px;
  font-weight: 800;
  color: #7DE3FF;
  font-variant-numeric: tabular-nums;
  animation: sol-flick 3.2s steps(1) infinite;
}

.sol-cold-temp small { font-size: 11px; color: rgba(255,255,255,0.55); font-weight: 400; }

/* 一物一码 */
.sol-qr {
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.sol-qr svg { flex-shrink: 0; width: 40px !important; height: 40px !important; }

.sol-qr .qr-scan {
  position: absolute;
  left: 6px;
  top: 0;
  width: 48px;
  height: 2px;
  background: #22D3EE;
  box-shadow: 0 0 6px rgba(34, 211, 238, 0.9);
  animation: sol-scan-qr 1.8s ease-in-out infinite;
}

@keyframes sol-scan-qr {
  0%, 100% { top: 6px; opacity: 0; }
  12% { opacity: 1; }
  50% { top: 42px; }
  88% { opacity: 1; }
}

.sol-qr .qr-txt b {
  display: block;
  font-size: 12px;
  color: #fff;
  letter-spacing: 1px;
}

.sol-qr .qr-txt span {
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.5);
}

/* 区块链节点 */
.sol-chain {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-top: 10px;
}

.sol-block {
  flex: 1;
  text-align: center;
  font-size: 9.5px;
  padding: 5px 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.5px;
}

.sol-block.mined {
  border-color: rgba(52, 211, 153, 0.5);
  color: #34D399;
}

.sol-block.mining {
  border-color: rgba(34, 211, 238, 0.6);
  color: #22D3EE;
  animation: sol-blink 1.4s ease-in-out infinite;
}

.sol-chain-arrow {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

/* ============================================================
   方案 05 · 定制研发 —— 敏捷流水线 + 代码
   ============================================================ */
.sol-code {
  position: relative;
  background: rgba(3, 12, 22, 0.75);
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 10.5px;
  line-height: 1.85;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.sol-code .code-dots {
  position: absolute;
  top: 7px;
  right: 10px;
  display: flex;
  gap: 4px;
}

.sol-code .code-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.sol-code .code-line {
  display: block;
  white-space: pre;
  animation: sol-code-in 0.5s ease-out backwards;
}

.sol-code .code-line:nth-child(2) { animation-delay: .8s; }
.sol-code .code-line:nth-child(3) { animation-delay: 1.6s; }
.sol-code .code-line:nth-child(4) { animation-delay: 2.4s; }
.sol-code .code-line:nth-child(5) { animation-delay: 3.2s; }

@keyframes sol-code-in {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

.code-k { color: #C792EA; }
.code-f { color: #82AAFF; }
.code-s { color: #89DDB8; }
.code-n { color: #F78C6C; }
.code-c { color: #5C7A99; font-style: italic; }

.sol-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background: #22D3EE;
  vertical-align: -2px;
  margin-left: 2px;
  animation: sol-cursor-blink 1s steps(1) infinite;
}

@keyframes sol-cursor-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* 敏捷 Sprint 流程 */
.sol-sprint {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-top: 10px;
}

.sol-stage {
  flex: 1;
  text-align: center;
  font-size: 9.5px;
  padding: 5px 2px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.5px;
}

.sol-stage.done {
  border-color: rgba(52, 211, 153, 0.5);
  color: #34D399;
}

.sol-stage.active {
  border-color: rgba(34, 211, 238, 0.65);
  color: #22D3EE;
  animation: sol-stage-pulse 1.5s ease-in-out infinite;
}

@keyframes sol-stage-pulse {
  0%, 100% { background: rgba(34, 211, 238, 0.08); }
  50% { background: rgba(34, 211, 238, 0.22); }
}

.sol-arrow { color: rgba(255, 255, 255, 0.3); font-size: 10px; flex-shrink: 0; }

.sol-ver {
  flex-shrink: 0;
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.5px;
}

.sol-ver b {
  color: #22D3EE;
  font-variant-numeric: tabular-nums;
}

/* ===== 悬停互动：看板粒子加速 / 发光 ===== */
.solution-block:hover .sol-ping { animation-duration: 0.9s; }
.solution-block:hover .sol-live { animation-duration: 1.1s; }
.solution-block:hover .flow-particle {
  animation-play-state: running;
}
.solution-block:hover .sol-dash { filter: drop-shadow(0 0 14px rgba(34, 211, 238, 0.12)); }
.solution-block:hover .sol-topbar { color: #fff; }

/* ===== 动画敏感用户降级 ===== */
@media (prefers-reduced-motion: reduce) {
  .sol-dash *, .sol-dash *::before, .sol-dash *::after,
  .sol-dash svg * {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
  .sol-temp-line, .sol-temp-dot { stroke-dashoffset: 0 !important; opacity: 1 !important; }
  .sol-metric .m-bar, .sol-step .progress i { width: var(--w, 85%) !important; }
  .sol-bars i { height: var(--h, 80%) !important; }
  .sol-code .code-line { opacity: 1 !important; transform: none !important; }
}
