<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content="Queen's Data Hub - Your trusted platform for fast, reliable, and affordable data bundles. Experience seamless connectivity with top-notch customer service.">
    <meta name="keywords" content="data bundles, affordable data, fast internet, data hub, Queen's Data Hub">
    <meta name="author" content="Queen's Data Hub">
    <title>Queen's Data Hub</title>

    <!-- Open Graph Meta Tags (for Facebook, WhatsApp, LinkedIn, etc.) -->
    <meta property="og:title" content="Queen's Data Hub">
    <meta property="og:description" content="Fast, reliable, and affordable data bundles. Stay connected with Queen's Data Hub!">
    <meta property="og:url" content="https://queendatahub.web.app">
    <meta property="og:type" content="website">

    <!-- Twitter Card Tags -->
    <meta name="twitter:card" content="summary">
    <meta name="twitter:title" content="Queen's Data Hub">
    <meta name="twitter:description" content="Fast, reliable, and affordable data bundles. Stay connected with Queen's Data Hub!">
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/notyf@3/notyf.min.css">
    <script src="https://js.paystack.co/v1/inline.js"></script>
    <style>
        body {
            font-family: 'Poppins', sans-serif;
            background-color: #111827;
            color: #e2e8f0;
        }
        .spinner {
            width: 30px;
            height: 30px;
            border: 3px solid #4f46e5;
            border-top: 3px solid #818cf8;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        .btn-hover:hover {
            filter: brightness(110%);
            transform: translateY(-1px);
            transition: all 0.2s ease;
        }
        .active-nav {
            background-color: rgba(79, 70, 229, 0.2);
            border-radius: 9999px;
        }
        @media (min-width: 768px) {
            .spinner {
                width: 50px;
                height: 50px;
                border-width: 5px;
            }
        }
    </style>
