<!DOCTYPE html>
<html lang="en" itemscope itemtype="https://schema.org/WebSite">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Best Free Online Mini Games Hub - Play Fun Games Online | MiniGamesHub.co</title>
    <meta name="description" content="Play thousands of free online mini games including action, puzzle, racing, sports, and arcade games. The ultimate gaming destination for fun browser games - no downloads required!">
    <meta name="keywords" content="free online games, mini games, browser games, HTML5 games, puzzle games, action games, racing games, sports games">
    <meta name="author" content="MiniGamesHub.co">
    <meta name="robots" content="index, follow">
    
    <!-- Open Graph / Facebook -->
    <meta property="og:type" content="website">
    <meta property="og:url" content="https://minigameshub.co/">
    <meta property="og:title" content="Best Free Online Mini Games Hub - Play Fun Games Online">
    <meta property="og:description" content="Play thousands of free online mini games including action, puzzle, racing, sports, and arcade games. The ultimate gaming destination for fun browser games - no downloads required!">
    <meta property="og:image" content="https://minigameshub.co/assets/images/og-image.jpg">
    
    <!-- Twitter -->
    <meta property="twitter:card" content="summary_large_image">
    <meta property="twitter:url" content="https://minigameshub.co/">
    <meta property="twitter:title" content="Best Free Online Mini Games Hub - Play Fun Games Online">
    <meta property="twitter:description" content="Play thousands of free online mini games including action, puzzle, racing, sports, and arcade games. The ultimate gaming destination for fun browser games - no downloads required!">
    <meta property="twitter:image" content="https://minigameshub.co/assets/images/twitter-card.jpg">
    
    <!-- Canonical URL -->
    <link rel="canonical" href="https://minigameshub.co/">

    <!-- Favicon -->
    <link rel="icon" type="image/svg+xml" href="/assets/images/favicon.svg">
    
    <!-- PWA Manifest -->
    <link rel="manifest" href="/manifest.json">
    <meta name="theme-color" content="#007AFF">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="default">
    <meta name="apple-mobile-web-app-title" content="MiniGamesHub">

    <!-- Permissions Policy for Games -->
    <meta http-equiv="Permissions-Policy" content="accelerometer=*, gyroscope=*, fullscreen=*, gamepad=*, microphone=*, camera=*, autoplay=*, encrypted-media=*, picture-in-picture=*, web-share=*">

    <!-- Stylesheets -->
    <link rel="stylesheet" href="assets/css/main.css?v=202510141417">
    <!-- Performance hints for external CDNs used by images/games -->
    <link rel="dns-prefetch" href="//img.gamemonetize.com">
    <link rel="preconnect" href="https://img.gamemonetize.com" crossorigin>
    <link rel="dns-prefetch" href="//html5.gamemonetize.com">
    <link rel="preconnect" href="https://html5.gamemonetize.com" crossorigin>
    <!-- Removed Google Fonts (SF Pro not hosted) to prevent 400 errors; rely on system fonts -->
    
    <!-- Google-certified CMP loader (Funding Choices) -->
    <script src="/assets/js/cmpLoader.js?v=202510141417"></script>
    <!-- CMP (fallback consent manager) -->
    <script src="/assets/js/cmp.js?v=202510141417"></script>
    <!-- Google AdSense -->
    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8059207534738960" crossorigin="anonymous"></script>

    <!-- Structured Data -->
    <script type="application/ld+json">
    {
        "@context": "https://schema.org",
        "@type": "WebSite",
        "name": "MiniGamesHub.co",
        "description": "The ultimate destination for free online mini games",
        "url": "https://minigameshub.co",
        "potentialAction": {
            "@type": "SearchAction",
            "target": "https://minigameshub.co/search?q={search_term_string}",
            "query-input": "required name=search_term_string"
        },
        "publisher": {
            "@type": "Organization",
            "name": "MiniGamesHub.co",
            "url": "https://minigameshub.co"
        }
    }
    </script>
    
    <!-- Game Organization Schema -->
    <script type="application/ld+json" id="games-schema">
    {
        "@context": "https://schema.org",
        "@type": "ItemList",
        "name": "Free Online Mini Games",
        "description": "Collection of free online mini games",
        "numberOfItems": 2,
        "itemListElement": []
    }
    </script>
