/* ============================================
   ملف: style.css
   تنسيقات منصة تعلم
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    padding: 20px;
    direction: rtl;
}

/* ===== الشريط العلوي ===== */
.top-bar {
    background: white;
    padding: 15px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.top-bar .logo h1 {
    font-size: 22px;
    color: #1a1a2e;
}
.top-bar .logo h1 span { color: #6c5ce7; }
.top-bar .logo .badge {
    background: #6c5ce7;
    color: white;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 11px;
}

.top-bar .user-area {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.top-bar .user-area select {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    min-width: 180px;
}
.top-bar .user-area select:focus {
    border-color: #6c5ce7;
}
.top-bar .user-area .btn-report {
    background: #6c5ce7;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
}
.top-bar .user-area .btn-report:hover {
    background: #5a4bd1;
}

/* ===== بطاقة الدرس ===== */
.lesson-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 25px;
}
.lesson-card .lesson-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.lesson-card .lesson-header h2 {
    font-size: 24px;
    color: #1a1a2e;
}
.lesson-card .lesson-header .meta {
    color: #888;
    font-size: 14px;
}
.lesson-card .lesson-header .meta span { margin-left: 15px; }
.lesson-card .lesson-header .subject-tag {
    background: #e8f0fe;
    color: #6c5ce7;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
}
.lesson-card .lesson-content {
    color: #444;
    line-height: 1.9;
}

/* ===== الاختبار ===== */
.quiz-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.quiz-section .quiz-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
}
.quiz-section .quiz-header h3 { font-size: 20px; }
.quiz-section .quiz-header .question-count {
    background: #f0f2f5;
    padding: 5px 16px;
    border-radius: 20px;
}

.question-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 16px;
    border-right: 4px solid transparent;
}
.question-item:hover {
    border-right-color: #6c5ce7;
}
.question-item .q-text {
    font-weight: 600;
    margin-bottom: 12px;
}
.question-item .q-text .q-number { color: #6c5ce7; }
.question-item .options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
@media (max-width: 600px) {
    .question-item .options { grid-template-columns: 1fr; }
}
.question-item .options label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
}
.question-item .options label:hover {
    border-color: #6c5ce7;
}
.question-item .options label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #6c5ce7;
}
.question-item .options label .option-letter {
    width: 28px;
    height: 28px;
    background: #e8f0fe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #6c5ce7;
}
.question-item .options label.selected {
    border-color: #6c5ce7;
    background: #f0edff;
}

/* ===== أزرار ===== */
.actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    flex-wrap: wrap;
}
.actions .btn {
    padding: 12px 32px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
.actions .btn-primary {
    background: #6c5ce7;
    color: white;
}
.actions .btn-primary:hover {
    background: #5a4bd1;
}
.actions .btn-outline {
    background: transparent;
    color: #6c5ce7;
    border: 2px solid #6c5ce7;
}
.actions .btn-outline:hover {
    background: #6c5ce7;
    color: white;
}

/* ===== النتيجة ===== */
.result-box {
    background: #f0fdf4;
    border-radius: 16px;
    padding: 30px;
    margin-top: 25px;
    border: 2px solid #bbf7d0;
    display: none;
}
.result-box.show { display: block; }
.result-box .big-score {
    font-size: 56px;
    font-weight: 800;
    color: #1a1a2e;
}
.result-box .big-score .highlight { color: #6c5ce7; }
.result-box .sub-text { color: #666; }
.result-box .rank-info {
    background: white;
    border-radius: 12px;
    padding: 15px 25px;
    display: inline-block;
    margin-top: 15px;
}
.result-box .rank-info .rank-number {
    font-size: 28px;
    font-weight: 700;
    color: #6c5ce7;
}
.result-box .whatsapp-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
.result-box .whatsapp-btn:hover { background: #1da85c; }

/* ===== المودال ===== */
.report-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.report-modal.show { display: flex; }
.report-modal .modal-content {
    background: white;
    border-radius: 20px;
    padding: 35px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}
.report-modal .modal-content .close-modal {
    float: left;
    background: #f0f2f5;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}
.report-modal .modal-content .close-modal:hover { background: #e74c3c; color: white; }
.report-modal .modal-content h3 {
    text-align: center;
    margin-bottom: 20px;
}
.report-modal .report-table {
    width: 100%;
    border-collapse: collapse;
}
.report-modal .report-table th,
.report-modal .report-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    text-align: right;
}
.report-modal .report-table th {
    background: #f8f9fa;
}
.report-modal .status-done { color: #00b894; font-weight: 600; }
.report-modal .status-pending { color: #fdcb6e; font-weight: 600; }

.footer-bar {
    text-align: center;
    color: #adb5bd;
    font-size: 13px;
    padding: 20px 0 10px;
    border-top: 1px solid #e9ecef;
    margin-top: 25px;
}