/* خط Cairo للعربية */
* {
    font-family: 'Cairo', sans-serif;
}

/* تأثيرات الحركة */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.scale-95 {
    transform: scale(0.95);
}

.transition-all {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* أزرار مخصصة للراديو والتشيك بوكس */
.custom-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-radio.selected {
    border-color: #3b82f6;
}

.custom-radio.selected::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #3b82f6;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-checkbox.selected {
    border-color: #3b82f6;
    background: #3b82f6;
}

.custom-checkbox.selected::after {
    content: '✓';
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
}

/* مشغل الدروس */
.lesson-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.lesson-content.active {
    opacity: 1;
    transform: translateY(0);
}

.lesson-item {
    transition: all 0.3s ease;
    position: relative;
}

.lesson-item:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(59, 130, 246, 0.1) 100%);
    transform: translateX(-2px);
}

.lesson-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.25) 100%);
    border-right: 4px solid #3b82f6;
    transform: translateX(-4px);
}

/* شريط التقدم */
.progress-bar {
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
}

/* منطقة رفع الملفات */
.upload-zone {
    transition: all 0.3s ease;
}

.upload-zone.drag-over {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.2) 100%);
    border-color: #3b82f6;
    transform: scale(1.02);
}

/* النوافذ المنبثقة */
.modal {
    backdrop-filter: blur(12px);
    background: rgba(0, 0, 0, 0.4);
}

.modal-content {
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* الأزرار المتدرجة */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* تأثير الزجاج */
.glass-effect {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* حاوي الفيديو */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* حاوي الملاحظات */
.notes-container {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.notes-container::-webkit-scrollbar {
    width: 6px;
}

.notes-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.notes-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* عنصر الملاحظة */
.note-item {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.note-item:hover {
    background-color: rgba(59, 130, 246, 0.05);
    border-left-color: #3b82f6;
    transform: translateX(2px);
}

/* الإشعارات */
.toast {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    transform: translateX(0) !important;
    animation: toastBounce 0.4s ease-out;
}

@keyframes toastBounce {
    0% { transform: translateX(100%) scale(0.8); }
    60% { transform: translateX(-5px) scale(1.05); }
    100% { transform: translateX(0) scale(1); }
}

/* التصميم المتجاوب */
@media (max-width: 768px) {
    .video-container {
        padding-bottom: 75%;
    }
    
    .mobile-optimized {
        padding: 1rem;
    }
    
    .text-responsive {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}

@media (max-width: 640px) {
    .sidebar-width {
        width: 90vw;
    }
    
    .mobile-header {
        padding: 0.75rem;
    }
    
    .mobile-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* حركات متنوعة */
.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.pulse-ring {
    animation: pulseRing 2s infinite;
}

@keyframes pulseRing {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* جداول البيانات */
.data-table {
    border-collapse: collapse;
    width: 100%;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #e5e7eb;
}

.data-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.data-table tbody tr:hover {
    background-color: #f9fafb;
}

/* شارات الحالة */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-active {
    background-color: #d1fae5;
    color: #065f46;
}

.status-inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

/* نمط الكارت */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

/* لودر */
.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* تحسينات للطباعة */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
}
