:root { --primary: #4834d4; --bg: #f8f9fd; }
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; }

/* الأزرار العلوية */
.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; box-shadow: 0 2px 5px rgba(0,0,0,0.1); cursor: pointer; }
#nav-title { font-weight: bold; font-size: 1.2rem; }

/* شبكة المواد والأسئلة */
.subjects-grid { display: flex; flex-direction: column; gap: 12px; }
.subject-card { padding: 20px; border-radius: 18px; color: #fff; font-weight: bold; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.questions-numbers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 10px; }
.question-item { aspect-ratio: 1/1; background: #fff; border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: bold; position: relative; border-bottom: 5px solid #ddd; box-shadow: 0 4px 8px rgba(0,0,0,0.05); }

/* ألوان الحالة */
.q-green { border-bottom-color: #2ecc71; }
.q-yellow { border-bottom-color: #f1c40f; }
.q-red { border-bottom-color: #e74c3c; }

/* أزرار الخيارات Chips */
.chips-row { display: flex; gap: 8px; margin: 10px 0; }
.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 5px; text-align: center; background: #fff; border-radius: 12px; border: 2px solid #eee; font-weight: bold; }
.chip-opt input:checked + span { background: var(--primary); color: #fff; border-color: var(--primary); }
.status-opt.green input:checked + span { background: #2ecc71; color: #fff; border-color: #2ecc71; }
.status-opt.yellow input:checked + span { background: #f1c40f; color: #fff; border-color: #f1c40f; }
.status-opt.red input:checked + span { background: #e74c3c; color: #fff; border-color: #e74c3c; }

/* مدخلات المحرر */
.input-row { display: flex; gap: 10px; margin-bottom: 15px; }
.input-group { margin-bottom: 15px; }
.input-group label { display: block; margin-bottom: 5px; font-weight: bold; color: #555; }
input, textarea { width: 100%; padding: 12px; border-radius: 12px; border: 2px solid #eee; box-sizing: border-box; font-family: inherit; }
.primary-btn { background: var(--primary); color: #fff; border: none; padding: 16px; border-radius: 15px; width: 100%; font-weight: bold; cursor: pointer; margin-top: 10px; }
.sec-btn { background: #eee; color: #333; border: none; padding: 12px; border-radius: 12px; width: 100%; margin-top: 8px; cursor: pointer; }
.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.1); cursor: pointer; }

/* شاشة التمرين */
.quiz-box { background: #fff; padding: 25px; border-radius: 25px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.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; animation: pop 0.3s; }
.word-pool-area { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; justify-content: center; }
.word-card { padding: 10px 18px; background: #fff; border: 2px solid #eee; border-radius: 12px; font-weight: bold; cursor: pointer; }

/* النافذة */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 100; }
.color-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 15px 0; }
.c-box span { display: block; width: 35px; height: 35px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.c-box input:checked + span { border-color: #000; }
.hidden { display: none !important; }
@keyframes pop { 0% { transform: scale(0.8); } 100% { transform: scale(1); } }
