<!DOCTYPE html>
<html><head>

    
        <link rel="preload" href="https://cdn.jsdelivr.net">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&amp;display=swap">
        <style>
            ::-webkit-scrollbar {
  width: 12px; /* Width of the scrollbar */
  height: 12px; /* Height for horizontal scrollbar */\
}

::-webkit-scrollbar-track {
  background: #111; /* Dark background for the track */
  border-radius: 10px; /* Rounded corners */
}

::-webkit-scrollbar-thumb {
  background: #333; /* Dark thumb color */
  border-radius: 10px; /* Rounded thumb */ /* Border around the thumb to match track */
}

::-webkit-scrollbar-thumb:hover {
  background: #222; /* Slightly darker thumb color on hover */
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.7); /* Subtle glow effect on hover */
}

::-webkit-scrollbar-corner {
  background: transparent; /* Remove the corner styling */
}
            body {
            font-family: 'Nunito', sans-serif;
            margin: 0;
            padding: 0;
            background-image: url("https://cdn.britannica.com/57/181857-050-972A4F96/Artist-rendering-matter-black-hole.jpg");
            background-repeat: no-repeat;
            background-position: center center;
            background-size: cover;
            background-attachment: fixed;
            }
            .container {
            margin: 0 auto;
            padding: 20px;
            text-align: center;
        }
        .games {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 25px));
            grid-gap: 20px;
            justify-content: center;
        }
        .game {
            background-color: #151515; /* Lighter blue */
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease, background-color 0.3s ease;
            cursor: pointer;
        }
        .game:hover {
            transform: translateY(-5px);
            background-color: #111; /* Darker blue on hover */
        }
        .game img {
            width:150px;
            height:150px;
            border-radius: 8px;
        }
        .game h2 {
            margin-top: 6px;
            font-size: 18px;
            text-align: center;
            margin-bottom: -6px;
            color:white;
        }
        .search-bar {
            margin-bottom: 30px;
            margin-top: 15px;
            border:3px solid black;
            border-radius: 8px;
            width:40%;
            margin-right: 80px;
            height:45px;
            font-size: 28px;
            font-family:'Nunito';
            font-weight: bold;
            background-color: #151515;
            color: white;
        }
        ::placeholder {
            color:white;
        }
            </style>
        </head>
        <body>
            <div id="frame" hidden>
        <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="">
<link href="https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&amp;display=swap" rel="stylesheet">
<link rel="icon" href="https://oyosite.s3.amazonaws.com/userdata/img9/1712089702-5f7e6262792ac2202395dc80.jpeg">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.1/css/all.min.css">
    <style>
        #menuButton {
            float:right;
            width:50px;
            height:50px;
            position:fixed;
            right:0px;
            border:none;
            border-radius:12px;
            background-color:rgba(255,255,255,0.2);
        }
        
        #bttn {
            text-align:center;
            border:none;
            border-radius:10px;
            width:75px;
            height:60px;
            margin:10px;
            background-color:rgba(200,200,200);
            cursor:pointer;
        }
        
        #menu {
            position:absolute;
            top:40%;
            left:36%;
            background-color:rgb(50,50,50);
            border-radius:20px;
        }
        #h1 {
            text-align:center;
            font-family:'Nunito';
            color:white;
            font-size:43px;
            height:40px;
        }
        
        iframe {
            position:absolute;
            height:100%;
            width:100%;
            margin:0;
            border:none;
            z-index:-9999;
        }
    </style>

    <iframe id="iframe">
    </iframe>
    <button id="menuButton" onclick="openMenu();">
    <i class="fa-solid fa-bars fa-3x"></i></button>
    <div id="menu" hidden>
        <h1 id="h1">Menu</h1>
        <button id="bttn" onclick="home();">
             <i class="fa-solid fa-house fa-3x"></i>
        </button>
        <button id="bttn" onclick="document.getElementById('iframe').src = document.getElementById('iframe').src;">
            <i class="fa-solid fa-rotate-right fa-3x"></i>
        </button>
        <button id="bttn" onclick="ab();">
            <i class="fa-regular fa-window-restore fa-3x"></i>
        </button>
        <button id="bttn" onclick="closeMenu();">
            <i class="fa-solid fa-x fa-3x"></i>
        </button>
    </div>

