Spaces:
Running
Running
الصفحة الرئيسية شريط علوي مكتوب فيه "إضافة مستوى". الضغط عليه: إذا أقل من 20000 نقطة → رسالة تنبيه بالنقاط المطلوبة. إذا كافي → إضافة مستوى جديد (اسم + أيقونة + لون). تحت الشريط تظهر المستويات: السهل ✅ (مفتوح) المتوسط 🔒 (يفتح عند 10000 نقطة) الصعب 🔒 (يفتح عند 20000 نقطة) الأصعب 🔒 (يفتح عند 30000 نقطة) المستحيل 🔒 (يفتح عند 50000 نقطة) [المستوى الجديد] (يضاف يدويًا من اللاعب بعد جمع 20000 نقطة). صفحة المستوى شريط علوي مكتوب فيه "إضافة قسم". قائمة الأقسام: الدين – العلوم – الفضاء – الأدب – [+ إضافة قسم]. الضغط على أي قسم → يفتح صفحة الأسئلة. صفحة الأسئلة سؤال مع 4 خيارات. الإجابة الصحيحة → +500 نقطة + رسالة ✔️ صحيح. الإجابة الخاطئة → رسالة ❌ خطأ + الإجابة الصحيحة. - Initial Deployment
Browse files- README.md +7 -5
- index.html +1594 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: questionanswer
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: gray
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,1594 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="ar" dir="rtl">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>إكسبلورا | منصة التعلم الذكي</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<script>
|
| 9 |
+
tailwind.config = {
|
| 10 |
+
theme: {
|
| 11 |
+
extend: {
|
| 12 |
+
colors: {
|
| 13 |
+
primary: {
|
| 14 |
+
50: '#f0f9ff',
|
| 15 |
+
100: '#e0f2fe',
|
| 16 |
+
500: '#4f46e5',
|
| 17 |
+
600: '#4338ca',
|
| 18 |
+
},
|
| 19 |
+
secondary: {
|
| 20 |
+
500: '#ec4899',
|
| 21 |
+
600: '#db2777',
|
| 22 |
+
},
|
| 23 |
+
success: '#10b981',
|
| 24 |
+
warning: '#f59e0b',
|
| 25 |
+
danger: '#ef4444',
|
| 26 |
+
dark: {
|
| 27 |
+
800: '#1e293b',
|
| 28 |
+
900: '#0f172a'
|
| 29 |
+
}
|
| 30 |
+
},
|
| 31 |
+
fontFamily: {
|
| 32 |
+
'tajawal': ['Tajawal', 'sans-serif'],
|
| 33 |
+
'sans': ['Tajawal', 'sans-serif']
|
| 34 |
+
},
|
| 35 |
+
boxShadow: {
|
| 36 |
+
'soft': '0 4px 20px rgba(0, 0, 0, 0.05)',
|
| 37 |
+
'hard': '0 8px 30px rgba(0, 0, 0, 0.1)',
|
| 38 |
+
'glow': '0 0 20px 5px rgba(79, 70, 229, 0.15)',
|
| 39 |
+
'inner-xl': 'inset 0 4px 12px rgba(0, 0, 0, 0.05)'
|
| 40 |
+
},
|
| 41 |
+
animation: {
|
| 42 |
+
'bounce-slow': 'bounce-slow 2s infinite',
|
| 43 |
+
'pulse-slow': 'pulse-slow 3s infinite',
|
| 44 |
+
'float': 'float 6s ease-in-out infinite',
|
| 45 |
+
},
|
| 46 |
+
keyframes: {
|
| 47 |
+
'bounce-slow': {
|
| 48 |
+
'0%, 100%': { transform: 'translateY(0)' },
|
| 49 |
+
'50%': { transform: 'translateY(-10px)' },
|
| 50 |
+
},
|
| 51 |
+
'pulse-slow': {
|
| 52 |
+
'0%, 100%': { opacity: 1 },
|
| 53 |
+
'50%': { opacity: 0.7 },
|
| 54 |
+
},
|
| 55 |
+
'float': {
|
| 56 |
+
'0%, 100%': { transform: 'translateY(0)' },
|
| 57 |
+
'50%': { transform: 'translateY(-15px)' },
|
| 58 |
+
}
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
}
|
| 62 |
+
}
|
| 63 |
+
</script>
|
| 64 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 65 |
+
<style>
|
| 66 |
+
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap');
|
| 67 |
+
|
| 68 |
+
* {
|
| 69 |
+
-webkit-tap-highlight-color: transparent;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
body {
|
| 73 |
+
font-family: 'Tajawal', sans-serif;
|
| 74 |
+
background-color: #f8fafc;
|
| 75 |
+
transition: all 0.3s ease;
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
.gradient-bg {
|
| 79 |
+
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
.fade-in {
|
| 83 |
+
animation: fadeIn 0.5s ease-in-out forwards;
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
.slide-up {
|
| 87 |
+
animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
.gradient-text {
|
| 91 |
+
background-clip: text;
|
| 92 |
+
-webkit-background-clip: text;
|
| 93 |
+
color: transparent;
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
.text-stroke {
|
| 97 |
+
-webkit-text-stroke: 1px rgba(255,255,255,0.3);
|
| 98 |
+
text-stroke: 1px rgba(255,255,255,0.3);
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
.card-hover {
|
| 102 |
+
transition: all 0.3s ease;
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
.card-hover:hover {
|
| 106 |
+
transform: translateY(-5px);
|
| 107 |
+
box-shadow: 0 10px 25px rgba(0,0,0,0.1);
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
.blob {
|
| 111 |
+
filter: blur(50px);
|
| 112 |
+
opacity: 0.15;
|
| 113 |
+
position: absolute;
|
| 114 |
+
z-index: 0;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
@keyframes fadeIn {
|
| 118 |
+
from { opacity: 0; }
|
| 119 |
+
to { opacity: 1; }
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
@keyframes slideUp {
|
| 123 |
+
from {
|
| 124 |
+
opacity: 0;
|
| 125 |
+
transform: translateY(20px);
|
| 126 |
+
}
|
| 127 |
+
to {
|
| 128 |
+
opacity: 1;
|
| 129 |
+
transform: translateY(0);
|
| 130 |
+
}
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
.level-icon {
|
| 134 |
+
transition: all 0.3s ease;
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
.level-card:hover .level-icon {
|
| 138 |
+
transform: scale(1.1);
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.badge-pulse {
|
| 142 |
+
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
|
| 143 |
+
animation: badge-pulse 1.5s infinite;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
@keyframes badge-pulse {
|
| 147 |
+
0% {
|
| 148 |
+
transform: scale(0.95);
|
| 149 |
+
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
|
| 150 |
+
}
|
| 151 |
+
70% {
|
| 152 |
+
transform: scale(1);
|
| 153 |
+
box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
|
| 154 |
+
}
|
| 155 |
+
100% {
|
| 156 |
+
transform: scale(0.95);
|
| 157 |
+
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
|
| 158 |
+
}
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
.option-selected {
|
| 162 |
+
background-color: #4f46e5;
|
| 163 |
+
color: white;
|
| 164 |
+
border-color: #4f46e5;
|
| 165 |
+
}
|
| 166 |
+
|
| 167 |
+
/* Custom scrollbar */
|
| 168 |
+
::-webkit-scrollbar {
|
| 169 |
+
width: 8px;
|
| 170 |
+
}
|
| 171 |
+
::-webkit-scrollbar-track {
|
| 172 |
+
background: #f1f5f9;
|
| 173 |
+
}
|
| 174 |
+
::-webkit-scrollbar-thumb {
|
| 175 |
+
background: #cbd5e1;
|
| 176 |
+
border-radius: 4px;
|
| 177 |
+
}
|
| 178 |
+
::-webkit-scrollbar-thumb:hover {
|
| 179 |
+
background: #94a3b8;
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
/* Custom animations */
|
| 183 |
+
.breathing {
|
| 184 |
+
animation: breathing 5s ease-in-out infinite;
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
@keyframes breathing {
|
| 188 |
+
0%, 100% { transform: scale(1); }
|
| 189 |
+
50% { transform: scale(1.02); }
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
.ripple {
|
| 193 |
+
position: relative;
|
| 194 |
+
overflow: hidden;
|
| 195 |
+
}
|
| 196 |
+
|
| 197 |
+
.ripple-effect {
|
| 198 |
+
position: absolute;
|
| 199 |
+
border-radius: 50%;
|
| 200 |
+
background-color: rgba(255, 255, 255, 0.3);
|
| 201 |
+
transform: scale(0);
|
| 202 |
+
animation: ripple 0.6s linear;
|
| 203 |
+
pointer-events: none;
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
@keyframes ripple {
|
| 207 |
+
to {
|
| 208 |
+
transform: scale(4);
|
| 209 |
+
opacity: 0;
|
| 210 |
+
}
|
| 211 |
+
}
|
| 212 |
+
</style>
|
| 213 |
+
</head>
|
| 214 |
+
<body class="min-h-screen font-tajawal text-dark-800 bg-gradient-to-br from-gray-50 to-indigo-50">
|
| 215 |
+
<!-- Main App Container -->
|
| 216 |
+
<div class="container mx-auto px-4 py-6 max-w-7xl relative overflow-hidden">
|
| 217 |
+
<!-- Background blobs -->
|
| 218 |
+
<div class="blob w-64 h-64 bg-primary-400 rounded-full -left-40 -top-40 animate-float"></div>
|
| 219 |
+
<div class="blob w-80 h-80 bg-secondary-500 rounded-full -right-40 bottom-20 animate-float animation-delay-2000"></div>
|
| 220 |
+
<div class="blob w-72 h-72 bg-warning-400 rounded-full left-1/2 -bottom-40 animate-float animation-delay-3000"></div>
|
| 221 |
+
|
| 222 |
+
<!-- Top Navigation Bar -->
|
| 223 |
+
<header class="relative rounded-2xl shadow-hard p-4 mb-8 flex flex-col md:flex-row justify-between items-center gap-4 overflow-hidden bg-gradient-to-br from-gray-900 to-dark-900">
|
| 224 |
+
<div class="absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MDAiIGhlaWdodD0iNjAwIj48ZmlsdGVyIGlkPSJhIiB4PSIwIiB5PSIwIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iLjA1IiBudW1PY3RhdmVzPSIyIiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCIvPjwvZmlsdGVyPjxwYXRoIGZpbHRlcj0idXJsKCNhKSIgb3BhY2l0eT0iLjA1IiBkPSJNMCwwaDYwMHY2MDBIMHoiLz48L3N2Zz4=')] opacity-10"></div>
|
| 225 |
+
|
| 226 |
+
<div class="flex items-center gap-4 z-10">
|
| 227 |
+
<div class="w-14 h-14 rounded-2xl flex items-center justify-center shadow-md bg-gradient-to-br from-primary-500 to-primary-600">
|
| 228 |
+
<i class="fas fa-atom text-2xl text-white"></i>
|
| 229 |
+
</div>
|
| 230 |
+
<div>
|
| 231 |
+
<h1 class="text-2xl font-bold text-white">
|
| 232 |
+
<span class="gradient-text bg-gradient-to-r from-primary-300 to-secondary-300">إكسبلورا</span>
|
| 233 |
+
</h1>
|
| 234 |
+
<p class="text-xs text-white/70">رحلتك التعليمية تبدأ من هنا</p>
|
| 235 |
+
</div>
|
| 236 |
+
</div>
|
| 237 |
+
|
| 238 |
+
<div class="flex flex-wrap items-center gap-3 justify-center z-10">
|
| 239 |
+
<div class="flex items-center bg-white/10 backdrop-blur-md rounded-xl px-4 py-2 gap-3 shadow-sm border border-white/10">
|
| 240 |
+
<div class="relative">
|
| 241 |
+
<i class="fas fa-coins text-yellow-300"></i>
|
| 242 |
+
<span class="absolute -top-2 -right-2 w-5 h-5 bg-success rounded-full flex items-center justify-center text-white text-xs font-bold badge-pulse">+</span>
|
| 243 |
+
</div>
|
| 244 |
+
<div>
|
| 245 |
+
<span class="font-bold text-white" id="points-counter">0</span>
|
| 246 |
+
<span class="text-xs text-white/80">نقطة</span>
|
| 247 |
+
</div>
|
| 248 |
+
</div>
|
| 249 |
+
|
| 250 |
+
<button id="add-level-btn" class="bg-primary-500/90 text-white font-medium rounded-xl px-6 py-2.5 hover:shadow-glow hover:bg-primary-500 transition-all duration-300 flex items-center gap-2 shadow-sm ripple">
|
| 251 |
+
<i class="fas fa-plus"></i>
|
| 252 |
+
<span>مستوى جديد</span>
|
| 253 |
+
</button>
|
| 254 |
+
|
| 255 |
+
<div class="relative">
|
| 256 |
+
<div class="w-10 h-10 rounded-xl bg-white/10 backdrop-blur-md flex items-center justify-center hover:bg-white/20 transition cursor-pointer shadow-sm border border-white/10 ripple">
|
| 257 |
+
<i class="fas fa-user text-white/90"></i>
|
| 258 |
+
</div>
|
| 259 |
+
<div class="absolute -top-1 -right-1 w-3 h-3 rounded-full bg-green-400 border-2 border-gray-900"></div>
|
| 260 |
+
</div>
|
| 261 |
+
</div>
|
| 262 |
+
</header>
|
| 263 |
+
|
| 264 |
+
<!-- Main Content -->
|
| 265 |
+
<main class="space-y-6 relative">
|
| 266 |
+
<!-- Welcome Banner (Dynamic Card) -->
|
| 267 |
+
<div class="bg-gradient-to-br from-indigo-50 to-white rounded-2xl shadow-soft p-6 md:p-6 relative overflow-hidden border border-white/70 card-hover breathing">
|
| 268 |
+
<div class="absolute -right-20 -top-20 w-40 h-40 rounded-full bg-primary-200/20 opacity-20 animate-pulse"></div>
|
| 269 |
+
<div class="absolute -left-20 -bottom-20 w-48 h-48 rounded-full bg-secondary-200/20 opacity-15 animate-pulse animation-delay-1000"></div>
|
| 270 |
+
|
| 271 |
+
<div class="relative z-10">
|
| 272 |
+
<div class="flex flex-col sm:flex-row justify-between items-start gap-5">
|
| 273 |
+
<div class="flex-1">
|
| 274 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-2">!مرحباً بك في إكسبلورا</h2>
|
| 275 |
+
<p class="text-gray-700 mb-4 max-w-2xl">
|
| 276 |
+
ابدأ رحلتك التعليمية اليوم مع منصتنا التفاعلية، حيث تحصل على نقاط لكل إجابة صحيحة وتفتح مستويات جديدة كلما تقدمت!
|
| 277 |
+
</p>
|
| 278 |
+
<div class="flex items-center gap-3">
|
| 279 |
+
<button class="bg-primary-500 text-white px-4 py-2 rounded-full text-sm font-medium shadow-sm hover:bg-primary-600 transition ripple">
|
| 280 |
+
ابدأ الآن
|
| 281 |
+
</button>
|
| 282 |
+
<button class="bg-white text-gray-700 px-4 py-2 rounded-full text-sm font-medium shadow-sm hover:bg-gray-50 transition ripple border border-gray-200">
|
| 283 |
+
تعلم المزيد
|
| 284 |
+
</button>
|
| 285 |
+
</div>
|
| 286 |
+
</div>
|
| 287 |
+
<div class="flex-none relative">
|
| 288 |
+
<div class="w-[120px] h-[120px]">
|
| 289 |
+
<svg viewBox="0 0 100 100" class="w-full h-full rotate-[-90deg]">
|
| 290 |
+
<circle cx="50" cy="50" r="45" stroke="#e2e8f0" stroke-width="6" fill="none"></circle>
|
| 291 |
+
<circle cx="50" cy="50" r="45" stroke="url(#progress-gradient)" stroke-width="6" fill="none" stroke-linecap="round" stroke-dasharray="282.743" stroke-dashoffset="141.372" style="transform-origin: 50% 50%"></circle>
|
| 292 |
+
<defs>
|
| 293 |
+
<linearGradient id="progress-gradient" x1="0%" y1="0%" x2="100%" y2="0%">
|
| 294 |
+
<stop offset="0%" stop-color="#6366f1"></stop>
|
| 295 |
+
<stop offset="100%" stop-color="#8b5cf6"></stop>
|
| 296 |
+
</linearGradient>
|
| 297 |
+
</defs>
|
| 298 |
+
</svg>
|
| 299 |
+
</div>
|
| 300 |
+
<div class="absolute inset-0 flex flex-col items-center justify-center">
|
| 301 |
+
<div class="font-bold text-xl text-gray-800" id="current-level-display">مبتدئ</div>
|
| 302 |
+
<div class="text-xs text-gray-500">مستواك الحالي</div>
|
| 303 |
+
</div>
|
| 304 |
+
</div>
|
| 305 |
+
</div>
|
| 306 |
+
|
| 307 |
+
<div class="mt-8 pt-5 border-t border-gray-200/50">
|
| 308 |
+
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
|
| 309 |
+
<div class="bg-white/70 backdrop-blur p-3 rounded-xl border border-white/90 shadow-xs">
|
| 310 |
+
<div class="text-xs text-gray-500 mb-1">إجمالي النقاط</div>
|
| 311 |
+
<div class="flex items-center gap-2">
|
| 312 |
+
<div class="w-3 h-3 rounded-full bg-primary-500 animate-pulse"></div>
|
| 313 |
+
<span class="font-bold text-lg text-dark-900" id="points-display">0</span>
|
| 314 |
+
<span class="text-gray-500 text-sm">نقطة</span>
|
| 315 |
+
</div>
|
| 316 |
+
</div>
|
| 317 |
+
<div class="bg-white/70 backdrop-blur p-3 rounded-xl border border-white/90 shadow-xs">
|
| 318 |
+
<div class="text-xs text-gray-500 mb-1">المستويات المكتملة</div>
|
| 319 |
+
<div class="flex items-center gap-2">
|
| 320 |
+
<div class="w-3 h-3 rounded-full bg-success animate-pulse"></div>
|
| 321 |
+
<span class="font-bold text-lg text-dark-900" id="completed-levels-display">1</span>
|
| 322 |
+
<span class="text-gray-500 text-sm">/5</span>
|
| 323 |
+
</div>
|
| 324 |
+
</div>
|
| 325 |
+
<div class="bg-white/70 backdrop-blur p-3 rounded-xl border border-white/90 shadow-xs">
|
| 326 |
+
<div class="text-xs text-gray-500 mb-1">تقدم اليوم</div>
|
| 327 |
+
<div class="flex items-center gap-2">
|
| 328 |
+
<div class="w-3 h-3 rounded-full bg-warning animate-pulse"></div>
|
| 329 |
+
<span class="font-bold text-lg text-dark-900">+250</span>
|
| 330 |
+
<span class="text-gray-500 text-sm">نقطة</span>
|
| 331 |
+
</div>
|
| 332 |
+
</div>
|
| 333 |
+
<div class="bg-white/70 backdrop-blur p-3 rounded-xl border border-white/90 shadow-xs">
|
| 334 |
+
<div class="text-xs text-gray-500 mb-1">إجابات صحيحة</div>
|
| 335 |
+
<div class="flex items-center gap-2">
|
| 336 |
+
<div class="w-3 h-3 rounded-full bg-secondary-500 animate-pulse"></div>
|
| 337 |
+
<span class="font-bold text-lg text-dark-900">12</span>
|
| 338 |
+
<span class="text-gray-500 text-sm">إجابة</span>
|
| 339 |
+
</div>
|
| 340 |
+
</div>
|
| 341 |
+
</div>
|
| 342 |
+
</div>
|
| 343 |
+
</div>
|
| 344 |
+
</div>
|
| 345 |
+
|
| 346 |
+
<!-- Levels Section -->
|
| 347 |
+
<section class="bg-white/80 backdrop-blur-sm rounded-2xl shadow-soft p-5 border border-white/70">
|
| 348 |
+
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-5">
|
| 349 |
+
<div>
|
| 350 |
+
<h2 class="text-xl font-bold text-gray-800">المستويات التعليمية</h2>
|
| 351 |
+
<p class="text-xs text-gray-500">اختر مستوى لتبدأ رحلتك التعليمية</p>
|
| 352 |
+
</div>
|
| 353 |
+
<div class="flex items-center bg-white/90 border border-gray-100 px-3 py-1.5 rounded-xl gap-2 shadow-xs">
|
| 354 |
+
<div class="text-xs">
|
| 355 |
+
<span class="font-bold text-primary-600" id="unlocked-levels-count">1</span>
|
| 356 |
+
<span> / </span>
|
| 357 |
+
<span class="text-gray-600">5</span>
|
| 358 |
+
<span class="text-gray-500"> مراحل مفتوحة</span>
|
| 359 |
+
</div>
|
| 360 |
+
<div class="w-7 h-7 rounded-lg bg-primary-100 text-primary-600 flex items-center justify-center">
|
| 361 |
+
<i class="fas fa-lock-open text-xs"></i>
|
| 362 |
+
</div>
|
| 363 |
+
</div>
|
| 364 |
+
</div>
|
| 365 |
+
|
| 366 |
+
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 xl:grid-cols-5 gap-4" id="levels-container">
|
| 367 |
+
<!-- Levels will be added here dynamically -->
|
| 368 |
+
</div>
|
| 369 |
+
|
| 370 |
+
<div class="mt-4 pt-3 border-t border-gray-200/50 text-center">
|
| 371 |
+
<button class="text-primary-500 hover:text-primary-600 text-sm font-medium flex items-center justify-center gap-1 mx-auto">
|
| 372 |
+
<span>عرض جميع المستويات</span>
|
| 373 |
+
<i class="fas fa-chevron-left text-xs"></i>
|
| 374 |
+
</button>
|
| 375 |
+
</div>
|
| 376 |
+
</section>
|
| 377 |
+
|
| 378 |
+
<!-- Daily Challenge and Features -->
|
| 379 |
+
<div class="grid grid-cols-1 lg:grid-cols-3 gap-5">
|
| 380 |
+
<!-- Daily Challenge -->
|
| 381 |
+
<div class="bg-gradient-to-br from-amber-100 to-white rounded-2xl shadow-soft p-5 border border-white/70">
|
| 382 |
+
<div class="flex items-center justify-between mb-4">
|
| 383 |
+
<h3 class="font-bold text-gray-800 flex items-center gap-2">
|
| 384 |
+
<i class="fas fa-bolt text-amber-500"></i>
|
| 385 |
+
<span>التحدي اليومي</span>
|
| 386 |
+
</h3>
|
| 387 |
+
<div class="text-xs bg-amber-500/10 text-amber-600 px-2 py-1 rounded-full font-medium">جديد</div>
|
| 388 |
+
</div>
|
| 389 |
+
<p class="text-sm text-gray-700 mb-4">أجب على 7 أسئلة اليوم لتحصل على مكافأة خ��صة!</p>
|
| 390 |
+
<div class="w-full bg-amber-200/30 rounded-full h-2 mb-4">
|
| 391 |
+
<div class="h-full rounded-full bg-gradient-to-r from-amber-500 to-amber-400" style="width: 28%"></div>
|
| 392 |
+
</div>
|
| 393 |
+
<div class="flex justify-between items-center text-xs">
|
| 394 |
+
<span>1/7 أسئلة</span>
|
| 395 |
+
<span class="text-amber-600 font-medium">+350 نقطة</span>
|
| 396 |
+
</div>
|
| 397 |
+
</div>
|
| 398 |
+
|
| 399 |
+
<!-- Learning Progress -->
|
| 400 |
+
<div class="bg-gradient-to-br from-blue-100 to-white rounded-2xl shadow-soft p-5 border border-white/70">
|
| 401 |
+
<div class="flex items-center justify-between mb-4">
|
| 402 |
+
<h3 class="font-bold text-gray-800 flex items-center gap-2">
|
| 403 |
+
<i class="fas fa-chart-line text-blue-500"></i>
|
| 404 |
+
<span>تقدمك التعليمي</span>
|
| 405 |
+
</h3>
|
| 406 |
+
<div class="text-xs bg-blue-500/10 text-blue-600 px-2 py-1 rounded-full font-medium">14%</div>
|
| 407 |
+
</div>
|
| 408 |
+
<div class="flex items-center justify-between mb-2">
|
| 409 |
+
<span class="text-sm text-gray-600">الفترة الحالية</span>
|
| 410 |
+
<span class="text-sm font-medium">1/7 أيام</span>
|
| 411 |
+
</div>
|
| 412 |
+
<div class="grid grid-cols-7 gap-1 mb-4">
|
| 413 |
+
<div class="h-1.5 rounded-full bg-blue-500/30"></div>
|
| 414 |
+
<div class="h-1.5 rounded-full bg-blue-500/10"></div>
|
| 415 |
+
<div class="h-1.5 rounded-full bg-blue-500/10"></div>
|
| 416 |
+
<div class="h-1.5 rounded-full bg-blue-500/10"></div>
|
| 417 |
+
<div class="h-1.5 rounded-full bg-blue-500/10"></div>
|
| 418 |
+
<div class="h-1.5 rounded-full bg-blue-500/10"></div>
|
| 419 |
+
<div class="h-1.5 rounded-full bg-blue-500/10"></div>
|
| 420 |
+
</div>
|
| 421 |
+
<button class="w-full bg-blue-500/10 hover:bg-blue-500/20 text-blue-600 text-xs font-medium py-2 rounded-lg transition ripple">
|
| 422 |
+
تابع التقدم
|
| 423 |
+
</button>
|
| 424 |
+
</div>
|
| 425 |
+
|
| 426 |
+
<!-- Quick Actions -->
|
| 427 |
+
<div class="bg-gradient-to-br from-white to-white rounded-2xl shadow-soft p-5 border border-white/70">
|
| 428 |
+
<h3 class="font-bold text-gray-800 mb-4">إجراءات سريعة</h3>
|
| 429 |
+
<div class="grid grid-cols-2 gap-3">
|
| 430 |
+
<button class="bg-emerald-50 hover:bg-emerald-100 text-emerald-600 px-3 py-2 rounded-xl text-xs font-medium shadow-xs transition flex items-center justify-center gap-2 ripple">
|
| 431 |
+
<i class="fas fa-medal"></i>
|
| 432 |
+
<span>الإنجازات</span>
|
| 433 |
+
</button>
|
| 434 |
+
<button class="bg-purple-50 hover:bg-purple-100 text-purple-600 px-3 py-2 rounded-xl text-xs font-medium shadow-xs transition flex items-center justify-center gap-2 ripple">
|
| 435 |
+
<i class="fas fa-trophy"></i>
|
| 436 |
+
<span>المركز</span>
|
| 437 |
+
</button>
|
| 438 |
+
<button class="bg-amber-50 hover:bg-amber-100 text-amber-600 px-3 py-2 rounded-xl text-xs font-medium shadow-xs transition flex items-center justify-center gap-2 ripple">
|
| 439 |
+
<i class="fas fa-star"></i>
|
| 440 |
+
<span>المفضلة</span>
|
| 441 |
+
</button>
|
| 442 |
+
<button class="bg-red-50 hover:bg-red-100 text-red-600 px-3 py-2 rounded-xl text-xs font-medium shadow-xs transition flex items-center justify-center gap-2 ripple">
|
| 443 |
+
<i class="fas fa-history"></i>
|
| 444 |
+
<span>السجل</span>
|
| 445 |
+
</button>
|
| 446 |
+
</div>
|
| 447 |
+
</div>
|
| 448 |
+
</div>
|
| 449 |
+
|
| 450 |
+
<!-- Level Content Section (initially hidden) -->
|
| 451 |
+
<section id="level-content-section" class="hidden bg-white/80 backdrop-blur-sm rounded-2xl shadow-soft p-5 border border-white/70 fade-in">
|
| 452 |
+
<!-- Level Content will be loaded here -->
|
| 453 |
+
</section>
|
| 454 |
+
|
| 455 |
+
<!-- Section Content (initially hidden) -->
|
| 456 |
+
<section id="section-content" class="hidden bg-white/80 backdrop-blur-sm rounded-2xl shadow-soft p-5 border border-white/70 fade-in">
|
| 457 |
+
<!-- Section questions will be loaded here -->
|
| 458 |
+
</section>
|
| 459 |
+
|
| 460 |
+
<!-- Weekly Leaderboard -->
|
| 461 |
+
<section class="bg-white/80 backdrop-blur-sm rounded-2xl shadow-soft p-5 border border-white/70">
|
| 462 |
+
<div class="flex justify-between items-center mb-4">
|
| 463 |
+
<h2 class="text-xl font-bold text-gray-800">أفضل المتعلمين هذا الأسبوع</h2>
|
| 464 |
+
<button class="text-sm text-primary-600 hover:text-primary-700 flex items-center gap-1">
|
| 465 |
+
<span>عرض الكل</span>
|
| 466 |
+
<i class="fas fa-chevron-left text-xs"></i>
|
| 467 |
+
</button>
|
| 468 |
+
</div>
|
| 469 |
+
|
| 470 |
+
<div class="space-y-3">
|
| 471 |
+
<div class="flex items-center justify-between bg-gradient-to-r from-blue-50/50 to-white/90 p-3 rounded-xl border border-blue-100/50">
|
| 472 |
+
<div class="flex items-center gap-3">
|
| 473 |
+
<div class="relative">
|
| 474 |
+
<div class="w-8 h-8 rounded-full bg-gradient-to-r from-amber-400 to-yellow-300 flex items-center justify-center text-xs font-bold text-white">
|
| 475 |
+
1
|
| 476 |
+
</div>
|
| 477 |
+
<div class="absolute -top-1 -right-1 w-3 h-3 rounded-full bg-green-400 border-2 border-white"></div>
|
| 478 |
+
</div>
|
| 479 |
+
<div>
|
| 480 |
+
<h4 class="text-sm font-medium text-gray-800">أحمد محمد</h4>
|
| 481 |
+
<p class="text-xs text-gray-500">12,450 نقطة</p>
|
| 482 |
+
</div>
|
| 483 |
+
</div>
|
| 484 |
+
<div class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded-full font-medium">
|
| 485 |
+
<i class="fas fa-arrow-up mr-1"></i> 15.2%
|
| 486 |
+
</div>
|
| 487 |
+
</div>
|
| 488 |
+
|
| 489 |
+
<div class="flex items-center justify-between bg-white/90 p-3 rounded-xl border border-gray-100">
|
| 490 |
+
<div class="flex items-center gap-3">
|
| 491 |
+
<div class="relative">
|
| 492 |
+
<div class="w-8 h-8 rounded-full bg-gradient-to-r from-gray-300 to-gray-400 flex items-center justify-center text-xs font-bold text-white">
|
| 493 |
+
2
|
| 494 |
+
</div>
|
| 495 |
+
</div>
|
| 496 |
+
<div>
|
| 497 |
+
<h4 class="text-sm font-medium text-gray-800">ليلى عبدالله</h4>
|
| 498 |
+
<p class="text-xs text-gray-500">10,730 نقطة</p>
|
| 499 |
+
</div>
|
| 500 |
+
</div>
|
| 501 |
+
<div class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded-full font-medium">
|
| 502 |
+
<i class="fas fa-arrow-up mr-1"></i> 8.5%
|
| 503 |
+
</div>
|
| 504 |
+
</div>
|
| 505 |
+
|
| 506 |
+
<div class="flex items-center justify-between bg-white/90 p-3 rounded-xl border border-gray-100">
|
| 507 |
+
<div class="flex items-center gap-3">
|
| 508 |
+
<div class="relative">
|
| 509 |
+
<div class="w-8 h-8 rounded-full bg-gradient-to-r from-amber-700 to-amber-600 flex items-center justify-center text-xs font-bold text-white">
|
| 510 |
+
3
|
| 511 |
+
</div>
|
| 512 |
+
</div>
|
| 513 |
+
<div>
|
| 514 |
+
<h4 class="text-sm font-medium text-gray-800">سالم إبراهيم</h4>
|
| 515 |
+
<p class="text-xs text-gray-500">9,120 نقطة</p>
|
| 516 |
+
</div>
|
| 517 |
+
</div>
|
| 518 |
+
<div class="text-xs bg-red-100 text-red-800 px-2 py-1 rounded-full font-medium">
|
| 519 |
+
<i class="fas fa-arrow-down mr-1"></i> 3.1%
|
| 520 |
+
</div>
|
| 521 |
+
</div>
|
| 522 |
+
</div>
|
| 523 |
+
</section>
|
| 524 |
+
|
| 525 |
+
<!-- Featured Content -->
|
| 526 |
+
<section class="bg-gradient-to-br from-primary-100/30 to-white/90 rounded-2xl shadow-soft p-5 border border-white/70">
|
| 527 |
+
<div class="flex justify-between items-center mb-5">
|
| 528 |
+
<div>
|
| 529 |
+
<h2 class="text-xl font-bold text-gray-800">محتوى مميز</h2>
|
| 530 |
+
<p class="text-xs text-gray-500">تعلم من أفضل المصادر التعليمية</p>
|
| 531 |
+
</div>
|
| 532 |
+
<button class="text-primary-600 hover:text-primary-700 text-sm font-medium flex items-center gap-1">
|
| 533 |
+
<span>عرض الكل</span>
|
| 534 |
+
<i class="fas fa-chevron-left text-xs"></i>
|
| 535 |
+
</button>
|
| 536 |
+
</div>
|
| 537 |
+
|
| 538 |
+
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4">
|
| 539 |
+
<div class="bg-white rounded-xl shadow-xs p-4 border border-gray-100/50 hover:shadow-sm transition cursor-pointer">
|
| 540 |
+
<div class="w-full h-32 bg-gradient-to-br from-blue-600 to-blue-500 rounded-lg mb-3 flex items-center justify-center text-white">
|
| 541 |
+
<i class="fas fa-vial text-4xl"></i>
|
| 542 |
+
</div>
|
| 543 |
+
<h4 class="font-medium text-gray-800 mb-2 text-sm">تجارب العلوم البسيطة</h4>
|
| 544 |
+
<p class="text-xs text-gray-500 mb-3">5 دروس • 27 دقيقة</p>
|
| 545 |
+
<div class="flex items-center justify-between">
|
| 546 |
+
<div class="text-xs flex items-center gap-1 text-primary-600 font-medium">
|
| 547 |
+
<i class="fas fa-play-circle"></i>
|
| 548 |
+
<span>ابدأ التعلم</span>
|
| 549 |
+
</div>
|
| 550 |
+
<div class="text-xs text-gray-500 flex items-center gap-1">
|
| 551 |
+
<i class="fas fa-users"></i>
|
| 552 |
+
<span>147+</span>
|
| 553 |
+
</div>
|
| 554 |
+
</div>
|
| 555 |
+
</div>
|
| 556 |
+
|
| 557 |
+
<div class="bg-white rounded-xl shadow-xs p-4 border border-gray-100/50 hover:shadow-sm transition cursor-pointer">
|
| 558 |
+
<div class="w-full h-32 bg-gradient-to-br from-purple-600 to-purple-500 rounded-lg mb-3 flex items-center justify-center text-white">
|
| 559 |
+
<i class="fas fa-history text-4xl"></i>
|
| 560 |
+
</div>
|
| 561 |
+
<h4 class="font-medium text-gray-800 mb-2 text-sm">محطات تاريخية عربية</h4>
|
| 562 |
+
<p class="text-xs text-gray-500 mb-3">8 دروس • 42 دقيقة</p>
|
| 563 |
+
<div class="flex items-center justify-between">
|
| 564 |
+
<div class="text-xs flex items-center gap-1 text-primary-600 font-medium">
|
| 565 |
+
<i class="fas fa-play-circle"></i>
|
| 566 |
+
<span>ابدأ التعلم</span>
|
| 567 |
+
</div>
|
| 568 |
+
<div class="text-xs text-gray-500 flex items-center gap-1">
|
| 569 |
+
<i class="fas fa-users"></i>
|
| 570 |
+
<span>89+</span>
|
| 571 |
+
</div>
|
| 572 |
+
</div>
|
| 573 |
+
</div>
|
| 574 |
+
|
| 575 |
+
<div class="bg-white rounded-xl shadow-xs p-4 border border-gray-100/50 hover:shadow-sm transition cursor-pointer">
|
| 576 |
+
<div class="w-full h-32 bg-gradient-to-br from-green-600 to-green-500 rounded-lg mb-3 flex items-center justify-center text-white">
|
| 577 |
+
<i class="fas fa-leaf text-4xl"></i>
|
| 578 |
+
</div>
|
| 579 |
+
<h4 class="font-medium text-gray-800 mb-2 text-sm">البيئة والاستدامة</h4>
|
| 580 |
+
<p class="text-xs text-gray-500 mb-3">6 دروس • 35 دقيقة</p>
|
| 581 |
+
<div class="flex items-center justify-between">
|
| 582 |
+
<div class="text-xs flex items-center gap-1 text-primary-600 font-medium">
|
| 583 |
+
<i class="fas fa-play-circle"></i>
|
| 584 |
+
<span>ابدأ التعلم</span>
|
| 585 |
+
</div>
|
| 586 |
+
<div class="text-xs text-gray-500 flex items-center gap-1">
|
| 587 |
+
<i class="fas fa-users"></i>
|
| 588 |
+
<span>63+</span>
|
| 589 |
+
</div>
|
| 590 |
+
</div>
|
| 591 |
+
</div>
|
| 592 |
+
</div>
|
| 593 |
+
</section>
|
| 594 |
+
</main>
|
| 595 |
+
|
| 596 |
+
<!-- Bottom Navigation -->
|
| 597 |
+
<nav class="fixed bottom-0 left-0 right-0 bg-white shadow-hard border-t border-gray-100/80 backdrop-blur-sm z-30">
|
| 598 |
+
<div class="container mx-auto px-4">
|
| 599 |
+
<div class="flex justify-between">
|
| 600 |
+
<a href="#" class="py-3 px-4 text-center text-primary-500 relative">
|
| 601 |
+
<i class="fas fa-home block text-xl mb-1"></i>
|
| 602 |
+
<span class="text-xs block">الرئيسية</span>
|
| 603 |
+
<span class="absolute top-1 right-1 w-2 h-2 rounded-full bg-primary-500"></span>
|
| 604 |
+
</a>
|
| 605 |
+
<a href="#" class="py-3 px-4 text-center text-gray-500 hover:text-primary-500 transition">
|
| 606 |
+
<i class="fas fa-compass block text-xl mb-1"></i>
|
| 607 |
+
<span class="text-xs block">استكشف</span>
|
| 608 |
+
</a>
|
| 609 |
+
<a href="#" class="py-3 px-4 text-center text-gray-500 hover:text-primary-500 transition relative">
|
| 610 |
+
<i class="fas fa-trophy block text-xl mb-1"></i>
|
| 611 |
+
<span class="text-xs block">الجوائز</span>
|
| 612 |
+
<span class="absolute top-0 -right-1 w-5 h-5 rounded-full bg-secondary-500 text-xs text-white flex items-center justify-center border-2 border-white">3</span>
|
| 613 |
+
</a>
|
| 614 |
+
<a href="#" class="py-3 px-4 text-center text-gray-500 hover:text-primary-500 transition">
|
| 615 |
+
<i class="fas fa-user block text-xl mb-1"></i>
|
| 616 |
+
<span class="text-xs block">حسابي</span>
|
| 617 |
+
</a>
|
| 618 |
+
</div>
|
| 619 |
+
</div>
|
| 620 |
+
</nav>
|
| 621 |
+
</div>
|
| 622 |
+
|
| 623 |
+
<!-- Add Level Modal -->
|
| 624 |
+
<div id="add-level-modal" class="fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 hidden z-50">
|
| 625 |
+
<div class="bg-white rounded-2xl shadow-hard max-w-md w-full mx-auto overflow-hidden slide-up border border-white/70">
|
| 626 |
+
<div class="gradient-bg p-5 text-white flex justify-between items-center">
|
| 627 |
+
<div class="flex items-center gap-3">
|
| 628 |
+
<div class="w-10 h-10 rounded-lg bg-white/20 flex items-center justify-center">
|
| 629 |
+
<i class="fas fa-layer-plus text-lg"></i>
|
| 630 |
+
</div>
|
| 631 |
+
<h3 class="text-xl font-bold">إنشاء مستوى جديد</h3>
|
| 632 |
+
</div>
|
| 633 |
+
<button id="close-modal" class="text-white/80 hover:text-white transition transform hover:rotate-90">
|
| 634 |
+
<i class="fas fa-times"></i>
|
| 635 |
+
</button>
|
| 636 |
+
</div>
|
| 637 |
+
|
| 638 |
+
<div class="p-5">
|
| 639 |
+
<div class="bg-primary-50/50 border border-primary-200 rounded-xl p-5 mb-5 text-center relative overflow-hidden">
|
| 640 |
+
<div class="absolute -right-10 -top-10 w-32 h-32 rounded-full bg-primary-200 opacity-10"></div>
|
| 641 |
+
<div class="absolute -left-10 -bottom-10 w-40 h-40 rounded-full bg-secondary-200 opacity-10"></div>
|
| 642 |
+
|
| 643 |
+
<div class="w-16 h-16 mx-auto mb-3 rounded-2xl bg-primary-200/20 text-primary-500 flex items-center justify-center shadow-inset">
|
| 644 |
+
<i class="fas fa-gift text-2xl"></i>
|
| 645 |
+
</div>
|
| 646 |
+
<p id="modal-message" class="text-sm text-gray-700 mb-2 leading-relaxed">
|
| 647 |
+
تحتاج <span class="font-bold text-primary-600">50,000</span> نقطة لفتح مستوى جديد
|
| 648 |
+
</p>
|
| 649 |
+
<div class="flex items-center justify-center gap-2 text-primary-700">
|
| 650 |
+
<span class="text-sm">نقاطك الحالية:</span>
|
| 651 |
+
<span class="font-bold text-lg" id="current-points-modal">0</span>
|
| 652 |
+
</div>
|
| 653 |
+
</div>
|
| 654 |
+
|
| 655 |
+
<div class="space-y-4">
|
| 656 |
+
<div>
|
| 657 |
+
<label class="block text-sm font-medium text-gray-700 mb-2">تصنيف المستوى</label>
|
| 658 |
+
<div class="grid grid-cols-2 gap-3">
|
| 659 |
+
<button class="level-type-btn border border-gray-300 rounded-xl px-4 py-3 text-sm font-medium hover:border-primary-500 hover:bg-primary-50 hover:text-primary-600 transition active:bg-primary-500/10 ripple">
|
| 660 |
+
<i class="fas fa-user-graduate mr-2"></i>
|
| 661 |
+
تعليمي
|
| 662 |
+
</button>
|
| 663 |
+
<button class="level-type-btn border border-gray-300 rounded-xl px-4 py-3 text-sm font-medium hover:border-primary-500 hover:bg-primary-50 hover:text-primary-600 transition active:bg-primary-500/10 ripple">
|
| 664 |
+
<i class="fas fa-brain mr-2"></i>
|
| 665 |
+
ذكاء
|
| 666 |
+
</button>
|
| 667 |
+
</div>
|
| 668 |
+
</div>
|
| 669 |
+
|
| 670 |
+
<div>
|
| 671 |
+
<label for="level-name" class="block text-sm font-medium text-gray-700 mb-2">اسم المستوى</label>
|
| 672 |
+
<input type="text" id="level-name" class="w-full px-4 py-3 border border-gray-300 rounded-xl focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition text-right">
|
| 673 |
+
</div>
|
| 674 |
+
|
| 675 |
+
<div>
|
| 676 |
+
<label for="level-desc" class="block text-sm font-medium text-gray-700 mb-2">وصف المستوى</label>
|
| 677 |
+
<textarea id="level-desc" rows="2" class="w-full px-4 py-3 border border-gray-300 rounded-xl focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition text-right"></textarea>
|
| 678 |
+
</div>
|
| 679 |
+
</div>
|
| 680 |
+
|
| 681 |
+
<div class="flex justify-end gap-3 pt-5">
|
| 682 |
+
<button id="cancel-add-level" class="px-5 py-2.5 rounded-xl border border-gray-300 hover:bg-gray-50 transition font-medium text-gray-700 ripple">
|
| 683 |
+
إلغاء
|
| 684 |
+
</button>
|
| 685 |
+
<button id="confirm-add-level" class="bg-primary-500 text-white px-6 py-2.5 rounded-xl hover:bg-primary-600 transition font-medium shadow-sm disabled:opacity-50 disabled:cursor-not-allowed ripple" disabled>
|
| 686 |
+
إنشاء المستوى
|
| 687 |
+
</button>
|
| 688 |
+
</div>
|
| 689 |
+
</div>
|
| 690 |
+
</div>
|
| 691 |
+
</div>
|
| 692 |
+
|
| 693 |
+
<!-- Level Unlocked Modal -->
|
| 694 |
+
<div id="unlocked-modal" class="fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 hidden z-50">
|
| 695 |
+
<div class="rounded-2xl shadow-hard max-w-md w-full mx-auto overflow-hidden text-center p-8 slide-up relative overflow-visible bg-gradient-to-br from-dark-900 to-gray-900 text-white">
|
| 696 |
+
<div class="absolute -top-16 left-1/2 transform -translate-x-1/2 w-32 h-32 rounded-full bg-gradient-to-br from-yellow-400 to-amber-500 flex items-center justify-center shadow-xl animate-bounce-slow">
|
| 697 |
+
<i class="fas fa-trophy text-4xl text-white"></i>
|
| 698 |
+
</div>
|
| 699 |
+
<div class="absolute inset-0 opacity-10 bg-[url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MDAiIGhlaWdodD0iNjAwIj48ZmlsdGVyIGlkPSJhIiB4PSIwIiB5PSIwIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iLjA1IiBudW1PY3RhdmVzPSIyIiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCIvPjwvZmlsdGVyPjxwYXRoIGZpbHRlcj0idXJsKCNhKSIgb3BhY2l0eT0iLjA1IiBkPSJNMCwwaDYwMHY2MDBIMHoiLz48L3N2Zz4=')]"></div>
|
| 700 |
+
|
| 701 |
+
<h2 class="text-3xl font-bold mb-4 mt-8">!تهانينا</h2>
|
| 702 |
+
<p id="unlocked-message" class="text-lg mb-6 leading-relaxed">لقد حققت إنجازاً رائعاً بفتح مستوى جديد</p>
|
| 703 |
+
<div class="w-24 h-24 mx-auto mb-6 bg-gradient-to-br from-yellow-400/10 to-amber-500/10 rounded-2xl flex items-center justify-center border border-yellow-400/20">
|
| 704 |
+
<span class="text-3xl font-bold bg-gradient-to-br from-yellow-300 to-amber-500 bg-clip-text text-transparent">+5K</span>
|
| 705 |
+
</div>
|
| 706 |
+
<p class="text-primary-200 mb-6">+5,000 نقطة مكافأة</p>
|
| 707 |
+
<button id="close-unlocked-modal" class="bg-white text-primary-600 font-bold px-8 py-3 rounded-xl hover:shadow-md transition flex items-center gap-2 mx-auto ripple">
|
| 708 |
+
<span>استمر في التعلم</span>
|
| 709 |
+
<i class="fas fa-chevron-left"></i>
|
| 710 |
+
</button>
|
| 711 |
+
</div>
|
| 712 |
+
</div>
|
| 713 |
+
|
| 714 |
+
<!-- Help Dialog -->
|
| 715 |
+
<div id="help-dialog" class="fixed bottom-20 left-4 bg-white rounded-xl shadow-hard p-5 max-w-xs hidden z-40 border border-white/70">
|
| 716 |
+
<button id="close-help" class="absolute top-3 left-3 text-gray-500 hover:text-gray-700">
|
| 717 |
+
<i class="fas fa-times"></i>
|
| 718 |
+
</button>
|
| 719 |
+
<h3 class="text-lg font-bold text-gray-800 mb-3 text-center pr-6">كيف تستخدم إكسبلورا؟</h3>
|
| 720 |
+
<div class="text-sm text-gray-700 space-y-3">
|
| 721 |
+
<div class="flex items-start gap-3 p-2 rounded-lg bg-gray-50">
|
| 722 |
+
<div class="flex-none w-8 h-8 rounded-lg bg-primary-500/10 text-primary-500 flex items-center justify-center">
|
| 723 |
+
<span class="font-bold">1</span>
|
| 724 |
+
</div>
|
| 725 |
+
<p>اختر مستوى تعليمي يناسب معرفتك الحالية</p>
|
| 726 |
+
</div>
|
| 727 |
+
<div class="flex items-start gap-3 p-2 rounded-lg">
|
| 728 |
+
<div class="flex-none w-8 h-8 rounded-lg bg-primary-500/10 text-primary-500 flex items-center justify-center">
|
| 729 |
+
<span class="font-bold">2</span>
|
| 730 |
+
</div>
|
| 731 |
+
<p>اختر أحد الأقسام داخل المستوى</p>
|
| 732 |
+
</div>
|
| 733 |
+
<div class="flex items-start gap-3 p-2 rounded-lg bg-gray-50">
|
| 734 |
+
<div class="flex-none w-8 h-8 rounded-lg bg-primary-500/10 text-primary-500 flex items-center justify-center">
|
| 735 |
+
<span class="font-bold">3</span>
|
| 736 |
+
</div>
|
| 737 |
+
<p>أجب على الأسئلة لكسب النقاط والتقدم</p>
|
| 738 |
+
</div>
|
| 739 |
+
</div>
|
| 740 |
+
<div class="mt-4 pt-3 border-t border-gray-200/50">
|
| 741 |
+
<a href="#" class="text-sm text-primary-600 hover:text-primary-700 flex items-center justify-center gap-1">
|
| 742 |
+
<span>المزيد من المساعدة</span>
|
| 743 |
+
<i class="fas fa-chevron-left text-xs"></i>
|
| 744 |
+
</a>
|
| 745 |
+
</div>
|
| 746 |
+
<div class="absolute bottom-0 left-1/2 transform -translate-x-1/2 translate-y-full w-0 h-0 border-l-8 border-r-8 border-t-8 border-l-transparent border-r-transparent border-t-white"></div>
|
| 747 |
+
</div>
|
| 748 |
+
|
| 749 |
+
<!-- Notification Toast -->
|
| 750 |
+
<div id="toast" class="fixed bottom-4 right-4 md:right-6 px-5 py-3 rounded-xl shadow-hard text-white hidden z-50 slide-up flex items-center gap-3 max-w-xs">
|
| 751 |
+
<i id="toast-icon" class="fas fa-check-circle text-xl"></i>
|
| 752 |
+
<div>
|
| 753 |
+
<h4 class="font-medium" id="toast-title">تم بنجاح</h4>
|
| 754 |
+
<p class="text-sm opacity-90" id="toast-message">النص الخاص بالرسالة يظهر هنا</p>
|
| 755 |
+
</div>
|
| 756 |
+
</div>
|
| 757 |
+
|
| 758 |
+
<!-- Floating Action Button -->
|
| 759 |
+
<div id="fab-help" class="fixed bottom-20 left-4 w-12 h-12 rounded-full gradient-bg text-white shadow-hard flex items-center justify-center hover:shadow-glow hover:scale-105 transition-all duration-300 z-30 ripple">
|
| 760 |
+
<i class="fas fa-question text-xl"></i>
|
| 761 |
+
</div>
|
| 762 |
+
|
| 763 |
+
<!-- Ripple Effect Script -->
|
| 764 |
+
<script>
|
| 765 |
+
// Create ripple effect on buttons
|
| 766 |
+
document.addEventListener('click', function(e) {
|
| 767 |
+
if (e.target.classList.contains('ripple') || e.target.closest('.ripple')) {
|
| 768 |
+
const btn = e.target.classList.contains('ripple') ? e.target : e.target.closest('.ripple');
|
| 769 |
+
const rect = btn.getBoundingClientRect();
|
| 770 |
+
const x = e.clientX - rect.left;
|
| 771 |
+
const y = e.clientY - rect.top;
|
| 772 |
+
|
| 773 |
+
const ripple = document.createElement('span');
|
| 774 |
+
ripple.className = 'ripple-effect';
|
| 775 |
+
ripple.style.left = `${x}px`;
|
| 776 |
+
ripple.style.top = `${y}px`;
|
| 777 |
+
|
| 778 |
+
btn.appendChild(ripple);
|
| 779 |
+
|
| 780 |
+
setTimeout(() => {
|
| 781 |
+
ripple.remove();
|
| 782 |
+
}, 600);
|
| 783 |
+
}
|
| 784 |
+
});
|
| 785 |
+
</script>
|
| 786 |
+
|
| 787 |
+
<script>
|
| 788 |
+
// App State
|
| 789 |
+
const state = {
|
| 790 |
+
points: parseInt(localStorage.getItem('points')) || 2500,
|
| 791 |
+
currentLevel: null,
|
| 792 |
+
currentSection: null,
|
| 793 |
+
unlockedLevels: JSON.parse(localStorage.getItem('unlockedLevels')) || ['easy', 'medium'],
|
| 794 |
+
levels: [
|
| 795 |
+
{
|
| 796 |
+
id: 'easy',
|
| 797 |
+
name: 'مبتدئ',
|
| 798 |
+
requiredPoints: 0,
|
| 799 |
+
unlocked: true,
|
| 800 |
+
color: 'from-emerald-400 to-emerald-300',
|
| 801 |
+
bgColor: 'bg-emerald-400/10',
|
| 802 |
+
textColor: 'text-emerald-600',
|
| 803 |
+
icon: 'fa-seedling',
|
| 804 |
+
description: 'المستوى المثالي للبدء في رحلتك التعليمية',
|
| 805 |
+
completed: true
|
| 806 |
+
},
|
| 807 |
+
{
|
| 808 |
+
id: 'medium',
|
| 809 |
+
name: 'متوسط',
|
| 810 |
+
requiredPoints: 10000,
|
| 811 |
+
unlocked: true,
|
| 812 |
+
color: 'from-blue-400 to-blue-300',
|
| 813 |
+
bgColor: 'bg-blue-400/10',
|
| 814 |
+
textColor: 'text-blue-600',
|
| 815 |
+
icon: 'fa-cloud-sun',
|
| 816 |
+
description: 'تحديات مناسبة للبناء على أساسياتك',
|
| 817 |
+
completed: false
|
| 818 |
+
},
|
| 819 |
+
{
|
| 820 |
+
id: 'hard',
|
| 821 |
+
name: 'متقدم',
|
| 822 |
+
requiredPoints: 20000,
|
| 823 |
+
unlocked: false,
|
| 824 |
+
color: 'from-purple-400 to-purple-300',
|
| 825 |
+
bgColor: 'bg-purple-400/10',
|
| 826 |
+
textColor: 'text-purple-600',
|
| 827 |
+
icon: 'fa-mountain',
|
| 828 |
+
description: 'أسئلة تحتاج إلى تركيز وفهم عميق',
|
| 829 |
+
completed: false
|
| 830 |
+
},
|
| 831 |
+
{
|
| 832 |
+
id: 'harder',
|
| 833 |
+
name: 'خبير',
|
| 834 |
+
requiredPoints: 30000,
|
| 835 |
+
unlocked: false,
|
| 836 |
+
color: 'from-amber-400 to-amber-300',
|
| 837 |
+
bgColor: 'bg-amber-400/10',
|
| 838 |
+
textColor: 'text-amber-600',
|
| 839 |
+
icon: 'fa-brain',
|
| 840 |
+
description: 'للأشخاص الذين يتقنون المجال جيداً',
|
| 841 |
+
completed: false
|
| 842 |
+
},
|
| 843 |
+
{
|
| 844 |
+
id: 'impossible',
|
| 845 |
+
name: 'أسطوري',
|
| 846 |
+
requiredPoints: 50000,
|
| 847 |
+
unlocked: false,
|
| 848 |
+
color: 'from-pink-400 to-pink-300',
|
| 849 |
+
bgColor: 'bg-pink-400/10',
|
| 850 |
+
textColor: 'text-pink-600',
|
| 851 |
+
icon: 'fa-fire',
|
| 852 |
+
description: 'تحدٍّ حقيقي حتى لأصحاب الخبرة',
|
| 853 |
+
completed: false
|
| 854 |
+
}
|
| 855 |
+
],
|
| 856 |
+
sections: JSON.parse(localStorage.getItem('sections')) || {
|
| 857 |
+
easy: ['الدين', 'العلوم', 'الفضاء', 'الأدب'],
|
| 858 |
+
medium: ['التاريخ', 'الرياضيات'],
|
| 859 |
+
hard: [],
|
| 860 |
+
harder: [],
|
| 861 |
+
impossible: []
|
| 862 |
+
},
|
| 863 |
+
questions: JSON.parse(localStorage.getItem('questions')) || {
|
| 864 |
+
easy: {
|
| 865 |
+
'الدين': Array(10).fill().map((_, i) => ({
|
| 866 |
+
question: `ما هو حكم ${i % 2 === 0 ? 'الصلاة' : 'الصيام'} في الإسلام؟`,
|
| 867 |
+
options: ['واجب', 'مستحب', 'مكروه', 'محرم'],
|
| 868 |
+
correctAnswer: 0,
|
| 869 |
+
answered: localStorage.getItem(`answered-easy-الدين-${i}`) === 'true'
|
| 870 |
+
})),
|
| 871 |
+
'العلوم': Array(10).fill().map((_, i) => ({
|
| 872 |
+
question: `ما هو العنصر الكيميائي رقم ${i+1} في الجدول الدوري؟`,
|
| 873 |
+
options: [
|
| 874 |
+
['الهيدروجين', 'الهيليوم', '��لليثيوم', 'البيريليوم'],
|
| 875 |
+
['الصوديوم', 'المغنيسيوم', 'الألومنيوم', 'السيليكون'],
|
| 876 |
+
['البوتاسيوم', 'الكالسيوم', 'الحديد', 'النحاس'],
|
| 877 |
+
['الفضة', 'الذهب', 'الزئبق', 'الرصاص']
|
| 878 |
+
][i % 4],
|
| 879 |
+
correctAnswer: 0,
|
| 880 |
+
answered: localStorage.getItem(`answered-easy-العلوم-${i}`) === 'true'
|
| 881 |
+
})),
|
| 882 |
+
'الفضاء': Array(10).fill().map((_, i) => ({
|
| 883 |
+
question: i % 2 === 0 ? `ما هو الكوكب ${i < 5 ? 'الأقرب' : 'الأبعد'} عن الشمس؟` : `كم قمراً طبيعياً يمتلك ${['المريخ', 'المشتري', 'زحل', 'أورانوس', 'نبتون'][i % 5]}؟`,
|
| 884 |
+
options: i % 2 === 0 ?
|
| 885 |
+
['عطارد', 'الزهرة', 'الأرض', 'المريخ'] :
|
| 886 |
+
[(i % 2).toString(), (i % 3 + 1).toString(), (i % 4 + 10).toString(), (i % 5 + 20).toString()],
|
| 887 |
+
correctAnswer: i % 2 === 0 ? 0 : 1,
|
| 888 |
+
answered: localStorage.getItem(`answered-easy-الفضاء-${i}`) === 'true'
|
| 889 |
+
})),
|
| 890 |
+
'الأدب': Array(10).fill().map((_, i) => ({
|
| 891 |
+
question: `من هو مؤلف ${['ديوان المعلقات', 'كتاب الأغاني', 'البخلاء', 'كليلة ودمنة', 'ألف ليلة وليلة'][i % 5]}؟`,
|
| 892 |
+
options: [
|
| 893 |
+
['امرؤ القيس', 'الحسن بن هانئ', 'الجاحظ', 'ابن المقفع'],
|
| 894 |
+
['الأصمعي', 'ابن عبد ربه', 'أبو الفرج الأصفهاني', 'المبرد'],
|
| 895 |
+
['ابن المقفع', 'الجاحظ', 'التوحيدي', 'ابن قتيبة'],
|
| 896 |
+
['نهروان', 'كيكاووس', 'بيدبا', 'أبو علي القالي']
|
| 897 |
+
][i % 4],
|
| 898 |
+
correctAnswer: i % 4,
|
| 899 |
+
answered: localStorage.getItem(`answered-easy-الأدب-${i}`) === 'true'
|
| 900 |
+
}))
|
| 901 |
+
},
|
| 902 |
+
medium: {
|
| 903 |
+
'التاريخ': Array(5).fill().map((_, i) => ({
|
| 904 |
+
question: `في أي عام حدثت ${['معركة حطين', 'سقوط غرناطة', 'معاهدة سايكس بيكو', 'ثورة 1919', 'حرب أكتوبر'][i]}؟`,
|
| 905 |
+
options: [
|
| 906 |
+
['1187', '1250', '1291', '1347'],
|
| 907 |
+
['1492', '1520', '1609', '1655'],
|
| 908 |
+
['1916', '1920', '1936', '1948'],
|
| 909 |
+
['1919', '1925', '1930', '1936'],
|
| 910 |
+
['1967', '1973', '1982', '1991']
|
| 911 |
+
][i],
|
| 912 |
+
correctAnswer: 0,
|
| 913 |
+
answered: localStorage.getItem(`answered-medium-التاريخ-${i}`) === 'true'
|
| 914 |
+
})),
|
| 915 |
+
'الرياضيات': Array(5).fill().map((_, i) => ({
|
| 916 |
+
question: `ما هو ناتج ${['2x + 5 = 15', '3² × 4 ÷ 2', '∫x dx', 'sin²θ + cos²θ', 'المشتقة الأولى لـ x²'][i]}؟`,
|
| 917 |
+
options: [
|
| 918 |
+
['x = 5', 'x = 10', 'x = 7.5', 'x = 2.5'],
|
| 919 |
+
['12', '18', '24', '36'],
|
| 920 |
+
['x²/2 + C', 'x + C', '1 + C', 'x² + C'],
|
| 921 |
+
['0', '1', 'tanθ', 'secθ'],
|
| 922 |
+
['x', '2x', 'x²', '2x²']
|
| 923 |
+
][i],
|
| 924 |
+
correctAnswer: [0, 1, 0, 1, 1][i],
|
| 925 |
+
answered: localStorage.getItem(`answered-medium-الرياضيات-${i}`) === 'true'
|
| 926 |
+
}))
|
| 927 |
+
},
|
| 928 |
+
hard: {},
|
| 929 |
+
harder: {},
|
| 930 |
+
impossible: {}
|
| 931 |
+
}
|
| 932 |
+
};
|
| 933 |
+
|
| 934 |
+
// DOM Elements
|
| 935 |
+
const pointsCounter = document.getElementById('points-counter');
|
| 936 |
+
const pointsDisplay = document.getElementById('points-display');
|
| 937 |
+
const completedLevelsDisplay = document.getElementById('completed-levels-display');
|
| 938 |
+
const unlockedLevelsCount = document.getElementById('unlocked-levels-count');
|
| 939 |
+
const currentLevelDisplay = document.getElementById('current-level-display');
|
| 940 |
+
|
| 941 |
+
const addLevelBtn = document.getElementById('add-level-btn');
|
| 942 |
+
const levelsContainer = document.getElementById('levels-container');
|
| 943 |
+
const levelContentSection = document.getElementById('level-content-section');
|
| 944 |
+
const sectionContent = document.getElementById('section-content');
|
| 945 |
+
|
| 946 |
+
// Modal Elements
|
| 947 |
+
const addLevelModal = document.getElementById('add-level-modal');
|
| 948 |
+
const closeModalBtn = document.getElementById('close-modal');
|
| 949 |
+
const cancelAddLevelBtn = document.getElementById('cancel-add-level');
|
| 950 |
+
const modalMessage = document.getElementById('modal-message');
|
| 951 |
+
const confirmAddLevelBtn = document.getElementById('confirm-add-level');
|
| 952 |
+
const currentPointsModal = document.getElementById('current-points-modal');
|
| 953 |
+
|
| 954 |
+
const unlockedModal = document.getElementById('unlocked-modal');
|
| 955 |
+
const unlockedMessage = document.getElementById('unlocked-message');
|
| 956 |
+
const closeUnlockedModalBtn = document.getElementById('close-unlocked-modal');
|
| 957 |
+
|
| 958 |
+
const helpBtn = document.getElementById('fab-help');
|
| 959 |
+
const helpDialog = document.getElementById('help-dialog');
|
| 960 |
+
const closeHelpBtn = document.getElementById('close-help');
|
| 961 |
+
|
| 962 |
+
const toast = document.getElementById('toast');
|
| 963 |
+
const toastTitle = document.getElementById('toast-title');
|
| 964 |
+
const toastMessage = document.getElementById('toast-message');
|
| 965 |
+
const toastIcon = document.getElementById('toast-icon');
|
| 966 |
+
|
| 967 |
+
// Initialize App
|
| 968 |
+
function init() {
|
| 969 |
+
updatePoints();
|
| 970 |
+
renderLevels();
|
| 971 |
+
checkLevelUnlocks();
|
| 972 |
+
setupEventListeners();
|
| 973 |
+
updateDashboardStats();
|
| 974 |
+
}
|
| 975 |
+
|
| 976 |
+
// Set up event listeners
|
| 977 |
+
function setupEventListeners() {
|
| 978 |
+
// Level management
|
| 979 |
+
addLevelBtn.addEventListener('click', showAddLevelModal);
|
| 980 |
+
closeModalBtn.addEventListener('click', () => addLevelModal.classList.add('hidden'));
|
| 981 |
+
cancelAddLevelBtn.addEventListener('click', () => addLevelModal.classList.add('hidden'));
|
| 982 |
+
confirmAddLevelBtn.addEventListener('click', confirmAddLevel);
|
| 983 |
+
|
| 984 |
+
// Unlocked modal
|
| 985 |
+
closeUnlockedModalBtn.addEventListener('click', () => {
|
| 986 |
+
unlockedModal.classList.add('hidden');
|
| 987 |
+
renderLevels();
|
| 988 |
+
});
|
| 989 |
+
|
| 990 |
+
// Help system
|
| 991 |
+
helpBtn.addEventListener('click', toggleHelpDialog);
|
| 992 |
+
closeHelpBtn.addEventListener('click', () => helpDialog.classList.add('hidden'));
|
| 993 |
+
|
| 994 |
+
// Level type buttons
|
| 995 |
+
document.querySelectorAll('.level-type-btn').forEach(btn => {
|
| 996 |
+
btn.addEventListener('click', () => {
|
| 997 |
+
document.querySelectorAll('.level-type-btn').forEach(b =>
|
| 998 |
+
b.classList.remove('border-primary-500', 'bg-primary-50', 'text-primary-600')
|
| 999 |
+
);
|
| 1000 |
+
btn.classList.add('border-primary-500', 'bg-primary-50', 'text-primary-600');
|
| 1001 |
+
});
|
| 1002 |
+
});
|
| 1003 |
+
|
| 1004 |
+
document.addEventListener('click', (e) => {
|
| 1005 |
+
if (!helpDialog.contains(e.target) && e.target !== helpBtn) {
|
| 1006 |
+
helpDialog.classList.add('hidden');
|
| 1007 |
+
}
|
| 1008 |
+
});
|
| 1009 |
+
}
|
| 1010 |
+
|
| 1011 |
+
function toggleHelpDialog() {
|
| 1012 |
+
helpDialog.classList.toggle('hidden');
|
| 1013 |
+
}
|
| 1014 |
+
|
| 1015 |
+
// Update points display
|
| 1016 |
+
function updatePoints() {
|
| 1017 |
+
const formatter = new Intl.NumberFormat('ar-EG');
|
| 1018 |
+
pointsCounter.textContent = formatter.format(state.points);
|
| 1019 |
+
pointsDisplay.textContent = formatter.format(state.points);
|
| 1020 |
+
currentPointsModal.textContent = formatter.format(state.points);
|
| 1021 |
+
localStorage.setItem('points', state.points.toString());
|
| 1022 |
+
|
| 1023 |
+
state.levels.forEach(level => {
|
| 1024 |
+
if (state.points >= level.requiredPoints && !state.unlockedLevels.includes(level.id)) {
|
| 1025 |
+
state.unlockedLevels.push(level.id);
|
| 1026 |
+
level.unlocked = true;
|
| 1027 |
+
showUnlockedModal(level.name);
|
| 1028 |
+
state.points += 5000; // Bonus points
|
| 1029 |
+
showToast(`مستوى جديد مفتوح: ${level.name}! +5,000 نقطة مكافأة`, 'success');
|
| 1030 |
+
}
|
| 1031 |
+
});
|
| 1032 |
+
|
| 1033 |
+
localStorage.setItem('unlockedLevels', JSON.stringify(state.unlockedLevels));
|
| 1034 |
+
updateDashboardStats();
|
| 1035 |
+
}
|
| 1036 |
+
|
| 1037 |
+
// Update dashboard statistics
|
| 1038 |
+
function updateDashboardStats() {
|
| 1039 |
+
// Calculate current level
|
| 1040 |
+
let currentLevel = state.levels[0];
|
| 1041 |
+
for (let i = state.levels.length - 1; i >= 0; i--) {
|
| 1042 |
+
if (state.unlockedLevels.includes(state.levels[i].id)) {
|
| 1043 |
+
currentLevel = state.levels[i];
|
| 1044 |
+
break;
|
| 1045 |
+
}
|
| 1046 |
+
}
|
| 1047 |
+
currentLevelDisplay.textContent = currentLevel.name;
|
| 1048 |
+
|
| 1049 |
+
// Calculate unlocked levels count
|
| 1050 |
+
const unlockedCount = state.unlockedLevels.length;
|
| 1051 |
+
unlockedLevelsCount.textContent = unlockedCount;
|
| 1052 |
+
|
| 1053 |
+
// Calculate completed levels count
|
| 1054 |
+
const completedCount = state.levels.filter(l => l.completed).length;
|
| 1055 |
+
completedLevelsDisplay.textContent = completedCount;
|
| 1056 |
+
}
|
| 1057 |
+
|
| 1058 |
+
// Render levels to the DOM
|
| 1059 |
+
function renderLevels() {
|
| 1060 |
+
levelsContainer.innerHTML = '';
|
| 1061 |
+
|
| 1062 |
+
state.levels.forEach(level => {
|
| 1063 |
+
const isUnlocked = state.unlockedLevels.includes(level.id);
|
| 1064 |
+
const progress = Math.min(100, (state.points / level.requiredPoints) * 100) || 0;
|
| 1065 |
+
|
| 1066 |
+
const levelCard = document.createElement('div');
|
| 1067 |
+
levelCard.className = `level-card relative rounded-xl overflow-hidden ${level.bgColor} ${!isUnlocked ? 'opacity-90' : ''} card-hover fade-in border border-white/70`;
|
| 1068 |
+
|
| 1069 |
+
levelCard.innerHTML = `
|
| 1070 |
+
<div class="absolute inset-0 bg-gradient-to-br from-white/50 to-white/80 backdrop-blur-sm z-0 ${!isUnlocked ? '' : 'hidden'}"></div>
|
| 1071 |
+
<div class="relative z-10 h-full flex flex-col">
|
| 1072 |
+
<div class="p-5 flex-1 flex flex-col">
|
| 1073 |
+
<div class="flex justify-between items-start mb-3">
|
| 1074 |
+
<div class="flex items-center gap-2">
|
| 1075 |
+
<div class="w-10 h-10 rounded-xl ${isUnlocked ? `bg-gradient-to-br ${level.color} text-white` : 'bg-gray-200 text-gray-500'} flex items-center justify-center text-lg level-icon shadow-xs border ${isUnlocked ? 'border-white/20' : 'border-gray-300/30'}`}>
|
| 1076 |
+
<i class="fas ${level.icon}"></i>
|
| 1077 |
+
</div>
|
| 1078 |
+
<div>
|
| 1079 |
+
<h3 class="text-lg font-bold ${isUnlocked ? 'text-gray-800' : 'text-gray-600'}">${level.name}</h3>
|
| 1080 |
+
<p class="text-xs ${isUnlocked ? level.textColor : 'text-gray-500'}">${level.requiredPoints.toLocaleString('ar-EG')} نقطة</p>
|
| 1081 |
+
</div>
|
| 1082 |
+
</div>
|
| 1083 |
+
${level.completed ? `
|
| 1084 |
+
<div class="text-xs px-2 py-1 rounded-xl bg-success/10 text-success font-medium flex items-center gap-1">
|
| 1085 |
+
<i class="fas fa-check text-xs"></i>
|
| 1086 |
+
<span>مكتمل</span>
|
| 1087 |
+
</div>
|
| 1088 |
+
` : ''}
|
| 1089 |
+
</div>
|
| 1090 |
+
<p class="text-xs ${isUnlocked ? 'text-gray-600' : 'text-gray-500'} mb-4">${level.description}</p>
|
| 1091 |
+
|
| 1092 |
+
<div class="mt-auto">
|
| 1093 |
+
<div class="flex justify-between items-center mb-1 text-xs">
|
| 1094 |
+
<span class="${isUnlocked ? 'text-success font-medium' : 'text-gray-500'}">
|
| 1095 |
+
${isUnlocked ?
|
| 1096 |
+
'<i class="fas fa-lock-open mr-1"></i> مفتوح' :
|
| 1097 |
+
'<i class="fas fa-lock mr-1"></i> مغلق'}
|
| 1098 |
+
</span>
|
| 1099 |
+
</div>
|
| 1100 |
+
|
| 1101 |
+
<div class="w-full bg-gray-200 rounded-full h-2 overflow-hidden ${!isUnlocked ? 'opacity-70' : ''}">
|
| 1102 |
+
<div class="h-full rounded-full bg-gradient-to-r ${level.color}" style="width: ${progress}%"></div>
|
| 1103 |
+
</div>
|
| 1104 |
+
</div>
|
| 1105 |
+
</div>
|
| 1106 |
+
|
| 1107 |
+
<button onclick="handleLevelClick('${level.id}')" class="flex items-center justify-center w-full py-3 ${isUnlocked ? `bg-gradient-to-br ${level.color} text-white` : 'bg-gray-100 text-gray-500'} font-medium transition ripple group">
|
| 1108 |
+
<span>${isUnlocked ? 'فتح المستوى' : 'فتح بمزيد من النقاط'}</span>
|
| 1109 |
+
<i class="fas fa-chevron-left text-xs mr-2 transition-transform group-hover:-translate-x-1"></i>
|
| 1110 |
+
</button>
|
| 1111 |
+
</div>
|
| 1112 |
+
`;
|
| 1113 |
+
|
| 1114 |
+
levelsContainer.appendChild(levelCard);
|
| 1115 |
+
});
|
| 1116 |
+
}
|
| 1117 |
+
|
| 1118 |
+
window.handleLevelClick = function(levelId) {
|
| 1119 |
+
const level = state.levels.find(l => l.id === levelId);
|
| 1120 |
+
const isUnlocked = state.unlockedLevels.includes(levelId);
|
| 1121 |
+
|
| 1122 |
+
if (isUnlocked) {
|
| 1123 |
+
loadLevelContent(levelId);
|
| 1124 |
+
} else {
|
| 1125 |
+
const progress = Math.min(100, (state.points / level.requiredPoints) * 100) || 0;
|
| 1126 |
+
const unlockText = progress >= 90 ?
|
| 1127 |
+
`أنت على بعد خطوات من فتح ${level.name}! تحتاج ${(level.requiredPoints - state.points).toLocaleString('ar-EG')} نقطة فقط.` :
|
| 1128 |
+
`تحتاج إلى ${level.requiredPoints.toLocaleString('ar-EG')} نقطة لفتح ${level.name} (${progress.toFixed(0)}% مكتمل)`;
|
| 1129 |
+
|
| 1130 |
+
showToast(unlockText, 'info');
|
| 1131 |
+
}
|
| 1132 |
+
};
|
| 1133 |
+
|
| 1134 |
+
// Show toast message
|
| 1135 |
+
function showToast(message, type = 'info') {
|
| 1136 |
+
toast.className = `fixed bottom-4 right-4 md:right-6 px-5 py-3 rounded-xl shadow-hard text-white hidden z-50 slide-up flex items-center gap-3 max-w-xs`;
|
| 1137 |
+
|
| 1138 |
+
// Set colors and icon based on type
|
| 1139 |
+
let bgColor, icon;
|
| 1140 |
+
switch(type) {
|
| 1141 |
+
case 'success':
|
| 1142 |
+
bgColor = 'bg-success';
|
| 1143 |
+
icon = 'fa-check-circle';
|
| 1144 |
+
toastTitle.textContent = 'تم بنجاح';
|
| 1145 |
+
break;
|
| 1146 |
+
case 'error':
|
| 1147 |
+
bgColor = 'bg-danger';
|
| 1148 |
+
icon = 'fa-times-circle';
|
| 1149 |
+
toastTitle.textContent = 'خطأ';
|
| 1150 |
+
break;
|
| 1151 |
+
case 'warning':
|
| 1152 |
+
bgColor = 'bg-warning';
|
| 1153 |
+
icon = 'fa-exclamation-triangle';
|
| 1154 |
+
toastTitle.textContent = 'تحذير';
|
| 1155 |
+
break;
|
| 1156 |
+
case 'info':
|
| 1157 |
+
default:
|
| 1158 |
+
bgColor = 'bg-primary-500';
|
| 1159 |
+
icon = 'fa-info-circle';
|
| 1160 |
+
toastTitle.textContent = 'معلومة';
|
| 1161 |
+
break;
|
| 1162 |
+
}
|
| 1163 |
+
|
| 1164 |
+
toastIcon.className = `fas ${icon} text-xl`;
|
| 1165 |
+
toastMessage.textContent = message;
|
| 1166 |
+
toast.classList.add(bgColor);
|
| 1167 |
+
toast.classList.remove('hidden');
|
| 1168 |
+
|
| 1169 |
+
setTimeout(() => {
|
| 1170 |
+
toast.classList.add('opacity-0', 'translate-y-4', 'transition-all', 'duration-300');
|
| 1171 |
+
setTimeout(() => {
|
| 1172 |
+
toast.classList.add('hidden');
|
| 1173 |
+
toast.classList.remove('opacity-0', 'translate-y-4', bgColor);
|
| 1174 |
+
}, 300);
|
| 1175 |
+
}, 3000);
|
| 1176 |
+
}
|
| 1177 |
+
|
| 1178 |
+
// Show unlocked level modal
|
| 1179 |
+
function showUnlockedModal(levelName) {
|
| 1180 |
+
unlockedMessage.textContent = `لقد فتحت مستوى ${levelName} بنجاح!`;
|
| 1181 |
+
unlockedModal.classList.remove('hidden');
|
| 1182 |
+
}
|
| 1183 |
+
|
| 1184 |
+
// Show add level modal
|
| 1185 |
+
function showAddLevelModal() {
|
| 1186 |
+
addLevelModal.classList.remove('hidden');
|
| 1187 |
+
|
| 1188 |
+
if (state.points >= 50000) {
|
| 1189 |
+
modalMessage.innerHTML = `
|
| 1190 |
+
<div class="flex items-center justify-center gap-2 mb-1">
|
| 1191 |
+
<i class="fas fa-check-circle text-success"></i>
|
| 1192 |
+
<span class="font-bold text-success">متطلبات مكتملة</span>
|
| 1193 |
+
</div>
|
| 1194 |
+
<div class="text-sm text-gray-700">لديك ${state.points.toLocaleString('ar-EG')} نقطة، يمكنك الآن إنشاء مستوى جديد</div>
|
| 1195 |
+
`;
|
| 1196 |
+
confirmAddLevelBtn.disabled = false;
|
| 1197 |
+
} else {
|
| 1198 |
+
const neededPoints = 50000 - state.points;
|
| 1199 |
+
modalMessage.innerHTML = `
|
| 1200 |
+
<div class="flex items-center justify-center gap-2 mb-1">
|
| 1201 |
+
<i class="fas fa-info-circle text-primary-600"></i>
|
| 1202 |
+
<span class="font-bold text-primary-600">متطلبات غير مكتملة</span>
|
| 1203 |
+
</div>
|
| 1204 |
+
<div class="text-sm text-gray-700">تحتاج ${neededPoints.toLocaleString('ar-EG')} نقطة إضافية لإنشاء مستوى جديد</div>
|
| 1205 |
+
`;
|
| 1206 |
+
confirmAddLevelBtn.disabled = true;
|
| 1207 |
+
}
|
| 1208 |
+
}
|
| 1209 |
+
|
| 1210 |
+
function confirmAddLevel() {
|
| 1211 |
+
showToast('يمكنك الآن إضافة مستوى جديد فور توفر هذه الميزة', 'success');
|
| 1212 |
+
addLevelModal.classList.add('hidden');
|
| 1213 |
+
}
|
| 1214 |
+
|
| 1215 |
+
// Load content for a specific level
|
| 1216 |
+
function loadLevelContent(levelId) {
|
| 1217 |
+
state.currentLevel = levelId;
|
| 1218 |
+
levelContentSection.classList.remove('hidden');
|
| 1219 |
+
sectionContent.classList.add('hidden');
|
| 1220 |
+
document.querySelector('main').scrollIntoView({ behavior: 'smooth' });
|
| 1221 |
+
|
| 1222 |
+
const level = state.levels.find(l => l.id === levelId);
|
| 1223 |
+
const sections = state.sections[levelId] || [];
|
| 1224 |
+
const questionsCount = sections.reduce((acc, section) => {
|
| 1225 |
+
return acc + (state.questions[levelId]?.[section]?.length || 0);
|
| 1226 |
+
}, 0);
|
| 1227 |
+
|
| 1228 |
+
levelContentSection.innerHTML = `
|
| 1229 |
+
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-5">
|
| 1230 |
+
<div class="flex items-center gap-3">
|
| 1231 |
+
<button onclick="levelContentSection.classList.add('hidden');" class="w-10 h-10 rounded-xl bg-gray-100 hover:bg-gray-200 flex items-center justify-center transition ripple">
|
| 1232 |
+
<i class="fas fa-arrow-right text-gray-700"></i>
|
| 1233 |
+
</button>
|
| 1234 |
+
<div>
|
| 1235 |
+
<h2 class="text-xl font-bold text-gray-800">${level.name}</h2>
|
| 1236 |
+
<p class="text-xs text-gray-500">${sections.length} أقسام • ${questionsCount} أسئلة</p>
|
| 1237 |
+
</div>
|
| 1238 |
+
</div>
|
| 1239 |
+
|
| 1240 |
+
<div class="flex items-center gap-2">
|
| 1241 |
+
<div class="bg-gray-100 border border-gray-200 px-3 py-1 rounded-lg text-xs flex items-center gap-1 shadow-xs">
|
| 1242 |
+
<span>${level.requiredPoints.toLocaleString('ar-EG')}</span>
|
| 1243 |
+
<span class="text-gray-500 text-xs">نقطة</span>
|
| 1244 |
+
</div>
|
| 1245 |
+
|
| 1246 |
+
<button id="add-section-btn" class="bg-primary-500 text-white px-4 py-2 rounded-lg hover:shadow-md transition flex items-center gap-2 shadow-sm ripple">
|
| 1247 |
+
<i class="fas fa-plus"></i>
|
| 1248 |
+
<span class="text-xs">إضافة قسم</span>
|
| 1249 |
+
</button>
|
| 1250 |
+
</div>
|
| 1251 |
+
</div>
|
| 1252 |
+
|
| 1253 |
+
${sections.length > 0 ? `
|
| 1254 |
+
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4" id="sections-container">
|
| 1255 |
+
${sections.map(section => {
|
| 1256 |
+
const questions = state.questions[levelId]?.[section] || [];
|
| 1257 |
+
const answeredCount = questions.filter(q => q.answered).length;
|
| 1258 |
+
const progress = questions.length ? Math.round((answeredCount / questions.length) * 100) : 0;
|
| 1259 |
+
|
| 1260 |
+
return `
|
| 1261 |
+
<div onclick="loadSectionContent('${section}')" class="bg-white rounded-xl border border-gray-200/70 p-4 hover:shadow-md transition-all duration-300 cursor-pointer group relative overflow-hidden ripple">
|
| 1262 |
+
${progress === 100 ? `
|
| 1263 |
+
<div class="absolute top-2 right-2 w-7 h-7 rounded-lg bg-success/10 text-success flex items-center justify-center">
|
| 1264 |
+
<i class="fas fa-check text-xs"></i>
|
| 1265 |
+
</div>
|
| 1266 |
+
` : ''}
|
| 1267 |
+
|
| 1268 |
+
<div class="flex justify-between items-center mb-3">
|
| 1269 |
+
<h3 class="font-medium text-gray-800 group-hover:text-primary-600 transition">${section}</h3>
|
| 1270 |
+
<div class="w-7 h-7 rounded-lg bg-gradient-to-br ${level.color} text-white flex items-center justify-center transition group-hover:scale-110">
|
| 1271 |
+
<i class="fas fa-arrow-left text-xs"></i>
|
| 1272 |
+
</div>
|
| 1273 |
+
</div>
|
| 1274 |
+
|
| 1275 |
+
<div class="w-full bg-gray-200 rounded-full h-2 mb-3 overflow-hidden">
|
| 1276 |
+
<div class="h-full rounded-full ${progress === 100 ? 'bg-success' : `bg-gradient-to-r ${level.color}`}" style="width: ${progress}%"></div>
|
| 1277 |
+
</div>
|
| 1278 |
+
|
| 1279 |
+
<div class="flex items-center justify-between text-xs text-gray-500">
|
| 1280 |
+
<span>${questions.length} أسئلة</span>
|
| 1281 |
+
<span>${answeredCount} مكتملة</span>
|
| 1282 |
+
</div>
|
| 1283 |
+
</div>
|
| 1284 |
+
`;
|
| 1285 |
+
}).join('')}
|
| 1286 |
+
</div>
|
| 1287 |
+
` : `
|
| 1288 |
+
<div class="bg-gray-50 rounded-xl p-8 text-center border border-dashed border-gray-300">
|
| 1289 |
+
<div class="w-16 h-16 mx-auto rounded-xl bg-gray-200 text-gray-400 flex items-center justify-center mb-4">
|
| 1290 |
+
<i class="fas fa-folder-open text-2xl"></i>
|
| 1291 |
+
</div>
|
| 1292 |
+
<h4 class="text-gray-600 font-medium mb-2">لا توجد أقسام متاحة</h4>
|
| 1293 |
+
<p class="text-xs text-gray-500 mb-5">يمكنك إضافة قسم جديد باستخدام زر "إضافة قسم"</p>
|
| 1294 |
+
<button id="add-first-section-btn" class="bg-primary-500 text-white px-5 py-2.5 rounded-lg hover:bg-primary-600 transition font-medium shadow-sm mx-auto flex items-center gap-2 ripple">
|
| 1295 |
+
<i class="fas fa-plus"></i>
|
| 1296 |
+
<span>إضافة أول قسم</span>
|
| 1297 |
+
</button>
|
| 1298 |
+
</div>
|
| 1299 |
+
`}
|
| 1300 |
+
|
| 1301 |
+
<div class="mt-6 pt-4 border-t border-gray-200/50">
|
| 1302 |
+
<h3 class="text-lg font-bold text-gray-800 mb-3">نصائح للمستوى "${level.name}"</h3>
|
| 1303 |
+
<div class="relative">
|
| 1304 |
+
<div class="absolute -left-2 -top-2 w-24 h-24 rounded-full bg-blue-200/20 animate-pulse-slow"></div>
|
| 1305 |
+
<div class="relative z-10 space-y-3">
|
| 1306 |
+
<div class="flex items-start gap-3">
|
| 1307 |
+
<div class="flex-none w-10 h-10 rounded-lg bg-blue-100/30 text-blue-500 flex items-center justify-center">
|
| 1308 |
+
<i class="fas fa-lightbulb"></i>
|
| 1309 |
+
</div>
|
| 1310 |
+
<p class="text-sm text-gray-700">ركز على فهم الأسئلة جيداً قبل الإجابة، ولا تتردد في الرجوع للمصادر التعليمية.</p>
|
| 1311 |
+
</div>
|
| 1312 |
+
<div class="flex items-start gap-3">
|
| 1313 |
+
<div class="flex-none w-10 h-10 rounded-lg bg-green-100/30 text-green-500 flex items-center justify-center">
|
| 1314 |
+
<i class="fas fa-clock"></i>
|
| 1315 |
+
</div>
|
| 1316 |
+
<p class="text-sm text-gray-700">خصص وقتاً منتظماً للتعلم كل يوم حتى لو كان بسيطاً.</p>
|
| 1317 |
+
</div>
|
| 1318 |
+
</div>
|
| 1319 |
+
</div>
|
| 1320 |
+
</div>
|
| 1321 |
+
`;
|
| 1322 |
+
|
| 1323 |
+
document.getElementById('add-section-btn')?.addEventListener('click', showAddSectionModal);
|
| 1324 |
+
document.getElementById('add-first-section-btn')?.addEventListener('click', showAddSectionModal);
|
| 1325 |
+
}
|
| 1326 |
+
|
| 1327 |
+
function showAddSectionModal() {
|
| 1328 |
+
sectionNameInput.value = '';
|
| 1329 |
+
addSectionModal.classList.remove('hidden');
|
| 1330 |
+
}
|
| 1331 |
+
|
| 1332 |
+
window.loadSectionContent = function(sectionName) {
|
| 1333 |
+
state.currentSection = sectionName;
|
| 1334 |
+
sectionContent.classList.remove('hidden');
|
| 1335 |
+
document.getElementById('section-content').scrollIntoView({ behavior: 'smooth' });
|
| 1336 |
+
|
| 1337 |
+
const questions = state.questions[state.currentLevel]?.[sectionName] || [];
|
| 1338 |
+
const answeredCount = questions.filter(q => q.answered).length;
|
| 1339 |
+
const level = state.levels.find(l => l.id === state.currentLevel);
|
| 1340 |
+
|
| 1341 |
+
sectionContent.innerHTML = `
|
| 1342 |
+
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-5">
|
| 1343 |
+
<div class="flex items-center gap-3">
|
| 1344 |
+
<button onclick="sectionContent.classList.add('hidden');" class="w-10 h-10 rounded-xl bg-gray-100 hover:bg-gray-200 flex items-center justify-center transition ripple">
|
| 1345 |
+
<i class="fas fa-arrow-right text-gray-700"></i>
|
| 1346 |
+
</button>
|
| 1347 |
+
<div>
|
| 1348 |
+
<h2 class="text-xl font-bold text-gray-800">${sectionName}</h2>
|
| 1349 |
+
<div class="flex items-center gap-2 text-xs">
|
| 1350 |
+
<span class="text-primary-500">${level.name}</span>
|
| 1351 |
+
<span class="text-gray-300">•</span>
|
| 1352 |
+
<span class="text-gray-500">${questions.length} سؤال</span>
|
| 1353 |
+
${answeredCount > 0 ? `
|
| 1354 |
+
<span class="text-gray-300">•</span>
|
| 1355 |
+
<span class="text-success font-medium">${answeredCount} مكتملة</span>
|
| 1356 |
+
` : ''}
|
| 1357 |
+
</div>
|
| 1358 |
+
</div>
|
| 1359 |
+
</div>
|
| 1360 |
+
|
| 1361 |
+
<div class="flex items-center gap-2">
|
| 1362 |
+
<div class="bg-gray-100 border border-gray-200 px-3 py-1 rounded-lg text-xs flex items-center gap-1 shadow-xs">
|
| 1363 |
+
<i class="fas fa-coins text-warning mr-1"></i>
|
| 1364 |
+
<span class="font-medium">50</span>
|
| 1365 |
+
<span class="text-gray-500">نقطة</span>
|
| 1366 |
+
</div>
|
| 1367 |
+
|
| 1368 |
+
<button id="quiz-mode-btn" class="bg-gradient-to-r ${level.color} text-white px-3 py-1.5 rounded-lg hover:shadow-md transition flex items-center gap-2 ripple">
|
| 1369 |
+
<i class="fas fa-bolt text-xs"></i>
|
| 1370 |
+
<span class="text-xs">وضع الاختبار</span>
|
| 1371 |
+
</button>
|
| 1372 |
+
</div>
|
| 1373 |
+
</div>
|
| 1374 |
+
|
| 1375 |
+
${questions.length > 0 ? `
|
| 1376 |
+
<div id="questions-container" class="space-y-4">
|
| 1377 |
+
${questions.map((q, qIndex) => {
|
| 1378 |
+
const isAnswered = q.answered;
|
| 1379 |
+
|
| 1380 |
+
return `
|
| 1381 |
+
<div class="bg-white rounded-xl shadow-xs p-4 border ${
|
| 1382 |
+
isAnswered ? 'border-green-100/70 bg-green-50/20' : 'border-gray-200'
|
| 1383 |
+
} group relative overflow-hidden" id="question-${qIndex}">
|
| 1384 |
+
${isAnswered ? `
|
| 1385 |
+
<div class="absolute top-2 right-2 w-6 h-6 rounded-lg bg-success/10 text-success flex items-center justify-center">
|
| 1386 |
+
<i class="fas fa-check text-xs"></i>
|
| 1387 |
+
</div>
|
| 1388 |
+
` : ''}
|
| 1389 |
+
|
| 1390 |
+
<div class="flex justify-between items-start mb-2">
|
| 1391 |
+
<div class="flex items-center gap-2">
|
| 1392 |
+
<span class="text-xs px-2 py-1 rounded-full bg-gray-100 text-gray-600">${qIndex + 1}</span>
|
| 1393 |
+
<h3 class="font-medium text-gray-800 text-sm">${q.question}</h3>
|
| 1394 |
+
</div>
|
| 1395 |
+
<span class="text-xs px-2 py-1 ${
|
| 1396 |
+
isAnswered ? 'bg-green-100 text-success' : 'bg-blue-100 text-primary-600'
|
| 1397 |
+
} rounded-full whitespace-nowrap">${isAnswered ? 'تمت الإجابة' : '50 نقطة'}</span>
|
| 1398 |
+
</div>
|
| 1399 |
+
|
| 1400 |
+
<div class="grid grid-cols-1 ${q.options.length > 2 ? 'sm:grid-cols-2' : ''} gap-2 mt-3">
|
| 1401 |
+
${q.options.map((option, oIndex) => `
|
| 1402 |
+
<div class="relative">
|
| 1403 |
+
<input type="radio"
|
| 1404 |
+
id="q${qIndex}-o${oIndex}"
|
| 1405 |
+
name="q${qIndex}"
|
| 1406 |
+
value="${oIndex}"
|
| 1407 |
+
class="hidden"
|
| 1408 |
+
${isAnswered ? 'disabled' : ''}>
|
| 1409 |
+
<label for="q${qIndex}-o${oIndex}"
|
| 1410 |
+
class="block w-full h-full px-3 py-2 border ${
|
| 1411 |
+
isAnswered ?
|
| 1412 |
+
(oIndex === q.correctAnswer ?
|
| 1413 |
+
'border-green-300 bg-green-50/50 text-green-700' :
|
| 1414 |
+
'border-gray-200 text-gray-600') :
|
| 1415 |
+
'border-gray-200 hover:border-primary-300 bg-white text-gray-700'
|
| 1416 |
+
} rounded-lg cursor-pointer transition-all duration-200 flex items-start gap-2 text-sm ripple">
|
| 1417 |
+
<span class="flex-none w-4 h-4 rounded-full border ${
|
| 1418 |
+
isAnswered ?
|
| 1419 |
+
(oIndex === q.correctAnswer ?
|
| 1420 |
+
'bg-green-500 border-green-500 text-white' :
|
| 1421 |
+
'border-gray-300 bg-white') :
|
| 1422 |
+
'border-gray-400 group-hover:border-primary-500 bg-white'
|
| 1423 |
+
} flex items-center justify-center mt-1">
|
| 1424 |
+
${isAnswered && oIndex === q.correctAnswer ?
|
| 1425 |
+
'<i class="fas fa-check text-[8px]"></i>' :
|
| 1426 |
+
(isAnswered ? '<span class="w-1.5 h-1.5 rounded-full bg-gray-400"></span>' : '<span class="w-1.5 h-1.5 rounded-full bg-gray-400 group-hover:bg-primary-500"></span>')
|
| 1427 |
+
}
|
| 1428 |
+
</span>
|
| 1429 |
+
<span>${option}</span>
|
| 1430 |
+
</label>
|
| 1431 |
+
</div>
|
| 1432 |
+
`).join('')}
|
| 1433 |
+
</div>
|
| 1434 |
+
|
| 1435 |
+
<div class="mt-3 flex justify-end">
|
| 1436 |
+
<button onclick="checkAnswer(${qIndex})"
|
| 1437 |
+
class="bg-gradient-to-r ${level.color} text-white px-5 py-1.5 rounded-lg text-sm hover:shadow-md transition font-medium ripple ${
|
| 1438 |
+
isAnswered ? 'hidden' : ''
|
| 1439 |
+
}">
|
| 1440 |
+
<i class="fas fa-check-circle mr-2"></i>
|
| 1441 |
+
تأكيد الإجابة
|
| 1442 |
+
</button>
|
| 1443 |
+
</div>
|
| 1444 |
+
|
| 1445 |
+
${isAnswered ? `
|
| 1446 |
+
<div class="mt-3 pt-2 border-t border-gray-100/50">
|
| 1447 |
+
<p class="text-xs text-gray-600">
|
| 1448 |
+
<i class="fas fa-info-circle text-primary-500 mr-1"></i>
|
| 1449 |
+
تمت إجابة هذا السؤال سابقاً
|
| 1450 |
+
</p>
|
| 1451 |
+
</div>
|
| 1452 |
+
` : ''}
|
| 1453 |
+
</div>
|
| 1454 |
+
`;
|
| 1455 |
+
}).join('')}
|
| 1456 |
+
</div>
|
| 1457 |
+
|
| 1458 |
+
<div class="mt-6 pt-4 border-t border-gray-200/50">
|
| 1459 |
+
<h3 class="text-lg font-bold text-gray-800 mb-3">إحصائيات القسم</h3>
|
| 1460 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-3">
|
| 1461 |
+
<div class="bg-white rounded-xl p-3 border border-gray-200/70 shadow-xs">
|
| 1462 |
+
<div class="flex items-center justify-between mb-1">
|
| 1463 |
+
<h4 class="text-sm font-medium text-gray-600">معدل الدقة</h4>
|
| 1464 |
+
<span class="text-lg font-bold text-dark-800">${questions.length ? Math.round((answeredCount/questions.length)*100) : 0}%</span>
|
| 1465 |
+
</div>
|
| 1466 |
+
<div class="w-full bg-gray-200 rounded-full h-1.5 overflow-hidden">
|
| 1467 |
+
<div class="h-full rounded-full bg-gradient-to-r ${level.color}" style="width: ${questions.length ? (answeredCount/questions.length)*100 : 0}%"></div>
|
| 1468 |
+
</div>
|
| 1469 |
+
</div>
|
| 1470 |
+
|
| 1471 |
+
<div class="bg-white rounded-xl p-3 border border-gray-200/70 shadow-xs">
|
| 1472 |
+
<div class="flex items-center justify-between mb-1">
|
| 1473 |
+
<h4 class="text-sm font-medium text-gray-600">الأسئلة المتبقية</h4>
|
| 1474 |
+
<span class="text-lg font-bold text-dark-800">${questions.length - answeredCount}</span>
|
| 1475 |
+
</div>
|
| 1476 |
+
<p class="text-xs text-gray-500">من أصل ${questions.length} سؤال</p>
|
| 1477 |
+
</div>
|
| 1478 |
+
|
| 1479 |
+
<div class="bg-white rounded-xl p-3 border border-gray-200/70 shadow-xs">
|
| 1480 |
+
<div class="flex items-center justify-between mb-1">
|
| 1481 |
+
<h4 class="text-sm font-medium text-gray-600">النقاط المحتملة</h4>
|
| 1482 |
+
<span class="text-lg font-bold text-dark-800">${(questions.length - answeredCount)*50}</span>
|
| 1483 |
+
</div>
|
| 1484 |
+
<p class="text-xs text-gray-500">50 نقطة لكل إجابة جديدة</p>
|
| 1485 |
+
</div>
|
| 1486 |
+
</div>
|
| 1487 |
+
</div>
|
| 1488 |
+
` : `
|
| 1489 |
+
<div class="bg-gray-50 rounded-xl p-8 text-center border border-dashed border-gray-300">
|
| 1490 |
+
<div class="w-16 h-16 mx-auto rounded-xl bg-gray-200 text-gray-400 flex items-center justify-center mb-4">
|
| 1491 |
+
<i class="fas fa-comment-slash text-2xl"></i>
|
| 1492 |
+
</div>
|
| 1493 |
+
<h4 class="text-gray-600 font-medium mb-2">لا توجد أسئلة متاحة</h4>
|
| 1494 |
+
<p class="text-xs text-gray-500 mb-5">سيتم إضافة أسئلة لهذا القسم قريباً</p>
|
| 1495 |
+
<button onclick="sectionContent.classList.add('hidden');" class="bg-gray-200 text-gray-700 px-5 py-2 rounded-lg hover:bg-gray-300 transition text-sm font-medium mx-auto flex items-center gap-2 ripple">
|
| 1496 |
+
<i class="fas fa-chevron-left"></i>
|
| 1497 |
+
<span>العودة إلى الأقسام</span>
|
| 1498 |
+
</button>
|
| 1499 |
+
</div>
|
| 1500 |
+
`}
|
| 1501 |
+
`;
|
| 1502 |
+
|
| 1503 |
+
document.getElementById('quiz-mode-btn')?.addEventListener('click', () => {
|
| 1504 |
+
showToast('سيتم تفعيل وضع الاختبار قريباً في التحديثات القادمة', 'info');
|
| 1505 |
+
});
|
| 1506 |
+
};
|
| 1507 |
+
|
| 1508 |
+
window.checkAnswer = function(questionIndex) {
|
| 1509 |
+
const question = state.questions[state.currentLevel][state.currentSection][questionIndex];
|
| 1510 |
+
const selectedOption = document.querySelector(`input[name=q${questionIndex}]:checked`);
|
| 1511 |
+
|
| 1512 |
+
if (!selectedOption) {
|
| 1513 |
+
showToast('��لرجاء اختيار إجابة أولاً', 'warning');
|
| 1514 |
+
return;
|
| 1515 |
+
}
|
| 1516 |
+
|
| 1517 |
+
const isCorrect = parseInt(selectedOption.value) === question.correctAnswer;
|
| 1518 |
+
const questionElement = document.getElementById(`question-${questionIndex}`);
|
| 1519 |
+
const feedbackElement = document.createElement('div');
|
| 1520 |
+
feedbackElement.className = `mt-3 p-2 rounded-lg text-xs flex items-center gap-2 ${
|
| 1521 |
+
isCorrect ? 'bg-green-50 text-success' : 'bg-red-50 text-danger'
|
| 1522 |
+
} border ${
|
| 1523 |
+
isCorrect ? 'border-green-100' : 'border-red-100'
|
| 1524 |
+
}`;
|
| 1525 |
+
|
| 1526 |
+
feedbackElement.innerHTML = `
|
| 1527 |
+
<i class="fas ${
|
| 1528 |
+
isCorrect ? 'fa-check-circle' : 'fa-times-circle'
|
| 1529 |
+
}"></i>
|
| 1530 |
+
<span>${isCorrect ? 'إجابة صحيحة! +50 نقطة' : 'إجابة خاطئة، حاول مرة أخرى!'}</span>
|
| 1531 |
+
`;
|
| 1532 |
+
|
| 1533 |
+
questionElement.querySelector('button').insertAdjacentElement('beforebegin', feedbackElement);
|
| 1534 |
+
|
| 1535 |
+
if (isCorrect) {
|
| 1536 |
+
// Only add points if not already answered
|
| 1537 |
+
if (!question.answered) {
|
| 1538 |
+
state.points += 50;
|
| 1539 |
+
question.answered = true;
|
| 1540 |
+
state.questions[state.currentLevel][state.currentSection][questionIndex].answered = true;
|
| 1541 |
+
updatePoints();
|
| 1542 |
+
checkLevelUnlocks();
|
| 1543 |
+
|
| 1544 |
+
// Mark as answered
|
| 1545 |
+
localStorage.setItem(`answered-${state.currentLevel}-${state.currentSection}-${questionIndex}`, 'true');
|
| 1546 |
+
localStorage.setItem('questions', JSON.stringify(state.questions));
|
| 1547 |
+
|
| 1548 |
+
// Disable all options and show correct answer
|
| 1549 |
+
document.querySelectorAll(`#question-${questionIndex} input[type="radio"]`).forEach(input => {
|
| 1550 |
+
input.disabled = true;
|
| 1551 |
+
});
|
| 1552 |
+
|
| 1553 |
+
// Update UI to show answered state
|
| 1554 |
+
setTimeout(() => {
|
| 1555 |
+
questionElement.classList.add('border-green-100', 'bg-green-50/20');
|
| 1556 |
+
questionElement.querySelector('button').classList.add('hidden');
|
| 1557 |
+
|
| 1558 |
+
// Add checkmark at the top right
|
| 1559 |
+
const checkmark = document.createElement('div');
|
| 1560 |
+
checkmark.className = 'absolute top-2 right-2 w-6 h-6 rounded-lg bg-success/10 text-success flex items-center justify-center';
|
| 1561 |
+
checkmark.innerHTML = '<i class="fas fa-check text-xs"></i>';
|
| 1562 |
+
questionElement.prepend(checkmark);
|
| 1563 |
+
|
| 1564 |
+
// Reload section to update progress bars
|
| 1565 |
+
setTimeout(() => loadSectionContent(state.currentSection), 1500);
|
| 1566 |
+
}, 1000);
|
| 1567 |
+
}
|
| 1568 |
+
}
|
| 1569 |
+
};
|
| 1570 |
+
|
| 1571 |
+
function checkLevelUnlocks() {
|
| 1572 |
+
state.levels.forEach(level => {
|
| 1573 |
+
if (state.points >= level.requiredPoints && !state.unlockedLevels.includes(level.id)) {
|
| 1574 |
+
state.unlockedLevels.push(level.id);
|
| 1575 |
+
level.unlocked = true;
|
| 1576 |
+
showUnlockedModal(level.name);
|
| 1577 |
+
}
|
| 1578 |
+
});
|
| 1579 |
+
|
| 1580 |
+
localStorage.setItem('unlockedLevels', JSON.stringify(state.unlockedLevels));
|
| 1581 |
+
updateDashboardStats();
|
| 1582 |
+
}
|
| 1583 |
+
|
| 1584 |
+
// Initialize the app
|
| 1585 |
+
init();
|
| 1586 |
+
|
| 1587 |
+
// Smoothly show the page
|
| 1588 |
+
setTimeout(() => {
|
| 1589 |
+
document.body.style.opacity = '1';
|
| 1590 |
+
document.body.style.transition = 'opacity 0.3s ease';
|
| 1591 |
+
}, 50);
|
| 1592 |
+
</script>
|
| 1593 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=MrAzoooz/questionanswer" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 1594 |
+
</html>
|