<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>QuestFriends by VR_Wizard</title>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" rel="stylesheet">
    <style>
        :root {
            --primary: #5c2d91;
            --secondary: #0078d4;
            --background: #f0f2f5;
            --card-bg: #ffffff;
        }

        body {
            font-family: 'Segoe UI', sans-serif;
            background-color: var(--background);
            margin: 0;
            padding: 20px;
            min-height: 100vh;
            background: linear-gradient(135deg, #1a1a2e, #16213e, #1a1a2e);
            color: white;
        }

        .header {
            text-align: center;
            padding: 40px 20px;
            margin-bottom: 20px;
        }

        .header h1 {
            font-size: 3em;
            margin: 0;
            animation: fadeInDown 1s;
        }

        .header p {
            font-size: 1.2em;
            opacity: 0.9;
            animation: fadeIn 1s 0.5s both;
        }

        .search-container {
            max-width: 600px;
            margin: 0 auto 30px;
            padding: 0 20px;
        }

        .search-input {
            width: 100%;
            padding: 15px;
            border: none;
            border-radius: 25px;
            background: rgba(255, 255, 255, 0.1);
            color: white;
            font-size: 1.1em;
            backdrop-filter: blur(10px);
            transition: all 0.3s;
        }

        .search-input:focus {
            outline: none;
            background: rgba(255, 255, 255, 0.2);
            box-shadow: 0 0 15px rgba(92, 45, 145, 0.5);
        }

        .featured-games {
            max-width: 1200px;
            margin: 0 auto 40px;
            padding: 20px;
        }

        .featured-title {
            font-size: 1.8em;
            margin-bottom: 20px;
            color: #fff;
            text-align: center;
        }

        .featured-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            margin-bottom: 40px;
        }

        .games-container {
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
            padding: 20px;
        }

        .game {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            border-radius: 15px;
            overflow: hidden;
            transition: transform 0.3s, box-shadow 0.3s;
            animation: fadeIn 0.5s;
            position: relative;
        }

        .game.featured {
            background: rgba(92, 45, 145, 0.2);
            border: 2px solid var(--primary);
        }

        .game:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
        }

        .game img {
            width: 100%;
            height: 200px;
            object-fit: cover;
            border-bottom: 2px solid rgba(255, 255, 255, 0.1);
        }

        .game-info {
            padding: 20px;
        }

        .game-title {
            font-size: 1.5em;
            margin: 0 0 10px 0;
            color: white;
        }

        .referral-btn {
            display: inline-block;
            padding: 10px 20px;
            background: linear-gradient(45deg, var(--primary), var(--secondary));
            color: white;
            text-decoration: none;
            border-radius: 25px;
            transition: transform 0.2s, box-shadow 0.2s;
            margin-top: 10px;
        }

        .referral-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        }

        .click-counter {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(0, 0, 0, 0.5);
            padding: 5px 10px;
            border-radius: 15px;
            font-size: 0.9em;
        }

        .admin-panel {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: rgba(0, 0, 0, 0.8);
            padding: 20px;
            border-radius: 10px;
            display: none;
        }

        .admin-panel.visible {
            display: block;
        }

        .admin-btn {
            background: var(--primary);
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 5px;
            cursor: pointer;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .no-results {
            text-align: center;
            grid-column: 1 / -1;
            padding: 40px;
            font-size: 1.2em;
            color: rgba(255, 255, 255, 0.7);
        }
    </style>
</head>
<body>
    <div class="header">
        <h1>QuestFriends</h1>
        <p>Get 15% off on Meta Quest Games with our referral codes!</p>
    </div>

    <div class="search-container">
        <input type="text" class="search-input" placeholder="Search for games..." id="searchInput">
    </div>

    <div class="featured-games">
        <h2 class="featured-title">Featured Games</h2>
        <div class="featured-container" id="featuredContainer">
            <!-- Featured games will be dynamically added here -->
        </div>
    </div>

    <div class="games-container" id="gamesContainer">
        <!-- Games will be dynamically added here -->
    </div>

    <div class="admin-panel" id="adminPanel">
        <button class="admin-btn" onclick="resetCounters()">Reset All Counters</button>
    </div>

    <script>
    // Game data array with all games
    const games = [
        {
            title: "Five Nights At Freddy's 2",
            image: "images/Five_Nights_At_Freddy's_2.png",
            link: "https://www.oculus.com/appreferrals/VR_Wizards/7156077941079207/?utm_source=oculus&utm_location=3&utm_parent=frl&utm_medium=app_referral"
        },
        {
            title: "Pavlov",
            image: "images/Pavlov.png",
            link: "https://www.oculus.com/appreferrals/christoph.geske.3/2443267419018232/?utm_source=oculus&utm_location=2&utm_parent=frl&utm_medium=app_referral"
        },
        {
            title: "Assassin's Creed Nexus",
            image: "images/Assassin's_Creed_Nexus.png",
            link: "https://www.oculus.com/appreferrals/christoph.geske.3/5812519008825194/?utm_source=oculus&utm_location=3&utm_parent=frl&utm_medium=app_referral"
        },
        {
            title: "The Walking Dead: Saints & Sinners",
            image: "images/The_Walking_Dead_Saints_&_Sinners.png",
            link: "https://tinyurl.com/574x6w2x"
        },
        {
            title: "I Expect You to Die 2",
            image: "images/I_Expect_You_to_Die_2.png",
            link: "https://www.oculus.com/appreferrals/christoph.geske.3/2970998659623177/?utm_source=oculus&utm_location=2&utm_parent=frl&utm_medium=app_referral"
        },
        {
            title: "Moss: Book II",
            image: "images/Moss_Book_II.png",
            link: "https://tinyurl.com/4whak5t3"
        },
        {
            title: "Resident Evil 4",
            image: "images/Resident_Evil_4.png",
            link: "https://www.oculus.com/appreferrals/VR_Wizards/2637179839719680/?utm_source=oculus&utm_location=2&utm_parent=frl&utm_medium=app_referral"
        },
        {
            title: "Breachers",
            image: "images/Breachers.png",
            link: "https://tinyurl.com/2ndk7c3r"
        },
        {
            title: "Pistol Whip",
            image: "images/Pistol_Whip.png",
            link: "https://tinyurl.com/3cv9f7yy"
        },
        {
            title: "Red Matter 2",
            image: "images/Red_Matter_2.png",
            link: "https://tinyurl.com/2857wdyu"
        },
        {
            title: "Maskmaker",
            image: "images/Maskmaker.png",
            link: "https://www.oculus.com/appreferrals/christoph.geske.3/5028049290647430/?utm_source=oculus&utm_location=2&utm_parent=frl&utm_medium=app_referral"
        },
        {
            title: "Blade & Sorcery Nomad",
            image: "images/Blade_and_Sorcery_Nomad.png",
            link: "https://www.oculus.com/appreferrals/christoph.geske.3/2031826350263349/?utm_source=oculus&utm_location=2&utm_parent=frl&utm_medium=app_referral"
        },
        {
            title: "Beat Saber",
            image: "images/Beat_Saber.png",
            link: "https://tinyurl.com/4xjcerpc"
        },
        {
            title: "Warplanes: Battles over Pacific",
            image: "images/Warplanes_Battles_over_Pacific.png",
            link: "https://tinyurl.com/28d3wdk8"
        },
        {
            title: "Another Fisherman's Tale",
            image: "images/Another_Fisherman's_Tale.png",
            link: "https://www.oculus.com/appreferrals/VR_Wizards/4543286815791830/?utm_source=oculus&utm_location=2&utm_parent=frl&utm_medium=app_referral"
        },
        {
            title: "In Death Unchained",
            image: "images/In_Death_Unchained.png",
            link: "https://www.oculus.com/appreferrals/christoph.geske.3/2334376869949242/?utm_source=oculus&utm_location=2&utm_parent=frl&utm_medium=app_referral"
        },
        {
            title: "Demeo",
            image: "images/Demeo.png",
            link: "https://www.oculus.com/appreferrals/christoph.geske.3/3634830803298285/?utm_source=oculus&utm_location=3&utm_parent=frl&utm_medium=app_referral"
        },
        {
            title: "Ragna Rock",
            image: "images/Ragna_Rock.png",
            link: "https://www.oculus.com/appreferrals/VR_Wizards/3749621795127676/?utm_source=oculus&utm_location=2&utm_parent=frl&utm_medium=app_referral"
        },
        {
            title: "Until You Fall",
            image: "images/Until_You_Fall.png",
            link: "https://tinyurl.com/y5fb6cvu"
        },
        {
            title: "Townsmen VR",
            image: "images/Townsmen_VR.png",
            link: "https://www.oculus.com/appreferrals/VR_Wizards/5155208571260698/?utm_source=oculus&utm_location=2&utm_parent=frl&utm_medium=app_referral"
        },
        {
            title: "Jurassic World Aftermath",
            image: "images/Jurassic_World_Aftermath.png",
            link: "https://www.oculus.com/appreferrals/christoph.geske.3/2708465082504733/?utm_source=oculus&utm_location=2&utm_parent=frl&utm_medium=app_referral"
        },
        {
            title: "Star Wars: Tales from the Galaxy's Edge",
            image: "images/Star_Wars_Tales_from_the_Galaxys_Edge.png",
            link: "https://tinyurl.com/mrdbhdh2"
        },
        {
            title: "GORN",
            image: "images/GORN.png",
            link: "https://tinyurl.com/a8zyfhf4"
        },
        {
            title: "Virtual Desktop",
            image: "images/Virtual_Desktop.png",
            link: "https://tinyurl.com/bdee63sd"
        },
        {
            title: "Towers & Powers",
            image: "images/Towers_and_Powers.png",
            link: "https://www.meta.com/appreferrals/VR_Wizards/3535742746525560/?utm_source=oculus&utm_location=2&utm_parent=frl&utm_medium=app_referral/&utm_content=copy"
        },
        {
            title: "Waltz of the Wizard",
            image: "images/Waltz_of_the_Wizard.png",
            link: "https://www.oculus.com/appreferrals/christoph.geske.3/2280285932034855/?utm_source=oculus&utm_location=2&utm_parent=frl&utm_medium=app_referral"
        },
        {
            title: "Medal of Honor: Above and Beyond",
            image: "images/Medal_of_Honor_Above_and_Beyond.png",
            link: "https://www.oculus.com/appreferrals/christoph.geske.3/3647259232032222/?utm_source=oculus&utm_location=2&utm_parent=frl&utm_medium=app_referral"
        },
        {
            title: "Ghost Giant",
            image: "images/Ghost_Giant.png",
            link: "https://tinyurl.com/9z69myem"
        },
        {
            title: "I Expect You to Die",
            image: "images/I_Expect_You_to_Die.png",
            link: "https://www.oculus.com/appreferrals/christoph.geske.3/1987283631365460/?utm_source=oculus&utm_location=2&utm_parent=frl&utm_medium=app_referral"
        },
        {
            title: "Blacktop Hoops",
            image: "images/Blacktop_Hoops.png",
            link: "https://www.oculus.com/appreferrals/VR_Wizards/4416817901687071/?utm_source=oculus&utm_location=2&utm_parent=frl&utm_medium=app_referral"
        },
        {
            title: "Brink Traveler",
            image: "images/Brink_Traveler.png",
            link: "https://www.oculus.com/appreferrals/VR_Wizards/3635172946605196/?utm_source=oculus&utm_location=2&utm_parent=frl&utm_medium=app_referral"
        },
        {
            title: "Contractors",
            image: "images/Contractors.png",
            link: "https://www.oculus.com/appreferrals/christoph.geske.3/2436897736439055/?utm_source=oculus&utm_location=2&utm_parent=frl&utm_medium=app_referral"
        }
    ];

    // Sort games alphabetically
    games.sort((a, b) => a.title.localeCompare(b.title));

    function createGameElement(game, counter) {
        return `
            <div class="game ${game.featured ? 'featured' : ''}">
                <span class="click-counter">Clicks: <span id="counter${counter}">0</span></span>
                <img src="${game.image}" alt="${game.title}">
                <div class="game-info">
                    <h2 class="game-title">${game.title}</h2>
                    <a href="${game.link}" class="referral-btn" data-counter="counter${counter}">Get 15% Off</a>
                </div>
            </div>
        `;
    }

    function renderGames(filteredGames = games) {
        const featuredContainer = document.getElementById('featuredContainer');
        const gamesContainer = document.getElementById('gamesContainer');

        // Clear containers
        featuredContainer.innerHTML = '';
        gamesContainer.innerHTML = '';

        if (filteredGames.length === 0) {
            gamesContainer.innerHTML = '<div class="no-results">No games found matching your search</div>';
            return;
        }

        let counter = 1;

        // Render featured games
        filteredGames
            .filter(game => game.featured)
            .forEach(game => {
                featuredContainer.innerHTML += createGameElement(game, counter++);
            });

        // Render all games
        filteredGames
            .filter(game => !game.featured)
            .forEach(game => {
                gamesContainer.innerHTML += createGameElement(game, counter++);
            });
    }

    // Search functionality
    document.getElementById('searchInput').addEventListener('input', (e) => {
        const searchTerm = e.target.value.toLowerCase();
        const filteredGames = games.filter(game =>
            game.title.toLowerCase().includes(searchTerm)
        );
        renderGames(filteredGames);
        initializeCounters();
    });

    function initializeCounters() {
        document.querySelectorAll('[id^="counter"]').forEach(counter => {
            counter.textContent = localStorage.getItem(counter.id) || 0;
        });
    }

    document.addEventListener('click', (e) => {
        if (e.target.classList.contains('referral-btn')) {
            const counterId = e.target.dataset.counter;
            const counterEl = document.getElementById(counterId);
            const newCount = parseInt(counterEl.textContent) + 1;
            counterEl.textContent = newCount;
            localStorage.setItem(counterId, newCount);
        }
    });

    let isAdmin = false;
    document.addEventListener('keydown', (e) => {
        if (e.ctrlKey && e.key === 'a') {
            e.preventDefault();
            isAdmin = !isAdmin;
            document.getElementById('adminPanel').classList.toggle('visible');
        }
    });

    function resetCounters() {
        if (!isAdmin) return;
        document.querySelectorAll('[id^="counter"]').forEach(counter => {
            counter.textContent = 0;
            localStorage.setItem(counter.id, 0);
        });
    }

    // Initial render
    renderGames();
    initializeCounters();
    </script>
</body>
</html>

The images are not loaded correctly in the code please fix