

<?php $__env->startSection('meta_title', 'Liderlik Tablosu - Sınav & Mülakat Hazırlık'); ?>
<?php $__env->startSection('meta_description', 'En başarılı adayları gör, yarışmaya katıl!'); ?>

<?php $__env->startSection('content'); ?>
<style>
    .lb-header {
        background: linear-gradient(135deg, #0f2448 0%, #1e3a5f 50%, #2563eb 100%);
        color: white;
        padding: 48px 40px;
        border-radius: 20px;
        margin-bottom: 32px;
        box-shadow: 0 16px 48px rgba(30, 58, 95, 0.35);
        text-align: center;
        position: relative;
        overflow: hidden;
    }
    .lb-header::before {
        content: '';
        position: absolute;
        top: -80px; left: -80px;
        width: 280px; height: 280px;
        border-radius: 50%;
        background: rgba(255,255,255,0.05);
    }
    .lb-header::after {
        content: '';
        position: absolute;
        bottom: -100px; right: -100px;
        width: 360px; height: 360px;
        border-radius: 50%;
        background: rgba(255,255,255,0.03);
    }
    .lb-header-inner { position: relative; z-index: 1; }
    .lb-header h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
    .lb-header p { font-size: 15px; opacity: 0.85; }

    .lb-container {
        max-width: 800px;
        margin: 0 auto;
    }

    .lb-card {
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 16px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.04);
        overflow: hidden;
    }

    .lb-item {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 18px 24px;
        border-bottom: 1px solid #f3f4f6;
        transition: background 0.2s;
    }
    .lb-item:last-child { border-bottom: none; }
    .lb-item:hover { background: #f9fafb; }

    .lb-rank {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        font-weight: 800;
        flex-shrink: 0;
    }
    .lb-rank-1 {
        background: linear-gradient(135deg, #fbbf24, #f59e0b);
        color: white;
        box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
    }
    .lb-rank-2 {
        background: linear-gradient(135deg, #9ca3af, #6b7280);
        color: white;
        box-shadow: 0 4px 12px rgba(156, 163, 175, 0.4);
    }
    .lb-rank-3 {
        background: linear-gradient(135deg, #d97706, #b45309);
        color: white;
        box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
    }
    .lb-rank-other {
        background: #f3f4f6;
        color: #6b7280;
        font-size: 14px;
    }

    .lb-avatar {
        width: 48px; height: 48px;
        border-radius: 50%;
        background: linear-gradient(135deg, #2563eb, #7c3aed);
        display: flex; align-items: center; justify-content: center;
        font-size: 18px; font-weight: 700; color: white;
        flex-shrink: 0;
        box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    }

    .lb-info { flex: 1; min-width: 0; }
    .lb-name { font-size: 15px; font-weight: 700; color: #111827; }
    .lb-attempts { font-size: 12px; color: #9ca3af; margin-top: 2px; }

    .lb-score-box {
        text-align: right;
        flex-shrink: 0;
    }
    .lb-score {
        font-size: 22px;
        font-weight: 800;
        color: #2563eb;
    }
    .lb-score-label {
        font-size: 11px;
        color: #9ca3af;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .lb-empty {
        text-align: center;
        padding: 80px 40px;
        color: #9ca3af;
    }
    .lb-empty-icon { font-size: 64px; margin-bottom: 16px; }
    .lb-empty-title { font-size: 18px; font-weight: 700; color: #6b7280; margin-bottom: 8px; }
    .lb-empty-desc { font-size: 14px; }

    .lb-pagination {
        display: flex;
        justify-content: center;
        padding: 20px;
        border-top: 1px solid #e5e7eb;
    }
</style>


<div class="lb-header">
    <div class="lb-header-inner">
        <h1>🏆 Liderlik Tablosu</h1>
        <p>En başarılı adayları gör, yarışmaya katıl!</p>
    </div>
</div>


<div class="lb-container">
    <div class="lb-card">
        <?php if($leaderboard->count() > 0): ?>
            <?php $__currentLoopData = $leaderboard; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="lb-item">
                    <div class="lb-rank <?php echo e($index === 0 ? 'lb-rank-1' : ($index === 1 ? 'lb-rank-2' : ($index === 2 ? 'lb-rank-3' : 'lb-rank-other'))); ?>">
                        <?php echo e($index === 0 ? '🥇' : ($index === 1 ? '🥈' : ($index === 2 ? '🥉' : ($leaderboard->firstItem() + $index)))); ?>

                    </div>
                    <div class="lb-avatar">
                        <?php echo e(mb_strtoupper(mb_substr($user->name, 0, 1))); ?>

                    </div>
                    <div class="lb-info">
                        <div class="lb-name"><?php echo e($user->name); ?></div>
                        <div class="lb-attempts"><?php echo e($user->total_attempts); ?> <?php echo e($user->total_attempts == 1 ? 'deneme' : 'deneme'); ?></div>
                    </div>
                    <div class="lb-score-box">
                        <div class="lb-score">%<?php echo e($user->best_score); ?></div>
                        <div class="lb-score-label">En İyi</div>
                    </div>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        <?php else: ?>
            <div class="lb-empty">
                <div class="lb-empty-icon">🏆</div>
                <div class="lb-empty-title">Henüz sınav sonucu yok</div>
                <div class="lb-empty-desc">İlk sırada sen olmak için hemen sınava gir!</div>
            </div>
        <?php endif; ?>

        <?php if($leaderboard->hasPages()): ?>
        <div class="lb-pagination">
            <?php echo e($leaderboard->links()); ?>

        </div>
        <?php endif; ?>
    </div>

    
    <div style="text-align:center;margin-top:24px;">
        <a href="<?php echo e(route('interview.index')); ?>" style="display:inline-flex;align-items:center;gap:8px;color:#6b7280;font-weight:600;font-size:14px;text-decoration:none;transition:color 0.2s;">
            ← Sınavlara Dön
        </a>
    </div>
</div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.public', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\askeribilgiler\resources\views\interview\leaderboard.blade.php ENDPATH**/ ?>