/**
 * 「知己 (ZhiJi)」高定动效库 (Animation Keyframes & Classes)
 * 赋予官网电影级丝滑、呼吸律动与 3D 环绕共振感
 */

/* 1. 双生共振环 3D 旋转 */
@keyframes ring-orbit-left {
  0% {
    transform: rotateX(65deg) rotateY(-25deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(65deg) rotateY(-25deg) rotateZ(360deg);
  }
}

@keyframes ring-orbit-right {
  0% {
    transform: rotateX(65deg) rotateY(25deg) rotateZ(360deg);
  }
  100% {
    transform: rotateX(65deg) rotateY(25deg) rotateZ(0deg);
  }
}

.anim-ring-left {
  animation: ring-orbit-left 22s linear infinite;
  transform-style: preserve-3d;
}

.anim-ring-right {
  animation: ring-orbit-right 26s linear infinite;
  transform-style: preserve-3d;
}

/* 2. 呼吸与光晕律动 */
@keyframes breath-glow {
  0%, 100% {
    opacity: 0.45;
    filter: drop-shadow(0 0 25px rgba(245, 211, 114, 0.35));
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    filter: drop-shadow(0 0 50px rgba(245, 211, 114, 0.65));
    transform: scale(1.02);
  }
}

.anim-breath {
  animation: breath-glow 4.5s ease-in-out infinite;
}

@keyframes breath-neon {
  0%, 100% {
    opacity: 0.4;
    filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.3));
  }
  50% {
    opacity: 0.8;
    filter: drop-shadow(0 0 45px rgba(99, 102, 241, 0.6));
  }
}

.anim-breath-neon {
  animation: breath-neon 5s ease-in-out infinite;
}

/* 3. 悬浮漂浮动效 */
@keyframes float-smooth {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(0.8deg);
  }
}

.anim-float {
  animation: float-smooth 6s ease-in-out infinite;
}

.anim-float-delayed {
  animation: float-smooth 6.5s ease-in-out 1.5s infinite;
}

.anim-float-slow {
  animation: float-smooth 8.5s ease-in-out 3s infinite;
}

/* 4. 流光掠影 (Shimmer Sweep) */
@keyframes text-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.shimmer-text {
  background: linear-gradient(
    90deg,
    #fff3c4 0%,
    #f5d372 25%,
    #ffffff 50%,
    #f5d372 75%,
    #c89e34 100%
  );
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: text-shimmer 7s linear infinite;
}

.shimmer-neon {
  background: linear-gradient(
    90deg,
    #38bdf8 0%,
    #818cf8 25%,
    #ffffff 50%,
    #818cf8 75%,
    #38bdf8 100%
  );
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: text-shimmer 8s linear infinite;
}

/* 5. 按钮流光边框循环 */
@keyframes border-glow-spin {
  0% {
    --border-angle: 0deg;
  }
  100% {
    --border-angle: 360deg;
  }
}

/* 6. 滚动显现淡入动效 (Scroll Reveal) */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }
.reveal-delay-4 { transition-delay: 0.48s; }

/* 7. 动态水波涟漪 (Ripples) */
@keyframes ripple-pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.4;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.8;
  }
}

.anim-pulse-badge {
  animation: ripple-pulse 3.5s ease-in-out infinite;
}

/* 8. 密码锁旋转与解锁微动效 */
@keyframes lock-unlock-hover {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06) rotate(-3deg); }
}

.anim-lock-glow:hover {
  animation: lock-unlock-hover 1.2s ease-in-out infinite;
}
