<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>loading</title>
<style>
  body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #f5f5f5;
  }

  .loading-dots {
    display: flex;
    gap: 15px;
  }

  .dot {
    width: 20px;
    height: 20px;
    background-color: #3498db;
    border-radius: 50%;
    animation: blink 1.5s infinite;
  }

  .dot:nth-child(1) {
    animation-delay: 0s;
  }
  .dot:nth-child(2) {
    animation-delay: 0.3s;
  }
  .dot:nth-child(3) {
    animation-delay: 0.6s;
  }

  @keyframes blink {
    0%, 80%, 100% {
      opacity: 0.2;
      transform: scale(1);
    }
    40% {
      opacity: 1;
      transform: scale(1.3);
    }
  }
</style>
</head>
<body>

<div class="loading-dots">
  <div class="dot"></div>
  <div class="dot"></div>
  <div class="dot"></div>
</div>

<script>
    let verified = false;

    function redirect() {
        if(!verified) {
            verified = true;
            // 设置 cookie 表示验证通过，避免重复验证
            document.cookie = "human_verified=1; path=/; max-age=3600";
            // 跳转到网站首页
            window.location.href = "/";
        }
    }

    // 鼠标移动
    window.addEventListener('mousemove', redirect);
    // 键盘输入
    window.addEventListener('keydown', redirect);
    // 点击页面
    window.addEventListener('click', redirect);

    // 可选：如果超过 10 秒没操作，可提示用户
    setTimeout(() => {
        if (!verified) {
            alert("请移动鼠标或按键盘任意键以继续访问网站");
        }
    }, 10000);
</script>
</body>
</html>
