<?php $__env->startSection('title', 'My Profile'); ?>

<?php $__env->startSection('content'); ?>

<div class="d-flex justify-content-between align-items-center mb-4">
    <div>
        <h1 class="h3 mb-1 text-gray-800 fw-bold">My Profile</h1>
        <p class="text-muted small">Your public profile and account details</p>
    </div>
</div>

<div class="row g-5">

    
    <div class="col-lg-4">
        <div class="card shadow border-0 text-center h-100">
            <div class="card-body p-5">
                <img src="<?php echo e(Auth::user()->profile_image_path
                    ? asset('storage/avatar/' . Auth::user()->profile_image_path)
                    : asset('img/undraw_profile.svg')); ?>"
                     class="rounded-circle shadow-lg mb-4 border border-5 border-white"
                     style="width: 180px; height: 180px; object-fit: cover;"
                     alt="Profile Picture">

                <h4 class="fw-bold text-gray-800 mb-1"><?php echo e(Auth::user()->name); ?></h4>
                <p class="text-muted mb-4"><?php echo e(Auth::user()->email); ?></p>

                <div class="mt-4">
                    <?php if(Auth::user()->isLogged == 1): ?>
                        <span class="badge bg-success fs-6 px-4 py-2 fw-bold">
                            Online In-Game
                        </span>
                    <?php else: ?>
                        <span class="badge bg-secondary fs-6 px-4 py-2 fw-bold">
                            Offline
                        </span>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>

    
    <div class="col-lg-8">
        <div class="card shadow border-0 h-100">
            <div class="card-header py-4 text-white text-center fw-bold"
                 style="background: linear-gradient(90deg, #4e73df, #224abe);">
                <h5 class="mb-0">Account Information</h5>
            </div>

            <div class="card-body p-5">
                <table class="table table-borderless align-middle mb-5">
                    <tbody>
                        <tr>
                            <th width="35%" class="text-gray-700 fw-600">Username</th>
                            <td class="fw-bold"><?php echo e(Auth::user()->name); ?></td>
                        </tr>
                        <tr>
                            <th>Registered Email</th>
                            <td><?php echo e(Auth::user()->email); ?></td>
                        </tr>
                        <tr>
                            <th>Join Date</th>
                            <td><?php echo e(Auth::user()->created_at?->format('d M Y, H:i') ?? 'Unknown'); ?></td>
                        </tr>
                      
                        <tr>
                            <th>Client IP Address</th>
                            <td class="text-muted"><?php echo e(Auth::user()->ip ?? 'Not recorded'); ?></td>
                        </tr>
                        <tr>
                            <th>Account Status</th>
                            <td>
                                <?php if(Auth::user()->isLogged == 1): ?>
                                    <span class="text-success fw-bold">Currently In-Game</span>
                                <?php else: ?>
                                    <span class="text-muted">Offline</span>
                                <?php endif; ?>
                            </td>
                        </tr>
                    </tbody>
                </table>

                <hr class="border-light opacity-25">

                <div class="d-flex flex-wrap gap-3 justify-content-center justify-content-lg-start mt-4">
                    <a href="<?php echo e(route('user.profile.changepassword')); ?>"
                       class="btn btn-outline-info btn-lg px-5 fw-bold">
                        Change Password 

                    </a>
                    <a href="<?php echo e(route('user.profile.editprofile')); ?>"
                       class="btn btn-primary btn-lg px-5 fw-bold shadow-sm">
                        Edit Profile
                    </a>
                </div>
            </div>
        </div>
    </div>

</div>


<style>
    .card:hover {
        transform: translateY(-6px);
        box-shadow: 0 1.5rem 3rem rgba(0,0,0,.175) !important;
        transition: all 0.4s ease;
    }
</style>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('manage.user.index', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home2/reckons1/public_html/gogogo/resources/views/manage/user/profile/index.blade.php ENDPATH**/ ?>