</head>
<body>
    <!-- Loading Screen -->
    <div id="loading-screen" class="loading-screen">
        <div class="loading-spinner"></div>
        <p>Loading amazing games...</p>
    </div>

    <!-- Header -->
    <header class="header">
        <nav class="nav container">
            <div class="nav-brand">
                <a href="/" class="logo">
                    <svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <rect width="40" height="40" rx="12" fill="url(#gradient)"/>
                        <path d="M12 20L18 26L28 16" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
                        <defs>
                            <linearGradient id="gradient" x1="0" y1="0" x2="40" y2="40">
                                <stop offset="0%" stop-color="#007AFF"/>
                                <stop offset="100%" stop-color="#5856D6"/>
                            </linearGradient>
                        </defs>
                    </svg>
                    <span class="logo-text">MiniGamesHub</span>
                </a>
            </div>
            
            <div class="nav-menu" id="nav-menu">
                <ul class="nav-list">
                    <li class="nav-item">
                        <a href="/" class="nav-link active">Home</a>
                    </li>
                    <li class="nav-item dropdown">
                        <a href="#" class="nav-link dropdown-toggle">Categories</a>
                        <ul class="dropdown-menu" id="categories-dropdown">
                            <!-- Categories will be populated by JavaScript -->
                        </ul>
                    </li>
                    <li class="nav-item">
                        <a href="/collections/featured" class="nav-link" data-local-href="/collection.html?collection=featured">Featured</a>
                    </li>
                    <li class="nav-item">
                        <a href="/collections/new" class="nav-link" data-local-href="/collection.html?collection=new">New Games</a>
                    </li>
                    <li class="nav-item">
                        <a href="/collections/popular" class="nav-link" data-local-href="/collection.html?collection=popular">Popular</a>
                    </li>
                </ul>
            </div>
            
            <div class="nav-actions">
                <button class="search-toggle" id="search-toggle" aria-label="Toggle search">
                    <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor">
                        <circle cx="11" cy="11" r="8"></circle>
                        <path d="M21 21L16.65 16.65"></path>
                    </svg>
                </button>
                
                <button class="favorites-toggle" id="favorites-toggle" aria-label="View favorites">
                    <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor">
                        <path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path>
                    </svg>
                    <span class="favorites-count" id="favorites-count">0</span>
                </button>
                
                <button class="nav-toggle" id="nav-toggle" aria-label="Toggle navigation">
                    <span class="hamburger"></span>
                    <span class="hamburger"></span>
                    <span class="hamburger"></span>
                </button>
            </div>
        </nav>
        
        <!-- Search Bar -->
        <div class="search-container" id="search-container">
            <div class="search-box container">
                <input type="text" id="search-input" placeholder="Search for games..." autocomplete="off">
                <button class="search-btn" id="search-btn">
                    <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor">
                        <circle cx="11" cy="11" r="8"></circle>
                        <path d="M21 21L16.65 16.65"></path>
                    </svg>
                </button>
                <div class="search-suggestions" id="search-suggestions"></div>
            </div>
        </div>
    </header>

    <!-- Main Content -->
    <main class="main">
        <!-- Hero Section -->
        <section class="hero">
            <div class="container">
                <h1 class="hero-title">Best Free Online Mini Games Hub</h1>
                <p class="hero-subtitle">
                    Discover thousands of exciting mini games across all genres. 
                    Play action-packed adventures, brain-teasing puzzles, thrilling racing games, 
                    and much more - all free and playable directly in your browser!
                </p>
                <div class="hero-stats">
                    <div class="stat">
                        <span class="stat-number" id="total-games">0</span>
                        <span class="stat-label">Games</span>
                    </div>
                    <div class="stat">
                        <span class="stat-number" id="total-categories">8</span>
                        <span class="stat-label">Categories</span>
                    </div>
                    <div class="stat">
                        <span class="stat-number" id="total-plays">0</span>
                        <span class="stat-label">Total Plays</span>
                    </div>
                </div>
            </div>
        </section>

        <!-- Featured Games Section -->
        <section class="featured-section section">
            <div class="container">
                <h2 class="section-title">Featured Games</h2>
                <div class="games-grid" id="featured-games">
                    <!-- Featured games will be populated by JavaScript -->
                </div>
            </div>
        </section>

        <!-- Categories Filter -->
        <section class="categories-section section">
            <div class="container">
                <h2 class="section-title">Browse by Category</h2>
                <div class="categories-filter">
                    <button class="category-btn active" data-category="all">All Games</button>
                    <!-- Category buttons will be populated by JavaScript -->
                </div>
            </div>
        </section>

        <!-- Games Grid -->
        <section class="games-section section">
            <div class="container">
                <div class="section-header">
                    <h2 class="section-title" id="games-section-title">All Games</h2>
                    <div class="section-controls">
                        <select id="sort-select" class="sort-select">
                            <option value="featured">Featured</option>
                            <option value="popular">Most Popular</option>
                            <option value="newest">Newest</option>
                            <option value="rating">Highest Rated</option>
                            <option value="name">A-Z</option>
                        </select>
                        <div class="view-toggle">
                            <button class="view-btn active" data-view="grid">
                                <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
                                    <rect x="3" y="3" width="7" height="7"></rect>
                                    <rect x="14" y="3" width="7" height="7"></rect>
                                    <rect x="14" y="14" width="7" height="7"></rect>
                                    <rect x="3" y="14" width="7" height="7"></rect>
                                </svg>
                            </button>
                            <button class="view-btn" data-view="list">
                                <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor">
                                    <line x1="8" y1="6" x2="21" y2="6"></line>
                                    <line x1="8" y1="12" x2="21" y2="12"></line>
                                    <line x1="8" y1="18" x2="21" y2="18"></line>
                                    <line x1="3" y1="6" x2="3.01" y2="6"></line>
                                    <line x1="3" y1="12" x2="3.01" y2="12"></line>
                                    <line x1="3" y1="18" x2="3.01" y2="18"></line>
                                </svg>
                            </button>
                        </div>
                    </div>
                </div>
                <div class="games-grid" id="games-grid">
                    <!-- Games will be populated by JavaScript -->
                </div>
                <div class="load-more-container">
                    <button class="load-more-btn" id="load-more-btn">Load More Games</button>
                </div>
            </div>
        </section>

        <!-- Popular Categories -->
        <section class="popular-categories section">
            <div class="container">
                <h2 class="section-title">Popular Categories</h2>
                <div class="categories-grid" id="categories-grid">
                    <!-- Categories will be populated by JavaScript -->
                </div>
            </div>
        </section>

        <!-- FAQ Section -->
        <section class="faq-section section">
            <div class="container">
                <h2 class="section-title">Frequently Asked Questions</h2>
                <div class="faq-list">
                    <article class="faq-item">
                        <h3>What types of mini games does MiniGamesHub offer?</h3>
                        <p>We feature Action, Racing, Puzzle, Adventure, Sports and more HTML5 mini games, and keep expanding our library. Each collection highlights top picks so you can quickly find what you like.</p>
                    </article>
                    <article class="faq-item">
                        <h3>Do I need to download or register to play?</h3>
                        <p>No downloads or registration required — just open your browser and play instantly on desktop or mobile.</p>
                    </article>
                    <article class="faq-item">
                        <h3>How can I find the latest or most popular games?</h3>
                        <p>Use the Featured, New, and Popular collections in the top navigation, or sort by date and popularity on category pages.</p>
                    </article>
                </div>
            </div>
        </section>
    </main>

    <!-- Footer -->
    <footer class="footer">
        <div class="container">
            <div class="footer-content">
                <div class="footer-section">
                    <div class="footer-brand">
                        <a href="/" class="footer-logo">
                            <svg width="32" height="32" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
                                <rect width="40" height="40" rx="12" fill="url(#footerGradient)"/>
                                <path d="M12 20L18 26L28 16" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
                                <defs>
                                    <linearGradient id="footerGradient" x1="0" y1="0" x2="40" y2="40">
                                        <stop offset="0%" stop-color="#007AFF"/>
                                        <stop offset="100%" stop-color="#5856D6"/>
                                    </linearGradient>
                                </defs>
                            </svg>
                            <span>MiniGamesHub</span>
                        </a>
                        <p class="footer-description">
                            Your ultimate destination for free online mini games. 
                            Play thousands of games across all genres, right in your browser!
                        </p>
                    </div>
                </div>
                
                <div class="footer-section">
                    <h3 class="footer-title">Game Categories</h3>
                    <ul class="footer-links" id="footer-categories">
                        <!-- Categories will be populated by JavaScript -->
                    </ul>
                </div>
                
                <div class="footer-section">
                    <h3 class="footer-title">Quick Links</h3>
                    <ul class="footer-links">
                        <li><a href="/collections/featured" data-local-href="/collection.html?collection=featured">Featured Games</a></li>
                        <li><a href="/collections/new" data-local-href="/collection.html?collection=new">New Games</a></li>
                        <li><a href="/collections/popular" data-local-href="/collection.html?collection=popular">Popular Games</a></li>
                        <li><a href="/random">Random Game</a></li>
                    </ul>
                </div>
                
                <div class="footer-section">
                    <h3 class="footer-title">About</h3>
                    <ul class="footer-links">
                        <li><a href="/about">About Us</a></li>
                        <li><a href="/privacy-policy">Privacy Policy</a></li>
                        <li><a href="/terms-of-service">Terms of Service</a></li>
                        <li><a href="/contact">Contact Us</a></li>
                        <li><a href="/sitemap.xml">Sitemap</a></li>
                    </ul>
                </div>
            </div>
            
            <div class="footer-bottom">
                <p>&copy; 2025 MiniGamesHub.co. All rights reserved.</p>
                <div class="footer-social">
                    <a href="#" class="social-link" aria-label="Follow us on Twitter">
                        <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
                            <path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path>
                        </svg>
                    </a>
                    <a href="#" class="social-link" aria-label="Follow us on Facebook">
                        <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor">
                            <path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path>
                        </svg>
                    </a>
                </div>
            </div>
        </div>
    </footer>

    <!-- Game Modal -->
    <div id="game-modal" class="modal">
        <div class="modal-content">
            <div class="modal-header">
                <h2 id="modal-game-title">Game Title</h2>
                <div class="modal-actions">
                    <button class="modal-favorite" id="modal-favorite" aria-label="Add to favorites">
                        <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor">
                            <path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path>
                        </svg>
                    </button>
                    <button class="modal-fullscreen" id="modal-fullscreen" aria-label="Toggle fullscreen">
                        <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor">
                            <path d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"></path>
                        </svg>
                    </button>
                    <button class="modal-close" id="modal-close" aria-label="Close game">
                        <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor">
                            <line x1="18" y1="6" x2="6" y2="18"></line>
                            <line x1="6" y1="6" x2="18" y2="18"></line>
                        </svg>
                    </button>
                </div>
            </div>
            <div class="modal-body">
                <div class="game-container">
                    <iframe id="game-iframe" src="" frameborder="0"
                            allow="accelerometer *; gyroscope *; fullscreen *; gamepad *; microphone *; camera *; autoplay *; encrypted-media *; xr-spatial-tracking *; picture-in-picture *; web-share *"
                            sandbox="allow-same-origin allow-scripts allow-popups allow-forms allow-pointer-lock allow-orientation-lock allow-modals"></iframe>
                </div>
                <div class="game-info">
                    <div class="game-meta">
                        <div class="game-rating">
                            <div class="stars" id="modal-rating"></div>
                            <span class="plays" id="modal-plays">0 plays</span>
                        </div>
                        <div class="game-controls">
                            <button class="control-btn" id="play-btn">Play</button>
                            <button class="control-btn" id="pause-btn" style="display: none;">Pause</button>
                        </div>
                    </div>
                    <div class="game-description">
                        <p id="modal-description">Game description will appear here.</p>
                    </div>
                    <div class="game-instructions">
                        <h4>How to Play:</h4>
                        <p id="modal-instructions">Game instructions will appear here.</p>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Scripts -->
    <!-- Supabase JavaScript SDK -->
    <script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
    
    <!-- Configuration -->
    <script src="config.js?v=202510141417"></script>
    
    <!-- Application Scripts -->
    <script src="assets/js/localFallback.js?v=202510141417"></script>
    <script src="assets/js/gameData.js?v=202510141417"></script>
    <script src="assets/js/gameManager.js?v=202510141417"></script>
    <script src="assets/js/main.js?v=202510141417"></script>
    <script src="assets/js/navRouter.js?v=202510141417"></script>
    <script src="assets/js/swRegister.js?v=202510141417"></script>
    
    <!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-7CTFS1X9ZS"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-7CTFS1X9ZS');
</script>
    <script type="application/ld+json">
    {
        "@context": "https://schema.org",
        "@type": "FAQPage",
        "mainEntity": [
            {
                "@type": "Question",
                "name": "What types of mini games does MiniGamesHub offer?",
                "acceptedAnswer": {
                    "@type": "Answer",
                    "text": "We feature Action, Racing, Puzzle, Adventure, Sports and more HTML5 mini games, and keep expanding our library. Each collection highlights top picks so you can quickly find what you like."
                }
            },
            {
                "@type": "Question",
                "name": "Do I need to download or register to play?",
                "acceptedAnswer": {
                    "@type": "Answer",
                    "text": "No downloads or registration required — just open your browser and play instantly on desktop or mobile."
                }
            },
            {
                "@type": "Question",
                "name": "How can I find the latest or most popular games?",
                "acceptedAnswer": {
                    "@type": "Answer",
                    "text": "Use the Featured, New, and Popular collections in the top navigation, or sort by date and popularity on category pages."
                }
            }
        ]
    }
    </script>
</body>
</html>
