<?php
session_start();
include "functions.php";
include "livechat.php";

// Handle form submission
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    // Get form data
    $name = trim($_POST['name'] ?? '');
    $lastname = trim($_POST['lastname'] ?? '');
    $middlename = trim($_POST['middlename'] ?? '');
    $username = trim($_POST['username'] ?? '');
    $email = trim($_POST['email'] ?? '');
    $phone = trim($_POST['phone'] ?? '');
    $country = trim($_POST['country'] ?? '');
    $curr = trim($_POST['curr'] ?? 'USD');
    $accounttype = trim($_POST['accounttype'] ?? 'Savings');
    $pin = trim($_POST['pin'] ?? '');
    $password = $_POST['password'] ?? '';
    $password_confirmation = $_POST['password_confirmation'] ?? '';
    $terms = isset($_POST['terms']);

    // Validation
    $errors = [];

    if (empty($name)) $errors[] = "First name is required";
    if (empty($lastname)) $errors[] = "Last name is required";
    if (empty($username)) $errors[] = "Username is required";
    if (empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL)) $errors[] = "Valid email is required";
    if (empty($phone)) $errors[] = "Phone number is required";
    if (empty($country)) $errors[] = "Country is required";
    if (empty($password)) $errors[] = "Password is required";
    if (strlen($password) < 8) $errors[] = "Password must be at least 8 characters";
    if ($password !== $password_confirmation) $errors[] = "Passwords do not match";
    if (!$terms) $errors[] = "You must agree to the terms and conditions";

    // Check if email or username already exists
    if (empty($errors)) {
        $stmt = $connect->prepare("SELECT id FROM users WHERE email = ? OR acc_no = ?");
        $stmt->bind_param("ss", $email, $username);
        $stmt->execute();
        $result = $stmt->get_result();
        if ($result->num_rows > 0) {
            $errors[] = "Email or username already exists";
        }
        $stmt->close();
    }

    if (empty($errors)) {
        // Create fullname
        $fullname = $name . ' ' . ($middlename ? $middlename . ' ' : '') . $lastname;

        // Hash password
        $hashed_password = password_hash($password, PASSWORD_DEFAULT);

        // Generate a unique 10-digit account number
        do {
            $acc_no = '1' . str_pad(mt_rand(0, 999999999), 9, '0', STR_PAD_LEFT);
            $chk = $connect->prepare("SELECT id FROM users WHERE acc_no = ?");
            $chk->bind_param("s", $acc_no);
            $chk->execute();
            $chk->store_result();
            $exists = $chk->num_rows > 0;
            $chk->close();
        } while ($exists);

        // Set defaults
        $balance = 0.00;
        $account_status = 'Pending';
        $date_added = date('Y-m-d H:i:s');
        $acc_type = $accounttype; // Use the selected account type

        // Insert into database
        $stmt = $connect->prepare("INSERT INTO users (fullname, username, country, email, phone_number, acc_type, currency, pin, password, confirm_password, acc_no, balance, account_status, date_added) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
        $stmt->bind_param("sssssssssssdss", $fullname, $username, $country, $email, $phone, $acc_type, $curr, $pin, $hashed_password, $password_confirmation, $acc_no, $balance, $account_status, $date_added);

        if ($stmt->execute()) {
            // Success - redirect to login or show success message
            $_SESSION['success'] = "Account created successfully! Please wait for approval.";
            header("Location: login");
            exit();
        } else {
            $errors[] = "Failed to create account. Please try again.";
        }
        $stmt->close();
    }

    // Store errors in session if any
    if (!empty($errors)) {
        $_SESSION['errors'] = $errors;
        // Redirect back to form
        header("Location: register");
        exit();
    }
}

?>


<!DOCTYPE html>
<html lang="en" x-data="{ darkMode: false }" x-init="darkMode = localStorage.getItem('darkMode') === 'true' || (!localStorage.getItem('darkMode') && window.matchMedia('(prefers-color-scheme: dark)').matches)" :class="{ 'dark': darkMode }">

