/* ============================================
   大势智慧官网 - 科技感交互效果
   扫描线 / 光晕 / 文字流光 / 卡片3D / 按钮扫描
   ============================================ */

/* --- 全局鼠标光晕容器 --- */
body.legacy-page #global-glow,
body.legacy-page .mouse-particle {
  display: none !important;
}

#global-glow {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: radial-gradient(circle 800px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(16,227,255,0.06), transparent 60%);
  pointer-events: none; z-index: 1;
  transition: opacity 0.5s ease;
}

/* --- 鼠标粒子 --- */
.mouse-particle {
  position: fixed; pointer-events: none; z-index: 9997;
  background: rgba(16,227,255,0.7); border-radius: 50%;
  box-shadow: 0 0 8px rgba(16,227,255,0.6);
  transition: transform 1s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 1s ease-out;
}

/* --- 标题文字流光动画 --- */
.text-gradient-flow {
  background: linear-gradient(110deg, #ffffff 30%, rgba(123,48,240,0.25) 48%, rgba(123,48,240,0.55) 50%, rgba(123,48,240,0.25) 52%, #ffffff 70%);
  background-size: 200% auto;
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textFlowLight 4s linear infinite;
}
@keyframes textFlowLight {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

/* --- 卡片光斑 (glare) --- */
.glare {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255,255,255,0.06), transparent 50%);
  opacity: 0; transition: opacity 0.3s; mix-blend-mode: overlay;
  border-radius: inherit;
}
.card-3d:hover .glare, .img-glow:hover .glare { opacity: 1; }

/* --- 3D卡片交互基础 (card-3d) --- */
/* 确保所有需要3D效果的卡片有 position:relative 和 overflow:hidden */
.card-3d {
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out, box-shadow 0.4s ease, border-color 0.4s ease;
  will-change: transform;
}
/* 恢复时用较长过渡 */
.card-3d.tilt-reset {
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1), box-shadow 0.4s ease, border-color 0.4s ease;
}
/* 辅助：让glare在所有card-3d hover时显示 */
.card-3d:hover > .glare { opacity: 1; }

/* --- 按钮扫描光效 --- */
.btn-scan {
  position: relative; overflow: hidden;
}
.btn-scan::before {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(16,227,255,0.15), transparent);
  transition: left 0.5s ease;
  z-index: 1; pointer-events: none;
}
.btn-scan:hover::before { left: 100%; }

/* --- 移动端降级 --- */
@media (max-width: 768px) {
  body::after { opacity: 0.08; }
  #global-glow { opacity: 0.3; }
  .mouse-particle { display: none; }
  .text-gradient-flow { animation: none; background: #fff; -webkit-text-fill-color: #fff; }
}
