<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline';">
    <meta http-equiv="X-Content-Type-Options" content="nosniff">
    <meta http-equiv="X-Frame-Options" content="DENY">
    <meta name="referrer" content="no-referrer">
    <title>Secure Access</title>
    
        body {
            margin: 0;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background: linear-gradient(135deg, #1e1e2f 0%, #2a2a4e 100%);
            font-family: 'Segoe UI', sans-serif;
            color: #e0e0e0;
            user-select: none;
            overflow: hidden;
            position: relative;
        }
        .auth-box {
            background: rgba(40, 40, 70, 0.9);
            padding: 30px;
            border-radius: 15px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
            text-align: center;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            max-width: 90%;
            width: 350px;
        }
        input {
            padding: 12px;
            margin: 15px 0;
            width: 100%;
            max-width: 220px;
            border: none;
            border-radius: 5px;
            background: #3a3a5a;
            color: #e0e0e0;
            font-size: 16px;
            box-sizing: border-box;
        }
        .button-container {
            display: flex;
            gap: 10px;
            justify-content: center;
            align-items: center;
        }
        button {
            padding: 12px 0;
            border: none;
            border-radius: 5px;
            background: linear-gradient(90deg, #6a5af9 0%, #a855f7 100%);
            color: white;
            font-size: 16px;
            cursor: pointer;
            transition: transform 0.1s, background 0.3s;
            width: 100px;
            line-height: 1;
        }
        button:hover {
            transform: scale(1.05);
            background: linear-gradient(90deg, #a855f7 0%, #6a5af9 100%);
        }
        #timer {
            position: absolute;
            top: 20px;
            right: 20px;
            font-size: 18px;
            color: #a855f7;
            background: rgba(40, 40, 70, 0.8);
            padding: 5px 10px;
            border-radius: 5px;
        }
        #notification {
            position: absolute;
            top: 70px;
            left: 50%;
            transform: translateX(-50%);
            color: white;
            padding: 10px 20px;
            border-radius: 5px;
            display: none;
            font-size: 14px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        }
        h2 {
            margin: 0 0 20px 0;
            font-size: 24px;
            color: #a855f7;
        }
        p {
            font-size: 14px;
            color: #b0b0c0;
            white-space: nowrap; /* ป้องกันการตัดบรรทัด */
        }
        #logo {
            position: absolute;
            top: 20px;
            left: 20px;
            font-size: 20px;
            font-weight: bold;
            color: #a855f7;
        }
        footer {
            position: absolute;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 12px;
            color: #b0b0c0;
        }
        #contextMenu {
            position: absolute;
            background: #333;
            border: 1px solid #555;
            border-radius: 5px;
            padding: 5px 0;
            display: none;
            z-index: 1000;
        }
        #contextMenu div {
            padding: 8px 15px;
            color: #e0e0e0;
            cursor: pointer;
        }
        #contextMenu div.disabled {
            color: #666;
            cursor: not-allowed;
        }
        #contextMenu div:not(.disabled):hover {
            background: #555;
        }
        #expiredMessage {
            font-size: 18px;
            color: #FF4444;
            text-align: center;
        }

        /* Responsive Design */
        @media (max-width: 600px) {
            .auth-box {
                padding: 20px;
                width: 90%;
            }
            input {
                max-width: 100%;
                font-size: 14px;
            }
            button {
                width: 80px;
                font-size: 14px;
                padding: 10px 0;
            }
            h2 {
                font-size: 20px;
            }
            #timer {
                font-size: 16px;
                top: 10px;
                right: 10px;
            }
            #notification {
                top: 60px;
                font-size: 12px;
                padding: 8px 15px;
            }
            #logo {
                font-size: 16px;
                top: 10px;
                left: 10px;
            }
            footer {
                font-size: 10px;
                bottom: 5px;
            }
            p {
                font-size: 12px;
            }
        }
    
