/* =====================================================
   تنسيقات صفحة التقدم والإحصائيات
   ===================================================== */

.progress-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.progress-section h3 {
    color: var(--gray-800);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-section h3 i {
    color: var(--primary-color);
}

/* الإحصائيات العامة */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.stat-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
}

/* تقدم المواضيع */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.subject-progress-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.subject-progress-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.subject-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.subject-header h4 {
    color: var(--gray-800);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.mastery-level {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.subject-stats {
    margin-bottom: 16px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.stat-value {
    color: var(--gray-800);
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.subject-status {
    text-align: center;
}

.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status.completed {
    background: var(--success-color);
    color: white;
}

.status.in-progress {
    background: var(--warning-color);
    color: white;
}

/* الإنجازات */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.achievement-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.achievement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.achievement-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.achievement-info {
    flex: 1;
}

.achievement-info h4 {
    color: var(--gray-800);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.achievement-info p {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0 0 8px 0;
}

.achievement-points {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
}

.achievement-date {
    color: var(--gray-500);
    font-size: 0.75rem;
    text-align: right;
}

.empty-achievements {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}

.empty-achievements i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--gray-400);
}

.empty-achievements h4 {
    color: var(--gray-600);
    margin-bottom: 8px;
}

/* التوصيات */
.recommendations-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.recommendation-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid var(--primary-light);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: transform 0.2s ease;
}

.recommendation-card:hover {
    transform: translateY(-2px);
}

.recommendation-icon {
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.recommendation-content h4 {
    color: var(--gray-800);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.recommendation-content p {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
}

/* رسائل الخطأ */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #dc2626;
}

.error-message i {
    font-size: 2rem;
    margin-bottom: 12px;
}

.error-message p {
    margin: 0;
    font-size: 0.875rem;
}

/* تحسينات للأجهزة المحمولة */
@media (max-width: 768px) {
    .progress-section {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .subjects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .recommendations-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .achievement-card {
        flex-direction: column;
        text-align: center;
    }
    
    .achievement-date {
        text-align: center;
    }
}

/* تحريكات */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.progress-section {
    animation: slideInUp 0.5s ease-out;
}

.stat-card,
.subject-progress-card,
.achievement-card,
.recommendation-card {
    animation: slideInUp 0.5s ease-out;
}

/* تحسينات إضافية */
.progress-section:last-child {
    margin-bottom: 0;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }
.stat-card:nth-child(5) { animation-delay: 0.5s; }
.stat-card:nth-child(6) { animation-delay: 0.6s; }
