<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/vite.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0" />
    <meta name="description" content="C1 Wealth - Digital Asset Manager for Modern Investors" />
    <meta name="keywords" content="cryptocurrency, withdrawal, C1 Wealth, USDT, Bitcoin, investment" />
    <title>C1 Wealth - Digital Asset manager for Modern Investor</title>
    
    <!-- Netlify ENV -->
    <script>
      window.env = window.env || {};
    </script>

    <!-- Handle initial loading state -->
    <style>
      .initial-loader {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
        width: 100vw;
        position: fixed;
        top: 0;
        left: 0;
        background-color: #f9fafb;
        z-index: 9999;
      }
      
      @media (prefers-color-scheme: dark) {
        .initial-loader {
          background-color: #111827;
        }
      }
      
      .initial-loader__spinner {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        border: 4px solid rgba(74, 155, 155, 0.1);
        border-top-color: #4a9b9b;
        animation: spin 1s linear infinite;
      }
      
      @keyframes spin {
        to { transform: rotate(360deg); }
      }
      
      @media (prefers-color-scheme: dark) {
        .initial-loader__spinner {
          border-color: rgba(255, 255, 255, 0.1);
          border-top-color: #4a9b9b;
        }
      }
    </style>
    
    <!-- 🌗 Theme initialization -->
    <script type="text/javascript">
      (function() {
        try {
          const savedTheme = localStorage.getItem('theme');
          const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
          const theme = savedTheme || (prefersDark ? 'dark' : 'light');
          
          if (document.documentElement) {
            document.documentElement.classList.add(theme);
            document.documentElement.setAttribute('data-theme', theme);
          }
          
        } catch (e) {
          console.error('Theme initialization error:', e);
          // Fallback to light theme
          if (document.documentElement) {
            document.documentElement.classList.add('light');
          }
        }
      })();
    </script>
    <script type="module" crossorigin src="/assets/index-fS-nAhkl.js"></script>
    <link rel="modulepreload" crossorigin href="/assets/vendor-BohT_pYn.js">
    <link rel="modulepreload" crossorigin href="/assets/ui-BpDAgnXH.js">
    <link rel="modulepreload" crossorigin href="/assets/supabase-DaBE6CgA.js">
    <link rel="stylesheet" crossorigin href="/assets/index-CGPw_ahn.css">
  </head>
  <body class="text-base antialiased">
    <!-- Initial loading state -->
    <div class="initial-loader">
      <div class="initial-loader__spinner"></div>
    </div>
    
    <div id="root">
      <!-- App will render here -->
    </div>
        
    
    <!-- Remove loader once app is loaded -->
    <script>
      window.addEventListener('load', function() {
        setTimeout(function() {
          var loader = document.querySelector('.initial-loader');
          if (loader) {
            loader.style.opacity = '0'; 
            loader.style.transition = 'opacity 0.5s ease';
            setTimeout(function() {
              if (loader && loader.parentNode) {
                loader.parentNode.removeChild(loader);
              }
            }, 300);
          }
        }, 800); // Allow more time for the app to initialize
      });
    </script>
  </body>
</html>