</head>
<body>
    <div id="logo">Dev-g0d</div>
    <div id="timer">01:00</div>
    <div id="notification"></div>
    <div class="auth-box" id="authBox">
        <h2>Secure Access</h2>
        <input type="text" id="inputField" placeholder="Enter secure token...">
        <div class="button-container">
            <button onclick="qwezxcvbn()">🔑</button>
            <button onclick="jklmnpqr()">SUBMIT</button>
        </div>
        <p>Token ID: <span id="tokenId"></span></p>
    </div>
    <footer>© 2025 | Dev-g0d</footer>
    <div id="contextMenu">
        <div id="pasteOption" onclick="pasteToken()">Paste</div>
    </div>

    <script src="crypto-js.min.js" id="cryptoScript"></script>
    <script id="mainScript">
        if (typeof CryptoJS === 'undefined') {
            console.error("CryptoJS not loaded!");
            zxcvbnm123("Error: CryptoJS not loaded. Check your setup.", "error");
            throw new Error("CryptoJS not loaded");
        }

        const contextMenu = document.getElementById('contextMenu');
        let isTokenGenerated = false;
        let isInsideInput = false;

        document.addEventListener('contextmenu', e => {
            e.preventDefault();
            contextMenu.style.display = 'block';
            contextMenu.style.left = `${e.pageX}px`;
            contextMenu.style.top = `${e.pageY}px`;
            isInsideInput = e.target.id === 'inputField';
            const pasteOption = document.getElementById('pasteOption');
            if (isTokenGenerated && isInsideInput) {
                pasteOption.classList.remove('disabled');
            } else {
                pasteOption.classList.add('disabled');
            }
        });

        document.addEventListener('click', () => {
            contextMenu.style.display = 'none';
        });

        function pasteToken() {
            if (!isTokenGenerated) {
                zxcvbnm123('invalid!', "error");
                return;
            }
            if (!isInsideInput) {
                return;
            }
            const inputField = document.getElementById('inputField');
            if (inputField) {
                navigator.clipboard.readText().then(text => {
                    inputField.value = text;
                }).catch(err => {
                    zxcvbnm123('Failed to paste token!', "error");
                    console.error("Clipboard error:", err);
                });
            }
        }

        document.addEventListener('keydown', e => {
            if (e.key === 'F12' || (e.ctrlKey && e.shiftKey && e.key === 'I')) e.preventDefault();
        });

        const asdfghjk = Math.random().toString(36).substring(2, 10); // ไม่เข้ารหัส Token ID
        const qwertyui = document.getElementById('tokenId');
        if (qwertyui) {
            qwertyui.innerText = asdfghjk; // แสดง Token ID โดยไม่เข้ารหัส
        }

        let zxcvbnma = '';

        function poiuytre(text) {
            try {
                return CryptoJS.AES.encrypt(text, 'lkjhgfdsa').toString();
            } catch (e) {
                console.error("Encryption error:", e);
                zxcvbnm123("Encryption failed!", "error");
                return '';
            }
        }

        function lkjhgfds(encryptedText) {
            try {
                const bytes = CryptoJS.AES.decrypt(encryptedText, 'lkjhgfdsa');
                return bytes.toString(CryptoJS.enc.Utf8);
            } catch (e) {
                console.error("Decryption error:", e);
                zxcvbnm123("Decryption failed!", "error");
                return '';
            }
        }

        function qwezxcvbn() {
            zxcvbnma = Math.random().toString(36).substring(2, 20) + Math.random().toString(36).substring(2, 20);
            navigator.clipboard.writeText(zxcvbnma).then(() => {
                zxcvbnm123('Token copied to clipboard! Paste to proceed.', "success");
                isTokenGenerated = true;
            }).catch(err => {
                zxcvbnm123('Failed to copy token!', "error");
                console.error("Clipboard error:", err);
            });
        }

        let timeLeft = 60;
        const timerDisplay = document.getElementById('timer');
        const authBox = document.getElementById('authBox');
        if (timerDisplay && authBox) {
            const countdown = setInterval(() => {
                timeLeft--;
                const minutes = Math.floor(timeLeft / 60);
                const seconds = timeLeft % 60;
                timerDisplay.innerText = `0${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;
                if (timeLeft <= 0) {
                    clearInterval(countdown);
                    authBox.remove();
                    timerDisplay.remove();
                    const cryptoScript = document.getElementById('cryptoScript');
                    const mainScript = document.getElementById('mainScript');
                    if (cryptoScript) cryptoScript.remove();
                    if (mainScript) mainScript.remove();
                    const expiredMessage = document.createElement('div');
                    expiredMessage.id = 'expiredMessage';
                    expiredMessage.innerText = 'Access expired! Refresh to retry.';
                    document.body.appendChild(expiredMessage);
                }
            }, 1000);
        }

        function jklmnpqr() {
            const inputKey = document.getElementById('inputField').value;
            if (!zxcvbnma) {
                zxcvbnm123('Prepare token!', "error");
                return;
            }
            if (!inputKey) {
                zxcvbnm123('Please enter a token!', "error");
                return;
            }
            zxcvbnm123('Checking token...', "warning");
            setTimeout(() => {
                if (inputKey === zxcvbnma) {
                    zxcvbnm123('Access granted! Redirecting...', "success");
                    setTimeout(() => {
                        window.location.href = "https://discord.com/invite/zcqAAkHUac";
                    }, 1000);
                } else {
                    zxcvbnm123('Invalid token!', "error");
                }
            }, 2000);
        }

        function zxcvbnm123(message, status) {
            const notif = document.getElementById('notification');
            if (notif) {
                notif.innerText = message;
                if (status === "success") {
                    notif.style.background = "#4CAF50";
                } else if (status === "error") {
                    notif.style.background = "#FF4444";
                } else if (status === "warning") {
                    notif.style.background = "#FFBB33";
                }
                notif.style.display = 'block';
                setTimeout(() => {
                    notif.style.display = 'none';
                }, 3000);
            }
        }

        Object.defineProperty(window, 'zxcvbnma', {
            value: zxcvbnma,
            writable: false,
            configurable: false,
            enumerable: false
        });
    </script>
</body>
</html>