<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>MegaSimple | Bitcoin Investing & Digital Business</title>
  <meta name="description" content="MegaSimple — Bitcoin investing, online business, real estate, and domain reselling made simple." />

  <!-- Tailwind CSS -->
  <script src="https://cdn.tailwindcss.com"></script>
  <script>
    tailwind.config = {
      theme: {
        extend: {
          colors: {
            btc: '#F7931A',
            btcdark: '#c97a12',
            dark: '#0a0a0f',
            card: '#13131f',
            border: '#1e1e30',
          },
          fontFamily: {
            sans: ['Inter', 'system-ui', 'sans-serif'],
          }
        }
      }
    }
  </script>

  <!-- Google Fonts -->
  <link rel="preconnect" href="https://fonts.googleapis.com" />
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap" rel="stylesheet" />

  <!-- React + ReactDOM -->
  <script src="https://unpkg.com/react@18/umd/react.development.js" crossorigin></script>
  <script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js" crossorigin></script>

  <!-- Babel (JSX transform) -->
  <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>

  <!-- Chart.js -->
  <script src="https://cdn.jsdelivr.net/npm/chart.js@4/dist/chart.umd.min.js"></script>

  <style>
    body { background-color: #0a0a0f; color: #f0f0f0; }
    .gradient-text {
      background: linear-gradient(135deg, #F7931A 0%, #FFD700 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }
    .hero-glow {
      background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(247,147,26,0.15) 0%, transparent 70%);
    }
    .card-hover {
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .card-hover:hover {
      transform: translateY(-4px);
      box-shadow: 0 8px 30px rgba(247,147,26,0.15);
    }
    .nav-blur {
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
    }
    canvas { max-height: 320px; }
  </style>
</head>
<body>
  <div id="root"></div>

  <script type="text/babel">
    const { useState, useEffect, useRef } = React;

    /* ─── Confirmation Banner ───────────────────────────────────────── */
    function ConfirmationBanner() {
      const confirmed = new URLSearchParams(window.location.search).get('confirmed') === '1';
      const [visible, setVisible] = useState(confirmed);
      if (!visible) return null;
      return (
        <div className="fixed top-0 left-0 right-0 z-[100] bg-btc text-black font-bold py-4 px-6 text-sm md:text-base shadow-lg flex items-center justify-between gap-4">
          <div className="flex-1 text-center">
            🎉 You're confirmed! We'll send you your free copy when <em className="not-italic font-black">High-Stakes AI: Crypto Investing</em> goes live on Amazon.
          </div>
          <button onClick={() => setVisible(false)} className="text-black/60 hover:text-black text-xl font-black shrink-0 leading-none">✕</button>
        </div>
      );
    }

    /* ─── Nav ─────────────────────────────────────────────────────── */
    function Nav() {
      const [scrolled, setScrolled] = useState(false);
      const [open, setOpen] = useState(false);
      useEffect(() => {
        const handler = () => setScrolled(window.scrollY > 20);
        window.addEventListener('scroll', handler);
        return () => window.removeEventListener('scroll', handler);
      }, []);

      const links = [
        { href: '#book', label: 'Book' },
        { href: '#invest', label: 'Bitcoin' },
        { href: '#services', label: 'Services' },
        { href: '#domains', label: 'Domains' },
        { href: '/store.html', label: 'Store' },
        { href: '#about', label: 'About' },
      ];

      return (
        <nav className={`fixed top-0 w-full z-50 nav-blur transition-all duration-300 ${scrolled ? 'bg-dark/90 border-b border-border' : ''}`}>
          <div className="max-w-6xl mx-auto px-6 py-4 flex items-center justify-between">
            <div className="flex items-center gap-2">
              <span className="text-btc text-3xl font-black tracking-tight">Mega</span>
              <span className="text-white text-3xl font-black tracking-tight">Simple</span>
              <span className="text-btc text-xs font-semibold bg-btc/10 border border-btc/30 px-2 py-0.5 rounded-full ml-1">₿</span>
            </div>
            <div className="hidden md:flex items-center gap-8 text-sm font-medium text-gray-400">
              {links.map(l => (
                <a key={l.href} href={l.href} className="hover:text-btc transition-colors">{l.label}</a>
              ))}
              <a href="#contact" className="bg-btc hover:bg-btcdark text-black font-bold px-5 py-2 rounded-lg transition-colors">
                Get Your Free Copy Here
              </a>
            </div>
            <button className="md:hidden text-gray-400 hover:text-white transition-colors" onClick={() => setOpen(!open)}>
              {open ? (
                <svg width="24" height="24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
              ) : (
                <svg width="24" height="24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round"><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="18" x2="21" y2="18"/></svg>
              )}
            </button>
          </div>
          {open && (
            <div className="md:hidden bg-dark/95 border-b border-border px-6 py-4 flex flex-col gap-4">
              {links.map(l => (
                <a key={l.href} href={l.href} onClick={() => setOpen(false)} className="text-gray-400 hover:text-btc transition-colors font-medium">{l.label}</a>
              ))}
              <a href="#contact" onClick={() => setOpen(false)} className="bg-btc text-black font-bold px-5 py-3 rounded-lg text-center transition-colors">
                Get Your Free Copy Here
              </a>
            </div>
          )}
        </nav>
      );
    }

    /* ─── Hero ─────────────────────────────────────────────────────── */
    function Hero({ btcPrice }) {
      return (
        <section className="hero-glow min-h-screen flex flex-col justify-center items-center text-center px-6 pt-24 pb-16">
          <div className="max-w-4xl mx-auto">
            <div className="inline-flex items-center gap-2 bg-btc/10 border border-btc/30 text-btc text-sm font-semibold px-4 py-2 rounded-full mb-8">
              <span className="animate-pulse w-2 h-2 bg-btc rounded-full inline-block"></span>
              New Book — Coming Soon to Amazon
            </div>
            <h1 className="text-5xl md:text-7xl font-black leading-tight mb-6">
              Invest Smarter
              <br />
              <span className="gradient-text">With AI + Bitcoin</span>
            </h1>
            <p className="text-gray-400 text-lg md:text-xl max-w-2xl mx-auto mb-10 leading-relaxed">
              <em className="text-white not-italic font-semibold">High-Stakes AI: Crypto Investing</em> — the definitive guide to using
              artificial intelligence to build real wealth in Bitcoin and crypto markets.
            </p>

            {btcPrice && (
              <div className="inline-flex items-center gap-3 bg-card border border-border px-6 py-3 rounded-2xl mb-10">
                <span className="text-btc text-2xl">₿</span>
                <div className="text-left">
                  <div className="text-xs text-gray-500 font-medium">BTC / USD</div>
                  <div className="text-white font-bold text-xl">${btcPrice.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}</div>
                </div>
                <span className="text-xs text-green-400 font-semibold bg-green-400/10 border border-green-400/20 px-2 py-1 rounded-md">LIVE</span>
              </div>
            )}

            <div className="flex flex-wrap justify-center gap-4">
              <a href="#contact" className="bg-btc hover:bg-btcdark text-black font-bold px-8 py-4 rounded-xl text-lg transition-all hover:scale-105">
                Get Your Free Copy Here
              </a>
              <a href="#book" className="border border-border hover:border-btc/40 text-white font-semibold px-8 py-4 rounded-xl text-lg transition-all hover:bg-btc/5">
                About the Book
              </a>
            </div>
          </div>
        </section>
      );
    }

    /* ─── Book ──────────────────────────────────────────────────────── */
    function Book() {
      return (
        <section id="book" className="py-24 px-6 bg-card/30">
          <div className="max-w-5xl mx-auto">
            <div className="grid md:grid-cols-2 gap-16 items-center">
              <div className="flex justify-center">
                <div className="relative">
                  <div className="w-56 h-72 md:w-64 md:h-80 rounded-xl shadow-2xl flex flex-col items-center justify-center p-8 text-center" style={{background: 'linear-gradient(135deg, #1a1a2e 0%, #0a0a0f 60%)', border: '1px solid rgba(247,147,26,0.4)'}}>
                    <div className="text-btc text-5xl mb-3">₿</div>
                    <div className="text-white font-black text-lg leading-tight mb-1">High-Stakes AI</div>
                    <div className="text-btc font-bold text-sm tracking-wide mb-6">Crypto Investing</div>
                    <div className="w-full h-px bg-btc/20 mb-4"></div>
                    <div className="text-gray-500 text-xs font-medium tracking-widest uppercase">MegaSimple</div>
                  </div>
                  <div className="absolute -inset-6 rounded-2xl -z-10" style={{background: 'radial-gradient(ellipse, rgba(247,147,26,0.15) 0%, transparent 70%)'}}></div>
                </div>
              </div>
              <div>
                <div className="text-btc text-sm font-semibold uppercase tracking-widest mb-3">Coming Soon to Amazon</div>
                <h2 className="text-4xl md:text-5xl font-black text-white mb-6">
                  High-Stakes AI:<br /><span className="gradient-text">Crypto Investing</span>
                </h2>
                <p className="text-gray-400 leading-relaxed mb-6">
                  The definitive guide to using artificial intelligence to navigate cryptocurrency markets.
                  Learn how to leverage cutting-edge AI tools to identify opportunities, manage risk,
                  and build lasting wealth in the digital asset space.
                </p>
                <ul className="space-y-3 mb-8">
                  {[
                    'AI-powered market analysis techniques',
                    'Risk management for volatile crypto markets',
                    'Bitcoin-first investment framework',
                    'Step-by-step guides for every experience level',
                  ].map(function(item) {
                    return (
                      <li key={item} className="flex items-start gap-3 text-gray-300 text-sm">
                        <span className="text-btc font-bold mt-0.5">✓</span>
                        {item}
                      </li>
                    );
                  })}
                </ul>
                <a href="#contact" className="inline-flex items-center gap-2 bg-btc hover:bg-btcdark text-black font-bold px-8 py-4 rounded-xl text-lg transition-all hover:scale-105">
                  Get Your Free Copy Here →
                </a>
              </div>
            </div>
          </div>
        </section>
      );
    }

    /* ─── BTC Chart ─────────────────────────────────────────────────── */
    function BTCChart() {
      const canvasRef = useRef(null);
      const chartRef = useRef(null);
      const [loading, setLoading] = useState(true);
      const [error, setError] = useState(null);
      const [stats, setStats] = useState(null);

      useEffect(() => {
        async function fetchBTC() {
          try {
            const res = await fetch(
              'https://api.coingecko.com/api/v3/coins/bitcoin/market_chart?vs_currency=usd&days=30&interval=daily'
            );
            if (!res.ok) throw new Error('API error');
            const data = await res.json();

            const prices = data.prices.map(([ts, price]) => ({
              date: new Date(ts),
              price,
            }));

            const priceValues = prices.map(p => p.price);
            const min = Math.min(...priceValues);
            const max = Math.max(...priceValues);
            const first = priceValues[0];
            const last = priceValues[priceValues.length - 1];
            const change = ((last - first) / first) * 100;

            setStats({ min, max, change, last });

            const labels = prices.map(p =>
              p.date.toLocaleDateString('en-US', { month: 'short', day: 'numeric' })
            );

            if (chartRef.current) chartRef.current.destroy();

            const ctx = canvasRef.current.getContext('2d');
            const gradient = ctx.createLinearGradient(0, 0, 0, 300);
            gradient.addColorStop(0, 'rgba(247,147,26,0.3)');
            gradient.addColorStop(1, 'rgba(247,147,26,0.0)');

            chartRef.current = new Chart(ctx, {
              type: 'line',
              data: {
                labels,
                datasets: [{
                  label: 'BTC Price (USD)',
                  data: priceValues,
                  borderColor: '#F7931A',
                  backgroundColor: gradient,
                  borderWidth: 2.5,
                  pointRadius: 0,
                  pointHoverRadius: 6,
                  pointHoverBackgroundColor: '#F7931A',
                  pointHoverBorderColor: '#fff',
                  pointHoverBorderWidth: 2,
                  fill: true,
                  tension: 0.4,
                }],
              },
              options: {
                responsive: true,
                maintainAspectRatio: false,
                interaction: { intersect: false, mode: 'index' },
                plugins: {
                  legend: { display: false },
                  tooltip: {
                    backgroundColor: '#13131f',
                    borderColor: '#1e1e30',
                    borderWidth: 1,
                    titleColor: '#9ca3af',
                    bodyColor: '#F7931A',
                    bodyFont: { weight: 'bold', size: 16 },
                    padding: 12,
                    callbacks: {
                      label: ctx => `$${ctx.parsed.y.toLocaleString('en-US', { minimumFractionDigits: 0, maximumFractionDigits: 0 })}`,
                    }
                  },
                },
                scales: {
                  x: {
                    grid: { color: 'rgba(255,255,255,0.04)' },
                    ticks: { color: '#6b7280', font: { size: 11 }, maxTicksLimit: 8 },
                    border: { color: '#1e1e30' },
                  },
                  y: {
                    grid: { color: 'rgba(255,255,255,0.04)' },
                    ticks: {
                      color: '#6b7280',
                      font: { size: 11 },
                      callback: v => '$' + (v >= 1000 ? (v/1000).toFixed(0) + 'k' : v),
                    },
                    border: { color: '#1e1e30' },
                  },
                },
              },
            });
            setLoading(false);
          } catch (e) {
            setError('Could not load BTC price data. Please try again later.');
            setLoading(false);
          }
        }
        fetchBTC();
        return () => { if (chartRef.current) chartRef.current.destroy(); };
      }, []);

      return (
        <section id="invest" className="py-24 px-6">
          <div className="max-w-5xl mx-auto">
            <div className="text-center mb-12">
              <div className="text-btc text-sm font-semibold uppercase tracking-widest mb-3">Live Market Data</div>
              <h2 className="text-4xl md:text-5xl font-black text-white mb-4">Bitcoin Price</h2>
              <p className="text-gray-400 text-lg">30-day BTC/USD performance</p>
            </div>

            {stats && (
              <div className="grid grid-cols-2 md:grid-cols-4 gap-4 mb-8">
                {[
                  { label: 'Current Price', value: `$${stats.last.toLocaleString('en-US', {maximumFractionDigits: 0})}` },
                  { label: '30D High', value: `$${stats.max.toLocaleString('en-US', {maximumFractionDigits: 0})}` },
                  { label: '30D Low', value: `$${stats.min.toLocaleString('en-US', {maximumFractionDigits: 0})}` },
                  {
                    label: '30D Change',
                    value: `${stats.change >= 0 ? '+' : ''}${stats.change.toFixed(2)}%`,
                    positive: stats.change >= 0,
                  },
                ].map(({ label, value, positive }) => (
                  <div key={label} className="bg-card border border-border rounded-2xl p-5">
                    <div className="text-xs text-gray-500 font-medium mb-1">{label}</div>
                    <div className={`text-xl font-bold ${positive === true ? 'text-green-400' : positive === false ? 'text-red-400' : 'text-btc'}`}>
                      {value}
                    </div>
                  </div>
                ))}
              </div>
            )}

            <div className="bg-card border border-border rounded-2xl p-6" style={{height: '360px', position: 'relative'}}>
              {loading && (
                <div className="absolute inset-0 flex items-center justify-center">
                  <div className="text-center">
                    <div className="w-8 h-8 border-2 border-btc border-t-transparent rounded-full animate-spin mx-auto mb-3"></div>
                    <div className="text-gray-500 text-sm">Loading BTC data...</div>
                  </div>
                </div>
              )}
              {error && (
                <div className="absolute inset-0 flex items-center justify-center">
                  <div className="text-red-400 text-sm">{error}</div>
                </div>
              )}
              <canvas ref={canvasRef} style={{display: loading || error ? 'none' : 'block'}}></canvas>
            </div>
            <p className="text-center text-gray-600 text-xs mt-3">
              Data via CoinGecko · Updates on page load · Not financial advice
            </p>
          </div>
        </section>
      );
    }

    /* ─── Services ─────────────────────────────────────────────────── */
    function Services() {
      const services = [
        {
          icon: '₿',
          title: 'Bitcoin Investing',
          desc: 'Strategic BTC accumulation, DCA plans, and portfolio guidance for long-term wealth building.',
          tags: ['DCA Strategy', 'Cold Storage', 'Portfolio Review'],
        },
        {
          icon: '🌐',
          title: 'Online Business',
          desc: 'We build, acquire, and operate profitable digital businesses across multiple niches.',
          tags: ['E-Commerce', 'SaaS', 'Affiliate'],
        },
        {
          icon: '🏠',
          title: 'Real Estate',
          desc: 'Traditional and digital real estate investments — from physical properties to virtual land.',
          tags: ['Residential', 'Commercial', 'Digital Assets'],
        },
        {
          icon: '🔗',
          title: 'Domain Reselling',
          desc: 'Premium domain acquisition and reselling through MegaSimpleDomains.com.',
          tags: ['Domain Flipping', 'Premium Domains'],
        },
      ];

      return (
        <section id="services" className="py-24 px-6 bg-card/30">
          <div className="max-w-6xl mx-auto">
            <div className="text-center mb-16">
              <div className="text-btc text-sm font-semibold uppercase tracking-widest mb-3">What We Do</div>
              <h2 className="text-4xl md:text-5xl font-black text-white mb-4">Our Services</h2>
              <p className="text-gray-400 text-lg max-w-xl mx-auto">
                Multiple streams of wealth creation, all managed with one simple philosophy.
              </p>
            </div>
            <div className="grid md:grid-cols-2 lg:grid-cols-4 gap-6">
              {services.map(({ icon, title, desc, tags }) => (
                <div key={title} className="card-hover bg-card border border-border rounded-2xl p-6">
                  <div className="text-4xl mb-4">{icon}</div>
                  <h3 className="text-white font-bold text-lg mb-3">{title}</h3>
                  <p className="text-gray-500 text-sm leading-relaxed mb-4">{desc}</p>
                  <div className="flex flex-wrap gap-2">
                    {tags.map(tag => (
                      <span key={tag} className="text-xs text-btc bg-btc/10 border border-btc/20 px-2 py-1 rounded-md font-medium">
                        {tag}
                      </span>
                    ))}
                  </div>
                </div>
              ))}
            </div>
          </div>
        </section>
      );
    }

    /* ─── Domains Section ──────────────────────────────────────────── */
    function Domains() {
      return (
        <section id="domains" className="py-24 px-6">
          <div className="max-w-5xl mx-auto">
            <div className="bg-card border border-border rounded-3xl p-10 md:p-16 text-center relative overflow-hidden">
              <div className="absolute inset-0 bg-gradient-to-br from-btc/5 via-transparent to-transparent pointer-events-none"></div>
              <div className="relative z-10">
                <div className="text-btc text-5xl mb-6">🔗</div>
                <h2 className="text-4xl md:text-5xl font-black text-white mb-4">
                  MegaSimple<span className="text-btc">Domains</span>.com
                </h2>
                <p className="text-gray-400 text-lg max-w-2xl mx-auto mb-8 leading-relaxed">
                  Your one-stop shop for premium domains. We help businesses and investors secure
                  the perfect online address at competitive prices.
                </p>
                <div className="grid md:grid-cols-2 gap-6 mb-10 text-left">
                  {[
                    { icon: '🎯', title: 'Premium Domains', desc: 'Hand-picked, high-value domain names across all TLDs.' },
                    { icon: '💰', title: 'Domain Investment', desc: 'Buy and sell domains as an alternative asset class.' },
                  ].map(({ icon, title, desc }) => (
                    <div key={title} className="bg-dark border border-border rounded-xl p-5">
                      <div className="text-2xl mb-2">{icon}</div>
                      <div className="text-white font-semibold mb-1">{title}</div>
                      <div className="text-gray-500 text-sm">{desc}</div>
                    </div>
                  ))}
                </div>
                <a
                  href="https://megasimpledomains.com"
                  className="inline-flex items-center gap-2 bg-btc hover:bg-btcdark text-black font-bold px-8 py-4 rounded-xl text-lg transition-all hover:scale-105"
                >
                  Browse Domains →
                </a>
              </div>
            </div>
          </div>
        </section>
      );
    }

    /* ─── Stats Bar ─────────────────────────────────────────────────── */
    function Stats() {
      const items = [
        { value: '2017', label: 'Founded' },
        { value: '4', label: 'Revenue Streams' },
        { value: 'AI+₿', label: 'Investment Edge' },
        { value: '21M', label: 'BTC Hard Cap' },
      ];
      return (
        <div className="bg-btc/5 border-y border-btc/10 py-10 px-6">
          <div className="max-w-5xl mx-auto grid grid-cols-2 md:grid-cols-4 gap-8 text-center">
            {items.map(({ value, label }) => (
              <div key={label}>
                <div className="text-3xl md:text-4xl font-black text-btc mb-1">{value}</div>
                <div className="text-gray-500 text-sm font-medium">{label}</div>
              </div>
            ))}
          </div>
        </div>
      );
    }

    /* ─── About ─────────────────────────────────────────────────────── */
    function About() {
      return (
        <section id="about" className="py-24 px-6 bg-card/30">
          <div className="max-w-5xl mx-auto grid md:grid-cols-2 gap-16 items-center">
            <div>
              <div className="text-btc text-sm font-semibold uppercase tracking-widest mb-3">Who We Are</div>
              <h2 className="text-4xl md:text-5xl font-black text-white mb-6">
                Wealth building made <span className="gradient-text">Mega Simple</span>
              </h2>
              <p className="text-gray-400 leading-relaxed mb-6">
                MegaSimple was founded on one principle: the path to financial freedom doesn't have to be
                complicated. We leverage Bitcoin, online businesses, real estate, and premium digital assets
                to build lasting, diversified wealth.
              </p>
              <p className="text-gray-400 leading-relaxed mb-8">
                Whether you're a first-time investor or a seasoned entrepreneur, our approach keeps things
                clear, direct, and actionable. No jargon. No fluff. Just results.
              </p>
              <div className="flex flex-wrap gap-3">
                {['Bitcoin First', 'Long-Term Thinking', 'Diversified Assets', 'No Fluff'].map(tag => (
                  <span key={tag} className="bg-dark border border-border text-gray-300 text-sm px-4 py-2 rounded-full font-medium">
                    {tag}
                  </span>
                ))}
              </div>
            </div>
            <div className="grid grid-cols-2 gap-4">
              {[
                { num: '2017', label: 'Founded' },
                { num: '₿ First', label: 'Philosophy' },
                { num: '4', label: 'Revenue Streams' },
                { num: '24/7', label: 'Markets Open' },
              ].map(({ num, label }) => (
                <div key={label} className="bg-card border border-border rounded-2xl p-6 text-center card-hover">
                  <div className="text-2xl font-black text-btc mb-2">{num}</div>
                  <div className="text-gray-500 text-sm font-medium">{label}</div>
                </div>
              ))}
            </div>
          </div>
        </section>
      );
    }

    /* ─── CTA ───────────────────────────────────────────────────────── */
    function CTA() {
      const [email, setEmail] = useState('');
      const [submitted, setSubmitted] = useState(false);
      const [loading, setLoading] = useState(false);
      const [error, setError] = useState(null);
      const confirmed = new URLSearchParams(window.location.search).get('confirmed') === '1';

      async function handleSubmit(e) {
        e.preventDefault();
        if (!email) return;
        setLoading(true);
        setError(null);
        try {
          const res = await fetch('subscribe.php', {
            method: 'POST',
            headers: { 'Content-Type': 'application/json' },
            body: JSON.stringify({ email }),
          });
          const data = await res.json();
          if (data.success) {
            setSubmitted(true);
          } else {
            setError(data.error || 'Something went wrong. Please try again.');
          }
        } catch (err) {
          setError('Could not connect. Please try again.');
        }
        setLoading(false);
      }

      return (
        <section id="contact" className="py-24 px-6">
          <div className="max-w-3xl mx-auto text-center">
            <div className="text-btc text-6xl mb-6">₿</div>
            <h2 className="text-4xl md:text-5xl font-black text-white mb-4">
              Be First in Line
            </h2>
            <p className="text-gray-400 text-lg mb-10 max-w-xl mx-auto leading-relaxed">
              Get your free copy of <em className="text-white not-italic font-semibold">High-Stakes AI: Crypto Investing</em> —
              we'll send it to you the moment it goes live on Amazon.
            </p>
            {confirmed ? (
              <div className="inline-flex flex-col items-center gap-3 bg-btc/10 border border-btc/30 rounded-2xl px-10 py-8 mb-8">
                <div className="text-4xl">🎉</div>
                <div className="text-white font-bold text-lg">You're confirmed!</div>
                <div className="text-gray-400 text-sm text-center">You're on the list. We'll send you your free copy when <span className="text-white font-semibold">High-Stakes AI: Crypto Investing</span> goes live on Amazon.</div>
              </div>
            ) : submitted ? (
              <div className="inline-flex flex-col items-center gap-3 bg-btc/10 border border-btc/30 rounded-2xl px-10 py-8 mb-8">
                <div className="text-4xl">📩</div>
                <div className="text-white font-bold text-lg">Check your inbox!</div>
                <div className="text-gray-400 text-sm text-center">We sent a confirmation email to <span className="text-btc">{email}</span>.<br/>Click the link to confirm your subscription.</div>
              </div>
            ) : (
              <>
                <form onSubmit={handleSubmit} className="flex flex-col sm:flex-row gap-4 justify-center mb-4">
                  <input
                    type="email"
                    required
                    placeholder="your@email.com"
                    value={email}
                    onChange={e => setEmail(e.target.value)}
                    disabled={loading}
                    className="bg-card border border-border text-white placeholder-gray-600 px-6 py-4 rounded-xl text-sm focus:outline-none focus:border-btc/50 w-full sm:w-72 disabled:opacity-50"
                  />
                  <button type="submit" disabled={loading} className="bg-btc hover:bg-btcdark text-black font-bold px-8 py-4 rounded-xl transition-all hover:scale-105 whitespace-nowrap disabled:opacity-60 disabled:cursor-not-allowed">
                    {loading ? 'Subscribing...' : 'Send Me the Free Book'}
                  </button>
                </form>
                {error && <p className="text-red-400 text-sm mb-4">{error}</p>}
              </>
            )}
            <p className="text-gray-600 text-xs">No spam. Unsubscribe anytime. Not financial advice.</p>
          </div>
        </section>
      );
    }

    /* ─── Footer ─────────────────────────────────────────────────────── */
    function Footer() {
      return (
        <footer className="border-t border-border py-10 px-6">
          <div className="max-w-6xl mx-auto flex flex-col md:flex-row items-center justify-between gap-6">
            <div className="flex items-center gap-2">
              <span className="text-btc font-black text-xl">Mega</span>
              <span className="text-white font-black text-xl">Simple</span>
              <span className="text-btc ml-1">₿</span>
            </div>
            <div className="flex flex-wrap justify-center gap-6 text-sm text-gray-500">
              <a href="#invest" className="hover:text-btc transition-colors">Bitcoin</a>
              <a href="#services" className="hover:text-btc transition-colors">Services</a>
              <a href="https://megasimpledomains.com" className="hover:text-btc transition-colors">Domains</a>
              <a href="#about" className="hover:text-btc transition-colors">About</a>
            </div>
            <div className="text-gray-600 text-xs text-center">
              © {new Date().getFullYear()} MegaSimple.com · Not financial advice
            </div>
          </div>
        </footer>
      );
    }

    /* ─── App ─────────────────────────────────────────────────────────── */
    function App() {
      const [btcPrice, setBtcPrice] = useState(null);

      useEffect(() => {
        fetch('https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd')
          .then(r => r.json())
          .then(d => setBtcPrice(d?.bitcoin?.usd))
          .catch(() => {});
      }, []);

      return (
        <>
          <ConfirmationBanner />
          <Nav />
          <Hero btcPrice={btcPrice} />
          <Stats />
          <Book />
          <BTCChart />
          <Services />
          <Domains />
          <About />
          <CTA />
          <Footer />
        </>
      );
    }

    const root = ReactDOM.createRoot(document.getElementById('root'));
    root.render(<App />);
  </script>
</body>
</html>
