/* ============================================
   昆仑能动 - 科技风视觉效果系统
   动态背景 · 发光边框 · 扫描线 · 粒子动画
   ============================================ */

/* ---------- 全局科技网格背景 ---------- */
.tech-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(29,109,229,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29,109,229,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridMove 20s linear infinite;
}
@keyframes gridMove {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 60px 60px, 60px 60px; }
}

/* 粒子流光背景 */
.tech-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.tech-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--blue-400);
  box-shadow: 0 0 8px var(--blue-400);
  opacity: 0;
  animation: particleFloat 8s ease-in-out infinite;
}
@keyframes particleFloat {
  0% { opacity: 0; transform: translateY(100%) scale(0); }
  20% { opacity: 0.8; }
  80% { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-100vh) scale(1.5); }
}

/* ---------- 发光卡片 ---------- */
.glow-card {
  position: relative;
  transition: all var(--t-med);
}
.glow-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent, rgba(29,109,229,0.3), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--t-med);
  pointer-events: none;
}
.glow-card:hover::before {
  opacity: 1;
}
.glow-card:hover {
  box-shadow: 0 8px 40px rgba(29,109,229,0.15), 0 0 0 1px rgba(29,109,229,0.1);
}

/* ---------- 扫描线效果 ---------- */
.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue-400), var(--emerald-400), transparent);
  opacity: 0;
  animation: scanDown 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 3;
}
@keyframes scanDown {
  0% { top: 0; opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { top: 100%; opacity: 0; }
}

/* ---------- 数据流边框 ---------- */
.data-border {
  position: relative;
}
.data-border::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--blue-400), transparent);
  opacity: 0;
  transition: opacity var(--t-med);
}
.data-border:hover::after {
  opacity: 1;
  animation: dataFlow 2s linear infinite;
}
@keyframes dataFlow {
  0% { background-position: 0 -100%; }
  100% { background-position: 0 200%; }
}

/* ---------- 科技角标装饰 ---------- */
.tech-corner {
  position: relative;
}
.tech-corner::before,
.tech-corner::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--blue-400);
  opacity: 0;
  transition: opacity var(--t-med);
  pointer-events: none;
}
.tech-corner::before {
  top: 8px;
  left: 8px;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: 6px;
}
.tech-corner::after {
  bottom: 8px;
  right: 8px;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: 6px;
}
.tech-corner:hover::before,
.tech-corner:hover::after {
  opacity: 0.6;
}

/* ---------- 全息光晕脉冲 ---------- */
.holo-pulse {
  position: relative;
}
.holo-pulse::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(29,109,229,0.4);
  animation: holoPulse 2.5s ease-out infinite;
  pointer-events: none;
}
@keyframes holoPulse {
  0% { box-shadow: 0 0 0 0 rgba(29,109,229,0.3); }
  70% { box-shadow: 0 0 0 16px rgba(29,109,229,0); }
  100% { box-shadow: 0 0 0 0 rgba(29,109,229,0); }
}

/* ---------- 渐变文字动画 ---------- */
.gradient-text {
  background: linear-gradient(90deg, var(--blue-500), var(--emerald-500), var(--blue-500));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 4s linear infinite;
}
@keyframes gradientShift {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ---------- 数字翻转计数器 ---------- */
.tech-counter {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ---------- 电路装饰线 ---------- */
.circuit-line {
  position: absolute;
  pointer-events: none;
  opacity: 0.15;
}
.circuit-line svg {
  width: 100%;
  height: 100%;
}
.circuit-line path {
  stroke: var(--blue-400);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: circuitDraw 4s ease-in-out infinite;
}
@keyframes circuitDraw {
  0%, 100% { stroke-dashoffset: 200; }
  50% { stroke-dashoffset: 0; }
}

/* ---------- 玻璃态卡片 ---------- */
.glass-card {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 8px 32px rgba(15,40,71,0.08);
}

/* ---------- 暗色区玻璃态 ---------- */
.glass-dark {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ---------- 科技标签 ---------- */
.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 4px;
  background: rgba(29,109,229,0.08);
  color: var(--blue-500);
  border: 1px solid rgba(29,109,229,0.2);
  position: relative;
}
.tech-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--blue-400);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--blue-400);
  animation: dotBlink 2s ease-in-out infinite;
}
@keyframes dotBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---------- 六边形图标容器 ---------- */
.hex-icon {
  width: 72px;
  height: 80px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.hex-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(29,109,229,0.1), rgba(16,185,129,0.08));
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  transition: all var(--t-med);
}
.hex-icon:hover::before {
  background: linear-gradient(135deg, var(--blue-500), var(--emerald-500));
}
.hex-icon span {
  position: relative;
  z-index: 2;
  font-size: 1.8rem;
  transition: transform var(--t-med);
}
.hex-icon:hover span {
  transform: scale(1.2);
}

/* ---------- 暗色区科技标签 ---------- */
.tech-tag-dark {
  background: rgba(255,255,255,0.08);
  color: var(--blue-300);
  border-color: rgba(255,255,255,0.15);
}

/* ---------- 数据节点连线 ---------- */
.node-line {
  position: relative;
}
.node-line::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue-300), transparent);
  opacity: 0.3;
}

/* ---------- Hero 增强效果 ---------- */
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.hero-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--blue-300);
  box-shadow: 0 0 6px var(--blue-300);
  animation: heroParticleFloat 10s linear infinite;
}
@keyframes heroParticleFloat {
  0% { transform: translateY(100vh) translateX(0); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-100px) translateX(50px); opacity: 0; }
}

/* ---------- 页面 Banner 科技增强 ---------- */
.page-banner-tech {
  position: relative;
}
.page-banner-tech::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blue-400), var(--emerald-400), transparent);
  z-index: 3;
}

/* ---------- 悬浮科技信息卡 ---------- */
.tech-info-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px;
  border-left: 3px solid var(--blue-500);
  box-shadow: var(--shadow-sm);
  transition: all var(--t-med);
  overflow: hidden;
}
.tech-info-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--blue-500), var(--emerald-500), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}
.tech-info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.tech-info-card:hover::before {
  transform: scaleX(1);
}

/* ---------- 响应式调整 ---------- */
@media (max-width: 768px) {
  .tech-particles { display: none; }
  .hero-particles { display: none; }
  .circuit-line { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tech-bg,
  .tech-particle,
  .hero-particle,
  .scan-line,
  .holo-pulse::before,
  .gradient-text,
  .circuit-line path {
    animation: none !important;
  }
}
