: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: 20px; }

/* الفلاشات */
body.correct-flash { background-color: #d1f2eb !important; }
body.error-flash { background-color: #fadbd8 !important; }

/* شبكة الألوان (8 ألوان) */
.subject-colors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 15px 0; }
.s-col input { display: none; }
.s-col span { display: block; width: 40px; height: 40px; border-radius: 12px; border: 3px solid transparent; cursor: pointer; transition: 0.2s; }
.s-col input:checked + span { border-color: #000; transform: translateY(-5px); box-shadow: 0 5px 10px rgba(0,0,0,0.2); }

/* واجهة الأرقام للأسئلة */
.questions-numbers-style { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.question-item { 
    aspect-ratio: 1/1; background: white; border-radius: 20px; 
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    position: relative; box-shadow: 0 8px 15px rgba(0,0,0,0.05); border-bottom: 5px solid #ddd;
}
.question-item b { font-size: 1.8rem; color: #333; }
.question-item.q-green { border-bottom-color: #2ecc71; }
.question-item.q-yellow { border-bottom-color: #f1c40f; }
.question-item.q-red { border-bottom-color: #e74c3c; }

.edit-q-btn { position: absolute; top: 8px; left: 8px; background: #f0f0f0; border: none; border-radius: 50%; width: 28px; height: 28px; font-size: 0.7rem; color: var(--primary); }

/* العناصر الأخرى */
.subject-card { padding: 25px; border-radius: 22px; color: white; font-weight: bold; font-size: 1.4rem; cursor: pointer; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.modal { position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.glass-card { background: white; padding: 25px; border-radius: 25px; width: 90%; max-width: 400px; }
.input-group { margin-bottom: 15px; text-align: right; }
.input-group label { display: block; font-size: 0.85rem; color: #666; margin-bottom: 5px; }
input, textarea { width: 100%; padding: 14px; border: 2px solid #eee; border-radius: 12px; font-family: inherit; box-sizing: border-box; }
.status-selector { display: flex; gap: 8px; }
.status-opt { flex: 1; }
.status-opt input { display: none; }
.opt-content { padding: 10px; background: #f5f5f5; border-radius: 10px; text-align: center; cursor: pointer; font-size: 0.75rem; font-weight: bold; }
.status-opt input:checked + .opt-content { background: var(--primary); color: white; }

.interactive-text { background: white; padding: 20px; border-radius: 20px; line-height: 2.8; font-size: 1.2rem; min-height: 200px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
.word-gap { display: inline-block; min-width: 60px; border-bottom: 2px solid #ddd; color: transparent; margin: 0 4px; }
.word-gap.filled { color: var(--primary); border-bottom-color: #2ecc71; font-weight: bold; }
.word-gap.active-gap { border-bottom-color: var(--primary); background: #f4f2ff; }

.floating-words { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; justify-content: center; }
.word-card { padding: 12px 18px; background: white; border: 2px solid var(--primary); border-radius: 12px; font-weight: bold; cursor: pointer; }

.primary-btn { background: var(--primary); color: white; border: none; padding: 16px; border-radius: 15px; width: 100%; font-weight: bold; cursor: pointer; }
.sec-btn { background: #eee; border: none; padding: 12px; border-radius: 15px; width: 100%; margin-top: 10px; cursor: pointer; }
.fab-btn { position: fixed; bottom: 30px; left: 30px; width: 65px; height: 65px; border-radius: 50%; background: var(--primary); color: white; border: none; font-size: 1.6rem; box-shadow: 0 10px 20px rgba(72,52,212,0.3); }
.top-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.back-circle-btn { width: 45px; height: 45px; border-radius: 50%; border: none; background: #fff; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.score-badge { background: var(--primary); color: white; padding: 6px 15px; border-radius: 20px; font-weight: bold; }
.hidden { display: none !important; }
