Spaces:
Running
Running
الصفحة الرئيسية شريط علوي مكتوب فيه "إضافة مستوى". الضغط عليه: إذا أقل من 20000 نقطة → رسالة تنبيه بالنقاط المطلوبة. إذا كافي → إضافة مستوى جديد (اسم + أيقونة + لون). تحت الشريط تظهر المستويات: السهل ✅ (مفتوح) المتوسط 🔒 (يفتح عند 10000 نقطة) الصعب 🔒 (يفتح عند 20000 نقطة) الأصعب 🔒 (يفتح عند 30000 نقطة) المستحيل 🔒 (يفتح عند 50000 نقطة) [المستوى الجديد] (يضاف يدويًا من اللاعب بعد جمع 20000 نقطة). صفحة المستوى شريط علوي مكتوب فيه "إضافة قسم". قائمة الأقسام: الدين – العلوم – الفضاء – الأدب – [+ إضافة قسم]. الضغط على أي قسم → يفتح صفحة الأسئلة. صفحة الأسئلة سؤال مع 4 خيارات. الإجابة الصحيحة → +500 نقطة + رسالة ✔️ صحيح. الإجابة الخاطئة → رسالة ❌ خطأ + الإجابة الصحيحة. - Initial Deployment
10f8c57 verified Download index.html from MrAzoooz/questionanswer: direct link, hf CLI and curl.
- Browser
- Download file 94.6 kB
-
https://huggingface.co/spaces/MrAzoooz/questionanswer/resolve/main/index.html
- Command line
-
hf download hf://spaces/MrAzoooz/questionanswer/index.html
-
curl -L -o index.html https://huggingface.co/spaces/MrAzoooz/questionanswer/resolve/main/index.html
94.6 kB
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>إكسبلورا | منصة التعلم الذكي</title>
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: {
50: '#f0f9ff',
100: '#e0f2fe',
500: '#4f46e5',
600: '#4338ca',
},
secondary: {
500: '#ec4899',
600: '#db2777',
},
success: '#10b981',
warning: '#f59e0b',
danger: '#ef4444',
dark: {
800: '#1e293b',
900: '#0f172a'
}
},
fontFamily: {
'tajawal': ['Tajawal', 'sans-serif'],
'sans': ['Tajawal', 'sans-serif']
},
boxShadow: {
'soft': '0 4px 20px rgba(0, 0, 0, 0.05)',
'hard': '0 8px 30px rgba(0, 0, 0, 0.1)',
'glow': '0 0 20px 5px rgba(79, 70, 229, 0.15)',
'inner-xl': 'inset 0 4px 12px rgba(0, 0, 0, 0.05)'
},
animation: {
'bounce-slow': 'bounce-slow 2s infinite',
'pulse-slow': 'pulse-slow 3s infinite',
'float': 'float 6s ease-in-out infinite',
},
keyframes: {
'bounce-slow': {
'0%, 100%': { transform: 'translateY(0)' },
'50%': { transform: 'translateY(-10px)' },
},
'pulse-slow': {
'0%, 100%': { opacity: 1 },
'50%': { opacity: 0.7 },
},
'float': {
'0%, 100%': { transform: 'translateY(0)' },
'50%': { transform: 'translateY(-15px)' },
}
}
}
}
}
</script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap');
* {
-webkit-tap-highlight-color: transparent;
}
body {
font-family: 'Tajawal', sans-serif;
background-color: #f8fafc;
transition: all 0.3s ease;
}
.gradient-bg {
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}
.fade-in {
animation: fadeIn 0.5s ease-in-out forwards;
}
.slide-up {
animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.gradient-text {
background-clip: text;
-webkit-background-clip: text;
color: transparent;
}
.text-stroke {
-webkit-text-stroke: 1px rgba(255,255,255,0.3);
text-stroke: 1px rgba(255,255,255,0.3);
}
.card-hover {
transition: all 0.3s ease;
}
.card-hover:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.blob {
filter: blur(50px);
opacity: 0.15;
position: absolute;
z-index: 0;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.level-icon {
transition: all 0.3s ease;
}
.level-card:hover .level-icon {
transform: scale(1.1);
}
.badge-pulse {
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
animation: badge-pulse 1.5s infinite;
}
@keyframes badge-pulse {
0% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
}
70% {
transform: scale(1);
box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
}
100% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
}
}
.option-selected {
background-color: #4f46e5;
color: white;
border-color: #4f46e5;
}
/* Custom scrollbar */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: #94a3b8;
}
/* Custom animations */
.breathing {
animation: breathing 5s ease-in-out infinite;
}
@keyframes breathing {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.02); }
}
.ripple {
position: relative;
overflow: hidden;
}
.ripple-effect {
position: absolute;
border-radius: 50%;
background-color: rgba(255, 255, 255, 0.3);
transform: scale(0);
animation: ripple 0.6s linear;
pointer-events: none;
}
@keyframes ripple {
to {
transform: scale(4);
opacity: 0;
}
}
</style>
</head>
<body class="min-h-screen font-tajawal text-dark-800 bg-gradient-to-br from-gray-50 to-indigo-50">
<!-- Main App Container -->
<div class="container mx-auto px-4 py-6 max-w-7xl relative overflow-hidden">
<!-- Background blobs -->
<div class="blob w-64 h-64 bg-primary-400 rounded-full -left-40 -top-40 animate-float"></div>
<div class="blob w-80 h-80 bg-secondary-500 rounded-full -right-40 bottom-20 animate-float animation-delay-2000"></div>
<div class="blob w-72 h-72 bg-warning-400 rounded-full left-1/2 -bottom-40 animate-float animation-delay-3000"></div>
<!-- Top Navigation Bar -->
<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">
<div class="absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MDAiIGhlaWdodD0iNjAwIj48ZmlsdGVyIGlkPSJhIiB4PSIwIiB5PSIwIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iLjA1IiBudW1PY3RhdmVzPSIyIiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCIvPjwvZmlsdGVyPjxwYXRoIGZpbHRlcj0idXJsKCNhKSIgb3BhY2l0eT0iLjA1IiBkPSJNMCwwaDYwMHY2MDBIMHoiLz48L3N2Zz4=')] opacity-10"></div>
<div class="flex items-center gap-4 z-10">
<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">
<i class="fas fa-atom text-2xl text-white"></i>
</div>
<div>
<h1 class="text-2xl font-bold text-white">
<span class="gradient-text bg-gradient-to-r from-primary-300 to-secondary-300">إكسبلورا</span>
</h1>
<p class="text-xs text-white/70">رحلتك التعليمية تبدأ من هنا</p>
</div>
</div>
<div class="flex flex-wrap items-center gap-3 justify-center z-10">
<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">
<div class="relative">
<i class="fas fa-coins text-yellow-300"></i>
<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>
</div>
<div>
<span class="font-bold text-white" id="points-counter">0</span>
<span class="text-xs text-white/80">نقطة</span>
</div>
</div>
<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">
<i class="fas fa-plus"></i>
<span>مستوى جديد</span>
</button>
<div class="relative">
<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">
<i class="fas fa-user text-white/90"></i>
</div>
<div class="absolute -top-1 -right-1 w-3 h-3 rounded-full bg-green-400 border-2 border-gray-900"></div>
</div>
</div>
</header>
<!-- Main Content -->
<main class="space-y-6 relative">
<!-- Welcome Banner (Dynamic Card) -->
<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">
<div class="absolute -right-20 -top-20 w-40 h-40 rounded-full bg-primary-200/20 opacity-20 animate-pulse"></div>
<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>
<div class="relative z-10">
<div class="flex flex-col sm:flex-row justify-between items-start gap-5">
<div class="flex-1">
<h2 class="text-2xl font-bold text-gray-800 mb-2">!مرحباً بك في إكسبلورا</h2>
<p class="text-gray-700 mb-4 max-w-2xl">
ابدأ رحلتك التعليمية اليوم مع منصتنا التفاعلية، حيث تحصل على نقاط لكل إجابة صحيحة وتفتح مستويات جديدة كلما تقدمت!
</p>
<div class="flex items-center gap-3">
<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">
ابدأ الآن
</button>
<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">
تعلم المزيد
</button>
</div>
</div>
<div class="flex-none relative">
<div class="w-[120px] h-[120px]">
<svg viewBox="0 0 100 100" class="w-full h-full rotate-[-90deg]">
<circle cx="50" cy="50" r="45" stroke="#e2e8f0" stroke-width="6" fill="none"></circle>
<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>
<defs>
<linearGradient id="progress-gradient" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" stop-color="#6366f1"></stop>
<stop offset="100%" stop-color="#8b5cf6"></stop>
</linearGradient>
</defs>
</svg>
</div>
<div class="absolute inset-0 flex flex-col items-center justify-center">
<div class="font-bold text-xl text-gray-800" id="current-level-display">مبتدئ</div>
<div class="text-xs text-gray-500">مستواك الحالي</div>
</div>
</div>
</div>
<div class="mt-8 pt-5 border-t border-gray-200/50">
<div class="grid grid-cols-2 md:grid-cols-4 gap-4">
<div class="bg-white/70 backdrop-blur p-3 rounded-xl border border-white/90 shadow-xs">
<div class="text-xs text-gray-500 mb-1">إجمالي النقاط</div>
<div class="flex items-center gap-2">
<div class="w-3 h-3 rounded-full bg-primary-500 animate-pulse"></div>
<span class="font-bold text-lg text-dark-900" id="points-display">0</span>
<span class="text-gray-500 text-sm">نقطة</span>
</div>
</div>
<div class="bg-white/70 backdrop-blur p-3 rounded-xl border border-white/90 shadow-xs">
<div class="text-xs text-gray-500 mb-1">المستويات المكتملة</div>
<div class="flex items-center gap-2">
<div class="w-3 h-3 rounded-full bg-success animate-pulse"></div>
<span class="font-bold text-lg text-dark-900" id="completed-levels-display">1</span>
<span class="text-gray-500 text-sm">/5</span>
</div>
</div>
<div class="bg-white/70 backdrop-blur p-3 rounded-xl border border-white/90 shadow-xs">
<div class="text-xs text-gray-500 mb-1">تقدم اليوم</div>
<div class="flex items-center gap-2">
<div class="w-3 h-3 rounded-full bg-warning animate-pulse"></div>
<span class="font-bold text-lg text-dark-900">+250</span>
<span class="text-gray-500 text-sm">نقطة</span>
</div>
</div>
<div class="bg-white/70 backdrop-blur p-3 rounded-xl border border-white/90 shadow-xs">
<div class="text-xs text-gray-500 mb-1">إجابات صحيحة</div>
<div class="flex items-center gap-2">
<div class="w-3 h-3 rounded-full bg-secondary-500 animate-pulse"></div>
<span class="font-bold text-lg text-dark-900">12</span>
<span class="text-gray-500 text-sm">إجابة</span>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Levels Section -->
<section class="bg-white/80 backdrop-blur-sm rounded-2xl shadow-soft p-5 border border-white/70">
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-5">
<div>
<h2 class="text-xl font-bold text-gray-800">المستويات التعليمية</h2>
<p class="text-xs text-gray-500">اختر مستوى لتبدأ رحلتك التعليمية</p>
</div>
<div class="flex items-center bg-white/90 border border-gray-100 px-3 py-1.5 rounded-xl gap-2 shadow-xs">
<div class="text-xs">
<span class="font-bold text-primary-600" id="unlocked-levels-count">1</span>
<span> / </span>
<span class="text-gray-600">5</span>
<span class="text-gray-500"> مراحل مفتوحة</span>
</div>
<div class="w-7 h-7 rounded-lg bg-primary-100 text-primary-600 flex items-center justify-center">
<i class="fas fa-lock-open text-xs"></i>
</div>
</div>
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 xl:grid-cols-5 gap-4" id="levels-container">
<!-- Levels will be added here dynamically -->
</div>
<div class="mt-4 pt-3 border-t border-gray-200/50 text-center">
<button class="text-primary-500 hover:text-primary-600 text-sm font-medium flex items-center justify-center gap-1 mx-auto">
<span>عرض جميع المستويات</span>
<i class="fas fa-chevron-left text-xs"></i>
</button>
</div>
</section>
<!-- Daily Challenge and Features -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-5">
<!-- Daily Challenge -->
<div class="bg-gradient-to-br from-amber-100 to-white rounded-2xl shadow-soft p-5 border border-white/70">
<div class="flex items-center justify-between mb-4">
<h3 class="font-bold text-gray-800 flex items-center gap-2">
<i class="fas fa-bolt text-amber-500"></i>
<span>التحدي اليومي</span>
</h3>
<div class="text-xs bg-amber-500/10 text-amber-600 px-2 py-1 rounded-full font-medium">جديد</div>
</div>
<p class="text-sm text-gray-700 mb-4">أجب على 7 أسئلة اليوم لتحصل على مكافأة خاصة!</p>
<div class="w-full bg-amber-200/30 rounded-full h-2 mb-4">
<div class="h-full rounded-full bg-gradient-to-r from-amber-500 to-amber-400" style="width: 28%"></div>
</div>
<div class="flex justify-between items-center text-xs">
<span>1/7 أسئلة</span>
<span class="text-amber-600 font-medium">+350 نقطة</span>
</div>
</div>
<!-- Learning Progress -->
<div class="bg-gradient-to-br from-blue-100 to-white rounded-2xl shadow-soft p-5 border border-white/70">
<div class="flex items-center justify-between mb-4">
<h3 class="font-bold text-gray-800 flex items-center gap-2">
<i class="fas fa-chart-line text-blue-500"></i>
<span>تقدمك التعليمي</span>
</h3>
<div class="text-xs bg-blue-500/10 text-blue-600 px-2 py-1 rounded-full font-medium">14%</div>
</div>
<div class="flex items-center justify-between mb-2">
<span class="text-sm text-gray-600">الفترة الحالية</span>
<span class="text-sm font-medium">1/7 أيام</span>
</div>
<div class="grid grid-cols-7 gap-1 mb-4">
<div class="h-1.5 rounded-full bg-blue-500/30"></div>
<div class="h-1.5 rounded-full bg-blue-500/10"></div>
<div class="h-1.5 rounded-full bg-blue-500/10"></div>
<div class="h-1.5 rounded-full bg-blue-500/10"></div>
<div class="h-1.5 rounded-full bg-blue-500/10"></div>
<div class="h-1.5 rounded-full bg-blue-500/10"></div>
<div class="h-1.5 rounded-full bg-blue-500/10"></div>
</div>
<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">
تابع التقدم
</button>
</div>
<!-- Quick Actions -->
<div class="bg-gradient-to-br from-white to-white rounded-2xl shadow-soft p-5 border border-white/70">
<h3 class="font-bold text-gray-800 mb-4">إجراءات سريعة</h3>
<div class="grid grid-cols-2 gap-3">
<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">
<i class="fas fa-medal"></i>
<span>الإنجازات</span>
</button>
<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">
<i class="fas fa-trophy"></i>
<span>المركز</span>
</button>
<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">
<i class="fas fa-star"></i>
<span>المفضلة</span>
</button>
<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">
<i class="fas fa-history"></i>
<span>السجل</span>
</button>
</div>
</div>
</div>
<!-- Level Content Section (initially hidden) -->
<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">
<!-- Level Content will be loaded here -->
</section>
<!-- Section Content (initially hidden) -->
<section id="section-content" class="hidden bg-white/80 backdrop-blur-sm rounded-2xl shadow-soft p-5 border border-white/70 fade-in">
<!-- Section questions will be loaded here -->
</section>
<!-- Weekly Leaderboard -->
<section class="bg-white/80 backdrop-blur-sm rounded-2xl shadow-soft p-5 border border-white/70">
<div class="flex justify-between items-center mb-4">
<h2 class="text-xl font-bold text-gray-800">أفضل المتعلمين هذا الأسبوع</h2>
<button class="text-sm text-primary-600 hover:text-primary-700 flex items-center gap-1">
<span>عرض الكل</span>
<i class="fas fa-chevron-left text-xs"></i>
</button>
</div>
<div class="space-y-3">
<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">
<div class="flex items-center gap-3">
<div class="relative">
<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">
1
</div>
<div class="absolute -top-1 -right-1 w-3 h-3 rounded-full bg-green-400 border-2 border-white"></div>
</div>
<div>
<h4 class="text-sm font-medium text-gray-800">أحمد محمد</h4>
<p class="text-xs text-gray-500">12,450 نقطة</p>
</div>
</div>
<div class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded-full font-medium">
<i class="fas fa-arrow-up mr-1"></i> 15.2%
</div>
</div>
<div class="flex items-center justify-between bg-white/90 p-3 rounded-xl border border-gray-100">
<div class="flex items-center gap-3">
<div class="relative">
<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">
2
</div>
</div>
<div>
<h4 class="text-sm font-medium text-gray-800">ليلى عبدالله</h4>
<p class="text-xs text-gray-500">10,730 نقطة</p>
</div>
</div>
<div class="text-xs bg-green-100 text-green-800 px-2 py-1 rounded-full font-medium">
<i class="fas fa-arrow-up mr-1"></i> 8.5%
</div>
</div>
<div class="flex items-center justify-between bg-white/90 p-3 rounded-xl border border-gray-100">
<div class="flex items-center gap-3">
<div class="relative">
<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">
3
</div>
</div>
<div>
<h4 class="text-sm font-medium text-gray-800">سالم إبراهيم</h4>
<p class="text-xs text-gray-500">9,120 نقطة</p>
</div>
</div>
<div class="text-xs bg-red-100 text-red-800 px-2 py-1 rounded-full font-medium">
<i class="fas fa-arrow-down mr-1"></i> 3.1%
</div>
</div>
</div>
</section>
<!-- Featured Content -->
<section class="bg-gradient-to-br from-primary-100/30 to-white/90 rounded-2xl shadow-soft p-5 border border-white/70">
<div class="flex justify-between items-center mb-5">
<div>
<h2 class="text-xl font-bold text-gray-800">محتوى مميز</h2>
<p class="text-xs text-gray-500">تعلم من أفضل المصادر التعليمية</p>
</div>
<button class="text-primary-600 hover:text-primary-700 text-sm font-medium flex items-center gap-1">
<span>عرض الكل</span>
<i class="fas fa-chevron-left text-xs"></i>
</button>
</div>
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4">
<div class="bg-white rounded-xl shadow-xs p-4 border border-gray-100/50 hover:shadow-sm transition cursor-pointer">
<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">
<i class="fas fa-vial text-4xl"></i>
</div>
<h4 class="font-medium text-gray-800 mb-2 text-sm">تجارب العلوم البسيطة</h4>
<p class="text-xs text-gray-500 mb-3">5 دروس • 27 دقيقة</p>
<div class="flex items-center justify-between">
<div class="text-xs flex items-center gap-1 text-primary-600 font-medium">
<i class="fas fa-play-circle"></i>
<span>ابدأ التعلم</span>
</div>
<div class="text-xs text-gray-500 flex items-center gap-1">
<i class="fas fa-users"></i>
<span>147+</span>
</div>
</div>
</div>
<div class="bg-white rounded-xl shadow-xs p-4 border border-gray-100/50 hover:shadow-sm transition cursor-pointer">
<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">
<i class="fas fa-history text-4xl"></i>
</div>
<h4 class="font-medium text-gray-800 mb-2 text-sm">محطات تاريخية عربية</h4>
<p class="text-xs text-gray-500 mb-3">8 دروس • 42 دقيقة</p>
<div class="flex items-center justify-between">
<div class="text-xs flex items-center gap-1 text-primary-600 font-medium">
<i class="fas fa-play-circle"></i>
<span>ابدأ التعلم</span>
</div>
<div class="text-xs text-gray-500 flex items-center gap-1">
<i class="fas fa-users"></i>
<span>89+</span>
</div>
</div>
</div>
<div class="bg-white rounded-xl shadow-xs p-4 border border-gray-100/50 hover:shadow-sm transition cursor-pointer">
<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">
<i class="fas fa-leaf text-4xl"></i>
</div>
<h4 class="font-medium text-gray-800 mb-2 text-sm">البيئة والاستدامة</h4>
<p class="text-xs text-gray-500 mb-3">6 دروس • 35 دقيقة</p>
<div class="flex items-center justify-between">
<div class="text-xs flex items-center gap-1 text-primary-600 font-medium">
<i class="fas fa-play-circle"></i>
<span>ابدأ التعلم</span>
</div>
<div class="text-xs text-gray-500 flex items-center gap-1">
<i class="fas fa-users"></i>
<span>63+</span>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- Bottom Navigation -->
<nav class="fixed bottom-0 left-0 right-0 bg-white shadow-hard border-t border-gray-100/80 backdrop-blur-sm z-30">
<div class="container mx-auto px-4">
<div class="flex justify-between">
<a href="#" class="py-3 px-4 text-center text-primary-500 relative">
<i class="fas fa-home block text-xl mb-1"></i>
<span class="text-xs block">الرئيسية</span>
<span class="absolute top-1 right-1 w-2 h-2 rounded-full bg-primary-500"></span>
</a>
<a href="#" class="py-3 px-4 text-center text-gray-500 hover:text-primary-500 transition">
<i class="fas fa-compass block text-xl mb-1"></i>
<span class="text-xs block">استكشف</span>
</a>
<a href="#" class="py-3 px-4 text-center text-gray-500 hover:text-primary-500 transition relative">
<i class="fas fa-trophy block text-xl mb-1"></i>
<span class="text-xs block">الجوائز</span>
<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>
</a>
<a href="#" class="py-3 px-4 text-center text-gray-500 hover:text-primary-500 transition">
<i class="fas fa-user block text-xl mb-1"></i>
<span class="text-xs block">حسابي</span>
</a>
</div>
</div>
</nav>
</div>
<!-- Add Level Modal -->
<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">
<div class="bg-white rounded-2xl shadow-hard max-w-md w-full mx-auto overflow-hidden slide-up border border-white/70">
<div class="gradient-bg p-5 text-white flex justify-between items-center">
<div class="flex items-center gap-3">
<div class="w-10 h-10 rounded-lg bg-white/20 flex items-center justify-center">
<i class="fas fa-layer-plus text-lg"></i>
</div>
<h3 class="text-xl font-bold">إنشاء مستوى جديد</h3>
</div>
<button id="close-modal" class="text-white/80 hover:text-white transition transform hover:rotate-90">
<i class="fas fa-times"></i>
</button>
</div>
<div class="p-5">
<div class="bg-primary-50/50 border border-primary-200 rounded-xl p-5 mb-5 text-center relative overflow-hidden">
<div class="absolute -right-10 -top-10 w-32 h-32 rounded-full bg-primary-200 opacity-10"></div>
<div class="absolute -left-10 -bottom-10 w-40 h-40 rounded-full bg-secondary-200 opacity-10"></div>
<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">
<i class="fas fa-gift text-2xl"></i>
</div>
<p id="modal-message" class="text-sm text-gray-700 mb-2 leading-relaxed">
تحتاج <span class="font-bold text-primary-600">50,000</span> نقطة لفتح مستوى جديد
</p>
<div class="flex items-center justify-center gap-2 text-primary-700">
<span class="text-sm">نقاطك الحالية:</span>
<span class="font-bold text-lg" id="current-points-modal">0</span>
</div>
</div>
<div class="space-y-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">تصنيف المستوى</label>
<div class="grid grid-cols-2 gap-3">
<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">
<i class="fas fa-user-graduate mr-2"></i>
تعليمي
</button>
<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">
<i class="fas fa-brain mr-2"></i>
ذكاء
</button>
</div>
</div>
<div>
<label for="level-name" class="block text-sm font-medium text-gray-700 mb-2">اسم المستوى</label>
<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">
</div>
<div>
<label for="level-desc" class="block text-sm font-medium text-gray-700 mb-2">وصف المستوى</label>
<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>
</div>
</div>
<div class="flex justify-end gap-3 pt-5">
<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">
إلغاء
</button>
<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>
إنشاء المستوى
</button>
</div>
</div>
</div>
</div>
<!-- Level Unlocked Modal -->
<div id="unlocked-modal" class="fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 hidden z-50">
<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">
<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">
<i class="fas fa-trophy text-4xl text-white"></i>
</div>
<div class="absolute inset-0 opacity-10 bg-[url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MDAiIGhlaWdodD0iNjAwIj48ZmlsdGVyIGlkPSJhIiB4PSIwIiB5PSIwIj48ZmVUdXJidWxlbmNlIHR5cGU9ImZyYWN0YWxOb2lzZSIgYmFzZUZyZXF1ZW5jeT0iLjA1IiBudW1PY3RhdmVzPSIyIiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCIvPjwvZmlsdGVyPjxwYXRoIGZpbHRlcj0idXJsKCNhKSIgb3BhY2l0eT0iLjA1IiBkPSJNMCwwaDYwMHY2MDBIMHoiLz48L3N2Zz4=')]"></div>
<h2 class="text-3xl font-bold mb-4 mt-8">!تهانينا</h2>
<p id="unlocked-message" class="text-lg mb-6 leading-relaxed">لقد حققت إنجازاً رائعاً بفتح مستوى جديد</p>
<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">
<span class="text-3xl font-bold bg-gradient-to-br from-yellow-300 to-amber-500 bg-clip-text text-transparent">+5K</span>
</div>
<p class="text-primary-200 mb-6">+5,000 نقطة مكافأة</p>
<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">
<span>استمر في التعلم</span>
<i class="fas fa-chevron-left"></i>
</button>
</div>
</div>
<!-- Help Dialog -->
<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">
<button id="close-help" class="absolute top-3 left-3 text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
<h3 class="text-lg font-bold text-gray-800 mb-3 text-center pr-6">كيف تستخدم إكسبلورا؟</h3>
<div class="text-sm text-gray-700 space-y-3">
<div class="flex items-start gap-3 p-2 rounded-lg bg-gray-50">
<div class="flex-none w-8 h-8 rounded-lg bg-primary-500/10 text-primary-500 flex items-center justify-center">
<span class="font-bold">1</span>
</div>
<p>اختر مستوى تعليمي يناسب معرفتك الحالية</p>
</div>
<div class="flex items-start gap-3 p-2 rounded-lg">
<div class="flex-none w-8 h-8 rounded-lg bg-primary-500/10 text-primary-500 flex items-center justify-center">
<span class="font-bold">2</span>
</div>
<p>اختر أحد الأقسام داخل المستوى</p>
</div>
<div class="flex items-start gap-3 p-2 rounded-lg bg-gray-50">
<div class="flex-none w-8 h-8 rounded-lg bg-primary-500/10 text-primary-500 flex items-center justify-center">
<span class="font-bold">3</span>
</div>
<p>أجب على الأسئلة لكسب النقاط والتقدم</p>
</div>
</div>
<div class="mt-4 pt-3 border-t border-gray-200/50">
<a href="#" class="text-sm text-primary-600 hover:text-primary-700 flex items-center justify-center gap-1">
<span>المزيد من المساعدة</span>
<i class="fas fa-chevron-left text-xs"></i>
</a>
</div>
<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>
</div>
<!-- Notification Toast -->
<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">
<i id="toast-icon" class="fas fa-check-circle text-xl"></i>
<div>
<h4 class="font-medium" id="toast-title">تم بنجاح</h4>
<p class="text-sm opacity-90" id="toast-message">النص الخاص بالرسالة يظهر هنا</p>
</div>
</div>
<!-- Floating Action Button -->
<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">
<i class="fas fa-question text-xl"></i>
</div>
<!-- Ripple Effect Script -->
<script>
// Create ripple effect on buttons
document.addEventListener('click', function(e) {
if (e.target.classList.contains('ripple') || e.target.closest('.ripple')) {
const btn = e.target.classList.contains('ripple') ? e.target : e.target.closest('.ripple');
const rect = btn.getBoundingClientRect();
const x = e.clientX - rect.left;
const y = e.clientY - rect.top;
const ripple = document.createElement('span');
ripple.className = 'ripple-effect';
ripple.style.left = `${x}px`;
ripple.style.top = `${y}px`;
btn.appendChild(ripple);
setTimeout(() => {
ripple.remove();
}, 600);
}
});
</script>
<script>
// App State
const state = {
points: parseInt(localStorage.getItem('points')) || 2500,
currentLevel: null,
currentSection: null,
unlockedLevels: JSON.parse(localStorage.getItem('unlockedLevels')) || ['easy', 'medium'],
levels: [
{
id: 'easy',
name: 'مبتدئ',
requiredPoints: 0,
unlocked: true,
color: 'from-emerald-400 to-emerald-300',
bgColor: 'bg-emerald-400/10',
textColor: 'text-emerald-600',
icon: 'fa-seedling',
description: 'المستوى المثالي للبدء في رحلتك التعليمية',
completed: true
},
{
id: 'medium',
name: 'متوسط',
requiredPoints: 10000,
unlocked: true,
color: 'from-blue-400 to-blue-300',
bgColor: 'bg-blue-400/10',
textColor: 'text-blue-600',
icon: 'fa-cloud-sun',
description: 'تحديات مناسبة للبناء على أساسياتك',
completed: false
},
{
id: 'hard',
name: 'متقدم',
requiredPoints: 20000,
unlocked: false,
color: 'from-purple-400 to-purple-300',
bgColor: 'bg-purple-400/10',
textColor: 'text-purple-600',
icon: 'fa-mountain',
description: 'أسئلة تحتاج إلى تركيز وفهم عميق',
completed: false
},
{
id: 'harder',
name: 'خبير',
requiredPoints: 30000,
unlocked: false,
color: 'from-amber-400 to-amber-300',
bgColor: 'bg-amber-400/10',
textColor: 'text-amber-600',
icon: 'fa-brain',
description: 'للأشخاص الذين يتقنون المجال جيداً',
completed: false
},
{
id: 'impossible',
name: 'أسطوري',
requiredPoints: 50000,
unlocked: false,
color: 'from-pink-400 to-pink-300',
bgColor: 'bg-pink-400/10',
textColor: 'text-pink-600',
icon: 'fa-fire',
description: 'تحدٍّ حقيقي حتى لأصحاب الخبرة',
completed: false
}
],
sections: JSON.parse(localStorage.getItem('sections')) || {
easy: ['الدين', 'العلوم', 'الفضاء', 'الأدب'],
medium: ['التاريخ', 'الرياضيات'],
hard: [],
harder: [],
impossible: []
},
questions: JSON.parse(localStorage.getItem('questions')) || {
easy: {
'الدين': Array(10).fill().map((_, i) => ({
question: `ما هو حكم ${i % 2 === 0 ? 'الصلاة' : 'الصيام'} في الإسلام؟`,
options: ['واجب', 'مستحب', 'مكروه', 'محرم'],
correctAnswer: 0,
answered: localStorage.getItem(`answered-easy-الدين-${i}`) === 'true'
})),
'العلوم': Array(10).fill().map((_, i) => ({
question: `ما هو العنصر الكيميائي رقم ${i+1} في الجدول الدوري؟`,
options: [
['الهيدروجين', 'الهيليوم', 'الليثيوم', 'البيريليوم'],
['الصوديوم', 'المغنيسيوم', 'الألومنيوم', 'السيليكون'],
['البوتاسيوم', 'الكالسيوم', 'الحديد', 'النحاس'],
['الفضة', 'الذهب', 'الزئبق', 'الرصاص']
][i % 4],
correctAnswer: 0,
answered: localStorage.getItem(`answered-easy-العلوم-${i}`) === 'true'
})),
'الفضاء': Array(10).fill().map((_, i) => ({
question: i % 2 === 0 ? `ما هو الكوكب ${i < 5 ? 'الأقرب' : 'الأبعد'} عن الشمس؟` : `كم قمراً طبيعياً يمتلك ${['المريخ', 'المشتري', 'زحل', 'أورانوس', 'نبتون'][i % 5]}؟`,
options: i % 2 === 0 ?
['عطارد', 'الزهرة', 'الأرض', 'المريخ'] :
[(i % 2).toString(), (i % 3 + 1).toString(), (i % 4 + 10).toString(), (i % 5 + 20).toString()],
correctAnswer: i % 2 === 0 ? 0 : 1,
answered: localStorage.getItem(`answered-easy-الفضاء-${i}`) === 'true'
})),
'الأدب': Array(10).fill().map((_, i) => ({
question: `من هو مؤلف ${['ديوان المعلقات', 'كتاب الأغاني', 'البخلاء', 'كليلة ودمنة', 'ألف ليلة وليلة'][i % 5]}؟`,
options: [
['امرؤ القيس', 'الحسن بن هانئ', 'الجاحظ', 'ابن المقفع'],
['الأصمعي', 'ابن عبد ربه', 'أبو الفرج الأصفهاني', 'المبرد'],
['ابن المقفع', 'الجاحظ', 'التوحيدي', 'ابن قتيبة'],
['نهروان', 'كيكاووس', 'بيدبا', 'أبو علي القالي']
][i % 4],
correctAnswer: i % 4,
answered: localStorage.getItem(`answered-easy-الأدب-${i}`) === 'true'
}))
},
medium: {
'التاريخ': Array(5).fill().map((_, i) => ({
question: `في أي عام حدثت ${['معركة حطين', 'سقوط غرناطة', 'معاهدة سايكس بيكو', 'ثورة 1919', 'حرب أكتوبر'][i]}؟`,
options: [
['1187', '1250', '1291', '1347'],
['1492', '1520', '1609', '1655'],
['1916', '1920', '1936', '1948'],
['1919', '1925', '1930', '1936'],
['1967', '1973', '1982', '1991']
][i],
correctAnswer: 0,
answered: localStorage.getItem(`answered-medium-التاريخ-${i}`) === 'true'
})),
'الرياضيات': Array(5).fill().map((_, i) => ({
question: `ما هو ناتج ${['2x + 5 = 15', '3² × 4 ÷ 2', '∫x dx', 'sin²θ + cos²θ', 'المشتقة الأولى لـ x²'][i]}؟`,
options: [
['x = 5', 'x = 10', 'x = 7.5', 'x = 2.5'],
['12', '18', '24', '36'],
['x²/2 + C', 'x + C', '1 + C', 'x² + C'],
['0', '1', 'tanθ', 'secθ'],
['x', '2x', 'x²', '2x²']
][i],
correctAnswer: [0, 1, 0, 1, 1][i],
answered: localStorage.getItem(`answered-medium-الرياضيات-${i}`) === 'true'
}))
},
hard: {},
harder: {},
impossible: {}
}
};
// DOM Elements
const pointsCounter = document.getElementById('points-counter');
const pointsDisplay = document.getElementById('points-display');
const completedLevelsDisplay = document.getElementById('completed-levels-display');
const unlockedLevelsCount = document.getElementById('unlocked-levels-count');
const currentLevelDisplay = document.getElementById('current-level-display');
const addLevelBtn = document.getElementById('add-level-btn');
const levelsContainer = document.getElementById('levels-container');
const levelContentSection = document.getElementById('level-content-section');
const sectionContent = document.getElementById('section-content');
// Modal Elements
const addLevelModal = document.getElementById('add-level-modal');
const closeModalBtn = document.getElementById('close-modal');
const cancelAddLevelBtn = document.getElementById('cancel-add-level');
const modalMessage = document.getElementById('modal-message');
const confirmAddLevelBtn = document.getElementById('confirm-add-level');
const currentPointsModal = document.getElementById('current-points-modal');
const unlockedModal = document.getElementById('unlocked-modal');
const unlockedMessage = document.getElementById('unlocked-message');
const closeUnlockedModalBtn = document.getElementById('close-unlocked-modal');
const helpBtn = document.getElementById('fab-help');
const helpDialog = document.getElementById('help-dialog');
const closeHelpBtn = document.getElementById('close-help');
const toast = document.getElementById('toast');
const toastTitle = document.getElementById('toast-title');
const toastMessage = document.getElementById('toast-message');
const toastIcon = document.getElementById('toast-icon');
// Initialize App
function init() {
updatePoints();
renderLevels();
checkLevelUnlocks();
setupEventListeners();
updateDashboardStats();
}
// Set up event listeners
function setupEventListeners() {
// Level management
addLevelBtn.addEventListener('click', showAddLevelModal);
closeModalBtn.addEventListener('click', () => addLevelModal.classList.add('hidden'));
cancelAddLevelBtn.addEventListener('click', () => addLevelModal.classList.add('hidden'));
confirmAddLevelBtn.addEventListener('click', confirmAddLevel);
// Unlocked modal
closeUnlockedModalBtn.addEventListener('click', () => {
unlockedModal.classList.add('hidden');
renderLevels();
});
// Help system
helpBtn.addEventListener('click', toggleHelpDialog);
closeHelpBtn.addEventListener('click', () => helpDialog.classList.add('hidden'));
// Level type buttons
document.querySelectorAll('.level-type-btn').forEach(btn => {
btn.addEventListener('click', () => {
document.querySelectorAll('.level-type-btn').forEach(b =>
b.classList.remove('border-primary-500', 'bg-primary-50', 'text-primary-600')
);
btn.classList.add('border-primary-500', 'bg-primary-50', 'text-primary-600');
});
});
document.addEventListener('click', (e) => {
if (!helpDialog.contains(e.target) && e.target !== helpBtn) {
helpDialog.classList.add('hidden');
}
});
}
function toggleHelpDialog() {
helpDialog.classList.toggle('hidden');
}
// Update points display
function updatePoints() {
const formatter = new Intl.NumberFormat('ar-EG');
pointsCounter.textContent = formatter.format(state.points);
pointsDisplay.textContent = formatter.format(state.points);
currentPointsModal.textContent = formatter.format(state.points);
localStorage.setItem('points', state.points.toString());
state.levels.forEach(level => {
if (state.points >= level.requiredPoints && !state.unlockedLevels.includes(level.id)) {
state.unlockedLevels.push(level.id);
level.unlocked = true;
showUnlockedModal(level.name);
state.points += 5000; // Bonus points
showToast(`مستوى جديد مفتوح: ${level.name}! +5,000 نقطة مكافأة`, 'success');
}
});
localStorage.setItem('unlockedLevels', JSON.stringify(state.unlockedLevels));
updateDashboardStats();
}
// Update dashboard statistics
function updateDashboardStats() {
// Calculate current level
let currentLevel = state.levels[0];
for (let i = state.levels.length - 1; i >= 0; i--) {
if (state.unlockedLevels.includes(state.levels[i].id)) {
currentLevel = state.levels[i];
break;
}
}
currentLevelDisplay.textContent = currentLevel.name;
// Calculate unlocked levels count
const unlockedCount = state.unlockedLevels.length;
unlockedLevelsCount.textContent = unlockedCount;
// Calculate completed levels count
const completedCount = state.levels.filter(l => l.completed).length;
completedLevelsDisplay.textContent = completedCount;
}
// Render levels to the DOM
function renderLevels() {
levelsContainer.innerHTML = '';
state.levels.forEach(level => {
const isUnlocked = state.unlockedLevels.includes(level.id);
const progress = Math.min(100, (state.points / level.requiredPoints) * 100) || 0;
const levelCard = document.createElement('div');
levelCard.className = `level-card relative rounded-xl overflow-hidden ${level.bgColor} ${!isUnlocked ? 'opacity-90' : ''} card-hover fade-in border border-white/70`;
levelCard.innerHTML = `
<div class="absolute inset-0 bg-gradient-to-br from-white/50 to-white/80 backdrop-blur-sm z-0 ${!isUnlocked ? '' : 'hidden'}"></div>
<div class="relative z-10 h-full flex flex-col">
<div class="p-5 flex-1 flex flex-col">
<div class="flex justify-between items-start mb-3">
<div class="flex items-center gap-2">
<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'}`}>
<i class="fas ${level.icon}"></i>
</div>
<div>
<h3 class="text-lg font-bold ${isUnlocked ? 'text-gray-800' : 'text-gray-600'}">${level.name}</h3>
<p class="text-xs ${isUnlocked ? level.textColor : 'text-gray-500'}">${level.requiredPoints.toLocaleString('ar-EG')} نقطة</p>
</div>
</div>
${level.completed ? `
<div class="text-xs px-2 py-1 rounded-xl bg-success/10 text-success font-medium flex items-center gap-1">
<i class="fas fa-check text-xs"></i>
<span>مكتمل</span>
</div>
` : ''}
</div>
<p class="text-xs ${isUnlocked ? 'text-gray-600' : 'text-gray-500'} mb-4">${level.description}</p>
<div class="mt-auto">
<div class="flex justify-between items-center mb-1 text-xs">
<span class="${isUnlocked ? 'text-success font-medium' : 'text-gray-500'}">
${isUnlocked ?
'<i class="fas fa-lock-open mr-1"></i> مفتوح' :
'<i class="fas fa-lock mr-1"></i> مغلق'}
</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2 overflow-hidden ${!isUnlocked ? 'opacity-70' : ''}">
<div class="h-full rounded-full bg-gradient-to-r ${level.color}" style="width: ${progress}%"></div>
</div>
</div>
</div>
<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">
<span>${isUnlocked ? 'فتح المستوى' : 'فتح بمزيد من النقاط'}</span>
<i class="fas fa-chevron-left text-xs mr-2 transition-transform group-hover:-translate-x-1"></i>
</button>
</div>
`;
levelsContainer.appendChild(levelCard);
});
}
window.handleLevelClick = function(levelId) {
const level = state.levels.find(l => l.id === levelId);
const isUnlocked = state.unlockedLevels.includes(levelId);
if (isUnlocked) {
loadLevelContent(levelId);
} else {
const progress = Math.min(100, (state.points / level.requiredPoints) * 100) || 0;
const unlockText = progress >= 90 ?
`أنت على بعد خطوات من فتح ${level.name}! تحتاج ${(level.requiredPoints - state.points).toLocaleString('ar-EG')} نقطة فقط.` :
`تحتاج إلى ${level.requiredPoints.toLocaleString('ar-EG')} نقطة لفتح ${level.name} (${progress.toFixed(0)}% مكتمل)`;
showToast(unlockText, 'info');
}
};
// Show toast message
function showToast(message, type = 'info') {
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`;
// Set colors and icon based on type
let bgColor, icon;
switch(type) {
case 'success':
bgColor = 'bg-success';
icon = 'fa-check-circle';
toastTitle.textContent = 'تم بنجاح';
break;
case 'error':
bgColor = 'bg-danger';
icon = 'fa-times-circle';
toastTitle.textContent = 'خطأ';
break;
case 'warning':
bgColor = 'bg-warning';
icon = 'fa-exclamation-triangle';
toastTitle.textContent = 'تحذير';
break;
case 'info':
default:
bgColor = 'bg-primary-500';
icon = 'fa-info-circle';
toastTitle.textContent = 'معلومة';
break;
}
toastIcon.className = `fas ${icon} text-xl`;
toastMessage.textContent = message;
toast.classList.add(bgColor);
toast.classList.remove('hidden');
setTimeout(() => {
toast.classList.add('opacity-0', 'translate-y-4', 'transition-all', 'duration-300');
setTimeout(() => {
toast.classList.add('hidden');
toast.classList.remove('opacity-0', 'translate-y-4', bgColor);
}, 300);
}, 3000);
}
// Show unlocked level modal
function showUnlockedModal(levelName) {
unlockedMessage.textContent = `لقد فتحت مستوى ${levelName} بنجاح!`;
unlockedModal.classList.remove('hidden');
}
// Show add level modal
function showAddLevelModal() {
addLevelModal.classList.remove('hidden');
if (state.points >= 50000) {
modalMessage.innerHTML = `
<div class="flex items-center justify-center gap-2 mb-1">
<i class="fas fa-check-circle text-success"></i>
<span class="font-bold text-success">متطلبات مكتملة</span>
</div>
<div class="text-sm text-gray-700">لديك ${state.points.toLocaleString('ar-EG')} نقطة، يمكنك الآن إنشاء مستوى جديد</div>
`;
confirmAddLevelBtn.disabled = false;
} else {
const neededPoints = 50000 - state.points;
modalMessage.innerHTML = `
<div class="flex items-center justify-center gap-2 mb-1">
<i class="fas fa-info-circle text-primary-600"></i>
<span class="font-bold text-primary-600">متطلبات غير مكتملة</span>
</div>
<div class="text-sm text-gray-700">تحتاج ${neededPoints.toLocaleString('ar-EG')} نقطة إضافية لإنشاء مستوى جديد</div>
`;
confirmAddLevelBtn.disabled = true;
}
}
function confirmAddLevel() {
showToast('يمكنك الآن إضافة مستوى جديد فور توفر هذه الميزة', 'success');
addLevelModal.classList.add('hidden');
}
// Load content for a specific level
function loadLevelContent(levelId) {
state.currentLevel = levelId;
levelContentSection.classList.remove('hidden');
sectionContent.classList.add('hidden');
document.querySelector('main').scrollIntoView({ behavior: 'smooth' });
const level = state.levels.find(l => l.id === levelId);
const sections = state.sections[levelId] || [];
const questionsCount = sections.reduce((acc, section) => {
return acc + (state.questions[levelId]?.[section]?.length || 0);
}, 0);
levelContentSection.innerHTML = `
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-5">
<div class="flex items-center gap-3">
<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">
<i class="fas fa-arrow-right text-gray-700"></i>
</button>
<div>
<h2 class="text-xl font-bold text-gray-800">${level.name}</h2>
<p class="text-xs text-gray-500">${sections.length} أقسام • ${questionsCount} أسئلة</p>
</div>
</div>
<div class="flex items-center gap-2">
<div class="bg-gray-100 border border-gray-200 px-3 py-1 rounded-lg text-xs flex items-center gap-1 shadow-xs">
<span>${level.requiredPoints.toLocaleString('ar-EG')}</span>
<span class="text-gray-500 text-xs">نقطة</span>
</div>
<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">
<i class="fas fa-plus"></i>
<span class="text-xs">إضافة قسم</span>
</button>
</div>
</div>
${sections.length > 0 ? `
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4" id="sections-container">
${sections.map(section => {
const questions = state.questions[levelId]?.[section] || [];
const answeredCount = questions.filter(q => q.answered).length;
const progress = questions.length ? Math.round((answeredCount / questions.length) * 100) : 0;
return `
<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">
${progress === 100 ? `
<div class="absolute top-2 right-2 w-7 h-7 rounded-lg bg-success/10 text-success flex items-center justify-center">
<i class="fas fa-check text-xs"></i>
</div>
` : ''}
<div class="flex justify-between items-center mb-3">
<h3 class="font-medium text-gray-800 group-hover:text-primary-600 transition">${section}</h3>
<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">
<i class="fas fa-arrow-left text-xs"></i>
</div>
</div>
<div class="w-full bg-gray-200 rounded-full h-2 mb-3 overflow-hidden">
<div class="h-full rounded-full ${progress === 100 ? 'bg-success' : `bg-gradient-to-r ${level.color}`}" style="width: ${progress}%"></div>
</div>
<div class="flex items-center justify-between text-xs text-gray-500">
<span>${questions.length} أسئلة</span>
<span>${answeredCount} مكتملة</span>
</div>
</div>
`;
}).join('')}
</div>
` : `
<div class="bg-gray-50 rounded-xl p-8 text-center border border-dashed border-gray-300">
<div class="w-16 h-16 mx-auto rounded-xl bg-gray-200 text-gray-400 flex items-center justify-center mb-4">
<i class="fas fa-folder-open text-2xl"></i>
</div>
<h4 class="text-gray-600 font-medium mb-2">لا توجد أقسام متاحة</h4>
<p class="text-xs text-gray-500 mb-5">يمكنك إضافة قسم جديد باستخدام زر "إضافة قسم"</p>
<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">
<i class="fas fa-plus"></i>
<span>إضافة أول قسم</span>
</button>
</div>
`}
<div class="mt-6 pt-4 border-t border-gray-200/50">
<h3 class="text-lg font-bold text-gray-800 mb-3">نصائح للمستوى "${level.name}"</h3>
<div class="relative">
<div class="absolute -left-2 -top-2 w-24 h-24 rounded-full bg-blue-200/20 animate-pulse-slow"></div>
<div class="relative z-10 space-y-3">
<div class="flex items-start gap-3">
<div class="flex-none w-10 h-10 rounded-lg bg-blue-100/30 text-blue-500 flex items-center justify-center">
<i class="fas fa-lightbulb"></i>
</div>
<p class="text-sm text-gray-700">ركز على فهم الأسئلة جيداً قبل الإجابة، ولا تتردد في الرجوع للمصادر التعليمية.</p>
</div>
<div class="flex items-start gap-3">
<div class="flex-none w-10 h-10 rounded-lg bg-green-100/30 text-green-500 flex items-center justify-center">
<i class="fas fa-clock"></i>
</div>
<p class="text-sm text-gray-700">خصص وقتاً منتظماً للتعلم كل يوم حتى لو كان بسيطاً.</p>
</div>
</div>
</div>
</div>
`;
document.getElementById('add-section-btn')?.addEventListener('click', showAddSectionModal);
document.getElementById('add-first-section-btn')?.addEventListener('click', showAddSectionModal);
}
function showAddSectionModal() {
sectionNameInput.value = '';
addSectionModal.classList.remove('hidden');
}
window.loadSectionContent = function(sectionName) {
state.currentSection = sectionName;
sectionContent.classList.remove('hidden');
document.getElementById('section-content').scrollIntoView({ behavior: 'smooth' });
const questions = state.questions[state.currentLevel]?.[sectionName] || [];
const answeredCount = questions.filter(q => q.answered).length;
const level = state.levels.find(l => l.id === state.currentLevel);
sectionContent.innerHTML = `
<div class="flex flex-col sm:flex-row justify-between items-start sm:items-center gap-3 mb-5">
<div class="flex items-center gap-3">
<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">
<i class="fas fa-arrow-right text-gray-700"></i>
</button>
<div>
<h2 class="text-xl font-bold text-gray-800">${sectionName}</h2>
<div class="flex items-center gap-2 text-xs">
<span class="text-primary-500">${level.name}</span>
<span class="text-gray-300">•</span>
<span class="text-gray-500">${questions.length} سؤال</span>
${answeredCount > 0 ? `
<span class="text-gray-300">•</span>
<span class="text-success font-medium">${answeredCount} مكتملة</span>
` : ''}
</div>
</div>
</div>
<div class="flex items-center gap-2">
<div class="bg-gray-100 border border-gray-200 px-3 py-1 rounded-lg text-xs flex items-center gap-1 shadow-xs">
<i class="fas fa-coins text-warning mr-1"></i>
<span class="font-medium">50</span>
<span class="text-gray-500">نقطة</span>
</div>
<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">
<i class="fas fa-bolt text-xs"></i>
<span class="text-xs">وضع الاختبار</span>
</button>
</div>
</div>
${questions.length > 0 ? `
<div id="questions-container" class="space-y-4">
${questions.map((q, qIndex) => {
const isAnswered = q.answered;
return `
<div class="bg-white rounded-xl shadow-xs p-4 border ${
isAnswered ? 'border-green-100/70 bg-green-50/20' : 'border-gray-200'
} group relative overflow-hidden" id="question-${qIndex}">
${isAnswered ? `
<div class="absolute top-2 right-2 w-6 h-6 rounded-lg bg-success/10 text-success flex items-center justify-center">
<i class="fas fa-check text-xs"></i>
</div>
` : ''}
<div class="flex justify-between items-start mb-2">
<div class="flex items-center gap-2">
<span class="text-xs px-2 py-1 rounded-full bg-gray-100 text-gray-600">${qIndex + 1}</span>
<h3 class="font-medium text-gray-800 text-sm">${q.question}</h3>
</div>
<span class="text-xs px-2 py-1 ${
isAnswered ? 'bg-green-100 text-success' : 'bg-blue-100 text-primary-600'
} rounded-full whitespace-nowrap">${isAnswered ? 'تمت الإجابة' : '50 نقطة'}</span>
</div>
<div class="grid grid-cols-1 ${q.options.length > 2 ? 'sm:grid-cols-2' : ''} gap-2 mt-3">
${q.options.map((option, oIndex) => `
<div class="relative">
<input type="radio"
id="q${qIndex}-o${oIndex}"
name="q${qIndex}"
value="${oIndex}"
class="hidden"
${isAnswered ? 'disabled' : ''}>
<label for="q${qIndex}-o${oIndex}"
class="block w-full h-full px-3 py-2 border ${
isAnswered ?
(oIndex === q.correctAnswer ?
'border-green-300 bg-green-50/50 text-green-700' :
'border-gray-200 text-gray-600') :
'border-gray-200 hover:border-primary-300 bg-white text-gray-700'
} rounded-lg cursor-pointer transition-all duration-200 flex items-start gap-2 text-sm ripple">
<span class="flex-none w-4 h-4 rounded-full border ${
isAnswered ?
(oIndex === q.correctAnswer ?
'bg-green-500 border-green-500 text-white' :
'border-gray-300 bg-white') :
'border-gray-400 group-hover:border-primary-500 bg-white'
} flex items-center justify-center mt-1">
${isAnswered && oIndex === q.correctAnswer ?
'<i class="fas fa-check text-[8px]"></i>' :
(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>')
}
</span>
<span>${option}</span>
</label>
</div>
`).join('')}
</div>
<div class="mt-3 flex justify-end">
<button onclick="checkAnswer(${qIndex})"
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 ${
isAnswered ? 'hidden' : ''
}">
<i class="fas fa-check-circle mr-2"></i>
تأكيد الإجابة
</button>
</div>
${isAnswered ? `
<div class="mt-3 pt-2 border-t border-gray-100/50">
<p class="text-xs text-gray-600">
<i class="fas fa-info-circle text-primary-500 mr-1"></i>
تمت إجابة هذا السؤال سابقاً
</p>
</div>
` : ''}
</div>
`;
}).join('')}
</div>
<div class="mt-6 pt-4 border-t border-gray-200/50">
<h3 class="text-lg font-bold text-gray-800 mb-3">إحصائيات القسم</h3>
<div class="grid grid-cols-1 md:grid-cols-3 gap-3">
<div class="bg-white rounded-xl p-3 border border-gray-200/70 shadow-xs">
<div class="flex items-center justify-between mb-1">
<h4 class="text-sm font-medium text-gray-600">معدل الدقة</h4>
<span class="text-lg font-bold text-dark-800">${questions.length ? Math.round((answeredCount/questions.length)*100) : 0}%</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-1.5 overflow-hidden">
<div class="h-full rounded-full bg-gradient-to-r ${level.color}" style="width: ${questions.length ? (answeredCount/questions.length)*100 : 0}%"></div>
</div>
</div>
<div class="bg-white rounded-xl p-3 border border-gray-200/70 shadow-xs">
<div class="flex items-center justify-between mb-1">
<h4 class="text-sm font-medium text-gray-600">الأسئلة المتبقية</h4>
<span class="text-lg font-bold text-dark-800">${questions.length - answeredCount}</span>
</div>
<p class="text-xs text-gray-500">من أصل ${questions.length} سؤال</p>
</div>
<div class="bg-white rounded-xl p-3 border border-gray-200/70 shadow-xs">
<div class="flex items-center justify-between mb-1">
<h4 class="text-sm font-medium text-gray-600">النقاط المحتملة</h4>
<span class="text-lg font-bold text-dark-800">${(questions.length - answeredCount)*50}</span>
</div>
<p class="text-xs text-gray-500">50 نقطة لكل إجابة جديدة</p>
</div>
</div>
</div>
` : `
<div class="bg-gray-50 rounded-xl p-8 text-center border border-dashed border-gray-300">
<div class="w-16 h-16 mx-auto rounded-xl bg-gray-200 text-gray-400 flex items-center justify-center mb-4">
<i class="fas fa-comment-slash text-2xl"></i>
</div>
<h4 class="text-gray-600 font-medium mb-2">لا توجد أسئلة متاحة</h4>
<p class="text-xs text-gray-500 mb-5">سيتم إضافة أسئلة لهذا القسم قريباً</p>
<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">
<i class="fas fa-chevron-left"></i>
<span>العودة إلى الأقسام</span>
</button>
</div>
`}
`;
document.getElementById('quiz-mode-btn')?.addEventListener('click', () => {
showToast('سيتم تفعيل وضع الاختبار قريباً في التحديثات القادمة', 'info');
});
};
window.checkAnswer = function(questionIndex) {
const question = state.questions[state.currentLevel][state.currentSection][questionIndex];
const selectedOption = document.querySelector(`input[name=q${questionIndex}]:checked`);
if (!selectedOption) {
showToast('الرجاء اختيار إجابة أولاً', 'warning');
return;
}
const isCorrect = parseInt(selectedOption.value) === question.correctAnswer;
const questionElement = document.getElementById(`question-${questionIndex}`);
const feedbackElement = document.createElement('div');
feedbackElement.className = `mt-3 p-2 rounded-lg text-xs flex items-center gap-2 ${
isCorrect ? 'bg-green-50 text-success' : 'bg-red-50 text-danger'
} border ${
isCorrect ? 'border-green-100' : 'border-red-100'
}`;
feedbackElement.innerHTML = `
<i class="fas ${
isCorrect ? 'fa-check-circle' : 'fa-times-circle'
}"></i>
<span>${isCorrect ? 'إجابة صحيحة! +50 نقطة' : 'إجابة خاطئة، حاول مرة أخرى!'}</span>
`;
questionElement.querySelector('button').insertAdjacentElement('beforebegin', feedbackElement);
if (isCorrect) {
// Only add points if not already answered
if (!question.answered) {
state.points += 50;
question.answered = true;
state.questions[state.currentLevel][state.currentSection][questionIndex].answered = true;
updatePoints();
checkLevelUnlocks();
// Mark as answered
localStorage.setItem(`answered-${state.currentLevel}-${state.currentSection}-${questionIndex}`, 'true');
localStorage.setItem('questions', JSON.stringify(state.questions));
// Disable all options and show correct answer
document.querySelectorAll(`#question-${questionIndex} input[type="radio"]`).forEach(input => {
input.disabled = true;
});
// Update UI to show answered state
setTimeout(() => {
questionElement.classList.add('border-green-100', 'bg-green-50/20');
questionElement.querySelector('button').classList.add('hidden');
// Add checkmark at the top right
const checkmark = document.createElement('div');
checkmark.className = 'absolute top-2 right-2 w-6 h-6 rounded-lg bg-success/10 text-success flex items-center justify-center';
checkmark.innerHTML = '<i class="fas fa-check text-xs"></i>';
questionElement.prepend(checkmark);
// Reload section to update progress bars
setTimeout(() => loadSectionContent(state.currentSection), 1500);
}, 1000);
}
}
};
function checkLevelUnlocks() {
state.levels.forEach(level => {
if (state.points >= level.requiredPoints && !state.unlockedLevels.includes(level.id)) {
state.unlockedLevels.push(level.id);
level.unlocked = true;
showUnlockedModal(level.name);
}
});
localStorage.setItem('unlockedLevels', JSON.stringify(state.unlockedLevels));
updateDashboardStats();
}
// Initialize the app
init();
// Smoothly show the page
setTimeout(() => {
document.body.style.opacity = '1';
document.body.style.transition = 'opacity 0.3s ease';
}, 50);
</script>
<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>
</html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>إكسبلورا | منصة التعلم الذكي</title>
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: {
50: '#f0f9ff',
100: '#e0f2fe',
500: '#4f46e5',
600: '#4338ca',
},
secondary: {
500: '#ec4899',
600: '#db2777',
},
success: '#10b981',
warning: '#f59e0b',
danger: '#ef4444',
dark: {
800: '#1e293b',
900: '#0f172a'
}
},
fontFamily: {
'tajawal': ['Tajawal', 'sans-serif'],
'sans': ['Tajawal', 'sans-serif']
},
boxShadow: {
'soft': '0 4px 20px rgba(0, 0, 0, 0.05)',
'hard': '0 8px 30px rgba(0, 0, 0, 0.1)',
'glow': '0 0 20px 5px rgba(79, 70, 229, 0.15)',
'inner-xl': 'inset 0 4px 12px rgba(0, 0, 0, 0.05)'
},
animation: {
'bounce-slow': 'bounce-slow 2s infinite',
'pulse-slow': 'pulse-slow 3s infinite',
'float': 'float 6s ease-in-out infinite',
},
keyframes: {
'bounce-slow': {
'0%, 100%': { transform: 'translateY(0)' },
'50%': { transform: 'translateY(-10px)' },
},
'pulse-slow': {
'0%, 100%': { opacity: 1 },
'50%': { opacity: 0.7 },
},
'float': {
'0%, 100%': { transform: 'translateY(0)' },
'50%': { transform: 'translateY(-15px)' },
}
}
}
}
}
</script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap');
* {
-webkit-tap-highlight-color: transparent;
}
body {
font-family: 'Tajawal', sans-serif;
background-color: #f8fafc;
transition: all 0.3s ease;
}
.gradient-bg {
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}
.fade-in {
animation: fadeIn 0.5s ease-in-out forwards;
}
.slide-up {
animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.gradient-text {
background-clip: text;
-webkit-background-clip: text;
color: transparent;
}
.text-stroke {
-webkit-text-stroke: 1px rgba(255,255,255,0.3);
text-stroke: 1px rgba(255,255,255,0.3);
}