<title>Online Games</title>
<script>
        var mousePosition;
var offset = [0,0];
var div;
var isDown = false;

div = document.getElementById("menu");

div.addEventListener('mousedown', function(e) {
    div.style.cursor = "move";
    isDown = true;
    offset = [
        div.offsetLeft - e.clientX,
        div.offsetTop - e.clientY
    ];
}, true);

document.addEventListener('mouseup', function() {
    isDown = false;
    div.style.cursor = "";
}, true);

document.addEventListener('mousemove', function(event) {
    event.preventDefault();
    if (isDown) {
        mousePosition = {
    
            x : event.clientX,
            y : event.clientY
    
        };
        div.style.left = (mousePosition.x + offset[0]) + 'px';
        div.style.top  = (mousePosition.y + offset[1]) + 'px';
    }
}, true);

// Line BREAK!
    
function openMenu() {
    document.getElementById("menu").hidden = false;
}

function closeMenu() {
    document.getElementById("menu").hidden = true;
}

function ab() {
    var win = window.open();
    win.document.body.style.margin = "0";
    win.document.body.style.height = "100vh";
    var iFrame = win.document.createElement("iframe");
    iFrame.style.height = "100%";
    iFrame.style.width = "100%";
    iFrame.style.margin = "0";
    iFrame.style.border = "none";
    iFrame.src = document.getElementById("iframe").src;
    win.document.body.appendChild(iFrame);
}
</script>
    </div>
            <div id="gc">
<div class="container">
    <input class="search-bar" placeholder="Search for games..." oninput="filterGames();">
    <div class="games" id="gcontainer">
    </div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/gh/Zotronix/Catalyst-Games@main/update/lists.js"></script>
<script>
function createGames() {
    for (let i = 0; i < gameURLS.length; i++) {
        document.getElementById("gcontainer").innerHTML += `<div class="game" onclick="openMath('${gameURLS[i].url}');">
            <img draggable="false">
            <h2>${gameURLS[i].name}</h2>
        </div>`
    }
}
            function filterGames() {
            var input, filter, container, gameCards, i, txtValue;
            input = document.querySelector('.search-bar');
            filter = input.value.toUpperCase();
            container = document.querySelector('.container');
            gameCards = container.getElementsByClassName('game');

            for (i = 0; i < gameCards.length; i++) {
                txtValue = gameCards[i].querySelector('h2').textContent || gameCards[i].querySelector('h2').innerText;
                if (txtValue.toUpperCase().indexOf(filter) > -1) {
                    gameCards[i].style.display = "";
                } else {
                    gameCards[i].style.display = "none";
                }
            }
        }
     function imgLoader() {
            var i, container, gameCards;
                        container = document.querySelector('.container');
            gameCards = container.getElementsByClassName('game');
            for (i = 0; i < gameCards.length; i++) {
                        gameCards[i].querySelector('img').src = "https://cdn.jsdelivr.net/gh/Zotronix/gakaas/" + gameCards[i].querySelector('h2').textContent.replace(" ", "%20") + ".png";
            }
        }
        
        createGames()
        imgLoader();

        var gc = document.getElementById("gc");
        var frame = document.getElementById("frame");
        var iframe = document.getElementById("iframe");
        
  function openMath(url) {
    gc.hidden = true;
    frame.hidden = false;
    iframe.src = url;
}




    
        function home() {
        gc.hidden = false;
        frame.hidden = true;
document.getElementById("menu").hidden = true;
    }
        
        function abz() {
         var win = window.open();
            win.document.write("");
        }

function openAB() {
  var win = window.open(); // Open a new window
  win.document.body.style.margin = "0px"; // Set no margin for the body
  var iframe = win.document.createElement("iframe"); // Create an iframe element
  iframe.style.width = "100%"; // Set iframe width to 100%
  iframe.style.height = "100%"; // Set iframe height to 100%
  iframe.style.border = "none"; // Remove border from iframe
  iframe.src = window.location; // Set iframe source to the URL
  win.document.body.appendChild(iframe); // Append iframe to the new window's body
}


       document.addEventListener('keydown', function(event) {
    if (event.shiftKey && event.altKey && event.ctrlKey && event.key === 'M') {
        openAB();
    }
}); 
</script>

</body></html>