:root { --primary: #4834d4; --bg: #f5f6fa; }
body { font-family: 'Segoe UI', sans-serif; background: var(--bg); direction: rtl; margin: 0; user-select: none; }
.container { max-width: 500px; margin: 0 auto; padding: 15px; }

/* أزرار الخيارات (Chips) */
.chips-row { display: flex; gap: 10px; margin-top: 10px; }
.chip-opt, .status-opt { flex: 1; cursor: pointer; }
.chip-opt input, .status-opt input { display: none; }
.chip-opt span, .status-opt span { 
    display: block; padding: 12px; text-align: center; background: #fff; 
    border-radius: 12px; border: 2px solid #eee; font-weight: bold; transition: 0.3s;
}
.chip-opt input:checked + span { background: var(--primary); color: #fff; }
.status-opt.green input:checked + span { background: #2ecc71; color: #fff; }
.status-opt.yellow input:checked + span { background: #f1c40f; color: #fff; }
.status-opt.red input:checked + span { background: #e74c3c; color: #fff; }

/* المربعات الرقمية */
.questions-numbers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.question-item { 
    aspect-ratio: 1/1; background: #fff; border-radius: 20px; display: flex; 
    align-items: center; justify-content: center; font-size: 1.5rem; font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); border-bottom: 5px solid #ddd;
}
.q-green { border-bottom-color: #2ecc71; }
.q-yellow { border-bottom-color: #f1c40f; }
.q-red { border-bottom-color: #e74c3c; }

/* الأزرار العائمة */
.fab-btn { position: fixed; bottom: 30px; left: 30px; width: 60px; height: 60px; border-radius: 50%; background: var(--primary); color: #fff; border: none; font-size: 1.5rem; box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.primary-btn { background: var(--primary); color: #fff; border: none; padding: 15px; border-radius: 15px; width: 100%; font-weight: bold; margin-top: 15px; cursor: pointer; }
.top-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.back-circle-btn { width: 40px; height: 40px; border-radius: 50%; border: none; background: #fff; cursor: pointer; }

/* شاشة التمرين */
.quiz-box { background: #fff; padding: 25px; border-radius: 25px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.quiz-text-area { line-height: 2.5; font-size: 1.2rem; }
.word-gap { display: inline-block; min-width: 50px; border-bottom: 2px solid #ccc; margin: 0 5px; color: transparent; }
.word-gap.filled { color: var(--primary); border-bottom-color: #2ecc71; font-weight: bold; }
.word-card { padding: 10px 15px; background: #fff; border: 2px solid #eee; border-radius: 10px; font-weight: bold; margin: 5px; cursor: pointer; display: inline-block; }
.hidden { display: none !important; }

/* نافذة المادة */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-content { background: #fff; padding: 25px; border-radius: 20px; width: 85%; max-width: 400px; }
.color-picker { display: flex; gap: 10px; margin: 15px 0; }
.c-box span { display: block; width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; }
.c-box input { display: none; }
.c-box input:checked + span { border-color: #000; }
