:root { 
    --primary: #4834d4; 
    --bg: #f8f9fd; 
    --glass: rgba(255, 255, 255, 0.9);
}

body { 
    font-family: 'Segoe UI', Tahoma, sans-serif; 
    background: var(--bg); 
    direction: rtl; 
    margin: 0; 
    color: #2d3436;
}

.container { max-width: 500px; margin: 0 auto; padding: 15px; }

/* الهيدر */
.top-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 25px; padding: 10px 5px; }
.back-circle-btn { width: 45px; height: 45px; border-radius: 50%; border: none; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.08); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--primary); }

/* المربعات الرقمية (تعديل موقع الأيقونة) */
.questions-numbers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.question-item { 
    aspect-ratio: 1/1; background: #fff; border-radius: 24px; display: flex; 
    align-items: center; justify-content: center; font-size: 1.8rem; font-weight: bold; 
    position: relative; border-bottom: 6px solid #ddd; box-shadow: 0 8px 20px rgba(0,0,0,0.04); 
    transition: 0.3s;
}
.q-edit { 
    position: absolute; top: 10px; left: 10px; font-size: 0.85rem; 
    color: var(--primary); background: #f0f1ff; padding: 6px; border-radius: 10px; 
}

/* الألوان والحالات */
.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: 12px 0; }
.chip-opt, .status-opt { flex: 1; cursor: pointer; position: relative; }
.chip-opt input, .status-opt input { display: none; }

.chip-opt span, .status-opt span { 
    display: block; padding: 15px 5px; text-align: center; background: #fff; 
    border-radius: 16px; border: 2px solid #edf2f7; font-weight: bold; 
    transition: 0.3s all cubic-bezier(0.4, 0, 0.2, 1); font-size: 0.9rem;
}

/* تأثير الاختيار */
.chip-opt input:checked + span { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 5px 15px rgba(72, 52, 212, 0.3); }
.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; }

/* شاشة التمرين (الحفاظ على الأسطر) */
.quiz-box { background: #fff; padding: 30px; border-radius: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); margin-bottom: 20px; }
.quiz-text-area { 
    line-height: 2.8; font-size: 1.3rem; 
    white-space: pre-wrap; /* سر بقاء الأسطر كما هي */
}
.word-gap { display: inline-block; min-width: 70px; height: 32px; background: #f1f2f6; border-bottom: 3px solid #cbd5e0; margin: 0 6px; vertical-align: middle; border-radius: 8px; color: transparent; }
.word-gap.filled { color: var(--primary); background: transparent; border-bottom-color: #2ecc71; font-weight: bold; }

/* أزرار الكلمات */
.word-pool-area { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.word-card { padding: 12px 20px; background: #fff; border: 2px solid #edf2f7; border-radius: 15px; font-weight: bold; box-shadow: 0 4px 6px rgba(0,0,0,0.02); cursor: pointer; }

/* المدخلات */
.glass-card { background: var(--glass); padding: 25px; border-radius: 30px; box-shadow: 0 15px 35px rgba(0,0,0,0.05); border: 1px solid rgba(255,255,255,0.7); }
input, textarea { width: 100%; padding: 15px; border-radius: 15px; border: 2px solid #eee; margin-top: 8px; font-family: inherit; font-size: 1rem; box-sizing: border-box; }
.primary-btn { background: var(--primary); color: #fff; border: none; padding: 18px; border-radius: 20px; width: 100%; font-weight: bold; font-size: 1.1rem; cursor: pointer; box-shadow: 0 10px 20px rgba(72, 52, 212, 0.2); }
.fab-btn { position: fixed; bottom: 30px; left: 30px; width: 65px; height: 65px; border-radius: 50%; background: var(--primary); color: #fff; border: none; font-size: 1.8rem; box-shadow: 0 10px 25px rgba(72, 52, 212, 0.4); cursor: pointer; z-index: 100; }

.hidden { display: none !important; }
