{
  "key": "quick_math",
  "name": "Quick Math",
  "nameAr": "الحساب السريع",
  "icon": "➗",
  "category": "speed",
  "description": "Solve math problems as fast as you can! Choose the correct answer before time runs out.",
  "descriptionAr": "حل العمليات الحسابية بأسرع وقت! اختر الناتج الصحيح قبل انتهاء الوقت.",
  "version": "1.0.0",
  "displayOrder": 5,
  "minPlayers": 1,
  "maxPlayers": 20,
  "showBottomTabBar": true,
  "settingsGroups": [
    { "key": "gameplay", "labelAr": "اللعب", "icon": "🎯" },
    { "key": "scoring", "labelAr": "النقاط والخصومات", "icon": "💰" },
    { "key": "display", "labelAr": "العرض", "icon": "📺" },
    { "key": "admin", "labelAr": "الأدمن", "icon": "🛡️" }
  ],
  "settings": [
    {
      "key": "questionCount",
      "type": "number",
      "label": "Number of Questions",
      "labelAr": "عدد الأسئلة",
      "icon": "📝",
      "group": "gameplay",
      "default": 10,
      "min": 5,
      "max": 30,
      "step": 1
    },
    {
      "key": "timeLimit",
      "type": "number",
      "label": "Time per Question (sec)",
      "labelAr": "وقت الإجابة (ثانية)",
      "icon": "⏱️",
      "group": "gameplay",
      "default": 10,
      "min": 5,
      "max": 30,
      "step": 5
    },
    {
      "key": "shuffleQuestions",
      "type": "boolean",
      "label": "Shuffle Questions",
      "labelAr": "ترتيب عشوائي للأسئلة",
      "icon": "🔀",
      "group": "gameplay",
      "default": true
    },
    {
      "key": "shuffleOptions",
      "type": "boolean",
      "label": "Shuffle Answer Options",
      "labelAr": "ترتيب عشوائي للخيارات",
      "icon": "🔄",
      "group": "gameplay",
      "default": true
    },
    {
      "key": "difficulty",
      "type": "select",
      "label": "Difficulty",
      "labelAr": "مستوى الصعوبة",
      "icon": "📊",
      "group": "gameplay",
      "default": "all",
      "options": [
        { "value": "all", "label": "All Levels", "labelAr": "جميع المستويات" },
        { "value": "easy", "label": "Easy", "labelAr": "سهل" },
        { "value": "medium", "label": "Medium", "labelAr": "متوسط" },
        { "value": "hard", "label": "Hard", "labelAr": "صعب" }
      ]
    },
    {
      "key": "pointsPerQuestion",
      "type": "number",
      "label": "Points per Correct Answer",
      "labelAr": "نقاط الإجابة الصحيحة",
      "icon": "⭐",
      "group": "scoring",
      "default": 10,
      "min": 5,
      "max": 100,
      "step": 5
    },
    {
      "key": "speedBonus",
      "type": "boolean",
      "label": "Speed Bonus Points",
      "labelAr": "نقاط إضافية للسرعة",
      "icon": "⚡",
      "group": "scoring",
      "default": true
    },
    {
      "key": "wrongAnswerPenalty",
      "type": "number",
      "label": "Wrong Answer Penalty",
      "labelAr": "خصم الإجابة الخاطئة",
      "icon": "⛔",
      "group": "scoring",
      "default": 0,
      "min": 0,
      "max": 10,
      "step": 1
    },
    {
      "key": "delayPenalty",
      "type": "boolean",
      "label": "Extra Delay Penalty",
      "labelAr": "خصم إضافي للتأخير",
      "icon": "🐌",
      "group": "scoring",
      "default": false,
      "dependsOn": "wrongAnswerPenalty"
    },
    {
      "key": "timeoutPenalty",
      "type": "number",
      "label": "Timeout Penalty",
      "labelAr": "خصم انتهاء الوقت",
      "icon": "⏳",
      "group": "scoring",
      "default": 0,
      "min": 0,
      "max": 10,
      "step": 1
    },
    {
      "key": "showCorrectAnswer",
      "type": "boolean",
      "label": "Show Correct Answer",
      "labelAr": "عرض الإجابة الصحيحة",
      "icon": "✅",
      "group": "display",
      "default": true
    },
    {
      "key": "showLeaderboard",
      "type": "boolean",
      "label": "Show Leaderboard After Each Question",
      "labelAr": "عرض الترتيب بعد كل سؤال",
      "icon": "🏆",
      "group": "display",
      "default": true
    },
    {
      "key": "leaderboardDuration",
      "type": "number",
      "label": "Leaderboard Display Duration (sec)",
      "labelAr": "مدة عرض لوحة النتائج (ثانية)",
      "icon": "⏳",
      "group": "display",
      "default": 4,
      "min": 2,
      "max": 15,
      "step": 1,
      "dependsOn": "showLeaderboard"
    },
    {
      "key": "adminMode",
      "type": "select",
      "label": "Admin Mode",
      "labelAr": "وضع الأدمن",
      "icon": "🎮",
      "group": "admin",
      "default": "controller",
      "options": [
        { "value": "controller", "label": "Controller Only", "labelAr": "متحكم فقط" },
        { "value": "participant", "label": "Participant", "labelAr": "مشارك" }
      ]
    }
  ],
  "events": [
    "qmath:start",
    "qmath:submit",
    "qmath:end",
    "qmath:getState"
  ]
}
