<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Game Loader</title>
    <style>
        html, body {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }

        .loader-container {
            display: flex;
            justify-content: center;
            align-items: center;
            position: absolute;
            width: 100%;
            height: 100%;
            z-index: 10;
        }

        .spinner {
            display: inline-block;
            width: 12vmin;
            height: 12vmin;
        }

        .spinner:after {
            content: " ";
            display: block;
            width: 10vmin;
            height: 10vmin;
            margin: 1vmin;
            border-radius: 50%;
            border: 6px solid #fff;
            border-color: #fff transparent #fff transparent;
            animation: spin 1.2s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        iframe {
            border: none;
            width: 100vw;
            height: 100vh;
            opacity: 0;
            transition: opacity 0.7s ease;
            display: none;
        }

        #fullscreenIcon {
            width: 40px;
            height: 40px;
            fill: #ffffff;
            cursor: pointer;
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 1000;
            background: rgba(0, 0, 0, 0.6);
            border-radius: 50%;
            padding: 8px;
            box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
            transition: transform 0.3s ease, background 0.3s ease;
        }

        #fullscreenIcon:hover {
            transform: scale(1.1);
            background: rgba(0, 0, 0, 0.8);
        }

        @media (max-width: 768px) {
            .spinner:after {
                border-width: 4px;
            }
            #fullscreenIcon {
                width: 35px;
                height: 35px;
            }
        }
    </style>
</head>

<body>
    <div class="loader-container" id="loader">
        <div class="spinner"></div>
    </div>

    <iframe 
        id="innerFrame" 
        name="innerFrame" 
        sandbox="allow-scripts allow-popups allow-forms allow-same-origin allow-popups-to-escape-sandbox allow-downloads allow-storage-access-by-user-activation" 
        frameborder="0" 
        allowfullscreen 
        style="overflow: auto;">
    </iframe>

    <svg id="fullscreenIcon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
        <path d="M4 4h6V2H2v8h2V4zm16 0v6h2V2h-8v2h6zM4 20v-6H2v8h8v-2H4zm16-6v6h-6v2h8v-8h-2z"/>
    </svg>

    <script>
        const encodedLink = "aHR0cHM6Ly9zei1nYW1lcy5naXRodWIuaW8vZ2FtZXMvRmxhc2guaHRtbD9nYW1lPWh0dHBzOi8vc3otZ2FtZXMuZ2l0aHViLmlvL0dhbWVzNy9ibG9vbnN0ZC5zd2Y=";
        const decodedLink = atob(encodedLink);

        function goFullscreen() {
            window.open(decodedLink, "_blank");
        }

        window.addEventListener("load", function () {
            const loader = document.getElementById("loader");
            const iframe = document.getElementById("innerFrame");
            const fullscreenIcon = document.getElementById("fullscreenIcon");

            fullscreenIcon.onclick = goFullscreen;

            function showIframe() {
                iframe.src = decodedLink;
                iframe.style.display = 'block';
                setTimeout(() => { iframe.style.opacity = 1; }, 500);
                fullscreenIcon.style.display = 'block';
            }

            setTimeout(function () {
                loader.style.opacity = 0;
                setTimeout(() => loader.remove(), 500);
                showIframe();
            }, 2000);
        });
    </script>
</body>

</html>
