/* ═══════════════════════════════════════════════════════════════
   FX LAYER · appin.site · 1:1 复刻自 deepseek_html_20260719_c8248f.html
   仅实现蓝本的动效层，数值与蓝本 <style> 完全一致。
   关键修正（相对此前版本）：
   · 去掉 prefers-reduced-motion 闸门（蓝本本就没有），保证始终渲染；
   · 光晕/网格/拖尾/粒子 抬到 z-index:50+，位于不透明 section 之上，
     使全站（含首屏）都能看见绿点、绿尾、光标扩散光晕。
   ═══════════════════════════════════════════════════════════════ */

:root{
  --mouse-x: 50%;
  --mouse-y: 50%;
  --grid-offset: 0px, 0px;
}

/* 内容层级压在动效层之下（动效层在 z-index:50+） */
nav, main, footer, .container, .page, .site-footer, section,
.hero-inner, .hero-grid, .hero-left, .hero-right,
.stats-grid, .section-inner, .footer-inner, .footer-cols, .footer-bottom,
.consult-box, .content-grid, .tools-grid, .products-grid, .works-grid, .radar-grid{
  position: relative;
  z-index: 1;
}

/* ── 1. 鼠标追踪光晕（蓝本 body::before：400px / 0.06）── */
body::before{
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 50;
  background: radial-gradient(circle 400px at var(--mouse-x) var(--mouse-y),
      rgba(0, 255, 65, 0.06) 0%, transparent 70%);
  transition: background 0.1s ease-out;
}
body.light::before{
  background: radial-gradient(circle 400px at var(--mouse-x) var(--mouse-y),
      rgba(0, 168, 46, 0.05) 0%, transparent 70%);
}

/* ── 2. 动态网格偏移（蓝本 body::after：0.04 / 50px / 0.6）── */
body::after{
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 50;
  background-image:
    linear-gradient(rgba(0, 255, 65, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 65, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.6;
  transform: translate(var(--grid-offset));
  transition: transform 0.15s ease-out;
}
body.light::after{
  background-image:
    linear-gradient(rgba(0, 168, 46, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 168, 46, 0.04) 1px, transparent 1px);
}

/* ── 3. 心跳指示灯（蓝本 .heartbeat-dot）── */
.heartbeat-dot{
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent-green);
  animation: fx-heartbeat 1.5s ease-in-out infinite;
  flex: none;
}
@keyframes fx-heartbeat{
  0%, 100%{
    transform: scale(0.8);
    opacity: 0.6;
    box-shadow: 0 0 10px var(--accent-green);
  }
  50%{
    transform: scale(1.2);
    opacity: 1;
    box-shadow: 0 0 30px var(--accent-green), 0 0 60px rgba(0, 255, 65, 0.3);
  }
}

/* ── 4. 鼠标拖尾 canvas（JS 绘制，#fx-trail）── */
#fx-trail{
  position: fixed; inset: 0;
  pointer-events: none; z-index: 51;
}

/* ── 5. 背景粒子 canvas（JS 绘制，#fx-particles，画布整体 opacity 0.4）── */
#fx-particles{
  position: fixed; inset: 0;
  pointer-events: none; z-index: 52;
  opacity: 0.4;
}

/* ── 6. 点击涟漪（蓝本：120px / 0.8s）── */
.ripple-layer{
  position: fixed; inset: 0;
  pointer-events: none; z-index: 999;
  overflow: hidden;
}
.ripple{
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--accent-green);
  background: transparent;
  animation: fx-rippleAnim 0.8s ease-out forwards;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
}
@keyframes fx-rippleAnim{
  0%{ width: 0; height: 0; opacity: 1; transform: translate(-50%, -50%) scale(0); }
  100%{ width: 120px; height: 120px; opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

/* ── 7. Glitch 文字故障（蓝本 #slogan-text.glitch-effect）── */
.fx-glitch{
  animation: fx-glitch 0.15s ease 3;
}
@keyframes fx-glitch{
  0%{
    transform: translate(0);
    text-shadow: 0 0 10px var(--accent-green);
  }
  20%{
    transform: translate(-1px, 1px);
    text-shadow: 2px 0 var(--accent-cyan), -2px 0 var(--accent-green);
    color: #ff00ff;
  }
  40%{
    transform: translate(1px, -1px);
    text-shadow: -2px 0 #00ff41, 2px 0 #00d4ff;
    color: #00ff41;
  }
  60%{
    transform: translate(0);
    text-shadow: 0 0 20px var(--accent-green);
    color: var(--accent-green);
  }
  100%{
    transform: translate(0);
    text-shadow: 0 0 10px var(--accent-green);
    color: var(--accent-green);
  }
}

/* ── 8. 首屏打字主视觉（对应蓝本 .hero .slogan：我是李坤 + 下面那句话）── */
.hero-slogan{
  color: var(--accent-green);
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: var(--s4);
  text-shadow: 0 0 30px rgba(0, 255, 65, 0.15);
  display: flex;
  align-items: center;
  gap: 4px;
}
#slogan-text{
  display: inline-block;
  white-space: nowrap;
}
.hero-subline{
  font-size: 17px;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: var(--s5);
  min-height: 1.7em;
}
#typed{
  display: inline-block;
}
.cursor-blink{
  display: inline-block;
  width: 12px;
  height: clamp(40px, 7vw, 72px);
  background: var(--accent-green);
  animation: fx-cursor-blink 1s step-end infinite;
  margin-left: 2px;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}
@keyframes fx-cursor-blink{
  0%, 100%{ opacity: 1; }
  50%{ opacity: 0; }
}
@keyframes fx-slogan-fade{
  to{ opacity: 1; }
}
@media (max-width: 768px){
  .hero-slogan{ font-size: 40px; flex-wrap: wrap; }
  #slogan-text{ white-space: normal; word-break: break-all; }
  .cursor-blink{ height: 40px; width: 8px; }
}
