<!doctype html>
<html lang="en">
  <head>
    <!-- Google Tag Manager -->
    <script>
      // Only load GTM in production and not on embed routes
      if (window.location.hostname == "chessmind.ai" && !window.location.pathname.startsWith('/embed/')) {
        (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
        new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
        j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
        'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
        })(window,document,'script','dataLayer','GTM-TS8C2C58');
      } else {
        // Mock dataLayer for localhost and embed mode
        window.dataLayer = window.dataLayer || [];
        window.gtag = function() { console.log('[GTM MOCK]', arguments); };
      }
    </script>
    <!-- End Google Tag Manager -->
    
    <!-- Facebook Pixel Code - DISABLED -->
    <script>
      // Facebook Pixel DISABLED
      // Mock fbq to prevent errors
      // window.fbq = function() { console.log('[DISABLED]', arguments); };
    </script>

    <!-- Reddit Pixel - DISABLED -->
    <script>
      // Reddit Pixel DISABLED
      // Mock rdt to prevent errors
      // window.rdt = function() { console.log('[DISABLED]', arguments); };
    </script>
    <!-- End Reddit Pixel -->
    
    <meta charset="UTF-8" />
    <meta name="keywords" content="chess training, chess puzzles, chess openings, chess tactics, chess practice, chess learning, chess improvement, chess trainer, opening repertoire, chess education, chess lessons, chess analysis, interactive chess, chess skills, chess strategy">
    <meta name="author" content="ChessMind AI">
    <meta name="description" content="🎯 Master chess with AI-powered training. Practice puzzles, learn openings, and improve your game with personalized chess lessons and analysis.">
    <meta name="theme-color" content="#1a1a1a">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    
    <!-- Favicon and Icons -->
    <link rel="icon" type="image/png" href="/assets/mascot-eyes-screenshot-4ca978e5.png" sizes="96x96" />
    <link rel="icon" type="image/svg+xml" href="/assets/images/apple-touch-icon-precomposed/favicon.svg">
    <link rel="shortcut icon" href="/assets/images/icons/favicon.ico">
    
    <!-- Light mode favicon -->
    <link rel="icon" href="/assets/images/icons/favicon.ico" type="image/x-icon" media="(prefers-color-scheme: light)">
    
    <!-- Dark mode favicon -->
    <link rel="icon" href="/assets/images/icons/favicon.ico" type="image/x-icon" media="(prefers-color-scheme: dark)">
        
    <!-- Open Graph / Facebook -->
    <meta property="og:type" content="website">
    <meta property="og:title" content="ChessMind AI | AI-Powered Chess Training Platform">
    <meta property="og:description" content="🎯 Master chess with AI-powered training. Practice puzzles, learn openings, and improve your game with personalized chess lessons and analysis.">
    <meta property="og:image" content="https://chessmind.ai/assets/images/mascot/mascot-eyes-screenshot.png">
    <meta property="og:url" content="https://chessmind.ai/">
    <meta property="og:site_name" content="ChessMind AI">
    
    <!-- Twitter Card -->
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:title" content="ChessMind AI | AI-Powered Chess Training Platform">
    <meta name="twitter:description" content="🎯 Master chess with AI-powered training. Practice puzzles, learn openings, and improve your game with personalized chess lessons and analysis.">
    <meta name="twitter:image" content="https://chessmind.ai/assets/images/mascot/mascot-eyes-screenshot.png">
    
    <!-- Canonical URL -->
    <link rel="canonical" href="https://chessmind.ai/">
    
    <!-- Font Optimization -->
    <script>
      // Check if we're on the actual embed route (not just a query param)
      const urlParams = new URLSearchParams(window.location.search);
      const isEmbedRoute = window.location.pathname.startsWith('/embed/');
      const isChessReadsTheme = urlParams.get('theme') === 'chessreads';

      // Always preconnect to Google Fonts
      document.write('<link rel="preconnect" href="https://fonts.googleapis.com">');
      document.write('<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>');

      // Load main site fonts if not on embed route
      if (!isEmbedRoute) {
        document.write('<link rel="preload" as="style" href="https://fonts.googleapis.com/css2?family=Mohave:ital,wght@0,300..700;1,300..700&display=swap">');
        document.write('<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Mohave:ital,wght@0,300..700;1,300..700&display=swap" media="all" onload="this.media=\'all\'">');
        document.write('<link rel="preload" as="style" href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap">');
        document.write('<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" media="all" onload="this.media=\'all\'">');
      }

      // Load Poppins font only for ChessReads theme on embed route
      if (isEmbedRoute && isChessReadsTheme) {
        document.write('<link rel="preload" as="style" href="https://fonts.googleapis.com/css?family=Poppins&display=swap">');
        document.write('<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins&display=swap" media="all" onload="this.media=\'all\'">');
      }
    </script>
    <noscript>
      <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" />
      <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Asap:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" />
    </noscript>
    
    <title>ChessMind AI | AI-Powered Chess Training Platform</title>
    <script type="module" crossorigin src="/assets/index-c5e8d92f.js"></script>
    <link rel="stylesheet" href="/assets/index-e7a075bd.css">
  </head>
  <body>
    <!-- Google Tag Manager -->
    <noscript>
      <script>
        if (window.location.hostname == "chessmind.ai" && !window.location.pathname.startsWith('/embed/')) {
          document.write('<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TS8C2C58" height="0" width="0" style="display:none;visibility:hidden"></iframe>');
        }
      </script>
    </noscript>
    <!-- End Google Tag Manager -->
    
    <!-- Facebook Pixel noscript - DISABLED -->
    <!-- Facebook tracking disabled -->
    
    <div id="app"></div>
    
  </body>
</html>
