<!doctype html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>正在选择最佳线路</title>
  <style>
    * { box-sizing: border-box; }

    html, body {
      width: 100%;
      height: 100%;
      margin: 0;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
      color: #17213a;
      background: linear-gradient(145deg, #f8fbff 0%, #edf3f9 100%);
      overflow: hidden;
    }

    body {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 100vh;
      padding: 24px;
    }

    .redirect-card {
      width: min(388px, 100%);
      min-height: 342px;
      padding: 34px 28px 30px;
      text-align: center;
      background: rgba(255, 255, 255, 0.96);
      border: 1px solid rgba(212, 221, 231, 0.9);
      border-radius: 7px;
      box-shadow: 0 24px 70px rgba(25, 38, 64, 0.12);
    }

    .spinner {
      position: relative;
      width: 68px;
      height: 68px;
      margin: 0 auto 22px;
      border-radius: 50%;
      background: conic-gradient(#10a58e 0deg, #10a58e 96deg, #dff3ef 96deg, #dff3ef 360deg);
      animation: spin 1s linear infinite;
    }

    .spinner::after {
      position: absolute;
      inset: 6px;
      content: "";
      border-radius: 50%;
      background: #fff;
    }

    h1 {
      margin: 0;
      font-size: 25px;
      line-height: 1.25;
      font-weight: 800;
    }

    p {
      margin: 12px 0 0;
      font-size: 15px;
      line-height: 1.6;
      color: #65758c;
    }

    .countdown {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 38px;
      height: 38px;
      margin: 22px auto 20px;
      color: #0d7d72;
      font-size: 17px;
      font-weight: 800;
      background: #e5f6f3;
      border-radius: 50%;
    }

    .jump-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 88px;
      height: 42px;
      padding: 0 17px;
      color: #fff;
      font-size: 14px;
      font-weight: 800;
      text-decoration: none;
      background: #12a88f;
      border-radius: 6px;
      box-shadow: 0 10px 20px rgba(18, 168, 143, 0.24);
    }

    .site-frame {
      display: none;
      width: 100vw;
      height: 100vh;
      border: 0;
      background: #fff;
    }

    body.loaded {
      display: block;
      padding: 0;
    }

    body.loaded .redirect-card {
      display: none;
    }

    body.loaded .site-frame {
      display: block;
    }

    @keyframes spin {
      to { transform: rotate(360deg); }
    }
  </style>
</head>
<body>
  <main class="redirect-card">
    <div class="spinner"></div>
    <h1>正在选择最佳线路</h1>
    <p>已找到可用线路，<span id="countText">3</span> 秒后自动加载</p>
    <div class="countdown" id="countdown">3</div>
    <a class="jump-button" id="jumpButton" href="https://16222.cc/">立即加载</a>
  </main>

  <iframe
    class="site-frame"
    id="siteFrame"
    src="https://16222.cc/"
    title="16222.cc"
    loading="eager"
    referrerpolicy="no-referrer-when-downgrade"
    allow="fullscreen; clipboard-read; clipboard-write; autoplay; encrypted-media">
  </iframe>

  <script>
    var _czc = _czc || [];
    (function () {
      var um = document.createElement("script");
      um.src = "https://s9.cnzz.com/z.js?id=1281486847&async=1";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(um, s);
    })();
  </script>

  <script>
    let secondsLeft = 3;
    const countText = document.getElementById("countText");
    const countdown = document.getElementById("countdown");
    const jumpButton = document.getElementById("jumpButton");

    function showSite() {
      document.body.classList.add("loaded");
    }

    jumpButton.addEventListener("click", function (event) {
      event.preventDefault();
      showSite();
    });

    const timer = window.setInterval(function () {
      secondsLeft -= 1;
      countText.textContent = secondsLeft;
      countdown.textContent = secondsLeft;

      if (secondsLeft <= 0) {
        window.clearInterval(timer);
        showSite();
      }
    }, 1000);
  </script>
</body>
</html>