<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Neezy Games Transcriber</title>
<link rel="icon" type="image" href="https://1drv.ms/i/c/03b9a948f7fded55/IQOGA0H9UQunRZsczLfGbmoOAaeNTHpHrBBM4KwnxRo6wyA?width=1024">
    <style>
        /* Style for the plans iframe */
        #plansIframeContainer {
            display: none; /* Hidden by default */
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.8); /* Semi-transparent background */
            z-index: 10000; /* High z-index to be on top */
        }

        #plansIframe {
            width: 80%;
            height: 80%;
            margin: 5% auto;
            border: none;
            display: block;
        }

        #closeIframeButton {
            position: absolute;
            top: 10px;
            right: 10px;
            background: #fff;
            color: #000;
            padding: 10px;
            border: none;
            cursor: pointer;
            font-size: 16px;
            z-index: 10001;
        }

        #closeIframeButton:hover {
            background: #ccc;
        }
    </style>
    <script>
        async function loginUser(event) {
            event.preventDefault();
            const email = document.getElementById("email").value;
            const password = document.getElementById("password").value;

            if (password.length < 10) {
                alert("Password must be at least 10 characters long.");
                return;
            }

            const response = await fetch("https://neezygamesdfvc.serveo.net/login", {
                method: "POST",
                headers: {
                    "Content-Type": "application/json",
                },
                body: JSON.stringify({ email, password }),
            });

            const result = await response.json();

            if (response.ok) {
                alert(result.message);
                hideLoginForm();
                showIframe();
            } else {
                alert(result.error);
            }
        }

        function hideLoginForm() {
            document.getElementById("loginForm").style.display = "none";
            document.getElementById("contactInfo").style.display = "none";
            document.getElementById("loginHeading").style.display = "none";
        }

        function showIframe() {
            const iframeContainer = document.getElementById("iframeContainer");
            const iframe = document.createElement("iframe");
            iframe.src = "https://neezygamescolorfulhatos.on.drv.tw/Transcriber/Transcriber%20Main.html";
            iframe.style.position = "fixed";
            iframe.style.top = "0";
            iframe.style.left = "0";
            iframe.style.width = "100vw";
            iframe.style.height = "100vh";
            iframe.style.border = "none";
            iframe.style.zIndex = "9998";
            iframeContainer.appendChild(iframe);
        }

        function openPlans() {
            document.getElementById("plansIframeContainer").style.display = "block";
        }

        function closePlans() {
            document.getElementById("plansIframeContainer").style.display = "none";
        }

        // Disable right-click context menu
        document.addEventListener('contextmenu', function(event) {
            event.preventDefault();
        });

        // Disable certain keyboard shortcuts
        document.addEventListener('keydown', function(event) {
            // Block Ctrl+U (View Source)
            if (event.ctrlKey && event.key.toLowerCase() === 'u') {
                event.preventDefault();
            }
            // Block Ctrl+Shift+I (DevTools)
            if (event.ctrlKey && event.shiftKey && event.key.toLowerCase() === 'i') {
                event.preventDefault();
            }
            // Block Ctrl+Shift+C (Inspect)
            if (event.ctrlKey && event.shiftKey && event.key.toLowerCase() === 'c') {
                event.preventDefault();
            }
            // Block F12 (DevTools)
            if (event.key === 'F12') {
                event.preventDefault();
            }
        });
    </script>
</head>
<body>
    <h1 id="loginHeading">Neezy Games Transcriber</h1>

    <div id="contactInfo" style="margin-bottom: 20px;">
        Contact <strong>neezygames1@gmail.com</strong> to view our plans.  

        <button onclick="openPlans()">View Plans</button> This composes an email to our email, then we will provide the details to pay.
        <br>
        We support languages such as English, French, German, Italian, and much more! 
    </div>

    <form id="loginForm" onsubmit="loginUser(event)">
        <label for="email">Email:</label>
        <input type="email" id="email" name="email" required>
        <br>
        <label for="password">Product Key:</label>
        <input type="password" id="password" name="password" required>
        <br>
        <button type="submit">Login</button>
    </form>

    <div id="iframeContainer"></div>

    <!-- Plans iframe container -->
    <div id="plansIframeContainer">
        <button id="closeIframeButton" onclick="closePlans()">Close</button>
        <iframe id="plansIframe" src="https://neezygamesplans.serveo.net"></iframe>
    </div>
</body>
</html>