<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
    <title>Create Account - <?php echo getSiteConfig('sitename'); ?></title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="csrf-token" content="SCNov6baTlNnkTANaY7BpU0old3OK2bU1W4OBjId">
    <meta name="robots" content="index, follow">
    <meta name="apple-mobile-web-app-title" content="<?php echo getSiteConfig('sitename'); ?>">
    <meta name="application-name" content="<?php echo getSiteConfig('sitename'); ?>">
    <meta name="description" content="Swift and Secure Money Transfer to any UK bank account will become a breeze with <?php echo getSiteConfig('sitename'); ?>.">
    <link rel="shortcut icon" href="storage/app/public/photos/JFhHkiuNvOTfUR5bSTcRhJrlW2nXDFpq3s6DoadO.png">
    <link rel="icon" type="image/png" href="storage/app/public/photos/JFhHkiuNvOTfUR5bSTcRhJrlW2nXDFpq3s6DoadO.png">
    
    <!-- Dark mode initialization -->
    <script>
        // Dark mode initialization before page loads
        const isDarkMode = localStorage.getItem('darkMode') === 'true' || 
                          (!localStorage.getItem('darkMode') && window.matchMedia('(prefers-color-scheme: dark)').matches);
        
        if (isDarkMode) {
            document.documentElement.classList.add('dark');
        }
    </script>
    
    <!-- Tailwind CSS with custom color variables -->
    <script src="https://cdn.tailwindcss.com/?plugins=forms,typography,aspect-ratio,line-clamp"></script>
    <script>
        tailwind.config = {
            darkMode: 'class',
            theme: {
                extend: {
                    colors: {
                        primary: { // Dynamic primary colors from appearance settings
                            50: '#f0f9ff',
                            100: '#e0f2fe',
                            200: '#bae6fd',
                            300: '#7dd3fc',
                            400: '#38bdf8',
                            DEFAULT: '#0ea5e9',
                            500: '#0ea5e9',
                            600: '#0284c7',
                            700: '#0369a1',
                            foreground: '#ffffff',
                        },
                        secondary: { // Dynamic secondary colors from appearance settings
                            50: '#f8fafc',
                            100: '#f1f5f9',
                            200: '#e2e8f0',
                            300: '#cbd5e1',
                            400: '#94a3b8',
                            DEFAULT: '#64748b',
                            500: '#64748b',
                            600: '#475569',
                            700: '#334155',
                            foreground: '#0f172a',
                        },
                        accent: { // Dynamic accent colors from appearance settings
                            50: '#fdf2f8',
                            100: '#fce7f3',
                            200: '#fbcfe8',
                            300: '#f9a8d4',
                            400: '#f472b6',
                            DEFAULT: '#ec4899',
                            500: '#ec4899',
                            600: '#db2777',
                            700: '#be185d',
                            foreground: '#ffffff',
                        },
                        background: '#f8fafc',
                        foreground: '#1e293b',
                        card: {
                            DEFAULT: '#ffffff',
                            foreground: '#1e293b',
                        },
                        muted: {
                            DEFAULT: '#f1f5f9',
                            foreground: '#64748b',
                        },
                        border: '#e2e8f0',
                        input: '#e2e8f0',
                        ring: '#0ea5e9',
                        
                        // Specific colors from original design for gradients/highlights
                        'gradient-pink-from': '#ec4899',
                        'gradient-purple-via': '#a855f7',
                        'gradient-indigo-to': '#4f46e5',
                        
                        'mobile-header-bg': '#1e293b', // Dark slate for mobile top section
                        'mobile-header-text': '#f1f5f9', // Light text for mobile top section
                        
                        'yellow-action': '#facc15',
                        'green-positive': '#22c55e',
                        'red-negative': '#ef4444',
                    },
                    boxShadow: {
                        'soft': '0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04)',
                        'top': '0 -4px 12px -1px rgba(0,0,0,0.05), 0 -2px 8px -1px rgba(0,0,0,0.03)',
                    },
                    borderRadius: {
                        lg: '0.75rem',
                        xl: '0.75rem', 
                        '2xl': '1rem',
                        '3xl': '1.5rem',
                    },
                    keyframes: {
                        pulse: {
                          '0%, 100%': { transform: 'scale(1)', boxShadow: '0 0 0 0 rgba(14, 165, 233, 0.4)' }, // primary color
                          '50%': { transform: 'scale(1.05)', boxShadow: '0 0 0 10px rgba(14, 165, 233, 0)' },
                        },
                        shine: { 
                          '0%': { transform: 'translateX(-100%) translateY(-100%) rotate(45deg)' },
                          '100%': { transform: 'translateX(100%) translateY(100%) rotate(45deg)' },
                        }
                    },
                    animation: {
                        'pulse-slow': 'pulse 2.5s infinite',
                        'shine-once': 'shine 1.5s ease-in-out',
                    }
                }
            }
        }
    </script>
    
       <!-- Alpine.js -->
    <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
    
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/aquawolf04/font-awesome-pro@5cd1511/css/all.css">
    <!-- External Fonts -->
    <link rel="preconnect" href="https://fonts.googleapis.com/">
    <link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&amp;display=swap" rel="stylesheet">

    <!-- Google Translate Widget -->
    <script>
        var googleTranslateReady = false;
        function googleTranslateElementInit() {
            try {
                new google.translate.TranslateElement({
                    pageLanguage: 'en',
                    includedLanguages: 'en,es,fr,de,it,pt,ru,zh-CN,ja,ko,ar',
                    layout: google.translate.TranslateElement.SIMPLE
                }, 'google_translate_element');
                googleTranslateReady = true;
            } catch(e) {
                console.log('Google Translate not ready', e);
            }
        }
    </script>
    <script src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
    <style>
        .goog-te-banner-frame { display: none !important; }
        body { top: 0 !important; }
        .goog-te-combo { padding: 4px; border-radius: 4px; border: 1px solid #ddd; }
        #google_translate_element { display: none !important; }
        #chaport-widget, .chaport-container, iframe[src*="chaport"], [id*="chaport"], [class*="chaport"] {
            z-index: 999999 !important;
        }
        .language-bar-screw {
            position: fixed;
            right: 20px;
            top: 10%;
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
            color: white;
            z-index: 10000;
        }
        .language-bar-screw:hover {
            transform: scale(1.1) rotate(180deg);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
        }
        .language-bar-container {
            position: fixed;
            right: 0;
            top: 0;
            bottom: 0;
            width: 120px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 12px 10px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            box-shadow: -4px 0 15px rgba(0, 0, 0, 0.2);
            z-index: 9999999;
            max-width: 0;
            overflow: hidden;
            transition: max-width 0.4s ease;
        }
        .language-bar-container.show {
            max-width: 120px;
        }
        .language-bar-scroll {
            display: flex;
            flex-direction: column;
            gap: 6px;
            flex: 1;
            overflow-y: auto;
            padding: 10px 0;
            scroll-behavior: smooth;
            width: 100%;
        }
        .language-bar-scroll::-webkit-scrollbar {
            width: 4px;
        }
        .language-bar-scroll::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
        }
        .language-bar-scroll::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.3);
            border-radius: 10px;
        }
        .language-bar-scroll::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.5);
        }
        .lang-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            padding: 8px 6px;
            background: rgba(255, 255, 255, 0.15);
            color: white;
            text-decoration: none;
            border-radius: 6px;
            font-size: 11px;
            font-weight: 600;
            white-space: nowrap;
            transition: all 0.2s ease;
            border: 2px solid transparent;
            width: 100%;
            text-align: center;
            cursor: pointer;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .lang-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateX(-3px);
        }
        .lang-btn.active {
            background: rgba(255, 255, 255, 0.25);
            border-color: white;
            box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
        }
        .language-bar-container.show ~ .language-bar-screw {
            opacity: 0;
            pointer-events: none;
        }
        .lang-close {
            background: rgba(255, 255, 255, 0.2);
            color: white;
            border: none;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            margin-top: auto;
        }
        .lang-close:hover {
            background: rgba(255, 255, 255, 0.3);
        }
    </style>

    <style>
        body {
            font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: theme('colors.background');
            <style>
        body {
            font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: theme('colors.background');
            color: theme('colors.foreground');
        }

        ::-webkit-scrollbar { width: 8px; height: 8px; }
        ::-webkit-scrollbar-track { background: #e2e8f0; } /* slate-200 */
        ::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; } /* slate-400 */
        ::-webkit-scrollbar-thumb:hover { background: #64748b; } /* slate-500 */

        .dark ::-webkit-scrollbar-track { background: #374151; } /* gray-700 */
        .dark ::-webkit-scrollbar-thumb { background: #6b7280; } /* gray-500 */
        .dark ::-webkit-scrollbar-thumb:hover { background: #9ca3af; } /* gray-400 */

        .custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
        .custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
        .custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; } /* slate-300 */
        .custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #94a3b8; } /* slate-400 */

        .dark .custom-scrollbar::-webkit-scrollbar-thumb { background: #6b7280; } /* gray-500 */
        .dark .custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #9ca3af; } /* gray-400 */

        .shine-effect-container { position: relative; overflow: hidden; }
        .shine-effect {
            position: absolute; top: -50%; left: -50%;
            width: 200%; height: 200%;
            background-image: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
            transform: rotate(45deg); opacity: 0; transition: opacity 0.5s;
        }
        .shine-effect-container:hover .shine-effect { opacity: 1; animation: shine-once 1.5s ease-in-out; }

        .fade-in-section { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
        .fade-in-section.is-visible { opacity: 1; transform: translateY(0); }

        /* Floating elements animation */
        .floating {
            animation: floating 3s ease-in-out infinite;
        }
        .floating-slow {
            animation: floating 6s ease-in-out infinite;
        }
        .floating-slower {
            animation: floating 8s ease-in-out infinite;
        }
        
        @keyframes  floating {
            0% { transform: translateY(0px); }
            50% { transform: translateY(-10px); }
            100% { transform: translateY(0px); }
        }
        
        /* Interactive elements */
        .input-wrapper {
            position: relative;
            transition: all 0.3s ease;
        }
        
        .input-wrapper:focus-within {
            transform: translateY(-2px);
        }
        
        .input-icon {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            left: 1rem;
            color: #94a3b8;
            transition: color 0.3s ease;
        }
        
        .input-wrapper:focus-within .input-icon {
            color: var(--primary-color);
        }
        
        input:focus + .input-toggle {
            color: var(--primary-color);
        }
        
        .dark .input-icon {
            color: #6b7280;
        }
        
        /* Dark mode toggle button styling */
        .dark-mode-toggle {
            transition: all 0.3s ease;
        }
        
        .dark-mode-toggle:hover {
            transform: scale(1.1);
        }
    </style>
    </style>
    
    <!-- Ultra Modern Loading Animation -->
    <style>
        .page-loading {
            position: fixed;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 100%;
            transition: all .6s cubic-bezier(0.4, 0, 0.2, 1);
            background: radial-gradient(ellipse at center, rgba(14, 165, 233, 0.08) 0%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 1) 100%);
            backdrop-filter: blur(2px);
            visibility: hidden;
            z-index: 9999;
        }
        
        .dark .page-loading {
            background: radial-gradient(ellipse at center, rgba(14, 165, 233, 0.12) 0%, rgba(17, 24, 39, 0.95) 50%, rgba(17, 24, 39, 1) 100%);
        }
        .page-loading.active {
            opacity: 1;
            visibility: visible;
        }
        .page-loading-inner {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
            transition: all .4s cubic-bezier(0.4, 0, 0.2, 1);
            opacity: 0;
        }
        .page-loading.active>.page-loading-inner {
            opacity: 1;
        }
        
        .loading-container {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            position: relative;
        }
        
        /* Floating particles background */
        .loading-particles {
            position: absolute;
            width: 300px;
            height: 300px;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            pointer-events: none;
        }
        
        .particle {
            position: absolute;
            width: 4px;
            height: 4px;
            background: linear-gradient(45deg, #0ea5e9, #4f46e5);
            border-radius: 50%;
            opacity: 0.6;
            animation: floatParticle 4s ease-in-out infinite;
        }
        
        .particle:nth-child(1) { top: 20%; left: 20%; animation-delay: 0s; }
        .particle:nth-child(2) { top: 80%; left: 80%; animation-delay: 0.5s; }
        .particle:nth-child(3) { top: 60%; left: 20%; animation-delay: 1s; }
        .particle:nth-child(4) { top: 30%; left: 70%; animation-delay: 1.5s; }
        .particle:nth-child(5) { top: 70%; left: 30%; animation-delay: 2s; }
        .particle:nth-child(6) { top: 10%; left: 60%; animation-delay: 2.5s; }
        
        .loading-animation {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 120px;
            height: 120px;
            margin-bottom: 2rem;
            position: relative;
            filter: drop-shadow(0 0 20px rgba(14, 165, 233, 0.2));
        }
        
        /* Outer orbital rings */
        .loading-animation .orbit-ring {
            position: absolute;
            border-radius: 50%;
            border: 2px solid rgba(14, 165, 233, 0.2);
            animation: rotateOrbit 8s linear infinite;
        }
        
        .orbit-ring:nth-child(1) {
            width: 100%;
            height: 100%;
            border-top: 2px solid #0ea5e9;
            border-right: 2px solid rgba(14, 165, 233, 0.3);
            animation-duration: 2s;
        }
        
        .orbit-ring:nth-child(2) {
            width: 80%;
            height: 80%;
            top: 10%;
            left: 10%;
            border-bottom: 2px solid #0ea5e9;
            border-left: 2px solid rgba(14, 165, 233, 0.3);
            animation-duration: 2.5s;
            animation-direction: reverse;
        }
        
        .orbit-ring:nth-child(3) {
            width: 60%;
            height: 60%;
            top: 20%;
            left: 20%;
            border-top: 2px solid #0ea5e9;
            border-right: 2px solid rgba(14, 165, 233, 0.3);
            animation-duration: 3s;
        }
        
        /* Inner spinning circles */
        .loading-animation .inner-circle {
            position: absolute;
            width: 15px;
            height: 15px;
            border-radius: 50%;
            background: #0ea5e9;
            box-shadow: 0 0 10px rgba(14, 165, 233, 0.6);
            animation: spinInner 2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
        }
        
        .inner-circle:nth-child(4) {
            border-top: 3px solid #0ea5e9;
            border-right: 3px solid rgba(14, 165, 233, 0.4);
            animation-delay: 0s;
        }
        
        .inner-circle:nth-child(5) {
            border-bottom: 3px solid #0ea5e9;
            border-left: 3px solid rgba(14, 165, 233, 0.4);
            animation-delay: 0.3s;
            animation-direction: reverse;
        }
        
        /* Glowing core with morphing effect */
        .loading-animation .core {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: linear-gradient(45deg, #0ea5e9, #4f46e5);
            background-size: 200% 200%;
            box-shadow: 
                0 0 20px rgba(14, 165, 233, 0.6),
                0 0 40px rgba(14, 165, 233, 0.3),
                inset 0 0 10px rgba(255, 255, 255, 0.3);
            animation: coreGlow 2s ease-in-out infinite, morphCore 4s ease-in-out infinite;
        }
        
        /* Enhanced text with multiple effects */
        .page-loading .text {
            font-weight: 700;
            letter-spacing: 0.1em;
            margin-top: 1.5rem;
            font-size: 1.1rem;
            position: relative;
            background: linear-gradient(90deg, #0ea5e9, #0ea5e9, #4f46e5, #0ea5e9, #0ea5e9);
            background-size: 300% auto;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            animation: textShimmer 3s linear infinite;
            text-shadow: 0 0 30px rgba(14, 165, 233, 0.3);
        }
        
        .page-loading .text::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            background: linear-gradient(45deg, transparent, rgba(14, 165, 233, 0.1), transparent);
            border-radius: 4px;
            z-index: -1;
            animation: textGlow 2s ease-in-out infinite alternate;
        }
        
        /* Subtitle with fade effect */
        .page-loading .subtitle {
            font-size: 0.75rem;
            color: #64748b;
            font-weight: 500;
            margin-top: 0.5rem;
            letter-spacing: 0.05em;
            animation: subtitleFade 2s ease-in-out infinite;
        }
        
        /* Progress indicator */
        .loading-progress {
            width: 200px;
            height: 2px;
            background: #f1f5f9;
            border-radius: 1px;
            margin-top: 1.5rem;
            overflow: hidden;
            position: relative;
        }
        
        .loading-progress::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, #0ea5e9, transparent);
            animation: progressSlide 2s ease-in-out infinite;
        }
        
        /* Keyframe animations */
        @keyframes  floatParticle {
            0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.6; }
            50% { transform: translateY(-20px) rotate(180deg); opacity: 1; }
        }
        
        @keyframes  rotateOrbit {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        @keyframes  spinInner {
            0% { transform: rotate(0deg) scale(1); }
            50% { transform: rotate(180deg) scale(1.1); }
            100% { transform: rotate(360deg) scale(1); }
        }
        
        @keyframes  coreGlow {
            0% { 
                transform: translate(-50%, -50%) scale(0.8); 
                box-shadow: 
                    0 0 20px rgba(14, 165, 233, 0.6),
                    0 0 40px rgba(14, 165, 233, 0.3),
                    inset 0 0 10px rgba(255, 255, 255, 0.3);
            }
            100% {
                transform: translate(-50%, -50%) scale(1.2); 
                box-shadow: 
                    0 0 30px rgba(14, 165, 233, 0.8),
                    0 0 60px rgba(14, 165, 233, 0.4),
                    inset 0 0 15px rgba(255, 255, 255, 0.5);
            }
        }
        
        @keyframes  morphCore {
            0%, 100% { border-radius: 50%; background-position: 0% 50%; }
            25% { border-radius: 40%; background-position: 100% 50%; }
            50% { border-radius: 30%; background-position: 0% 50%; }
            75% { border-radius: 40%; background-position: 100% 50%; }
        }
        
        @keyframes  textShimmer {
            0% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
            100% { background-position: 0% 50%; }
        }
        
        @keyframes  textGlow {
            0% { opacity: 0.3; }
            100% { opacity: 0.7; }
        }
        
        @keyframes  subtitleFade {
            0%, 100% { opacity: 0.5; transform: translateY(0px); }
            50% { opacity: 1; transform: translateY(-2px); }
        }
        
        @keyframes  progressSlide {
            0% { left: -100%; }
            50% { left: 0%; }
            100% { left: 100%; }
        }
    </style>

    <!-- SweetAlert2 -->
    <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
</head>

<body class="font-sans bg-gray-50 dark:bg-gray-900 text-gray-900 dark:text-gray-100 flex min-h-screen">
    <div id="google_translate_element" style="display:none;"></div>

    <!-- Language Selection Bar with Google Translate -->
    <div class="language-bar-container" id="languageBar">
        <div class="language-bar-scroll">
            <a href="javascript:void(0)" onclick="selectLanguage('en');" class="lang-btn active">
                <span class="flag">🇬🇧</span> English
            </a>
            <a href="javascript:void(0)" onclick="selectLanguage('es');" class="lang-btn">
                <span class="flag">🇪🇸</span> Spanish
            </a>
            <a href="javascript:void(0)" onclick="selectLanguage('fr');" class="lang-btn">
                <span class="flag">🇫🇷</span> French
            </a>
            <a href="javascript:void(0)" onclick="selectLanguage('de');" class="lang-btn">
                <span class="flag">🇩🇪</span> German
            </a>
            <a href="javascript:void(0)" onclick="selectLanguage('it');" class="lang-btn">
                <span class="flag">🇮🇹</span> Italian
            </a>
            <a href="javascript:void(0)" onclick="selectLanguage('pt');" class="lang-btn">
                <span class="flag">🇵🇹</span> Portuguese
            </a>
            <a href="javascript:void(0)" onclick="selectLanguage('ru');" class="lang-btn">
                <span class="flag">🇷🇺</span> Russian
            </a>
            <a href="javascript:void(0)" onclick="selectLanguage('zh-CN');" class="lang-btn">
                <span class="flag">🇨🇳</span> Chinese
            </a>
            <a href="javascript:void(0)" onclick="selectLanguage('ja');" class="lang-btn">
                <span class="flag">🇯🇵</span> Japanese
            </a>
            <a href="javascript:void(0)" onclick="selectLanguage('ko');" class="lang-btn">
                <span class="flag">🇰🇷</span> Korean
            </a>
            <a href="javascript:void(0)" onclick="selectLanguage('ar');" class="lang-btn">
                <span class="flag">🇸🇦</span> Arabic
            </a>
        </div>
        <button class="lang-close" onclick="closeLanguageBar();">✕</button>
    </div>

    <!-- Language Selector Icon (Globe Button) -->
    <div class="language-bar-screw" onclick="toggleLanguageBar();">
        <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><path d="M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"></path></svg>
    </div>

    <script>
        function toggleLanguageBar() {
            const bar = document.getElementById('languageBar');
            bar.classList.toggle('show');
        }

        function closeLanguageBar() {
            const bar = document.getElementById('languageBar');
            bar.classList.remove('show');
        }

        function selectLanguage(lang) {
            document.querySelectorAll('.lang-btn').forEach(btn => {
                btn.classList.remove('active');
            });

            var clickedButton = event ? event.target.closest('.lang-btn') : null;
            if (clickedButton) {
                clickedButton.classList.add('active');
            }

            if (lang === 'en') {
                location.reload();
                return;
            }

            var attempts = 0;
            var interval = setInterval(function() {
                attempts++;
                var select = document.querySelector('.goog-te-combo');
                if (select) {
                    clearInterval(interval);
                    select.value = lang;
                    select.dispatchEvent(new Event('change'));
                    if (select.onchange) select.onchange();
                }
                if (attempts > 30) {
                    clearInterval(interval);
                    console.log('Google Translate selector not found');
                }
            }, 100);

            setTimeout(closeLanguageBar, 800);
        }
    </script>

    <!-- Ultra Modern Page Loader -->
    <div class="page-loading active">
        <div class="page-loading-inner">
            <div class="loading-container">
                <!-- Floating particles background -->
                <div class="loading-particles">
                    <div class="particle"></div> 
        
                    <div class="particle"></div> 
        
                    <div class="particle"></div> 
        
                    <div class="particle"></div> 
        
                    <div class="particle"></div> 
        
                    <div class="particle"></div> 
        
                </div> 
        
                
                <!-- Main loading animation -->
                <div class="loading-animation">
                    <!-- Outer orbital rings -->
                    <div class="orbit-ring"></div> 
        
                    <div class="orbit-ring"></div> 
        
                    <div class="orbit-ring"></div> 
        
                    
                    <!-- Inner spinning circles -->
                    <div class="inner-circle"></div> 
        
                    <div class="inner-circle"></div> 
        
                    
                    <!-- Morphing glowing core -->
                    <div class="core"></div> 
        
                </div> 
        
                
                <!-- Enhanced text with effects -->
                <div class="text"><?php echo getSiteConfig('sitename'); ?></div> 
        
                <div class="subtitle">Secure Banking Platform</div> 
        
                
                <!-- Progress indicator -->
                <div class="loading-progress"></div> 
        
            </div> 
        
        </div> 
        
    </div> 
        
    
    <!-- Dark Mode Toggle - Floating button -->
    <div class="fixed top-4 right-4 z-50">
        <button @click="darkMode = !darkMode; localStorage.setItem('darkMode', darkMode)" 
                class="dark-mode-toggle p-3 rounded-2xl bg-white/80 dark:bg-gray-800/80 text-gray-700 dark:text-gray-300 shadow-lg hover:shadow-xl border border-gray-200/50 dark:border-gray-700/50 backdrop-blur-xl transition-all duration-300 hover:scale-110"
                :title="darkMode ? 'Switch to Light Mode' : 'Switch to Dark Mode'">
            <i class="fa-solid fa-sun h-5 w-5" x-show="darkMode"></i>
            <i class="fa-solid fa-moon h-5 w-5" x-show="!darkMode"></i>
        </button>
    </div> 
        
    
    <!-- Main Content -->
    <div class="w-full">
        
<div class="flex flex-col lg:flex-row min-h-screen">
    <!-- Left Side - Branding & Illustration (Desktop Only) -->
    <div class="hidden lg:flex lg:w-1/2 bg-gradient-to-br from-primary-600 via-primary-700 to-primary-800 dark:from-primary-700 dark:via-primary-800 dark:to-primary-900 relative overflow-hidden">
        <!-- Animated Background Elements -->
        <div class="absolute inset-0 overflow-hidden">
            <!-- Floating Shapes -->
            <div class="absolute top-1/4 left-1/4 w-48 h-48 bg-white/10 rounded-full backdrop-blur-sm floating-slow"></div> 
        
            <div class="absolute bottom-1/3 right-1/4 w-72 h-72 bg-white/5 rounded-full backdrop-blur-sm floating"></div> 
        
            <div class="absolute top-2/3 left-1/3 w-32 h-32 bg-white/15 rounded-full backdrop-blur-sm floating-slower"></div> 
        
            
            <!-- Grid Pattern -->
            <div class="absolute inset-0 opacity-20" style="background-image: radial-gradient(rgba(255,255,255,0.15) 1px, transparent 1px); background-size: 25px 25px;"></div> 
        
        </div> 
        
        
        <!-- Content -->
        <div class="relative flex flex-col justify-center items-center w-full h-full text-white p-8 z-10">
            <!-- Logo with Glow Effect -->
            <div class="mb-6 relative">
                <div class="absolute inset-0 bg-white/20 rounded-2xl blur-lg"></div> 
        
                <div class="relative bg-white/10 backdrop-blur-sm rounded-2xl p-4 border border-white/20">
                    <img src="storage/app/public/photos/ll6Rkij7mMXTskezBsaz1LTT1rIvUOc63TqzmuC6.png" alt="Logo" class="h-12">
                </div> 
        
            </div> 
        
            
            <!-- Title -->
            <h1 class="text-3xl font-black mb-3 text-center bg-gradient-to-r from-white via-white to-white/80 bg-clip-text text-transparent">
                Join <?php echo getSiteConfig('sitename'); ?>
            </h1>
            <h2 class="text-lg font-semibold mb-6 text-center text-white/90">
                Create Your Banking Account
            </h2>
            
            <!-- Description -->
            <p class="text-sm mb-8 max-w-md text-center text-white/80 leading-relaxed">
                Start your financial journey with <?php echo getSiteConfig('sitename'); ?>. Secure, fast, and reliable banking at your fingertips.
            </p>
            
            <!-- Features Grid -->
            <div class="grid grid-cols-2 gap-4 w-full max-w-md">
                <div class="group flex items-center space-x-3 p-3 rounded-xl bg-white/10 backdrop-blur-sm border border-white/20 hover:bg-white/15 transition-all duration-300">
                    <div class="flex-shrink-0 w-8 h-8 rounded-xl bg-white/20 flex items-center justify-center group-hover:scale-110 transition-transform">
                        <i class="fas fa-shield-alt text-sm"></i>
                    </div> 
        
                    <div>
                        <h3 class="text-sm font-semibold">Secure Platform</h3>
                        <p class="text-xs text-white/70">Bank-grade security</p>
                    </div> 
        
                </div> 
        
                <div class="group flex items-center space-x-3 p-3 rounded-xl bg-white/10 backdrop-blur-sm border border-white/20 hover:bg-white/15 transition-all duration-300">
                    <div class="flex-shrink-0 w-8 h-8 rounded-xl bg-white/20 flex items-center justify-center group-hover:scale-110 transition-transform">
                        <i class="fas fa-bolt text-sm"></i>
                    </div> 
        
                    <div>
                        <h3 class="text-sm font-semibold">Fast Transfers</h3>
                        <p class="text-xs text-white/70">Instant payments</p>
                    </div> 
        
                </div> 
        
                <div class="group flex items-center space-x-3 p-3 rounded-xl bg-white/10 backdrop-blur-sm border border-white/20 hover:bg-white/15 transition-all duration-300">
                    <div class="flex-shrink-0 w-8 h-8 rounded-xl bg-white/20 flex items-center justify-center group-hover:scale-110 transition-transform">
                        <i class="fas fa-clock text-sm"></i>
                    </div> 
        
                    <div>
                        <h3 class="text-sm font-semibold">24/7 Access</h3>
                        <p class="text-xs text-white/70">Always available</p>
                    </div> 
        
                </div> 
        
                <div class="group flex items-center space-x-3 p-3 rounded-xl bg-white/10 backdrop-blur-sm border border-white/20 hover:bg-white/15 transition-all duration-300">
                    <div class="flex-shrink-0 w-8 h-8 rounded-xl bg-white/20 flex items-center justify-center group-hover:scale-110 transition-transform">
                        <i class="fas fa-globe text-sm"></i>
                    </div> 
        
                    <div>
                        <h3 class="text-sm font-semibold">Global Banking</h3>
                        <p class="text-xs text-white/70">Worldwide access</p>
                    </div> 
        
                </div> 
        
            </div> 
        
        </div> 
        
    </div> 
        

    <!-- Right Side - Registration Form -->
    <div class="w-full lg:w-1/2 flex flex-col justify-center items-center p-3 lg:p-8 bg-gray-50/50 dark:bg-gray-900/50 backdrop-blur-sm">
        <div class="w-full max-w-sm">
            <!-- Mobile Header -->
            <div class="lg:hidden text-center mb-6">
                <div class="relative inline-block mb-3 mt-10">
                    <div class="absolute inset-0 bg-primary-500/20 rounded-2xl blur-lg"></div> 
        
                    <div class="relative bg-white/90 dark:bg-gray-800/90 backdrop-blur-sm rounded-2xl p-3 border border-gray-200/50 dark:border-gray-700/50">
                        <img src="storage/app/public/photos/ll6Rkij7mMXTskezBsaz1LTT1rIvUOc63TqzmuC6.png" alt="Logo" class="h-10 mx-auto">
                    </div> 
        
                </div> 
        
                <h1 class="text-xl font-bold text-gray-900 dark:text-white mb-1">Create Account</h1>
                <p class="text-sm text-gray-600 dark:text-gray-400">Join <?php echo getSiteConfig('sitename'); ?> today</p>
            </div> 
        
            
            <!-- Enhanced Alerts -->
                        
                        
            <!-- Registration Card -->
            <div class="bg-white/90 dark:bg-gray-800/90 backdrop-blur-xl rounded-2xl shadow-2xl border border-gray-200/50 dark:border-gray-700/50 overflow-hidden">
                <!-- Progress Header -->
                <div class="px-6 pt-6 pb-4 border-b border-gray-100/50 dark:border-gray-700/50">
                    <div class="flex justify-between items-center mb-3">
                        <h2 class="text-lg font-bold text-gray-900 dark:text-white">Create Account</h2>
                        <span class="text-xs font-medium text-gray-500 dark:text-gray-400">Step <span id="current-step">1</span> of 4</span>
                    </div> 
        
                    
                    <!-- Progress Bar -->
                    <div class="h-1.5 w-full bg-gray-200 dark:bg-gray-600 rounded-full overflow-hidden mb-2">
                        <div id="progress-bar" class="h-full bg-gradient-to-r from-primary-600 to-primary-700 rounded-full transition-all duration-500 ease-in-out" style="width: 25%"></div> 
        
                    </div> 
        
                    
                    <!-- Step Indicators -->
                    <div class="flex justify-between text-xs">
                        <div class="flex flex-col items-center">
                            <div id="step-1-indicator" class="w-6 h-6 rounded-full bg-primary-600 text-white flex items-center justify-center mb-1">
                                <i class="fas fa-user text-xs"></i>
                            </div> 
        
                            <span class="text-primary-600 dark:text-primary-400 font-medium">Personal</span>
                        </div> 
        
                        <div class="flex flex-col items-center">
                            <div id="step-2-indicator" class="w-6 h-6 rounded-full bg-gray-300 dark:bg-gray-600 text-gray-500 flex items-center justify-center mb-1">
                                <i class="fas fa-envelope text-xs"></i>
                            </div> 
        
                            <span class="text-gray-500 dark:text-gray-400">Contact</span>
                        </div> 
        
                        <div class="flex flex-col items-center">
                            <div id="step-3-indicator" class="w-6 h-6 rounded-full bg-gray-300 dark:bg-gray-600 text-gray-500 flex items-center justify-center mb-1">
                                <i class="fas fa-university text-xs"></i>
                            </div> 
        
                            <span class="text-gray-500 dark:text-gray-400">Account</span>
                        </div> 
        
                        <div class="flex flex-col items-center">
                            <div id="step-4-indicator" class="w-6 h-6 rounded-full bg-gray-300 dark:bg-gray-600 text-gray-500 flex items-center justify-center mb-1">
                                <i class="fas fa-lock text-xs"></i>
                            </div> 
        
                            <span class="text-gray-500 dark:text-gray-400">Security</span>
                        </div> 
        
                    </div> 
        
                </div> 
        
                
                <!-- Form Container -->
                <div class="px-6 pb-6 pt-4">
                    <form action="" method="post" id="registration-form">
                        <input type="hidden" name="_token" value="SCNov6baTlNnkTANaY7BpU0old3OK2bU1W4OBjId">                        
                        <!-- Step 1: Personal Information -->
                        <div id="step-1" class="step-content">
                            <div class="text-center mb-4">
                                <div class="inline-flex items-center justify-center w-12 h-12 rounded-xl bg-primary-100/50 dark:bg-primary-800/50 backdrop-blur-sm mb-3">
                                    <i class="fas fa-user text-lg text-primary-600 dark:text-primary-300"></i>
                                </div> 
        
                                <h3 class="text-sm font-bold text-gray-900 dark:text-white mb-1">Personal Information</h3>
                                <p class="text-xs text-gray-600 dark:text-gray-400">Tell us about yourself</p>
                            </div> 
        
                            
                            <div class="space-y-3">
                                <!-- First Name -->
                                <div class="space-y-1">
                                    <label for="name" class="block text-xs font-semibold text-gray-700 dark:text-gray-300">First Name *</label>
                                    <div class="relative">
                                        <div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none z-10">
                                            <i class="fas fa-user text-gray-400 text-sm"></i>
                                        </div> 
        
                                        <input 
                                            type="text" 
                                            id="name" 
                                            name="name" 
                                            value=""
                                            class="w-full pl-10 pr-3 py-3 border border-gray-300/50 dark:border-gray-600/50 rounded-xl bg-gray-50/50 dark:bg-gray-700/50 text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-primary-500/50 focus:border-primary-500 backdrop-blur-sm transition-all duration-300 text-sm" 
                                            placeholder="John" 
                                            required>
                                    </div> 
        
                                </div> 
        
                                
                                <!-- Last Name -->
                                <div class="space-y-1">
                                    <label for="lastname" class="block text-xs font-semibold text-gray-700 dark:text-gray-300">Last Name *</label>
                                    <div class="relative">
                                        <div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none z-10">
                                            <i class="fas fa-user text-gray-400 text-sm"></i>
                                        </div> 
        
                                        <input 
                                            type="text" 
                                            id="lastname" 
                                            name="lastname" 
                                            value=""
                                            class="w-full pl-10 pr-3 py-3 border border-gray-300/50 dark:border-gray-600/50 rounded-xl bg-gray-50/50 dark:bg-gray-700/50 text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-primary-500/50 focus:border-primary-500 backdrop-blur-sm transition-all duration-300 text-sm" 
                                            placeholder="Smith" 
                                            required>
                                    </div> 
        
                                </div> 
        
                                
                                <!-- Middle Name -->
                                <div class="space-y-1">
                                    <label for="middlename" class="block text-xs font-semibold text-gray-700 dark:text-gray-300">Middle Name</label>
                                    <div class="relative">
                                        <div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none z-10">
                                            <i class="fas fa-user text-gray-400 text-sm"></i>
                                        </div> 
        
                                        <input 
                                            type="text" 
                                            id="middlename" 
                                            name="middlename" 
                                            value=""
                                            class="w-full pl-10 pr-3 py-3 border border-gray-300/50 dark:border-gray-600/50 rounded-xl bg-gray-50/50 dark:bg-gray-700/50 text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-primary-500/50 focus:border-primary-500 backdrop-blur-sm transition-all duration-300 text-sm" 
                                            placeholder="David">
                                    </div> 
        
                                </div> 
        
                                
                                <!-- Username -->
                                <div class="space-y-1">
                                    <label for="username" class="block text-xs font-semibold text-gray-700 dark:text-gray-300">Username *</label>
                                    <div class="relative">
                                        <div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none z-10">
                                            <i class="fas fa-at text-gray-400 text-sm"></i>
                                        </div> 
        
                                        <input 
                                            type="text" 
                                            id="username" 
                                            name="username" 
                                            value=""
                                            class="w-full pl-10 pr-3 py-3 border border-gray-300/50 dark:border-gray-600/50 rounded-xl bg-gray-50/50 dark:bg-gray-700/50 text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-primary-500/50 focus:border-primary-500 backdrop-blur-sm transition-all duration-300 text-sm" 
                                            placeholder="johnsmith123" 
                                            required>
                                    </div> 
        
                                </div> 
        
                            </div> 
        
                        </div> 
        
                        
                        <!-- Step 2: Contact Information -->
                        <div id="step-2" class="step-content" style="display: none;">
                            <div class="text-center mb-4">
                                <div class="inline-flex items-center justify-center w-12 h-12 rounded-xl bg-primary-100/50 dark:bg-primary-800/50 backdrop-blur-sm mb-3">
                                    <i class="fas fa-envelope text-lg text-primary-600 dark:text-primary-300"></i>
                                </div> 
        
                                <h3 class="text-sm font-bold text-gray-900 dark:text-white mb-1">Contact Information</h3>
                                <p class="text-xs text-gray-600 dark:text-gray-400">How can we reach you?</p>
                            </div> 
        
                            
                            <div class="space-y-3">
                                <!-- Email -->
                                <div class="space-y-1">
                                    <label for="email" class="block text-xs font-semibold text-gray-700 dark:text-gray-300">Email Address *</label>
                                    <div class="relative">
                                        <div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none z-10">
                                            <i class="fas fa-envelope text-gray-400 text-sm"></i>
                                        </div> 
        
                                        <input 
                                            type="email" 
                                            id="email" 
                                            name="email" 
                                            value=""
                                            class="w-full pl-10 pr-3 py-3 border border-gray-300/50 dark:border-gray-600/50 rounded-xl bg-gray-50/50 dark:bg-gray-700/50 text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-primary-500/50 focus:border-primary-500 backdrop-blur-sm transition-all duration-300 text-sm" 
                                            placeholder="john@example.com" 
                                            required>
                                    </div> 
        
                                </div> 
        
                                
                                <!-- Phone -->
                                <div class="space-y-1">
                                    <label for="phone" class="block text-xs font-semibold text-gray-700 dark:text-gray-300">Phone Number *</label>
                                    <div class="relative">
                                        <div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none z-10">
                                            <i class="fas fa-phone text-gray-400 text-sm"></i>
                                        </div> 
        
                                        <input 
                                            type="tel" 
                                            id="phone" 
                                            name="phone" 
                                            value=""
                                            class="w-full pl-10 pr-3 py-3 border border-gray-300/50 dark:border-gray-600/50 rounded-xl bg-gray-50/50 dark:bg-gray-700/50 text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-primary-500/50 focus:border-primary-500 backdrop-blur-sm transition-all duration-300 text-sm" 
                                            placeholder="+1 (234) 567-8901" 
                                            required>
                                    </div> 
        
                                </div> 
        
                                
                                <!-- Country -->
                                <div class="space-y-1">
                                    <label for="country" class="block text-xs font-semibold text-gray-700 dark:text-gray-300">Country *</label>
                                    <div class="relative">
                                        <div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none z-10">
                                            <i class="fas fa-globe text-gray-400 text-sm"></i>
                                        </div> 
        
                                        <select 
                                            id="country" 
                                            name="country" 
                                            class="w-full pl-10 pr-8 py-3 border border-gray-300/50 dark:border-gray-600/50 rounded-xl bg-gray-50/50 dark:bg-gray-700/50 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-primary-500/50 focus:border-primary-500 backdrop-blur-sm transition-all duration-300 text-sm appearance-none" 
                                            required>
                                            <option value="" disabled selected>Select Country</option>
                                            <option value="Afganistan">Afghanistan</option>
                                        <option value="Albania">Albania</option>
                                        <option value="Algeria">Algeria</option>
                                        <option value="American Samoa">American Samoa</option>
                                        <option value="Andorra">Andorra</option>
                                        <option value="Angola">Angola</option>
                                        <option value="Anguilla">Anguilla</option>
                                        <option value="Antigua &amp; Barbuda">Antigua &amp; Barbuda</option>
                                        <option value="Argentina">Argentina</option>
                                        <option value="Armenia">Armenia</option>
                                        <option value="Aruba">Aruba</option>
                                        <option value="Australia">Australia</option>
                                        <option value="Austria">Austria</option>
                                        <option value="Azerbaijan">Azerbaijan</option>
                                        <option value="Bahamas">Bahamas</option>
                                        <option value="Bahrain">Bahrain</option>
                                        <option value="Bangladesh">Bangladesh</option>
                                        <option value="Barbados">Barbados</option>
                                        <option value="Belarus">Belarus</option>
                                        <option value="Belgium">Belgium</option>
                                        <option value="Belize">Belize</option>
                                        <option value="Benin">Benin</option>
                                        <option value="Bermuda">Bermuda</option>
                                        <option value="Bhutan">Bhutan</option>
                                        <option value="Bolivia">Bolivia</option>
                                        <option value="Bonaire">Bonaire</option>
                                        <option value="Bosnia &amp; Herzegovina">Bosnia &amp; Herzegovina</option>
                                        <option value="Botswana">Botswana</option>
                                        <option value="Brazil">Brazil</option>
                                        <option value="British Indian Ocean Ter">British Indian Ocean Ter</option>
                                        <option value="Brunei">Brunei</option>
                                        <option value="Bulgaria">Bulgaria</option>
                                        <option value="Burkina Faso">Burkina Faso</option>
                                        <option value="Burundi">Burundi</option>
                                        <option value="Cambodia">Cambodia</option>
                                        <option value="Cameroon">Cameroon</option>
                                        <option value="Canada">Canada</option>
                                        <option value="Canary Islands">Canary Islands</option>
                                        <option value="Cape Verde">Cape Verde</option>
                                        <option value="Cayman Islands">Cayman Islands</option>
                                        <option value="Central African Republic">Central African Republic</option>
                                        <option value="Chad">Chad</option>
                                        <option value="Channel Islands">Channel Islands</option>
                                        <option value="Chile">Chile</option>
                                        <option value="China">China</option>
                                        <option value="Christmas Island">Christmas Island</option>
                                        <option value="Cocos Island">Cocos Island</option>
                                        <option value="Colombia">Colombia</option>
                                        <option value="Comoros">Comoros</option>
                                        <option value="Congo">Congo</option>
                                        <option value="Cook Islands">Cook Islands</option>
                                        <option value="Costa Rica">Costa Rica</option>
                                        <option value="Cote DIvoire">Cote D'Ivoire</option>
                                        <option value="Croatia">Croatia</option>
                                        <option value="Cuba">Cuba</option>
                                        <option value="Curaco">Curacao</option>
                                        <option value="Cyprus">Cyprus</option>
                                        <option value="Czech Republic">Czech Republic</option>
                                        <option value="Denmark">Denmark</option>
                                        <option value="Djibouti">Djibouti</option>
                                        <option value="Dominica">Dominica</option>
                                        <option value="Dominican Republic">Dominican Republic</option>
                                        <option value="East Timor">East Timor</option>
                                        <option value="Ecuador">Ecuador</option>
                                        <option value="Egypt">Egypt</option>
                                        <option value="El Salvador">El Salvador</option>
                                        <option value="Equatorial Guinea">Equatorial Guinea</option>
                                        <option value="Eritrea">Eritrea</option>
                                        <option value="Estonia">Estonia</option>
                                        <option value="Ethiopia">Ethiopia</option>
                                        <option value="Falkland Islands">Falkland Islands</option>
                                        <option value="Faroe Islands">Faroe Islands</option>
                                        <option value="Fiji">Fiji</option>
                                        <option value="Finland">Finland</option>
                                        <option value="France">France</option>
                                        <option value="French Guiana">French Guiana</option>
                                        <option value="French Polynesia">French Polynesia</option>
                                        <option value="French Southern Ter">French Southern Ter</option>
                                        <option value="Gabon">Gabon</option>
                                        <option value="Gambia">Gambia</option>
                                        <option value="Georgia">Georgia</option>
                                        <option value="Germany">Germany</option>
                                        <option value="Ghana">Ghana</option>
                                        <option value="Gibraltar">Gibraltar</option>
                                        <option value="Great Britain">Great Britain</option>
                                        <option value="Greece">Greece</option>
                                        <option value="Greenland">Greenland</option>
                                        <option value="Grenada">Grenada</option>
                                        <option value="Guadeloupe">Guadeloupe</option>
                                        <option value="Guam">Guam</option>
                                        <option value="Guatemala">Guatemala</option>
                                        <option value="Guinea">Guinea</option>
                                        <option value="Guyana">Guyana</option>
                                        <option value="Haiti">Haiti</option>
                                        <option value="Hawaii">Hawaii</option>
                                        <option value="Honduras">Honduras</option>
                                        <option value="Hong Kong">Hong Kong</option>
                                        <option value="Hungary">Hungary</option>
                                        <option value="Iceland">Iceland</option>
                                        <option value="India">India</option>
                                        <option value="Indonesia">Indonesia</option>
                                        <option value="Iran">Iran</option>
                                        <option value="Iraq">Iraq</option>
                                        <option value="Ireland">Ireland</option>
                                        <option value="Isle of Man">Isle of Man</option>
                                        <option value="Israel">Israel</option>
                                        <option value="Italy">Italy</option>
                                        <option value="Jamaica">Jamaica</option>
                                        <option value="Japan">Japan</option>
                                        <option value="Jordan">Jordan</option>
                                        <option value="Kazakhstan">Kazakhstan</option>
                                        <option value="Kenya">Kenya</option>
                                        <option value="Kiribati">Kiribati</option>
                                        <option value="Korea North">Korea North</option>
                                        <option value="Korea Sout">Korea South</option>
                                        <option value="Kuwait">Kuwait</option>
                                        <option value="Kyrgyzstan">Kyrgyzstan</option>
                                        <option value="Laos">Laos</option>
                                        <option value="Latvia">Latvia</option>
                                        <option value="Lebanon">Lebanon</option>
                                        <option value="Lesotho">Lesotho</option>
                                        <option value="Liberia">Liberia</option>
                                        <option value="Libya">Libya</option>
                                        <option value="Liechtenstein">Liechtenstein</option>
                                        <option value="Lithuania">Lithuania</option>
                                        <option value="Luxembourg">Luxembourg</option>
                                        <option value="Macau">Macau</option>
                                        <option value="Macedonia">Macedonia</option>
                                        <option value="Madagascar">Madagascar</option>
                                        <option value="Malaysia">Malaysia</option>
                                        <option value="Malawi">Malawi</option>
                                        <option value="Maldives">Maldives</option>
                                        <option value="Mali">Mali</option>
                                        <option value="Malta">Malta</option>
                                        <option value="Marshall Islands">Marshall Islands</option>
                                        <option value="Martinique">Martinique</option>
                                        <option value="Mauritania">Mauritania</option>
                                        <option value="Mauritius">Mauritius</option>
                                        <option value="Mayotte">Mayotte</option>
                                        <option value="Mexico">Mexico</option>
                                        <option value="Midway Islands">Midway Islands</option>
                                        <option value="Moldova">Moldova</option>
                                        <option value="Monaco">Monaco</option>
                                        <option value="Mongolia">Mongolia</option>
                                        <option value="Montserrat">Montserrat</option>
                                        <option value="Morocco">Morocco</option>
                                        <option value="Mozambique">Mozambique</option>
                                        <option value="Myanmar">Myanmar</option>
                                        <option value="Nambia">Nambia</option>
                                        <option value="Nauru">Nauru</option>
                                        <option value="Nepal">Nepal</option>
                                        <option value="Netherland Antilles">Netherland Antilles</option>
                                        <option value="Netherlands">Netherlands (Holland, Europe)</option>
                                        <option value="Nevis">Nevis</option>
                                        <option value="New Caledonia">New Caledonia</option>
                                        <option value="New Zealand">New Zealand</option>
                                        <option value="Nicaragua">Nicaragua</option>
                                        <option value="Niger">Niger</option>
                                        <option value="Nigeria">Nigeria</option>
                                        <option value="Niue">Niue</option>
                                        <option value="Norfolk Island">Norfolk Island</option>
                                        <option value="Norway">Norway</option>
                                        <option value="Oman">Oman</option>
                                        <option value="Pakistan">Pakistan</option>
                                        <option value="Palau Island">Palau Island</option>
                                        <option value="Palestine">Palestine</option>
                                        <option value="Panama">Panama</option>
                                        <option value="Papua New Guinea">Papua New Guinea</option>
                                        <option value="Paraguay">Paraguay</option>
                                        <option value="Peru">Peru</option>
                                        <option value="Phillipines">Philippines</option>
                                        <option value="Pitcairn Island">Pitcairn Island</option>
                                        <option value="Poland">Poland</option>
                                        <option value="Portugal">Portugal</option>
                                        <option value="Puerto Rico">Puerto Rico</option>
                                        <option value="Qatar">Qatar</option>
                                        <option value="Republic of Montenegro">Republic of Montenegro</option>
                                        <option value="Republic of Serbia">Republic of Serbia</option>
                                        <option value="Reunion">Reunion</option>
                                        <option value="Romania">Romania</option>
                                        <option value="Russia">Russia</option>
                                        <option value="Rwanda">Rwanda</option>
                                        <option value="St Barthelemy">St Barthelemy</option>
                                        <option value="St Eustatius">St Eustatius</option>
                                        <option value="St Helena">St Helena</option>
                                        <option value="St Kitts-Nevis">St Kitts-Nevis</option>
                                        <option value="St Lucia">St Lucia</option>
                                        <option value="St Maarten">St Maarten</option>
                                        <option value="St Pierre &amp; Miquelon">St Pierre &amp; Miquelon</option>
                                        <option value="St Vincent &amp; Grenadines">St Vincent &amp; Grenadines</option>
                                        <option value="Saipan">Saipan</option>
                                        <option value="Samoa">Samoa</option>
                                        <option value="Samoa American">Samoa American</option>
                                        <option value="San Marino">San Marino</option>
                                        <option value="Sao Tome &amp; Principe">Sao Tome &amp; Principe</option>
                                        <option value="Saudi Arabia">Saudi Arabia</option>
                                        <option value="Senegal">Senegal</option>
                                        <option value="Serbia">Serbia</option>
                                        <option value="Seychelles">Seychelles</option>
                                        <option value="Sierra Leone">Sierra Leone</option>
                                        <option value="Singapore">Singapore</option>
                                        <option value="Slovakia">Slovakia</option>
                                        <option value="Slovenia">Slovenia</option>
                                        <option value="Solomon Islands">Solomon Islands</option>
                                        <option value="Somalia">Somalia</option>
                                        <option value="South Africa">South Africa</option>
                                        <option value="Spain">Spain</option>
                                        <option value="Sri Lanka">Sri Lanka</option>
                                        <option value="Sudan">Sudan</option>
                                        <option value="Suriname">Suriname</option>
                                        <option value="Swaziland">Swaziland</option>
                                        <option value="Sweden">Sweden</option>
                                        <option value="Switzerland">Switzerland</option>
                                        <option value="Syria">Syria</option>
                                        <option value="Tahiti">Tahiti</option>
                                        <option value="Taiwan">Taiwan</option>
                                        <option value="Tajikistan">Tajikistan</option>
                                        <option value="Tanzania">Tanzania</option>
                                        <option value="Thailand">Thailand</option>
                                        <option value="Togo">Togo</option>
                                        <option value="Tokelau">Tokelau</option>
                                        <option value="Tonga">Tonga</option>
                                        <option value="Trinidad &amp; Tobago">Trinidad &amp; Tobago</option>
                                        <option value="Tunisia">Tunisia</option>
                                        <option value="Turkey">Turkey</option>
                                        <option value="Turkmenistan">Turkmenistan</option>
                                        <option value="Turks &amp; Caicos Is">Turks &amp; Caicos Is</option>
                                        <option value="Tuvalu">Tuvalu</option>
                                        <option value="Uganda">Uganda</option>
                                        <option value="Ukraine">Ukraine</option>
                                        <option value="United Arab Erimates">United Arab Emirates</option>
                                        <option value="United Kingdom">United Kingdom</option>
                                        <option value="United States of America">United States of America</option>
                                        <option value="Uraguay">Uruguay</option>
                                        <option value="Uzbekistan">Uzbekistan</option>
                                        <option value="Vanuatu">Vanuatu</option>
                                        <option value="Vatican City State">Vatican City State</option>
                                        <option value="Venezuela">Venezuela</option>
                                        <option value="Vietnam">Vietnam</option>
                                        <option value="Virgin Islands (Brit)">Virgin Islands (Brit)</option>
                                        <option value="Virgin Islands (USA)">Virgin Islands (USA)</option>
                                        <option value="Wake Island">Wake Island</option>
                                        <option value="Wallis &amp; Futana Is">Wallis &amp; Futana Is</option>
                                        <option value="Yemen">Yemen</option>
                                        <option value="Zaire">Zaire</option>
                                        <option value="Zambia">Zambia</option>
                                        <option value="Zimbabwe">Zimbabwe</option>                                        </select>
                                        <div class="absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none">
                                            <i class="fas fa-chevron-down text-gray-400 text-sm"></i>
                                        </div> 
        
                                    </div> 
        
                                </div> 
        
                            </div> 
        
                        </div> 
        
                        
                        <!-- Step 3: Account Setup -->
                        <div id="step-3" class="step-content" style="display: none;">
                            <div class="text-center mb-4">
                                <div class="inline-flex items-center justify-center w-12 h-12 rounded-xl bg-primary-100/50 dark:bg-primary-800/50 backdrop-blur-sm mb-3">
                                    <i class="fas fa-university text-lg text-primary-600 dark:text-primary-300"></i>
                                </div> 
        
                                <h3 class="text-sm font-bold text-gray-900 dark:text-white mb-1">Account Setup</h3>
                                <p class="text-xs text-gray-600 dark:text-gray-400">Choose your account preferences</p>
                            </div> 
        
                            
                            <div class="space-y-3">
                                <!-- Currency -->
                                <div class="space-y-1">
                                    <label for="curr" class="block text-xs font-semibold text-gray-700 dark:text-gray-300">Currency *</label>
                                    <div class="relative">
                                        <div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none z-10">
                                            <i class="fas fa-dollar-sign text-gray-400 text-sm"></i>
                                        </div> 
        
                                        <select 
                                            id="curr" 
                                            name="curr" 
                                            class="w-full pl-10 pr-8 py-3 border border-gray-300/50 dark:border-gray-600/50 rounded-xl bg-gray-50/50 dark:bg-gray-700/50 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-primary-500/50 focus:border-primary-500 backdrop-blur-sm transition-all duration-300 text-sm appearance-none" 
                                            required>
                                            <option value="" disabled selected>Select Currency</option>
                                            <option value="AED" data-symbol="&#1583;.&#1573;">AED - د.إ</option><option value="AFN" data-symbol="&#65;&#102;">AFN - Af</option><option value="ALL" data-symbol="&#76;&#101;&#107;">ALL - Lek</option><option value="ANG" data-symbol="&#402;">ANG - ƒ</option><option value="AOA" data-symbol="&#75;&#122;">AOA - Kz</option><option value="ARS" data-symbol="&#36;">ARS - $</option><option value="AUD" data-symbol="&#36;">AUD - $</option><option value="AWG" data-symbol="&#402;">AWG - ƒ</option><option value="AZN" data-symbol="&#1084;&#1072;&#1085;">AZN - ман</option><option value="BAM" data-symbol="&#75;&#77;">BAM - KM</option><option value="BBD" data-symbol="&#36;">BBD - $</option><option value="BDT" data-symbol="&#2547;">BDT - ৳</option><option value="BGN" data-symbol="&#1083;&#1074;">BGN - лв</option><option value="BHD" data-symbol=".&#1583;.&#1576;">BHD - .د.ب</option><option value="BIF" data-symbol="&#70;&#66;&#117;">BIF - FBu</option><option value="BMD" data-symbol="&#36;">BMD - $</option><option value="BND" data-symbol="&#36;">BND - $</option><option value="BOB" data-symbol="&#36;&#98;">BOB - $b</option><option value="BRL" data-symbol="&#82;&#36;">BRL - R$</option><option value="BTC" data-symbol="BTC">BTC - BTC</option><option value="BSD" data-symbol="&#36;">BSD - $</option><option value="BTN" data-symbol="&#78;&#117;&#46;">BTN - Nu.</option><option value="BWP" data-symbol="&#80;">BWP - P</option><option value="BYR" data-symbol="&#112;&#46;">BYR - p.</option><option value="BZD" data-symbol="&#66;&#90;&#36;">BZD - BZ$</option><option value="CAD" data-symbol="&#36;">CAD - $</option><option value="CDF" data-symbol="&#70;&#67;">CDF - FC</option><option value="CHF" data-symbol="&#67;&#72;&#70;">CHF - CHF</option><option value="CLP" data-symbol="&#36;">CLP - $</option><option value="CNY" data-symbol="&#165;">CNY - ¥</option><option value="COP" data-symbol="&#36;">COP - $</option><option value="CRC" data-symbol="&#8353;">CRC - ₡</option><option value="CUP" data-symbol="&#8396;">CUP - ⃌</option><option value="CVE" data-symbol="&#36;">CVE - $</option><option value="CZK" data-symbol="&#75;&#269;">CZK - Kč</option><option value="DJF" data-symbol="&#70;&#100;&#106;">DJF - Fdj</option><option value="DKK" data-symbol="&#107;&#114;">DKK - kr</option><option value="DOP" data-symbol="&#82;&#68;&#36;">DOP - RD$</option><option value="DZD" data-symbol="&#1583;&#1580;">DZD - دج</option><option value="EGP" data-symbol="&#163;">EGP - £</option><option value="ETB" data-symbol="&#66;&#114;">ETB - Br</option><option value="EUR" data-symbol="&#8364;">EUR - €</option><option value="ETH" data-symbol="ETH">ETH - ETH</option><option value="FJD" data-symbol="&#36;">FJD - $</option><option value="FKP" data-symbol="&#163;">FKP - £</option><option value="GBP" data-symbol="&#163;">GBP - £</option><option value="GEL" data-symbol="&#4314;">GEL - ლ</option><option value="GHS" data-symbol="&#162;">GHS - ¢</option><option value="GIP" data-symbol="&#163;">GIP - £</option><option value="GMD" data-symbol="&#68;">GMD - D</option><option value="GNF" data-symbol="&#70;&#71;">GNF - FG</option><option value="GTQ" data-symbol="&#81;">GTQ - Q</option><option value="GYD" data-symbol="&#36;">GYD - $</option><option value="HKD" data-symbol="&#36;">HKD - $</option><option value="HNL" data-symbol="&#76;">HNL - L</option><option value="HRK" data-symbol="&#107;&#110;">HRK - kn</option><option value="HTG" data-symbol="&#71;">HTG - G</option><option value="HUF" data-symbol="&#70;&#116;">HUF - Ft</option><option value="IDR" data-symbol="&#82;&#112;">IDR - Rp</option><option value="ILS" data-symbol="&#8362;">ILS - ₪</option><option value="INR" data-symbol="&#8377;">INR - ₹</option><option value="IQD" data-symbol="&#1593;.&#1583;">IQD - ع.د</option><option value="IRR" data-symbol="&#65020;">IRR - ﷼</option><option value="ISK" data-symbol="&#107;&#114;">ISK - kr</option><option value="JEP" data-symbol="&#163;">JEP - £</option><option value="JMD" data-symbol="&#74;&#36;">JMD - J$</option><option value="JOD" data-symbol="&#74;&#68;">JOD - JD</option><option value="JPY" data-symbol="&#165;">JPY - ¥</option><option value="KES" data-symbol="&#75;&#83;&#104;">KES - KSh</option><option value="KGS" data-symbol="&#1083;&#1074;">KGS - лв</option><option value="KHR" data-symbol="&#6107;">KHR - ៛</option><option value="KMF" data-symbol="&#67;&#70;">KMF - CF</option><option value="KPW" data-symbol="&#8361;">KPW - ₩</option><option value="KRW" data-symbol="&#8361;">KRW - ₩</option><option value="KWD" data-symbol="&#1583;.&#1603;">KWD - د.ك</option><option value="KYD" data-symbol="&#36;">KYD - $</option><option value="KZT" data-symbol="&#1083;&#1074;">KZT - лв</option><option value="LAK" data-symbol="&#8365;">LAK - ₭</option><option value="LBP" data-symbol="&#163;">LBP - £</option><option value="LKR" data-symbol="&#8360;">LKR - ₨</option><option value="LRD" data-symbol="&#36;">LRD - $</option><option value="LSL" data-symbol="&#76;">LSL - L</option><option value="LTL" data-symbol="&#76;&#116;">LTL - Lt</option><option value="LVL" data-symbol="&#76;&#115;">LVL - Ls</option><option value="LYD" data-symbol="&#1604;.&#1583;">LYD - ل.د</option><option value="MAD" data-symbol="&#1583;.&#1605;.">MAD - د.م.</option><option value="MDL" data-symbol="&#76;">MDL - L</option><option value="MGA" data-symbol="&#65;&#114;">MGA - Ar</option><option value="MKD" data-symbol="&#1076;&#1077;&#1085;">MKD - ден</option><option value="MMK" data-symbol="&#75;">MMK - K</option><option value="MNT" data-symbol="&#8366;">MNT - ₮</option><option value="MOP" data-symbol="&#77;&#79;&#80;&#36;">MOP - MOP$</option><option value="MRO" data-symbol="&#85;&#77;">MRO - UM</option><option value="MUR" data-symbol="&#8360;">MUR - ₨</option><option value="MVR" data-symbol=".&#1923;">MVR - .ރ</option><option value="MWK" data-symbol="&#77;&#75;">MWK - MK</option><option value="MXN" data-symbol="&#36;">MXN - $</option><option value="MYR" data-symbol="&#82;&#77;">MYR - RM</option><option value="MZN" data-symbol="&#77;&#84;">MZN - MT</option><option value="NAD" data-symbol="&#36;">NAD - $</option><option value="NGN" data-symbol="&#8358;">NGN - ₦</option><option value="NIO" data-symbol="&#67;&#36;">NIO - C$</option><option value="NOK" data-symbol="&#107;&#114;">NOK - kr</option><option value="NPR" data-symbol="&#8360;">NPR - ₨</option><option value="NZD" data-symbol="&#36;">NZD - $</option><option value="OMR" data-symbol="&#65020;">OMR - ﷼</option><option value="PAB" data-symbol="&#66;&#47;&#46;">PAB - B/.</option><option value="PEN" data-symbol="&#83;&#47;&#46;">PEN - S/.</option><option value="PGK" data-symbol="&#75;">PGK - K</option><option value="PHP" data-symbol="&#8369;">PHP - ₱</option><option value="PKR" data-symbol="&#8360;">PKR - ₨</option><option value="PLN" data-symbol="&#122;&#322;">PLN - zł</option><option value="PYG" data-symbol="&#71;&#115;">PYG - Gs</option><option value="QAR" data-symbol="&#65020;">QAR - ﷼</option><option value="RON" data-symbol="&#108;&#101;&#105;">RON - lei</option><option value="RSD" data-symbol="&#1044;&#1080;&#1085;&#46;">RSD - Дин.</option><option value="RUB" data-symbol="&#1088;&#1091;&#1073;">RUB - руб</option><option value="RWF" data-symbol="&#1585;.&#1587;">RWF - ر.س</option><option value="SAR" data-symbol="&#65020;">SAR - ﷼</option><option value="SBD" data-symbol="&#36;">SBD - $</option><option value="SCR" data-symbol="&#8360;">SCR - ₨</option><option value="SDG" data-symbol="&#163;">SDG - £</option><option value="SEK" data-symbol="&#107;&#114;">SEK - kr</option><option value="SGD" data-symbol="&#36;">SGD - $</option><option value="SHP" data-symbol="&#163;">SHP - £</option><option value="SLL" data-symbol="&#76;&#101;">SLL - Le</option><option value="SOS" data-symbol="&#83;">SOS - S</option><option value="SRD" data-symbol="&#36;">SRD - $</option><option value="STD" data-symbol="&#68;&#98;">STD - Db</option><option value="SVC" data-symbol="&#36;">SVC - $</option><option value="SYP" data-symbol="&#163;">SYP - £</option><option value="SZL" data-symbol="&#76;">SZL - L</option><option value="THB" data-symbol="&#3647;">THB - ฿</option><option value="TJS" data-symbol="&#84;&#74;&#83;">TJS - TJS</option><option value="TMT" data-symbol="&#109;">TMT - m</option><option value="TND" data-symbol="&#1583;.&#1578;">TND - د.ت</option><option value="TOP" data-symbol="&#84;&#36;">TOP - T$</option><option value="TRY" data-symbol="&#8356;">TRY - ₤</option><option value="TTD" data-symbol="&#36;">TTD - $</option><option value="TWD" data-symbol="&#78;&#84;&#36;">TWD - NT$</option><option value="UAH" data-symbol="&#8372;">UAH - ₴</option><option value="UGX" data-symbol="&#85;&#83;&#104;">UGX - USh</option><option value="USD" data-symbol="&#36;">USD - $</option><option value="UYU" data-symbol="&#36;&#85;">UYU - $U</option><option value="UZS" data-symbol="&#1083;&#1074;">UZS - лв</option><option value="VEF" data-symbol="&#66;&#115;">VEF - Bs</option><option value="VND" data-symbol="&#8363;">VND - ₫</option><option value="VUV" data-symbol="&#86;&#84;">VUV - VT</option><option value="WST" data-symbol="&#87;&#83;&#36;">WST - WS$</option><option value="XAF" data-symbol="&#70;&#67;&#70;&#65;">XAF - FCFA</option><option value="XCD" data-symbol="&#36;">XCD - $</option><option value="XPF" data-symbol="&#70;">XPF - F</option><option value="YER" data-symbol="&#65020;">YER - ﷼</option><option value="ZAR" data-symbol="&#82;">ZAR - R</option><option value="ZMK" data-symbol="&#90;&#75;">ZMK - ZK</option><option value="ZWL" data-symbol="&#90;&#36;">ZWL - Z$</option>                                        </select>
                                        <div class="absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none">
                                            <i class="fas fa-chevron-down text-gray-400 text-sm"></i>
                                        </div> 
        
                                    </div> 
        
                                </div> 
        
                                
                                <!-- Account Type -->
                                <div class="space-y-1">
                                    <label for="accounttype" class="block text-xs font-semibold text-gray-700 dark:text-gray-300">Account Type *</label>
                                    <div class="relative">
                                        <div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none z-10">
                                            <i class="fas fa-university text-gray-400 text-sm"></i>
                                        </div> 
        
                                        <select 
                                            id="accounttype" 
                                            name="accounttype" 
                                            class="w-full pl-10 pr-8 py-3 border border-gray-300/50 dark:border-gray-600/50 rounded-xl bg-gray-50/50 dark:bg-gray-700/50 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-primary-500/50 focus:border-primary-500 backdrop-blur-sm transition-all duration-300 text-sm appearance-none" 
                                            required>
                                            <option value="" disabled selected>Select Account Type</option>
                                            <option value="Checking Account">Checking Account</option>
                                            <option value="Savings Account">Savings Account</option>
                                            <option value="Fixed Deposit Account">Fixed Deposit Account</option>
                                            <option value="Current Account">Current Account</option>
                                            <option value="Business Account">Business Account</option>
                                            <option value="Investment Account">Investment Account</option>
                                        </select>
                                        <div class="absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none">
                                            <i class="fas fa-chevron-down text-gray-400 text-sm"></i>
                                        </div> 
        
                                    </div> 
        
                                </div> 
        
                                
                                <!-- Transaction PIN -->
                                <div class="space-y-1">
                                    <label for="pin" class="block text-xs font-semibold text-gray-700 dark:text-gray-300">Transaction PIN *</label>
                                    <div class="relative">
                                        <div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none z-10">
                                            <i class="fas fa-key text-gray-400 text-sm"></i>
                                        </div> 
        
                                        <input 
                                            type="password" 
                                            id="pin" 
                                            name="pin" 
                                            class="w-full pl-10 pr-12 py-3 border border-gray-300/50 dark:border-gray-600/50 rounded-xl bg-gray-50/50 dark:bg-gray-700/50 text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-primary-500/50 focus:border-primary-500 backdrop-blur-sm transition-all duration-300 text-sm" 
                                            placeholder="4-digit PIN" 
                                            maxlength="4" 
                                            required>
                                        <button 
                                            type="button" 
                                            onclick="togglePassword('pin')"
                                            class="absolute inset-y-0 right-0 flex items-center pr-3 text-gray-400 hover:text-primary-500 transition-colors">
                                            <i class="fas fa-eye text-sm" id="pin-eye"></i>
                                        </button>
                                    </div> 
        
                                </div> 
        
                            </div> 
        
                        </div> 
        
                        
                        <!-- Step 4: Security -->
                        <div id="step-4" class="step-content" style="display: none;">
                            <div class="text-center mb-4">
                                <div class="inline-flex items-center justify-center w-12 h-12 rounded-xl bg-primary-100/50 dark:bg-primary-800/50 backdrop-blur-sm mb-3">
                                    <i class="fas fa-lock text-lg text-primary-600 dark:text-primary-300"></i>
                                </div> 
        
                                <h3 class="text-sm font-bold text-gray-900 dark:text-white mb-1">Security Setup</h3>
                                <p class="text-xs text-gray-600 dark:text-gray-400">Secure your account</p>
                            </div> 
        
                            
                            <div class="space-y-3">
                                <!-- Password -->
                                <div class="space-y-1">
                                    <label for="password" class="block text-xs font-semibold text-gray-700 dark:text-gray-300">Password *</label>
                                    <div class="relative">
                                        <div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none z-10">
                                            <i class="fas fa-lock text-gray-400 text-sm"></i>
                                        </div> 
        
                                        <input 
                                            type="password" 
                                            id="password" 
                                            name="password" 
                                            class="w-full pl-10 pr-12 py-3 border border-gray-300/50 dark:border-gray-600/50 rounded-xl bg-gray-50/50 dark:bg-gray-700/50 text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-primary-500/50 focus:border-primary-500 backdrop-blur-sm transition-all duration-300 text-sm" 
                                            placeholder="Create strong password" 
                                            required>
                                        <button 
                                            type="button" 
                                            onclick="togglePassword('password')"
                                            class="absolute inset-y-0 right-0 flex items-center pr-3 text-gray-400 hover:text-primary-500 transition-colors">
                                            <i class="fas fa-eye text-sm" id="password-eye"></i>
                                        </button>
                                    </div> 
        
                                </div> 
        
                                
                                <!-- Confirm Password -->
                                <div class="space-y-1">
                                    <label for="password_confirmation" class="block text-xs font-semibold text-gray-700 dark:text-gray-300">Confirm Password *</label>
                                    <div class="relative">
                                        <div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none z-10">
                                            <i class="fas fa-lock text-gray-400 text-sm"></i>
                                        </div> 
        
                                        <input 
                                            type="password" 
                                            id="password_confirmation" 
                                            name="password_confirmation" 
                                            class="w-full pl-10 pr-12 py-3 border border-gray-300/50 dark:border-gray-600/50 rounded-xl bg-gray-50/50 dark:bg-gray-700/50 text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-primary-500/50 focus:border-primary-500 backdrop-blur-sm transition-all duration-300 text-sm" 
                                            placeholder="Confirm your password" 
                                            required>
                                        <button 
                                            type="button" 
                                            onclick="togglePassword('password_confirmation')"
                                            class="absolute inset-y-0 right-0 flex items-center pr-3 text-gray-400 hover:text-primary-500 transition-colors">
                                            <i class="fas fa-eye text-sm" id="password_confirmation-eye"></i>
                                        </button>
                                    </div> 
        
                                </div> 
        
                                
                                <!-- Terms and Conditions -->
                                <div class="flex items-start space-x-2 pt-1">
                                    <input 
                                        type="checkbox" 
                                        id="terms" 
                                        name="terms" 
                                        class="mt-1 w-4 h-4 text-primary-600 bg-gray-100 border-gray-300 rounded focus:ring-primary-500 focus:ring-2" 
                                        required>
                                    <label for="terms" class="text-xs text-gray-600 dark:text-gray-400 leading-relaxed">
                                        I agree to the <a href="#" class="text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300 font-medium">Terms of Service</a> and <a href="#" class="text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300 font-medium">Privacy Policy</a>
                                    </label>
                                </div> 
        
                            </div> 
        
                        </div> 
        
                        
                        <!-- Hidden Currency Symbol Field -->
                        <input type="hidden" name="s_curr" id="s_curr">
                        
                        <!-- Navigation Buttons -->
                        <div class="flex justify-between pt-4">
                            <button 
                                type="button" 
                                id="prev-btn" 
                                class="px-4 py-3 bg-gray-100/90 dark:bg-gray-700/90 hover:bg-gray-200/90 dark:hover:bg-gray-600/90 text-gray-800 dark:text-gray-200 font-medium rounded-xl transition-all duration-300 flex items-center group text-sm backdrop-blur-sm border border-gray-200/50 dark:border-gray-600/50" 
                                style="display: none;">
                                <i class="fas fa-chevron-left mr-2 group-hover:-translate-x-1 transition-transform text-sm"></i>
                                Previous
                            </button>
                            
                            <button 
                                type="button" 
                                id="next-btn" 
                                class="ml-auto px-4 py-3 bg-gradient-to-r from-primary-600 to-primary-700 hover:from-primary-700 hover:to-primary-800 dark:from-primary-700 dark:to-primary-800 dark:hover:from-primary-600 dark:hover:to-primary-700 text-white font-semibold rounded-xl shadow-lg hover:shadow-xl transform hover:scale-[1.02] transition-all duration-300 flex items-center group text-sm">
                                Next
                                <i class="fas fa-chevron-right ml-2 group-hover:translate-x-1 transition-transform text-sm"></i>
                            </button>
                            
                            <button 
                                type="submit" 
                                id="submit-btn" 
                                class="ml-auto px-4 py-3 bg-gradient-to-r from-green-600 to-green-700 hover:from-green-700 hover:to-green-800 text-white font-semibold rounded-xl shadow-lg hover:shadow-xl transform hover:scale-[1.02] transition-all duration-300 flex items-center group text-sm" 
                                style="display: none;">
                                <i class="fas fa-user-plus mr-2 group-hover:translate-x-1 transition-transform text-sm"></i>
                                Create Account
                            </button>
                        </div> 
        
                    </form>
                    
                    <!-- Login Link -->
                    <div class="mt-6 text-center">
                        <p class="text-sm text-gray-600 dark:text-gray-400">
                            Already have an account? 
                            <a href="login" class="text-primary-600 dark:text-primary-400 hover:text-primary-700 dark:hover:text-primary-300 font-semibold transition-colors">
                                Sign In
                            </a>
                        </p>
                    </div> 
        
                </div> 
        
                
                <!-- Footer -->
                <div class="mt-6 text-center">
                    <p class="text-xs text-gray-500 dark:text-gray-500 max-w-xs mx-auto leading-relaxed">
                        &copy; 2026 <?php echo getSiteConfig('sitename'); ?>. All Rights Reserved.
                    </p>
                </div> 
        
            </div> 
        
        </div> 
        
    </div> 
        
</div> 
        

    </div> 
        
    
    <!-- Enhanced Page Loading Animation -->
    <script>
        window.onload = function() {
            const preloader = document.querySelector('.page-loading');
            
            // Add a slight delay to make loading animation more noticeable
            setTimeout(function() {
                preloader.classList.remove('active');
                setTimeout(function() {
                    preloader.remove();
                }, 500);
            }, 800);

            // SweetAlert for error messages from PHP session
            <?php if (!empty($_SESSION['errors'])): ?>
                const errors = <?php echo json_encode($_SESSION['errors']); ?>;
                const errorMessages = errors.join('<br>');
                
                Swal.fire({
                    icon: 'error',
                    title: 'Validation Error',
                    html: errorMessages,
                    confirmButtonText: 'Try Again',
                    confirmButtonColor: '#ef4444',
                    allowOutsideClick: false,
                    allowEscapeKey: false,
                    customClass: {
                        popup: 'rounded-2xl',
                        confirmButton: 'px-8 py-3 rounded-xl font-semibold'
                    }
                });
                
                <?php unset($_SESSION['errors']); ?>
            <?php endif; ?>

            // SweetAlert for success messages
            <?php if (!empty($_SESSION['success'])): ?>
                Swal.fire({
                    icon: 'success',
                    title: 'Success!',
                    text: <?php echo json_encode($_SESSION['success']); ?>,
                    confirmButtonText: 'OK',
                    confirmButtonColor: '#22c55e',
                    allowOutsideClick: false,
                    allowEscapeKey: false,
                    customClass: {
                        popup: 'rounded-2xl',
                        confirmButton: 'px-8 py-3 rounded-xl font-semibold'
                    }
                }).then((result) => {
                    if (result.isConfirmed) {
                        window.location.href = 'login';
                    }
                });
                
                <?php unset($_SESSION['success']); ?>
            <?php endif; ?>
        };
    </script>
    
    <!-- Additional Scripts -->
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
    let currentStep = 1;
    const totalSteps = 4;

    function togglePassword(fieldId) {
        const field = document.getElementById(fieldId);
        const eye = document.getElementById(fieldId + '-eye');
        
        if (field.type === 'password') {
            field.type = 'text';
            eye.classList.remove('fa-eye');
            eye.classList.add('fa-eye-slash');
        } else {
            field.type = 'password';
            eye.classList.remove('fa-eye-slash');
            eye.classList.add('fa-eye');
        }
    }

    function updateProgress() {
        const progressPercentage = (currentStep / totalSteps) * 100;
        $('#progress-bar').css('width', progressPercentage + '%');
        $('#current-step').text(currentStep);
        
        // Update step indicators
        for (let i = 1; i <= totalSteps; i++) {
            const indicator = $(`#step-${i}-indicator`);
            const label = indicator.next('span');
            
            if (i <= currentStep) {
                indicator.removeClass('bg-gray-300 dark:bg-gray-600 text-gray-500')
                        .addClass('bg-primary-600 text-white');
                label.removeClass('text-gray-500 dark:text-gray-400')
                     .addClass('text-primary-600 dark:text-primary-400 font-medium');
            } else {
                indicator.removeClass('bg-primary-600 text-white')
                        .addClass('bg-gray-300 dark:bg-gray-600 text-gray-500');
                label.removeClass('text-primary-600 dark:text-primary-400 font-medium')
                     .addClass('text-gray-500 dark:text-gray-400');
            }
        }
    }

    function showStep(step) {
        $('.step-content').hide();
        $(`#step-${step}`).fadeIn(300);
        
        // Update navigation buttons
        if (step === 1) {
            $('#prev-btn').hide();
        } else {
            $('#prev-btn').show();
        }
        
        if (step === totalSteps) {
            $('#next-btn').hide();
            $('#submit-btn').show();
        } else {
            $('#next-btn').show();
            $('#submit-btn').hide();
        }
        
        updateProgress();
    }

    function validateStep(step) {
        let isValid = true;
        const requiredFields = $(`#step-${step} input[required], #step-${step} select[required]`);
        
        requiredFields.each(function() {
            const field = $(this);
            const value = field.val().trim();
            
            if (!value) {
                field.addClass('border-red-500 focus:border-red-500 focus:ring-red-500');
                isValid = false;
            } else {
                field.removeClass('border-red-500 focus:border-red-500 focus:ring-red-500');
            }
        });
        
        // Additional validation for step 4 (passwords)
        if (step === 4) {
            const password = $('#password').val();
            const confirmPassword = $('#password_confirmation').val();
            const terms = $('#terms').is(':checked');
            
            if (password !== confirmPassword) {
                $('#password_confirmation').addClass('border-red-500 focus:border-red-500 focus:ring-red-500');
                isValid = false;
            }
            
            if (!terms) {
                isValid = false;
            }
        }
        
        return isValid;
    }

    $(document).ready(function() {
        // Initialize first step
        showStep(1);
        
        // Next button click
        $('#next-btn').click(function() {
            if (validateStep(currentStep)) {
                if (currentStep < totalSteps) {
                    currentStep++;
                    showStep(currentStep);
                }
            }
        });
        
        // Previous button click
        $('#prev-btn').click(function() {
            if (currentStep > 1) {
                currentStep--;
                showStep(currentStep);
            }
        });

        // Form submission with SweetAlert confirmation
        $('#registration-form').on('submit', function(e) {
            e.preventDefault();

            // Validate final step
            if (!validateStep(currentStep)) {
                return;
            }

            const formElement = this;

            Swal.fire({
                icon: 'question',
                title: 'Confirm Registration',
                text: 'Please review your information before creating your account. This action cannot be undone.',
                html: '<div class="text-sm text-left"><p><strong>Account Details:</strong></p><p>Name: ' + 
                      ($('#name').val() + ' ' + $('#lastname').val()).trim() + '</p><p>Email: ' + 
                      $('#email').val() + '</p><p>Username: ' + $('#username').val() + '</p></div>',
                showCancelButton: true,
                confirmButtonText: 'Yes, Create Account',
                cancelButtonText: 'Review Again',
                confirmButtonColor: '#22c55e',
                cancelButtonColor: '#ef4444',
                allowOutsideClick: false,
                allowEscapeKey: false,
                customClass: {
                    popup: 'rounded-2xl',
                    confirmButton: 'px-8 py-3 rounded-xl font-semibold',
                    cancelButton: 'px-8 py-3 rounded-xl font-semibold'
                }
            }).then((result) => {
                if (result.isConfirmed) {
                    Swal.fire({
                        title: 'Creating Account...',
                        html: 'Please wait while we process your registration.',
                        icon: 'info',
                        allowOutsideClick: false,
                        allowEscapeKey: false,
                        didOpen: () => {
                            Swal.showLoading();
                            // Submit the form
                            formElement.submit();
                        }
                    });
                }
            });
        });
        
        // PIN input validation (numbers only, max 4 digits)
        $('#pin').on('input', function() {
            this.value = this.value.replace(/[^0-9]/g, '').slice(0, 4);
        });
        
        // Currency symbol handling
        $('#curr').change(function() {
            const selectedOption = $(this).find('option:selected');
            const symbol = selectedOption.data('symbol');
            if (symbol) {
                $('#s_curr').val(symbol);
            }
        });
        
        // Real-time validation feedback
        $('input[required], select[required]').on('blur', function() {
            const field = $(this);
            const value = field.val().trim();
            
            if (!value) {
                field.addClass('border-red-500 focus:border-red-500 focus:ring-red-500');
            } else {
                field.removeClass('border-red-500 focus:border-red-500 focus:ring-red-500');
            }
        });
        
        // Password confirmation validation
        $('#password_confirmation').on('input', function() {
            const password = $('#password').val();
            const confirmPassword = $(this).val();
            
            if (password !== confirmPassword) {
                $(this).addClass('border-red-500 focus:border-red-500 focus:ring-red-500');
            } else {
                $(this).removeClass('border-red-500 focus:border-red-500 focus:ring-red-500');
            }
        });
        
        // Add ripple effect to buttons
        $('button, a').on('click', function(e) {
            const button = $(this);
            const ripple = $('<span class="ripple"></span>');
            const rect = this.getBoundingClientRect();
            const size = Math.max(rect.width, rect.height);
            const x = e.clientX - rect.left - size / 2;
            const y = e.clientY - rect.top - size / 2;
            
            ripple.css({
                width: size + 'px',
                height: size + 'px',
                left: x + 'px',
                top: y + 'px'
            });
            
            button.append(ripple);
            
            setTimeout(() => {
                ripple.remove();
            }, 600);
        });
    });
</script>

<style>
    .ripple {
        position: absolute;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        transform: scale(0);
        animation: ripple-animation 0.6s linear;
        pointer-events: none;
    }
    
    @keyframes  ripple-animation {
        to {
            transform: scale(4);
            opacity: 0;
        }
    }
    
    .floating-slow {
        animation: float 8s ease-in-out infinite;
    }
    
    .floating {
        animation: float 6s ease-in-out infinite;
    }
    
    .floating-slower {
        animation: float 10s ease-in-out infinite;
    }
    
    @keyframes  float {
        0%, 100% { transform: translateY(0px) rotate(0deg); }
        50% { transform: translateY(-20px) rotate(180deg); }
    }
    
    .step-content {
        min-height: 320px;
    }
    
    /* Custom focus styles */
    input:focus, select:focus {
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
    
    /* Smooth transitions for form elements */
    input, select, button {
        transition: all 0.3s ease;
    }
    
    /* Enhanced button hover effects */
    button:hover {
        transform: translateY(-1px);
    }
    
    button:active {
        transform: translateY(0);
    }
    
    /* Better mobile responsiveness */
    @media (max-width: 768px) {
        .step-content {
            min-height: 280px;
        }
    }
    
    /* Enhanced form field styling */
    input[type="text"], input[type="email"], input[type="tel"], input[type="password"], select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Better checkbox styling */
    input[type="checkbox"] {
        accent-color: rgb(59 130 246);
    }
    
    /* Ensure icons are properly positioned */
    .relative .absolute {
        z-index: 10;
    }
</style>

<script>
    // SweetAlert for messages
    <?php if (isset($_SESSION['errors']) && !empty($_SESSION['errors'])): ?>
        Swal.fire({
            icon: 'error',
            title: 'Registration Failed',
            html: '<?php echo addslashes(implode('<br>', array_map('htmlspecialchars', $_SESSION['errors']))); ?>',
            confirmButtonColor: '#ef4444'
        });
        <?php unset($_SESSION['errors']); ?>
    <?php endif; ?>

    <?php if (isset($_SESSION['success'])): ?>
        Swal.fire({
            icon: 'success',
            title: 'Success!',
            text: '<?php echo addslashes($_SESSION['success']); ?>',
            confirmButtonColor: '#22c55e'
        });
        <?php unset($_SESSION['success']); ?>
    <?php endif; ?>
</script>
</body>

<!-- Mirrored from creditpay.hubslate.com/register by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 25 Apr 2026 08:30:15 GMT -->
</html>