<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Dealing Desk - Broker Partnership</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" />
    <style>
        /* ... Your existing CSS remains here ... */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Inter', 'Segoe UI', sans-serif;
            background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
            background-size: 400% 400%;
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: flex-start;
            padding: 30px 20px;
            animation: gradient 15s ease infinite;
            position: relative;
            overflow-y: auto;
            overflow-x: hidden;
        }

        @keyframes gradient {
            0% {
                background-position: 0% 50%;
            }

            50% {
                background-position: 100% 50%;
            }

            100% {
                background-position: 0% 50%;
            }
        }

        /* Animated background elements */
        .bg-orb {
            position: fixed;
            border-radius: 50%;
            filter: blur(80px);
            opacity: 0.6;
            z-index: 0;
        }

        .orb-1 {
            width: 300px;
            height: 300px;
            background: rgba(255, 107, 107, 0.6);
            top: -150px;
            left: -150px;
            animation: float 8s ease-in-out infinite;
        }

        .orb-2 {
            width: 400px;
            height: 400px;
            background: rgba(76, 175, 255, 0.6);
            bottom: -200px;
            right: -200px;
            animation: float 10s ease-in-out infinite reverse;
        }

        .orb-3 {
            width: 250px;
            height: 250px;
            background: rgba(156, 39, 176, 0.5);
            bottom: 100px;
            left: 50%;
            animation: float 12s ease-in-out infinite;
        }

        @keyframes float {

            0%,
            100% {
                transform: translateY(0px) translateX(0px);
            }

            50% {
                transform: translateY(30px) translateX(20px);
            }
        }

        .container {
            width: 100%;
            max-width: 1000px;
            position: relative;
            z-index: 10;
            margin: auto;
        }

        /* Header */
        .header {
            text-align: center;
            margin-bottom: 50px;
            animation: slideDown 0.8s ease-out;
            padding-top: 20px;
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-40px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .header h1 {
            font-size: 48px;
            color: white;
            font-weight: 900;
            margin-bottom: 15px;
            text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            letter-spacing: -1px;
        }

        .header p {
            font-size: 18px;
            color: rgba(255, 255, 255, 0.9);
            text-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        }

        /* Step Indicator */
        .step-indicator {
            display: flex;
            justify-content: space-between;
            margin-bottom: 50px;
            position: relative;
            padding: 0 20px;
            animation: slideUp 0.8s ease-out 0.2s both;
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(40px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .step-indicator::before {
            content: '';
            position: absolute;
            top: 20px;
            left: 40px;
            right: 40px;
            height: 3px;
            background: rgba(255, 255, 255, 0.2);
            z-index: 0;
            border-radius: 10px;
        }

        .step {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            position: relative;
            z-index: 1;
        }

        .step-number {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.15);
            border: 3px solid rgba(255, 255, 255, 0.4);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 900;
            margin-bottom: 12px;
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            font-size: 20px;
            backdrop-filter: blur(10px);
            position: relative;
        }

        .step.active .step-number {
            background: white;
            color: #ee7752;
            border-color: white;
            box-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 60px rgba(238, 119, 82, 0.4);
            transform: scale(1.15) rotate(360deg);
            animation: pulse-ring 2s infinite;
        }

        @keyframes pulse-ring {
            0% {
                box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7), 0 0 60px rgba(238, 119, 82, 0.4);
            }

            50% {
                box-shadow: 0 0 0 15px rgba(255, 255, 255, 0), 0 0 60px rgba(238, 119, 82, 0.4);
            }

            100% {
                box-shadow: 0 0 0 0 rgba(255, 255, 255, 0), 0 0 60px rgba(238, 119, 82, 0.4);
            }
        }

        .step.completed .step-number {
            background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
            border-color: #4ade80;
            box-shadow: 0 0 20px rgba(74, 222, 128, 0.5);
            animation: checkmark 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        @keyframes checkmark {
            0% {
                transform: scale(0) rotate(-180deg);
            }

            100% {
                transform: scale(1) rotate(0deg);
            }
        }

        .step-label {
            font-size: 13px;
            color: rgba(255, 255, 255, 0.7);
            text-align: center;
            font-weight: 700;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            transition: all 0.3s ease;
        }

        .step.active .step-label {
            color: white;
            font-size: 14px;
        }

        /* Main Content */
        .content-wrapper {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 30px;
            padding: 50px;
            box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3), 0 0 1px rgba(255, 255, 255, 1) inset;
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            animation: slideUp 0.8s ease-out 0.4s both;
            position: relative;
            overflow: visible;
            margin-bottom: 50px;
        }

        .content-wrapper::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle, rgba(255, 107, 107, 0.1) 0%, transparent 70%);
            animation: shimmer 3s ease-in-out infinite;
        }

        @keyframes shimmer {

            0%,
            100% {
                transform: translate(0, 0);
            }

            50% {
                transform: translate(10px, -10px);
            }
        }

        .form-section {
            display: none;
            position: relative;
            z-index: 5;
        }

        .form-section.active {
            display: block;
            animation: formFadeIn 0.6s ease;
        }

        @keyframes formFadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        h1 {
            color: #ee7752;
            margin-bottom: 8px;
            font-size: 32px;
            font-weight: 900;
        }

        .subtitle {
            color: #999;
            margin-bottom: 35px;
            font-size: 15px;
            line-height: 1.6;
        }

        .form-group {
            margin-bottom: 25px;
            animation: slideInLeft 0.6s ease-out;
        }

        @keyframes slideInLeft {
            from {
                opacity: 0;
                transform: translateX(-20px);
            }

            to {
                opacity: 1;
                transform: translateX(0);
            }
        }

        .form-group:nth-child(2) {
            animation-delay: 0.1s;
        }

        .form-group:nth-child(3) {
            animation-delay: 0.2s;
        }

        .form-group:nth-child(4) {
            animation-delay: 0.3s;
        }

        .form-group:nth-child(5) {
            animation-delay: 0.4s;
        }

        .form-group:nth-child(6) {
            animation-delay: 0.5s;
        }

        label {
            display: block;
            margin-bottom: 10px;
            color: #333;
            font-weight: 700;
            font-size: 15px;
            letter-spacing: 0.3px;
        }

        input[type="text"],
        input[type="number"],
        input[type="email"],
        textarea,
        select {
            width: 100%;
            padding: 14px 18px;
            border: 2px solid #e8e8e8;
            border-radius: 12px;
            font-size: 15px;
            transition: all 0.3s ease;
            font-family: inherit;
            background: #f9f9f9;
        }

        input[type="text"]:focus,
        input[type="number"]:focus,
        input[type="email"]:focus,
        textarea:focus,
        select:focus {
            outline: none;
            border-color: #ee7752;
            background: white;
            box-shadow: 0 0 0 4px rgba(238, 119, 82, 0.1), 0 10px 25px rgba(238, 119, 82, 0.15);
            transform: translateY(-2px);
        }

        textarea {
            resize: vertical;
            min-height: 100px;
        }

        /* Checkbox Group */
        .checkbox-group {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 12px;
        }

        .checkbox-item {
            display: flex;
            align-items: center;
            padding: 14px;
            border: 2px solid #e8e8e8;
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            background: #f9f9f9;
            position: relative;
            overflow: hidden;
        }

        .checkbox-item::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(238, 119, 82, 0.2), transparent);
            transition: left 0.6s ease;
        }

        .checkbox-item:hover {
            border-color: #ee7752;
            background: #fff;
            transform: translateY(-3px);
            box-shadow: 0 5px 20px rgba(238, 119, 82, 0.15);
        }

        .checkbox-item:hover::before {
            left: 100%;
        }

        .checkbox-item input[type="checkbox"] {
            margin-right: 10px;
            cursor: pointer;
            width: 20px;
            height: 20px;
            accent-color: #ee7752;
            transition: all 0.3s ease;
        }

        .checkbox-item input[type="checkbox"]:checked {
            transform: scale(1.2);
        }

        .checkbox-item label {
            margin: 0;
            cursor: pointer;
            font-weight: 600;
            font-size: 14px;
        }

        .checkbox-item input[type="checkbox"]:checked+label {
            color: #ee7752;
        }

        /* Button Styles */
        .button-group {
            display: flex;
            gap: 15px;
            margin-top: 40px;
            animation: slideInLeft 0.6s ease-out 0.6s both;
        }

        button {
            flex: 1;
            padding: 16px 32px;
            border: none;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            text-transform: uppercase;
            letter-spacing: 0.8px;
            position: relative;
            overflow: hidden;
            min-height: 56px;
        }

        button::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.3);
            transform: translate(-50%, -50%);
            transition: width 0.6s, height 0.6s;
        }

        button:active::before {
            width: 300px;
            height: 300px;
        }

        .btn-primary {
            background: linear-gradient(135deg, #ee7752 0%, #e73c7e 100%);
            color: white;
            box-shadow: 0 15px 35px rgba(238, 119, 82, 0.3), 0 0 0 0 rgba(238, 119, 82, 0.1);
            position: relative;
        }

        .btn-primary::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transform: translateX(-100%);
            transition: transform 0.6s ease;
            border-radius: 12px;
        }

        .btn-primary:hover::after {
            transform: translateX(100%);
        }

        .btn-primary:hover {
            transform: translateY(-4px);
            box-shadow: 0 20px 50px rgba(238, 119, 82, 0.4), 0 0 0 0 rgba(238, 119, 82, 0.2);
        }

        .btn-primary:active {
            transform: translateY(-2px);
        }

        .btn-secondary {
            background: #f5f5f5;
            color: #333;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            border: 2px solid #e8e8e8;
        }

        .btn-secondary:hover {
            background: #ee7752;
            color: white;
            border-color: #ee7752;
            transform: translateY(-4px);
            box-shadow: 0 15px 35px rgba(238, 119, 82, 0.3);
        }

        button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        button i {
            margin-left: 8px;
            transition: all 0.3s ease;
        }

        .btn-primary:hover i {
            transform: translateX(4px);
        }

        /* Success Message */
        .success-message {
            text-align: center;
            padding: 50px 20px;
            animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        @keyframes scaleIn {
            from {
                opacity: 0;
                transform: scale(0.8);
            }

            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        .success-icon {
            font-size: 80px;
            color: #4ade80;
            margin-bottom: 20px;
            animation: bounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        @keyframes bounceIn {
            0% {
                opacity: 0;
                transform: scale(0) rotate(-180deg);
            }

            50% {
                transform: scale(1.1);
            }

            100% {
                opacity: 1;
                transform: scale(1) rotate(0deg);
            }
        }

        .success-message h2 {
            color: #333;
            margin-bottom: 15px;
            font-size: 28px;
            font-weight: 900;
        }

        .success-message p {
            color: #666;
            margin-bottom: 8px;
            font-size: 16px;
            line-height: 1.6;
        }

        .success-message p:last-child {
            margin-top: 25px;
            color: #ee7752;
            font-weight: 700;
            font-size: 18px;
        }

        /* Responsive */
        @media (max-width: 768px) {
            body {
                padding: 15px;
            }

            .header h1 {
                font-size: 32px;
            }

            .header p {
                font-size: 15px;
            }

            .content-wrapper {
                padding: 30px 20px;
                border-radius: 20px;
            }

            h1 {
                font-size: 24px;
            }

            .step-indicator {
                padding: 0 10px;
                margin-bottom: 35px;
            }

            .step-label {
                font-size: 11px;
            }

            .step-number {
                width: 40px;
                height: 40px;
                font-size: 16px;
                margin-bottom: 8px;
            }

            .checkbox-group {
                grid-template-columns: repeat(2, 1fr);
            }

            button {
                padding: 14px 24px;
                font-size: 14px;
                min-height: 50px;
            }

            .button-group {
                flex-direction: column;
                gap: 10px;
            }

            input,
            textarea,
            select {
                padding: 12px 15px;
                font-size: 14px;
            }

            .success-icon {
                font-size: 60px;
            }

            .success-message h2 {
                font-size: 22px;
            }
        }
    </style>

</head>

<body>
    <div class="bg-orb orb-1"></div>
    <div class="bg-orb orb-2"></div>
    <div class="bg-orb orb-3"></div>

    <div class="container">
        <div class="header">
            <h1>🚀 Dealing Desk Partnership</h1>
            <p>Join our elite network of broker partners</p>
        </div>
            <?php echo $__env->make('partials.messages2', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

        <div class="step-indicator">
            <div class="step active" id="step-1-indicator">
                <div class="step-number">1</div>
                <div class="step-label">Your Profile</div>
            </div>
            <div class="step" id="step-2-indicator">
                <div class="step-number">2</div>
                <div class="step-label">Application</div>
            </div>
        </div>

        <div class="content-wrapper">
            <form id="mainForm" method="POST" action="<?php echo e(route('formsubmit')); ?>">
                <?php echo csrf_field(); ?> 
                
                <div class="form-section active" id="step-1">
                    <h1>Let's Get to Know You</h1>
                    <p class="subtitle">Share your trading background and community presence to get started</p>
                    
                    <div>
                        <div class="form-group">
                            <label for="fullName">✨ Full Name</label>
                            <input type="text" id="fullName" name="fullName" placeholder="Enter your full name" required>
                        </div>

                        <div class="form-group">
                            <label for="yearsTrading">📊 Years of Trading Experience</label>
                            <input type="number" id="yearsTrading" name="yearsTrading" placeholder="E.g., 5" min="0"
                                max="60" required>
                        </div>

                        <div class="form-group">
                            <label>🌐 Which communities are you active in?</label>
                            <div class="checkbox-group">
                                <div class="checkbox-item">
                                    <input type="checkbox" id="tiktok" name="communities[]" value="TikTok">
                                    <label for="tiktok">TikTok</label>
                                </div>
                                <div class="checkbox-item">
                                    <input type="checkbox" id="whatsapp" name="communities[]" value="WhatsApp">
                                    <label for="whatsapp">WhatsApp</label>
                                </div>
                                <div class="checkbox-item">
                                    <input type="checkbox" id="twitter" name="communities[]" value="X (Twitter)">
                                    <label for="twitter">X (Twitter)</label>
                                </div>
                                <div class="checkbox-item">
                                    <input type="checkbox" id="facebook" name="communities[]" value="Facebook">
                                    <label for="facebook">Facebook</label>
                                </div>
                            </div>
                            <input type="hidden" id="communities_hidden" name="communities_string">
                        </div>

                        <div class="form-group">
                            <label for="communitySize">👥 Total Average Community Size</label>
                            <input type="number" id="communitySize" name="communitySize" placeholder="E.g., 50000"
                                min="0" required>
                        </div>

                        <div class="button-group">
                            <button type="button" class="btn-primary" id="step1-continue-btn">Continue <i
                                    class="fas fa-arrow-right"></i></button>
                        </div>
                    </div>
                </div>

                <div class="form-section" id="step-2">
                    <h1>Partnership Application</h1>
                    <p class="subtitle">Complete your dealing desk application</p>

                    <div>
                        <div class="form-group">
                            <label for="email">📧 Email Address</label>
                            <input type="email" id="email" name="email" placeholder="your@email.com" required>
                        </div>

                        <div class="form-group">
                            <label for="phone">📱 Phone Number</label>
                            <input type="text" id="phone" name="phone" placeholder="+1 (555) 000-0000" required>
                        </div>

                        <div class="form-group">
                            <label for="company">🏢 Company Name</label>
                            <input type="text" id="company" name="company" placeholder="Your trading company/firm">
                        </div>

                        <div class="form-group">
                            <label for="website">🔗 Website / Social Media Link</label>
                            <input type="text" id="website" name="website" placeholder="https://example.com">
                        </div>

                        <div class="form-group">
                            <label for="expectedVolume">💰 Expected Monthly Trading Volume</label>
                            <select id="expectedVolume" name="expectedVolume" required>
                                <option value="">Select expected volume...</option>
                                <option value="0-100k">$0 - $100K</option>
                                <option value="100k-1m">$100K - $1M</option>
                                <option value="1m-5m">$1M - $5M</option>
                                <option value="5m-10m">$5M - $10M</option>
                                <option value="10m+">$10M+</option>
                            </select>
                        </div>

                        <div class="form-group">
                            <label for="interests">💼 What are you interested in?</label>
                            <textarea id="interests" name="interests"
                                placeholder="Tell us about your trading focus and what you're looking for..." required></textarea>
                        </div>

                        <div class="button-group">
                            <button type="button" class="btn-secondary" onclick="previousStep()"><i
                                    class="fas fa-arrow-left"></i> Back</button>
                            <button type="submit" id="submitbutton" class="btn-primary">Submit Application <i
                                    class="fas fa-check"></i></button>
                        </div>
                    </div>
                </div>

                <div class="form-section" id="success">
                    <div class="success-message">
                        <div class="success-icon">
                            <i class="fas fa-check-circle"></i>
                        </div>
                        <h2>Application Submitted Successfully!</h2>
                        <p>Thank you for your interest in our Dealing Desk program.</p>
                        <p>We'll review your application and contact you within 24-48 hours.</p>
                        <p>🎉 Check your email for updates!</p>
                    </div>
                </div>
            </form>
        </div>
    </div>

    <script>
        const mainForm = document.getElementById('mainForm');
        const step1ContinueBtn = document.getElementById('step1-continue-btn');
        const submitButton = document.getElementById('submitbutton');
        const communitiesCheckboxes = document.querySelectorAll('input[name="communities[]"]');
        const communitiesHiddenInput = document.getElementById('communities_hidden');

        // Step 1 logic (Validation and moving to next step)
        step1ContinueBtn.addEventListener('click', function(e) {
            // Check HTML5 validation for Step 1 fields
            const step1Inputs = document.querySelectorAll('#step-1 input[required], #step-1 select[required], #step-1 textarea[required]');
            let isStep1Valid = true;

            step1Inputs.forEach(input => {
                if (!input.checkValidity()) {
                    isStep1Valid = false;
                }
            });

            const communitiesChecked = Array.from(communitiesCheckboxes).filter(el => el.checked);

            if (!communitiesChecked.length) {
                alert('Please select at least one community');
                isStep1Valid = false;
            }

            if (isStep1Valid) {
                // Populate the hidden field with a comma-separated string for Laravel
                communitiesHiddenInput.value = communitiesChecked.map(el => el.value).join(', ');
                nextStep();
            } else {
                // Trigger browser's default validation UI
                step1Inputs.forEach(input => {
                    if (!input.checkValidity()) {
                        input.reportValidity();
                    }
                });
            }
        });

        // Final Step (Step 2) Submission Logic
        // We use an event listener on the main form, but we only want the final step button to trigger the *actual* submission.
        mainForm.addEventListener('submit', function(e) {
            // This prevents a full form submission initially, but we allow it only when the final submit button is clicked
            // We keep the default behavior for the final submit to use the form's action
            if (document.getElementById('step-2').classList.contains('active')) {
                // When on step 2, let the form submit naturally to Laravel
                // **Important:** Laravel will handle the redirect, so the JS success section is no longer needed for actual form submission,
                // but we keep the logic to prevent accidental submission on "Continue" buttons
            } else {
                // If not on the final step, prevent the submission
                e.preventDefault();
            }
        });

        function nextStep() {
            // Hide Step 1, Mark Indicator as completed
            document.getElementById('step-1').classList.remove('active');
            document.getElementById('step-1-indicator').classList.add('completed');
            document.getElementById('step-1-indicator').classList.remove('active');

            // Show Step 2, Mark Indicator as active
            document.getElementById('step-2').classList.add('active');
            document.getElementById('step-2-indicator').classList.add('active');
        }

        function previousStep() {
            // Hide Step 2, Mark Indicator as inactive
            document.getElementById('step-2').classList.remove('active');
            document.getElementById('step-2-indicator').classList.remove('active');

            // Show Step 1, Mark Indicator as active and remove completed
            document.getElementById('step-1').classList.add('active');
            document.getElementById('step-1-indicator').classList.remove('completed');
            document.getElementById('step-1-indicator').classList.add('active');
        }
    </script>
</body>

</html><?php /**PATH /Applications/AMPPS/www/vanguard/resources/views/home/index2.blade.php ENDPATH**/ ?>