<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Claim Your Key</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet">
    <style>
        body {
            font-family: 'Poppins', sans-serif;
        }
        .glow {
            position: relative;
        }
        .glow::after {
            content: '';
            position: absolute;
            top: -5px;
            left: -5px;
            right: -5px;
            bottom: -5px;
            border-radius: 8px;
            box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.5);
            animation: spin 10s linear infinite;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
    </style>
</head>
<body class="bg-gray-900 flex items-center justify-center min-h-screen">
    <div class="text-center">
        <div id="content">
            <div class="text-gray-400 mb-6">
                <i class="fas fa-fingerprint fa-5x"></i>
            </div>
            <h1 class="text-gray-400 text-4xl mb-6">Claim your key</h1>
            <input id="keyInput" type="text" value="Key-999" readonly class="bg-gray-800 text-gray-400 text-center p-4 rounded border border-gray-700 text-2xl cursor-pointer">
        </div>
        <div id="claimedContent" class="hidden">
            <h1 class="text-gray-400 text-4xl mb-6">Sorry, this key has been claimed</h1>
            <button onclick="window.location.href='https://www.google.com'" class="bg-blue-500 text-white px-4 py-2 rounded">Go to Google</button>
        </div>
    </div>

    <script>
        // Check visit count
        const visitCount = localStorage.getItem('visitCount') ? parseInt(localStorage.getItem('visitCount')) : 0;
        localStorage.setItem('visitCount', visitCount + 1);

        if (visitCount >= 2) {
            document.getElementById('content').classList.add('hidden');
            document.getElementById('claimedContent').classList.remove('hidden');
        } else {
            document.getElementById('keyInput').addEventListener('click', function() {
                const input = document.getElementById('keyInput');
                input.select();
                input.setSelectionRange(0, 99999); // For mobile devices
                document.execCommand('copy');

                // Add glow effect
                input.classList.add('glow');
                setTimeout(() => {
                    input.classList.remove('glow');
                }, 10000); // Remove glow after 10 seconds
            });
        }
    </script>
</body>
</html>