

<?php $__env->startSection('title', 'Simülasyon Sonucu'); ?>

<?php $__env->startSection('content'); ?>
<div style="max-width: 800px; margin: 0 auto; padding: 40px 16px;">

    <a href="<?php echo e(route('ai.simulation')); ?>" style="color: #6b7280; text-decoration: none; font-size: 14px; margin-bottom: 24px; display: inline-block;">
        ← Simülasyonlara Dön
    </a>

    
    <div style="background: white; border-radius: 20px; border: 1px solid #e5e7eb; overflow: hidden; margin-bottom: 24px;">
        
        
        <?php
            $score = $simulation->score ?? 0;
            $bgColor = $score >= 80 ? '#10b981' : ($score >= 60 ? '#f59e0b' : '#ef4444');
            $label = $score >= 80 ? 'Mükemmel!' : ($score >= 60 ? 'İyi' : 'Geliştirilmeli');
        ?>
        
        <div style="background: <?php echo e($bgColor); ?>; padding: 40px; text-align: center; color: white;">
            <div style="font-size: 72px; font-weight: 800; margin-bottom: 8px;"><?php echo e($score); ?></div>
            <div style="font-size: 18px; font-weight: 600; opacity: 0.9; margin-bottom: 4px;"><?php echo e($label); ?></div>
            <div style="font-size: 14px; opacity: 0.7;"><?php echo e($simulation->scenario); ?></div>
        </div>

        
        <div style="padding: 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: center; border-bottom: 1px solid #e5e7eb;">
            <div>
                <div style="font-size: 24px; font-weight: 700; color: #111827;"><?php echo e($score); ?>/100</div>
                <div style="font-size: 13px; color: #6b7280;">Toplam Puan</div>
            </div>
            <div>
                <div style="font-size: 24px; font-weight: 700; color: #111827;"><?php echo e(count($simulation->responses ?? [])); ?></div>
                <div style="font-size: 13px; color: #6b7280;">Cevaplanan Soru</div>
            </div>
            <div>
                <div style="font-size: 24px; font-weight: 700; color: #111827;"><?php echo e($simulation->created_at->format('d.m.Y')); ?></div>
                <div style="font-size: 13px; color: #6b7280;">Tarih</div>
            </div>
        </div>

        
        <?php if($simulation->ai_notes): ?>
            <div style="padding: 24px; border-bottom: 1px solid #e5e7eb;">
                <h3 style="font-size: 16px; font-weight: 700; color: #111827; margin-bottom: 12px;">🤖 AI Geri Bildirimi</h3>
                <p style="font-size: 14px; color: #374151; line-height: 1.7; margin: 0;"><?php echo e($simulation->ai_notes); ?></p>
            </div>
        <?php endif; ?>

        
        <?php
            $aiFeedback = $simulation->ai_feedback ?? [];
            $strengths = $aiFeedback['strengths'] ?? [];
            $improvements = $aiFeedback['improvements'] ?? [];
        ?>

        <?php if(count($strengths) > 0 || count($improvements) > 0): ?>
            <div style="padding: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px;">
                <?php if(count($strengths) > 0): ?>
                    <div>
                        <h4 style="font-size: 14px; font-weight: 700; color: #065f46; margin-bottom: 12px; display: flex; align-items: center; gap: 6px;">
                            <span>✅</span> Güçlü Yönler
                        </h4>
                        <ul style="list-style: none; padding: 0; margin: 0;">
                            <?php $__currentLoopData = $strengths; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $strength): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li style="font-size: 13px; color: #374151; padding: 6px 0; border-bottom: 1px solid #f3f4f6; display: flex; align-items: start; gap: 6px;">
                                    <span style="color: #10b981; font-size: 16px;">•</span>
                                    <?php echo e($strength); ?>

                                </li>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </ul>
                    </div>
                <?php endif; ?>

                <?php if(count($improvements) > 0): ?>
                    <div>
                        <h4 style="font-size: 14px; font-weight: 700; color: #92400e; margin-bottom: 12px; display: flex; align-items: center; gap: 6px;">
                            <span>💡</span> Geliştirilecek Alanlar
                        </h4>
                        <ul style="list-style: none; padding: 0; margin: 0;">
                            <?php $__currentLoopData = $improvements; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $improvement): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <li style="font-size: 13px; color: #374151; padding: 6px 0; border-bottom: 1px solid #f3f4f6; display: flex; align-items: start; gap: 6px;">
                                    <span style="color: #f59e0b; font-size: 16px;">•</span>
                                    <?php echo e($improvement); ?>

                                </li>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </ul>
                    </div>
                <?php endif; ?>
            </div>
        <?php endif; ?>
    </div>

    
    <?php if($simulation->responses): ?>
        <div style="background: white; border-radius: 12px; border: 1px solid #e5e7eb; overflow: hidden;">
            <div style="padding: 16px 20px; background: #f9fafb; border-bottom: 1px solid #e5e7eb;">
                <h3 style="font-size: 16px; font-weight: 700; color: #111827; margin: 0;">Cevaplarınızın İncelemesi</h3>
            </div>
            <?php $__currentLoopData = $simulation->responses; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $answer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div style="padding: 20px; border-bottom: 1px solid #e5e7eb;">
                    <p style="font-size: 13px; color: #6b7280; font-weight: 600; margin-bottom: 8px;">SORU <?php echo e($index + 1); ?></p>
                    <p style="font-size: 14px; color: #374151; line-height: 1.6; margin: 0 0 12px;"><?php echo e($answer); ?></p>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>
    <?php endif; ?>

    
    <div style="display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap;">
        <a href="<?php echo e(route('ai.start_simulation', $simulation->scenario)); ?>" 
           style="flex: 1; background: #7c3aed; color: white; padding: 14px 24px; border-radius: 10px; text-decoration: none; font-weight: 600; text-align: center; min-width: 150px;">
            🔄 Tekrar Dene
        </a>
        <a href="<?php echo e(route('ai.simulation')); ?>" 
           style="flex: 1; background: #f3f4f6; color: #374151; padding: 14px 24px; border-radius: 10px; text-decoration: none; font-weight: 600; text-align: center; min-width: 150px;">
            📋 Diğer Simülasyonlar
        </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\ai\simulation-result.blade.php ENDPATH**/ ?>