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

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

/* المربعات الرقمية */
.questions-numbers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.question-item { 
    aspect-ratio: 1/1; background: #fff; border-radius: 18px; display: flex; align-items: center; 
    justify-content: center; position: relative; cursor: pointer; border-bottom: 6px solid #ddd;
}
.question-item b { font-size: 1.6rem; color: #2d3436; }
.q-green { border-bottom-color: #2ecc71; } .q-yellow { border-bottom-color: #f1c40f; } .q-red { border-bottom-color: #e74c3c; }
.edit-q-btn { position: absolute; top: 6px; left: 6px; border: none; background: #f8f9fa; border-radius: 50%; width: 28px; height: 28px; color: var(--primary); z-index: 10; }

/* واجهة الإضافة */
.editor-card { border-top: 6px solid var(--primary); padding: 25px !important; }
.input-row { display: flex; gap: 12px; margin-bottom: 15px; }
.input-group.small { flex: 1; } .input-group.large { flex: 3; }
.input-group label { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.85rem; margin-bottom: 8px; color: #555; }
input, textarea { width: 100%; padding: 12px; border: 2px solid #edf2f7; border-radius: 12px; box-sizing: border-box; background: #f8fafc; font-family: inherit; }

/* Chips الصعوبة والحالة */
.difficulty-chips, .status-selector { display: flex; gap: 8px; }
.chip, .status-opt { flex: 1; cursor: pointer; position: relative; }
.chip input, .status-opt input { display: none; }
.chip span, .status-opt .opt-content { display: block; padding: 10px; text-align: center; background: #eee; border-radius: 10px; font-weight: bold; font-size: 0.8rem; }
.chip input:checked + span { background: var(--primary); color: #fff; }
.status-opt.green input:checked + .opt-content { background: #2ecc71; color: #fff; }
.status-opt.yellow input:checked + .opt-content { background: #f1c40f; color: #fff; }
.status-opt.red input:checked + .opt-content { background: #e74c3c; color: #fff; }

/* التمرين */
.quiz-box { background: #fff; padding: 20px; border-radius: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.quiz-text-area { line-height: 2.8; font-size: 1.2rem; }
.word-gap { display: inline-block; min-width: 50px; height: 30px; background: #f0f0f0; border-bottom: 3px solid #ccc; margin: 0 4px; vertical-align: middle; border-radius: 5px; 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: 10px; margin-top: 25px; justify-content: center; }
.word-card { padding: 10px 15px; background: #fff; border: 2px solid var(--primary); border-radius: 10px; font-weight: bold; cursor: pointer; }

/* أزرار وعناصر عامة */
.primary-btn { background: var(--primary); color: #fff; border: none; padding: 15px; border-radius: 15px; width: 100%; font-weight: bold; cursor: pointer; margin-top: 15px; }
.fab-btn { position: fixed; bottom: 25px; left: 25px; width: 60px; height: 60px; border-radius: 50%; background: var(--primary); color: #fff; border: none; font-size: 1.5rem; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.subject-colors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 15px 0; }
.s-col span { display: block; width: 35px; height: 35px; border-radius: 10px; cursor: pointer; border: 2px solid transparent; }
.s-col input { display: none; }
.s-col input:checked + span { border-color: #000; transform: scale(1.1); }
.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; }
.hidden { display: none !important; }
