
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>MalikCheats</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            color: white;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
            overflow: hidden;
            background-color: black;
        }
        .video-background {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            z-index: -1;
        }
        .container {
            text-align: center;
            background: rgba(204, 0, 0, 0.85);
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
            position: relative;
            z-index: 1;
        }
        h1 {
            font-size: 2rem;
            font-weight: bold;
        }
        input[type="text"] {
            padding: 10px;
            border: none;
            border-radius: 5px;
            width: 250px;
            background: rgba(255, 255, 255, 0.1);
            color: white;
            text-align: center;
            outline: none;
        }
        input::placeholder {
            color: rgba(255, 255, 255, 0.7);
        }
        button {
            padding: 10px 20px;
            margin-top: 10px;
            background-color: white;
            color: #cc0000;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-weight: bold;
            width: 100%;
        }
        button:hover {
            background-color: #ffcccc;
        }

        .discord {
            width: 75px;
            height: 75px;
            display: block;
            margin: 30px auto;
            transition: transform 0.2s ease-in-out;
        }

        .discord:hover {
            transform: scale(1.1);
        }

        .line {
            fill: #ffffff;
            transition: fill 0.2s ease-in-out;
        }

        .discord:hover .line {
            fill: #7289da;
        }

        #error_text {
            color: #ff4d4d;
            font-size: 1.2rem;
            font-weight: bold;
            margin-bottom: 15px;
            text-align: center;
            position: absolute;
            top: 25%;
            width: 100%;
        }
    </style>
</head>
<body>
    <video autoplay loop muted class="video-background">
        <source src="/static/mp4/background.mp4" type="video/mp4">
    </video>

    <div id="music">
        <iframe width="0" height="0" src="https://www.youtube.com/embed/4KEgyGi9j70?autoplay=1&loop=1&playlist=4KEgyGi9j70" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
    </div>

    <h1 id="error_text"></h1>
    <div id="progress-bar">
        <div id="progress"></div>
    </div>

    <div class="container">
        <h1>MalikCheats</h1>
        <input type="text" placeholder="Enter License Key" id="license">
        <button onclick="checkLicense()">Login</button>
        <br>
        <a href="https://discord.gg/5d39aCJtYG" target="_blank"><svg class="discord" width="100" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" style="margin-top: 20px;"><path class="line" fill="#fff" d="M247.29492,169.80862,213.32129,56.56252A15.953,15.953,0,0,0,204.084,46.35744l-.53759.16309.54931-.1919a185.84371,185.84371,0,0,0-34.53515-10.30712,8.00026,8.00026,0,1,0-3.12012,15.69336q6.72656,1.3374,13.18457,3.14746a7.97792,7.97792,0,0,1-4.46045,15.07714,188.85309,188.85309,0,0,0-93.26074-.18359,7.99484,7.99484,0,0,1-5.56592-14.87305l.03418.01172q6.4541-1.80762,13.20068-3.15185a8.00026,8.00026,0,0,0-3.12011-15.69336A185.88539,185.88539,0,0,0,51.917,46.35647a15.95771,15.95771,0,0,0-9.23828,10.20507L8.70508,169.80862a16.09028,16.09028,0,0,0,4.88672,16.72656c.95459.83008,1.9331,1.645,2.92529,2.45166.02344.019.04346.041.06689.06006,16.23047,13.166,37.50342,23.22461,61.51856,29.08691a7.99977,7.99977,0,0,0,3.79492-15.543,160.72734,160.72734,0,0,1-31.33789-11.0664l.06592.00488a7.99746,7.99746,0,0,1,8.59912-13.24219C78.21,186.74367,102.063,192,128,192s49.80664-5.26269,68.792-13.71924a7.997,7.997,0,0,1,8.58252,13.24854l.06592-.00488a160.72734,160.72734,0,0,1-31.33789,11.0664,7.99978,7.99978,0,1,0,3.79492,15.543c24.01514-5.8623,45.28809-15.9209,61.51856-29.08691.02441-.01953.04492-.042.06884-.062h.00049c.99121-.80615,1.96973-1.62109,2.92383-2.45068A16.09062,16.09062,0,0,0,247.29492,169.80862ZM96,156a12,12,0,1,1,12-12A12,12,0,0,1,96,156Zm64,0a12,12,0,1,1,12-12A12,12,0,0,1,160,156Z"></path></svg></a>
    </div>

    <script>
    function checkLicense() {
      const license = document.getElementById('license').value;
      const errorText = document.getElementById('error_text');

      if (!license) {
        showError("Please enter a license key.");
        return;
      }

      fetch(`/api/v1/license/check?license=${license}`)
        .then(response => response.json())
        .then(data => {
          if (data.success) {
            localStorage.setItem('license', license);
            location.reload(true);
          } else {
            showError(data.message);
          }
          })
          .catch(error => {
            console.error("Error:", error);
            showError("An error occurred while checking the license.");
          });
      }

      function showError(message) {
        const errorText = document.getElementById('error_text');
        errorText.textContent = message;

        setTimeout(() => {
          errorText.textContent = "";
        }, 3000);
      }
    </script>
</body>
</html>