/* ═══════════════════════════════════════════════════════════
   Limooi · 动态星光层
   ───────────────────────────────────────────────────────────
   · Canvas 全屏星场：缓慢漂移 + 呼吸闪烁 + 视差
   · 鼠标靠近时星星被点亮、轻微吸引
   · 点击产生涟漪扩散
   · 覆盖在内容之上（pointer-events: none，不影响操作）
   ═══════════════════════════════════════════════════════════ */

#lm-stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;            /* 内容之上、弹窗之下 */
  mix-blend-mode: screen;
  opacity: .9;
}

/* 点击涟漪由 canvas 绘制，这里留空 */

@media (prefers-reduced-motion: reduce) {
  #lm-stars { display: none; }
}

/* ══ 标题逐字效果 ══ */
.lm-char {
  display: inline-block;
  transition: transform .22s cubic-bezier(.2,.7,.4,1),
              color .2s ease,
              text-shadow .22s ease;
  will-change: transform;
}
.lm-char.lm-char-in {
  animation: lm-char-rise .62s cubic-bezier(.2,.7,.4,1) both;
}
@keyframes lm-char-rise {
  from {
    opacity: 0;
    transform: translateY(22px) scale(.94);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* ══ 按钮按压涟漪 ══ */
button, .btn, a.btn, .primary-btn, .login-submit {
  position: relative;
  overflow: hidden;
  /* 保证 ripple 不被裁掉 */
  isolation: isolate;
}

.lm-press {
  transform: scale(.975) !important;
}

.lm-ripple {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,255,93,.45), rgba(201,255,93,0) 68%);
  transform: scale(0);
  animation: lm-ripple-out .56s cubic-bezier(.2,.7,.4,1) forwards;
  pointer-events: none;
  z-index: 0;
}
@keyframes lm-ripple-out {
  to {
    transform: scale(1);
    opacity: 0;
  }
}

/* ══ 减少动效 ══ */
@media (prefers-reduced-motion: reduce) {
  .lm-char.lm-char-in { animation: none; }
  .lm-ripple { display: none; }
}

/* ══ 鼠标跟随环境光 ══ */
#lm-aura {
  position: fixed;
  left: 0;
  top: 0;
  width: 520px;
  height: 520px;
  margin-left: -260px;
  margin-top: -260px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 4;
  background: radial-gradient(
    circle,
    rgba(201,255,93,.055) 0%,
    rgba(201,255,93,.022) 38%,
    transparent 68%
  );
  filter: blur(28px);
  will-change: transform;
}

/* ══ 滚动进度线 ══ */
#lm-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px; width: 0%;
  z-index: 9998;
  background: linear-gradient(90deg,#8fd63a,#c9ff5d,#eaffb0,#c9ff5d);
  background-size: 220% 100%;
  animation: lm-flow-x 2.4s linear infinite;
  box-shadow: 0 0 12px rgba(201,255,93,.6);
  pointer-events: none;
  transition: width .1s linear, opacity .3s;
  opacity: 0;
}

@keyframes lm-flow-x {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  #lm-aura, #lm-progress { display: none; }
}