</head>
<body class="bg-gray-900 flex flex-col items-center justify-between min-h-screen text-xs md:text-base">
    <!-- Support Navbar -->
    <nav class="bg-indigo-800 w-full py-1 md:py-2 flex justify-center items-center fixed top-0 z-20 shadow-lg text-2xs md:text-sm">
        <div class="flex items-center justify-between w-full max-w-xs md:max-w-4xl px-2 md:px-4">
            <p class="text-white">
                <span class="material-icons mr-1 align-middle text-yellow-400 text-xs md:text-base">support_agent</span>
                Call: <a href="tel:+1234567890" class="font-semibold">050 273 6439</a>

                <span class="material-icons mr-1 align-middle text-yellow-400 text-xs md:text-base"></span>
                For updates: <a href="https://chat.whatsapp.com/GbGfOM2FGYY15BBSYC7F7n" class="font-semibold">Click here!</a>
            </p>
        </div>
    </nav>
    <!-- Navbar -->
    <nav class="bg-gray-800 w-full py-2 md:py-4 flex justify-center items-center fixed top-5 md:top-8 z-10 shadow-lg">
        <h1 class="text-indigo-400 text-lg md:text-3xl font-bold"><span class="material-icons mr-1 align-middle text-sm md:text-xl">bolt</span>QUEEN'S DATA HUB</h1>
    </nav>

    <!-- Main Content -->
    <div id="main-content" class="bg-gray-800 p-4 md:p-8 rounded-lg shadow-xl w-full max-w-xs md:max-w-2xl mt-20 md:mt-32 mx-2 md:mx-auto mb-16 md:mb-24">
        <!-- Home Section -->
        <div id="home-section" class="hidden">
            <div id="user-greeting" class="text-indigo-300 text-sm md:text-xl mb-4 md:mb-6"></div>
            <div class="grid grid-cols-2 gap-2 md:gap-4 mb-4 md:mb-6">
                <div class="bg-gray-700 p-2 md:p-4 rounded-lg shadow-md">
                    <p class="text-gray-300 text-2xs md:text-sm mb-1">Total Spent</p>
                    <p id="total-spent" class="text-white text-sm md:text-lg font-semibold"></p>
                </div>
                <div class="bg-gray-700 p-2 md:p-4 rounded-lg shadow-md">
                    <p class="text-gray-300 text-2xs md:text-sm mb-1">Orders Made</p>
                    <p id="orders-made" class="text-white text-sm md:text-lg font-semibold"></p>
                </div>
                <div class="bg-gray-700 p-2 md:p-4 rounded-lg shadow-md">
                    <p class="text-gray-300 text-2xs md:text-sm mb-1">Data Activated</p>
                    <p id="data-activated" class="text-white text-sm md:text-lg font-semibold"></p>
                </div>
                <div class="bg-gray-700 p-2 md:p-4 rounded-lg shadow-md">
                    <p class="text-gray-300 text-2xs md:text-sm mb-1">Last Order</p>
                    <p id="last-order" class="text-white text-sm md:text-lg font-semibold"></p>
                </div>
            </div>
            <div class="bg-gray-700 p-2 md:p-4 rounded-lg shadow-md mb-4 md:mb-6">
                <p class="text-gray-300 text-2xs md:text-sm mb-1">Wallet Balance</p>
                <p id="wallet-balance" class="text-white text-sm md:text-lg font-semibold"></p>
            </div>
            <div class="flex space-x-2 md:space-x-4">
                <button id="purchase-button" class="flex-1 bg-indigo-600 text-white px-2 md:px-4 py-1 md:py-2 rounded-lg text-2xs md:text-base btn-hover flex items-center justify-center shadow-md">
                    <span class="material-icons mr-1 text-xs md:text-base">shopping_cart</span>BUY DATA
                </button>
                <button id="deposit-button" class="flex-1 bg-green-600 text-white px-2 md:px-4 py-1 md:py-2 rounded-lg text-2xs md:text-base btn-hover flex items-center justify-center shadow-md">
                    <span class="material-icons mr-1 text-xs md:text-base">account_balance_wallet</span>DEPOSIT
                </button>
            </div>
        </div>

        <!-- Bundle Purchase Section -->
        <div id="bundle-purchase-section" class="hidden">
            <h2 class="text-white text-lg md:text-2xl font-semibold mb-3 md:mb-5"><span class="material-icons mr-1 align-middle text-sm md:text-xl"></span>OFFERS & PLANS</h2>
            <div class="bg-red-500 text-white p-2 md:p-4 rounded-lg mb-3 md:mb-5 shadow-md text-2xs md:text-sm">
                <span class="material-icons mr-1 align-middle text-xs md:text-base">info</span>
                Your bundle will arrive within the next 10 - 40 minutes after purchase.
            </div>
            <div class="mb-3 md:mb-5">
                <label for="phone-number" class="block text-gray-300 mb-1 md:mb-2 text-2xs md:text-sm"><span class="material-icons mr-1 align-middle text-xs md:text-base">phone</span>PHONE NUMBER</label>
                <input type="text" id="phone-number" class="w-full p-1 md:p-2 bg-gray-700 text-gray-300 rounded-lg text-xs md:text-base shadow-inner" placeholder="Enter phone number"/>
            </div>
            <div class="mb-3 md:mb-5">
                <label for="network" class="block text-gray-300 mb-1 md:mb-2 text-2xs md:text-sm"><span class="material-icons mr-1 align-middle text-xs md:text-base">network_cell</span>NETWORK</label>
                <select id="network" class="w-full p-1 md:p-2 bg-gray-700 text-gray-300 rounded-lg text-xs md:text-base shadow-inner">
                    <option value="">Select Network</option>
                    <option value="mtn">MTN</option>
                    <option value="at">AirtelTigo</option>
                </select>
            </div>
            <div id="bundle-volume-container" class="mb-3 md:mb-5"></div>
            <div id="bundle-price" class="mb-3 md:mb-5 text-gray-300 text-xs md:text-base"></div>
            <div class="flex space-x-2 md:space-x-4">
                <button id="send-bundle" class="flex-1 bg-indigo-600 text-white px-2 md:px-4 py-1 md:py-2 rounded-lg text-2xs md:text-base btn-hover shadow-md">
                    <span class="material-icons mr-1 align-middle text-xs md:text-base">send</span>Send Bundle
                </button>
                <a href="agent.html"><button id="agent-portal" class="flex-1 bg-green-600 text-white px-2 md:px-4 py-1 md:py-2 rounded-lg text-2xs md:text-base btn-hover shadow-md">
                    <span class="material-icons mr-1 align-middle text-xs md:text-base">person</span>Agent Portal
                </button></a>
            </div>
            <div id="loader" class="hidden mt-3 md:mt-5 flex justify-center">
                <div class="spinner"></div>
            </div>
        </div>

        <!-- Deposit Section -->
        <div id="deposit-section" class="hidden">
            <h2 class="text-white text-lg md:text-2xl font-semibold mb-3 md:mb-5"><span class="material-icons mr-1 align-middle text-sm md:text-xl">account_balance_wallet</span>Deposit Funds</h2>
            <div class="bg-gray-700 p-2 md:p-4 rounded-lg shadow-md mb-3 md:mb-5">
                <p class="text-gray-300 text-2xs md:text-sm mb-1">Current Balance</p>
                <p id="deposit-wallet-balance" class="text-white text-sm md:text-lg font-semibold"></p>
            </div>
            <div class="mb-3 md:mb-5">
                <label for="deposit-amount" class="block text-gray-300 mb-1 md:mb-2 text-2xs md:text-sm"><span class="material-icons mr-1 align-middle text-xs md:text-base">payments</span>AMOUNT (GHS)</label>
                <input type="number" id="deposit-amount" class="w-full p-1 md:p-2 bg-gray-700 text-gray-300 rounded-lg text-xs md:text-base shadow-inner" placeholder="Enter amount to deposit" min="1" step="0.01"/>
            </div>
            <button id="confirm-deposit" class="w-full bg-green-600 text-white px-2 md:px-4 py-1 md:py-2 rounded-lg text-2xs md:text-base btn-hover shadow-md">
                <span class="material-icons mr-1 align-middle text-xs md:text-base">add</span>Deposit Funds
            </button>
        </div>

        <!-- Order Receipt Section -->
        <div id="order-receipt" class="hidden bg-gray-700 text-white p-3 md:p-5 rounded-lg mt-3 md:mt-5 shadow-md">
            <h3 class="text-sm md:text-lg font-semibold mb-2 md:mb-4">Order Receipt</h3>
            <div id="receipt-content" class="space-y-1 md:space-y-2 text-2xs md:text-sm">
                <p><strong>Name:</strong> <span id="receipt-name"></span></p>
                <p><strong>Network:</strong> <span id="receipt-network"></span></p>
                <p><strong>Phone Number:</strong> <span id="receipt-phone"></span></p>
                <p><strong>Bundle Volume:</strong> <span id="receipt-volume"></span></p>
                <p><strong>Price:</strong> GHS <span id="receipt-price"></span></p>
                <p><strong>Transaction Reference:</strong> <span id="receipt-reference"></span></p>
                <p><strong>Date:</strong> <span id="receipt-date"></span></p>
                <p><strong>Status:</strong> <span id="receipt-status"></span></p>
            </div>
        </div>

        <!-- Orders Section -->
        <div id="orders-section" class="hidden">
            <h2 class="text-white text-lg md:text-2xl font-semibold mb-3 md:mb-5"><span class="material-icons mr-1 align-middle text-sm md:text-xl">receipt_long</span>Your Orders</h2>
            <div id="orders-list" class="space-y-3 md:space-y-5 max-h-64 md:max-h-96 overflow-y-auto pr-2"></div>
        </div>

        <!-- Profile Section -->
        <div id="profile-section" class="hidden">
            <div class="flex items-center mb-4 md:mb-6">
                <div id="profile-avatar" class="w-12 h-12 md:w-20 md:h-20 rounded-full bg-indigo-600 text-white text-sm md:text-xl flex items-center justify-center mr-3 md:mr-5"></div>
                <div>
                    <h3 id="profile-name" class="text-sm md:text-lg font-semibold text-white"></h3>
                    <p id="profile-email" class="text-gray-400 text-2xs md:text-sm"></p>
                </div>
            </div>
            <div class="space-y-3 md:space-y-5">
                <div class="bg-gray-700 p-2 md:p-4 rounded-lg shadow-md">
                    <p class="text-gray-400 text-2xs md:text-sm mb-1">Phone Number</p>
                    <p id="profile-phone" class="text-white text-xs md:text-base"></p>
                </div>
                <div class="bg-gray-700 p-2 md:p-4 rounded-lg shadow-md">
                    <p class="text-gray-400 text-2xs md:text-sm mb-1">Join Date</p>
                    <p id="profile-join-date" class="text-white text-xs md:text-base"></p>
                </div>
                <div class="bg-gray-700 p-2 md:p-4 rounded-lg shadow-md">
                    <p class="text-gray-400 text-2xs md:text-sm mb-1">Wallet Balance</p>
                    <p id="profile-wallet-balance" class="text-white text-xs md:text-base font-semibold"></p>
                </div>
            </div>
            <div class="mt-4 md:mt-6">
                <button id="logout" class="w-full bg-red-600 text-white px-3 md:px-5 py-2 md:py-3 rounded-lg text-2xs md:text-base btn-hover shadow-md flex items-center justify-center">
                    <span class="material-icons mr-1 text-xs md:text-base">logout</span>Logout
                </button>
            </div>
        </div>
    </div>

    <!-- Bottom Bar Navigation -->
    <div class="bg-gray-800 w-full py-2 md:py-4 flex justify-around items-center fixed bottom-0 z-10 shadow-lg">
        <a href="#" id="home-icon" class="text-gray-400 hover:text-indigo-400 p-1 md:p-2 flex flex-col items-center">
            <span class="material-icons text-sm md:text-xl">home</span>
            <span class="text-2xs md:text-xs">Home</span>
        </a>
        <a href="#" id="data-icon" class="text-gray-400 hover:text-indigo-400 p-1 md:p-2 flex flex-col items-center">
            <span class="material-icons text-sm md:text-xl">wifi</span>
            <span class="text-2xs md:text-xs">Data</span>
        </a>
        <a href="#" id="wallet-icon" class="text-gray-400 hover:text-indigo-400 p-1 md:p-2 flex flex-col items-center">
            <span class="material-icons text-sm md:text-xl">account_balance_wallet</span>
            <span class="text-2xs md:text-xs">Wallet</span>
        </a>
        <a href="#" id="orders-icon" class="text-gray-400 hover:text-indigo-400 p-1 md:p-2 flex flex-col items-center">
            <span class="material-icons text-sm md:text-xl">receipt_long</span>
            <span class="text-2xs md:text-xs">Orders</span>
        </a>
        <a href="#" id="profile-icon" class="text-gray-400 hover:text-indigo-400 p-1 md:p-2 flex flex-col items-center">
            <span class="material-icons text-sm md:text-xl">person</span>
            <span class="text-2xs md:text-xs">Profile</span>
        </a>
    </div>

    <!-- Login Page -->
    <div id="login-page" class="bg-gray-800 p-4 md:p-8 rounded-lg shadow-xl w-full max-w-xs md:max-w-md mt-20 md:mt-32 mx-2 md:mx-auto hidden">
        <h2 class="text-white text-lg md:text-2xl font-semibold mb-3 md:mb-5"><span class="material-icons mr-1 align-middle text-sm md:text-xl">login</span>Login</h2>
        <div class="mb-3 md:mb-5">
            <label for="login-email" class="block text-gray-300 mb-1 md:mb-2 text-2xs md:text-sm"><span class="material-icons mr-1 align-middle text-xs md:text-base">email</span>Email</label>
            <input type="email" id="login-email" class="w-full p-1 md:p-2 bg-gray-700 text-gray-300 rounded-lg text-xs md:text-base shadow-inner" placeholder="Enter your email"/>
        </div>
        <div class="mb-3 md:mb-5">
            <label for="login-password" class="block text-gray-300 mb-1 md:mb-2 text-2xs md:text-sm"><span class="material-icons mr-1 align-middle text-xs md:text-base">lock</span>Password</label>
            <input type="password" id="login-password" class="w-full p-1 md:p-2 bg-gray-700 text-gray-300 rounded-lg text-xs md:text-base shadow-inner" placeholder="Enter your password"/>
        </div>
        <div class="flex space-x-2 md:space-x-4">
            <button id="login-button" class="flex-1 bg-indigo-600 text-white px-2 md:px-4 py-1 md:py-2 rounded-lg text-2xs md:text-base btn-hover shadow-md">
                <span class="material-icons mr-1 align-middle text-xs md:text-base">login</span>Login
            </button>
            <button id="go-to-signup" class="flex-1 bg-green-600 text-white px-2 md:px-4 py-1 md:py-2 rounded-lg text-2xs md:text-base btn-hover shadow-md">
                <span class="material-icons mr-1 align-middle text-xs md:text-base">person_add</span>Sign Up
            </button>
        </div>
        <p class="mt-3 md:mt-5 text-2xs md:text-sm text-center"><a href="#" id="forgot-password-link" class="text-indigo-400 hover:underline">Forgot Password?</a></p>
    </div>

    <!-- Sign Up Page -->
    <div id="signup-page" class="bg-gray-800 p-4 md:p-8 rounded-lg shadow-xl w-full max-w-xs md:max-w-md mt-20 md:mt-32 mx-2 md:mx-auto hidden">
        <h2 class="text-white text-lg md:text-2xl font-semibold mb-3 md:mb-5"><span class="material-icons mr-1 align-middle text-sm md:text-xl">person_add</span>Sign Up</h2>
        <div class="mb-3 md:mb-5">
            <label for="signup-name" class="block text-gray-300 mb-1 md:mb-2 text-2xs md:text-sm"><span class="material-icons mr-1 align-middle text-xs md:text-base">person</span>Name</label>
            <input type="text" id="signup-name" class="w-full p-1 md:p-2 bg-gray-700 text-gray-300 rounded-lg text-xs md:text-base shadow-inner" placeholder="Enter your name"/>
        </div>
        <div class="mb-3 md:mb-5">
            <label for="signup-email" class="block text-gray-300 mb-1 md:mb-2 text-2xs md:text-sm"><span class="material-icons mr-1 align-middle text-xs md:text-base">email</span>Email</label>
            <input type="email" id="signup-email" class="w-full p-1 md:p-2 bg-gray-700 text-gray-300 rounded-lg text-xs md:text-base shadow-inner" placeholder="Enter your email"/>
        </div>
        <div class="mb-3 md:mb-5">
            <label for="signup-phone" class="block text-gray-300 mb-1 md:mb-2 text-2xs md:text-sm"><span class="material-icons mr-1 align-middle text-xs md:text-base">phone</span>Phone</label>
            <input type="tel" id="signup-phone" class="w-full p-1 md:p-2 bg-gray-700 text-gray-300 rounded-lg text-xs md:text-base shadow-inner" placeholder="Enter your phone number"/>
        </div>
        <div class="mb-3 md:mb-5">
            <label for="signup-password" class="block text-gray-300 mb-1 md:mb-2 text-2xs md:text-sm"><span class="material-icons mr-1 align-middle text-xs md:text-base">lock</span>Password</label>
            <input type="password" id="signup-password" class="w-full p-1 md:p-2 bg-gray-700 text-gray-300 rounded-lg text-xs md:text-base shadow-inner" placeholder="Enter your password"/>
        </div>
        <div class="mb-3 md:mb-5">
            <label for="signup-confirm-password" class="block text-gray-300 mb-1 md:mb-2 text-2xs md:text-sm"><span class="material-icons mr-1 align-middle text-xs md:text-base">lock</span>Confirm Password</label>
            <input type="password" id="signup-confirm-password" class="w-full p-1 md:p-2 bg-gray-700 text-gray-300 rounded-lg text-xs md:text-base shadow-inner" placeholder="Confirm your password"/>
        </div>
        <div class="flex space-x-2 md:space-x-4">
            <button id="signup-button" class="flex-1 bg-green-600 text-white px-2 md:px-4 py-1 md:py-2 rounded-lg text-2xs md:text-base btn-hover shadow-md">
                <span class="material-icons mr-1 align-middle text-xs md:text-base">person_add</span>Sign Up
            </button>
            <button id="go-to-login" class="flex-1 bg-indigo-600 text-white px-2 md:px-4 py-1 md:py-2 rounded-lg text-2xs md:text-base btn-hover shadow-md">
                <span class="material-icons mr-1 align-middle text-xs md:text-base">login</span>Login
            </button>
        </div>
    </div>

    <!-- Reset Password Page -->
    <div id="reset-password-page" class="bg-gray-800 p-4 md:p-8 rounded-lg shadow-xl w-full max-w-xs md:max-w-md mt-20 md:mt-32 mx-2 md:mx-auto hidden">
        <h2 class="text-white text-lg md:text-2xl font-semibold mb-3 md:mb-5"><span class="material-icons mr-1 align-middle text-sm md:text-xl">lock_reset</span>Reset Password</h2>
        <div class="mb-3 md:mb-5">
            <label for="reset-email" class="block text-gray-300 mb-1 md:mb-2 text-2xs md:text-sm"><span class="material-icons mr-1 align-middle text-xs md:text-base">email</span>Email</label>
            <input type="email" id="reset-email" class="w-full p-1 md:p-2 bg-gray-700 text-gray-300 rounded-lg text-xs md:text-base shadow-inner" placeholder="Enter your email"/>
        </div>
        <button id="reset-password-button" class="w-full bg-indigo-600 text-white px-2 md:px-4 py-1 md:py-2 rounded-lg text-2xs md:text-base btn-hover shadow-md">
            <span class="material-icons mr-1 align-middle text-xs md:text-base">send</span>Send Reset Link
        </button>
        <p class="mt-3 md:mt-5 text-2xs md:text-sm text-center"><a href="#" id="back-to-login" class="text-indigo-400 hover:underline">Back to Login</a></p>
    </div>

    <script>
        var s=document.createElement('script');s.src='pathenv.js';s.type='module';document.body.appendChild(s);
    </script>

    <script src="https://cdn.jsdelivr.net/npm/notyf@3/notyf.min.js"></script>
</body>
</html>