Zhasjsjsus commited on
Commit
3dcdbea
·
verified ·
1 Parent(s): fb50406

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +874 -609
index.html CHANGED
@@ -1,626 +1,891 @@
1
  <!DOCTYPE html>
2
  <html lang="ar" dir="rtl">
3
-
4
  <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>نظام الاختراق المتقدم | Advanced Penetration System</title>
8
- <script src="https://cdn.tailwindcss.com"></script>
9
- <link
10
- href="https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Noto+Sans+Arabic:wght@400;700&display=swap"
11
- rel="stylesheet">
12
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
13
- <style>
14
- :root {
15
- --primary: #2563eb;
16
- --secondary: #3b82f6;
17
- --danger: #dc2626;
18
- --bg: #ffffff;
19
- --surface: #f8fafc;
20
- --text: #0f172a;
21
- --text-muted: #64748b;
22
- --border: #e2e8f0;
23
- --glass: rgba(255, 255, 255, 0.8);
24
- }
25
-
26
- * {
27
- margin: 0;
28
- padding: 0;
29
- box-sizing: border-box;
30
- }
31
-
32
- body {
33
- font-family: 'Share Tech Mono', 'Noto Sans Arabic', monospace;
34
- background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
35
- color: var(--text);
36
- overflow: hidden;
37
- height: 100vh;
38
- }
39
-
40
- /* Subtle Grid Background */
41
- .grid-bg {
42
- background-image:
43
- linear-gradient(rgba(37, 99, 235, 0.05) 1px, transparent 1px),
44
- linear-gradient(90deg, rgba(37, 99, 235, 0.05) 1px, transparent 1px);
45
- background-size: 50px 50px;
46
- position: absolute;
47
- top: 0;
48
- left: 0;
49
- right: 0;
50
- bottom: 0;
51
- z-index: -1;
52
- }
53
-
54
- /* Glass Panel - White Theme */
55
- .glass-panel {
56
- background: rgba(255, 255, 255, 0.9);
57
- backdrop-filter: blur(12px);
58
- border: 1px solid rgba(226, 232, 240, 0.8);
59
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
60
- border-radius: 12px;
61
- }
62
-
63
- /* Custom Scrollbar */
64
- ::-webkit-scrollbar {
65
- width: 8px;
66
- }
67
-
68
- ::-webkit-scrollbar-track {
69
- background: #f1f5f9;
70
- }
71
-
72
- ::-webkit-scrollbar-thumb {
73
- background: #cbd5e1;
74
- border-radius: 4px;
75
- }
76
-
77
- ::-webkit-scrollbar-thumb:hover {
78
- background: #94a3b8;
79
- }
80
-
81
- /* Progress Bar - Blue Theme */
82
- .progress-bar {
83
- background: #e2e8f0;
84
- border: 1px solid #cbd5e1;
85
- height: 20px;
86
- position: relative;
87
- overflow: hidden;
88
- border-radius: 6px;
89
- }
90
-
91
- .progress-fill {
92
- background: linear-gradient(90deg, #3b82f6, #2563eb);
93
- height: 100%;
94
- width: 0%;
95
- transition: width 0.3s ease;
96
- box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
97
- }
98
-
99
- /* Blink Animation */
100
- .blink {
101
- animation: blink 1s infinite;
102
- }
103
-
104
- @keyframes blink {
105
- 0%, 50% { opacity: 1; }
106
- 51%, 100% { opacity: 0; }
107
- }
108
-
109
- /* Typing Effect */
110
- .typing::after {
111
- content: '▋';
112
- animation: cursor 1s infinite;
113
- color: var(--primary);
114
- }
115
-
116
- @keyframes cursor {
117
- 0%, 50% { opacity: 1; }
118
- 51%, 100% { opacity: 0; }
119
- }
120
-
121
- /* Warning Pulse - Red Theme */
122
- .warning-pulse {
123
- animation: warningPulse 2s infinite;
124
- }
125
-
126
- @keyframes warningPulse {
127
- 0%, 100% {
128
- box-shadow: 0 0 5px rgba(220, 38, 38, 0.3);
129
- border-color: rgba(220, 38, 38, 0.5);
130
- }
131
- 50% {
132
- box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
133
- border-color: rgba(220, 38, 38, 0.8);
134
- }
135
- }
136
-
137
- /* Input Styling */
138
- input, select {
139
- background: #ffffff;
140
- border: 1px solid #cbd5e1;
141
- color: #0f172a;
142
- transition: all 0.2s;
143
- }
144
-
145
- input:focus, select:focus {
146
- outline: none;
147
- border-color: #3b82f6;
148
- box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
149
- }
150
-
151
- /* Button Styling */
152
- .btn-primary {
153
- background: linear-gradient(135deg, #3b82f6, #2563eb);
154
- color: white;
155
- border: none;
156
- transition: all 0.3s;
157
- box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
158
- }
159
-
160
- .btn-primary:hover {
161
- transform: translateY(-1px);
162
- box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
163
- }
164
-
165
- /* Terminal Text */
166
- .terminal-text {
167
- font-family: 'Share Tech Mono', monospace;
168
- color: #334155;
169
- }
170
-
171
- /* Header Styling */
172
- header {
173
- background: rgba(255, 255, 255, 0.95);
174
- backdrop-filter: blur(12px);
175
- border-bottom: 1px solid #e2e8f0;
176
- }
177
-
178
- /* Status Indicators */
179
- .status-dot {
180
- width: 8px;
181
- height: 8px;
182
- border-radius: 50%;
183
- display: inline-block;
184
- margin-left: 6px;
185
- }
186
-
187
- .status-active {
188
- background: #10b981;
189
- box-shadow: 0 0 8px #10b981;
190
- }
191
-
192
- /* Hex Pattern */
193
- .hex-pattern {
194
- position: absolute;
195
- font-size: 12px;
196
- opacity: 0.1;
197
- pointer-events: none;
198
- font-family: monospace;
199
- color: #64748b;
200
- }
201
-
202
- /* Log Entry */
203
- .log-entry {
204
- border-right: 3px solid transparent;
205
- padding: 4px 8px;
206
- margin: 2px 0;
207
- font-size: 0.85rem;
208
- transition: all 0.2s;
209
- }
210
-
211
- .log-entry:hover {
212
- background: rgba(241, 245, 249, 0.8);
213
- border-right-color: #3b82f6;
214
- }
215
-
216
- .log-success { color: #059669; }
217
- .log-warning { color: #d97706; }
218
- .log-error { color: #dc2626; }
219
- .log-info { color: #2563eb; }
220
-
221
- /* Smooth transitions */
222
- * {
223
- transition: background-color 0.3s, border-color 0.3s;
224
- }
225
- </style>
226
- </head>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
  <body>
229
- <div class="grid-bg"></div>
230
-
231
- <!-- Header -->
232
- <header class="relative z-10 p-4 sticky top-0">
233
- <div class="container mx-auto flex justify-between items-center flex-wrap gap-4">
234
- <div class="flex items-center gap-4">
235
- <div class="w-12 h-12 bg-blue-600 rounded-lg flex items-center justify-center text-white shadow-lg">
236
- <i class="fas fa-shield-alt text-2xl"></i>
237
- </div>
238
- <div>
239
- <h1 class="text-2xl font-bold text-slate-800 tracking-tight">نظام الاختراق المتقدم</h1>
240
- <p class="text-xs text-slate-500 font-medium">Advanced Penetration Testing Framework v9.0.1</p>
241
- </div>
242
- </div>
243
-
244
- <div class="flex items-center gap-6 text-sm">
245
- <div class="hidden md:flex items-center bg-white px-4 py-2 rounded-full border border-slate-200 shadow-sm">
246
- <span class="text-slate-500 ml-2">IP:</span>
247
- <span class="font-mono text-slate-700 font-semibold" id="userIp">192.168.1.105</span>
248
- </div>
249
- <div class="hidden md:flex items-center bg-white px-4 py-2 rounded-full border border-slate-200 shadow-sm">
250
- <span class="text-slate-500 ml-2">STATUS:</span>
251
- <span class="flex items-center text-emerald-600 font-semibold">
252
- <span class="status-dot status-active"></span>
253
- CONNECTED
254
- </span>
255
- </div>
256
- <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank"
257
- class="px-4 py-2 bg-slate-800 text-white rounded-lg hover:bg-slate-700 transition-all text-xs font-medium shadow-lg hover:shadow-xl">
258
- Built with anycoder
259
- </a>
260
- </div>
261
- </div>
262
- </header>
263
-
264
- <!-- Main Interface -->
265
- <main class="relative z-10 container mx-auto p-4 h-[calc(100vh-80px)] flex flex-col lg:flex-row gap-4">
266
-
267
- <!-- Left Panel - Controls -->
268
- <aside class="lg:w-1/4 flex flex-col gap-4">
269
- <!-- Target Input -->
270
- <div class="glass-panel p-5">
271
- <h3 class="text-lg mb-4 text-slate-800 font-bold border-b border-slate-200 pb-3 flex items-center">
272
- <i class="fas fa-crosshairs ml-2 text-blue-600"></i>
273
- الهدف المستهدف
274
- </h3>
275
- <div class="space-y-4">
276
- <div>
277
- <label class="text-xs text-slate-500 block mb-2 font-semibold uppercase tracking-wider">عنوان IP / نطاق</label>
278
- <input type="text" id="targetInput" placeholder="192.168.1.1"
279
- class="w-full rounded-lg p-3 font-mono text-sm bg-slate-50">
280
- </div>
281
- <div>
282
- <label class="text-xs text-slate-500 block mb-2 font-semibold uppercase tracking-wider">نوع الهجوم</label>
283
- <select id="attackType" class="w-full rounded-lg p-3 text-sm bg-slate-50 cursor-pointer">
284
- <option value="brute">Brute Force</option>
285
- <option value="ddos">DDoS Simulation</option>
286
- <option value="injection">SQL Injection</option>
287
- <option value="mitm">Man in the Middle</option>
288
- <option value="ransomware">Ransomware Deploy</option>
289
- </select>
290
- </div>
291
- <button onclick="startHack()" class="w-full btn-primary py-3 rounded-lg font-bold text-sm uppercase tracking-wider flex items-center justify-center gap-2">
292
- <i class="fas fa-play"></i>
293
- بدء العملية
294
- </button>
295
- </div>
296
- </div>
297
-
298
- <!-- System Stats -->
299
- <div class="glass-panel p-5 flex-1">
300
- <h3 class="text-lg mb-4 text-slate-800 font-bold border-b border-slate-200 pb-3 flex items-center">
301
- <i class="fas fa-microchip ml-2 text-blue-600"></i>
302
- موارد النظام
303
- </h3>
304
- <div class="space-y-5">
305
- <div>
306
- <div class="flex justify-between text-xs mb-2 font-semibold text-slate-600">
307
- <span>CPU Usage</span>
308
- <span id="cpuPercent" class="font-mono text-blue-600">0%</span>
309
- </div>
310
- <div class="progress-bar">
311
- <div id="cpuBar" class="progress-fill"></div>
312
- </div>
313
- </div>
314
- <div>
315
- <div class="flex justify-between text-xs mb-2 font-semibold text-slate-600">
316
- <span>Memory</span>
317
- <span id="memPercent" class="font-mono text-blue-600">0%</span>
318
- </div>
319
- <div class="progress-bar">
320
- <div id="memBar" class="progress-fill"></div>
321
- </div>
322
- </div>
323
- <div>
324
- <div class="flex justify-between text-xs mb-2 font-semibold text-slate-600">
325
- <span>Network</span>
326
- <span id="netPercent" class="font-mono text-blue-600">0%</span>
327
- </div>
328
- <div class="progress-bar">
329
- <div id="netBar" class="progress-fill"></div>
330
- </div>
331
- </div>
332
- </div>
333
-
334
- <!-- Active Connections -->
335
- <div class="mt-6">
336
- <h4 class="text-sm mb-3 text-slate-600 font-semibold border-b border-slate-100 pb-2">الاتصالات النشطة</h4>
337
- <div id="connectionsList" class="space-y-2 max-h-40 overflow-y-auto text-xs font-mono">
338
- <div class="flex justify-between items-center p-2 bg-slate-50 rounded border border-slate-100">
339
- <span class="text-slate-600">192.168.1.1:443</span>
340
- <span class="text-emerald-600 font-bold">ESTABLISHED</span>
341
- </div>
342
- <div class="flex justify-between items-center p-2 bg-slate-50 rounded border border-slate-100">
343
- <span class="text-slate-600">10.0.0.5:22</span>
344
- <span class="text-emerald-600 font-bold">ESTABLISHED</span>
345
- </div>
346
- <div class="flex justify-between items-center p-2 bg-slate-50 rounded border border-slate-100">
347
- <span class="text-slate-600">172.16.0.1:8080</span>
348
- <span class="text-amber-600 font-bold">PENDING</span>
349
- </div>
350
- </div>
351
- </div>
352
- </div>
353
- </aside>
354
-
355
- <!-- Center Panel - Terminal -->
356
- <section class="lg:w-1/2 flex flex-col gap-4">
357
- <div class="glass-panel flex-1 flex flex-col overflow-hidden">
358
- <div class="bg-slate-100 border-b border-slate-200 p-3 flex justify-between items-center">
359
- <div class="flex items-center gap-2">
360
- <div class="flex gap-1.5">
361
- <div class="w-3 h-3 rounded-full bg-red-400"></div>
362
- <div class="w-3 h-3 rounded-full bg-amber-400"></div>
363
- <div class="w-3 h-3 rounded-full bg-emerald-400"></div>
364
  </div>
365
- <span class="text-xs text-slate-500 font-mono ml-3">terminal — bash — 80x24</span>
366
- </div>
367
- <div class="flex gap-2">
368
- <button onclick="clearTerminal()" class="text-xs text-slate-500 hover:text-slate-700 px-2 py-1 rounded hover:bg-slate-200 transition-colors">
369
- <i class="fas fa-trash-alt"></i>
370
  </button>
371
- <button onclick="copyTerminal()" class="text-xs text-slate-500 hover:text-slate-700 px-2 py-1 rounded hover:bg-slate-200 transition-colors">
372
- <i class="fas fa-copy"></i>
373
- </button>
374
- </div>
375
- </div>
376
- <div id="terminal" class="flex-1 p-4 overflow-y-auto font-mono text-sm bg-white/50 terminal-text space-y-1">
377
- <div class="log-entry log-info">[INFO] System initialized successfully...</div>
378
- <div class="log-entry log-info">[INFO] Loading penetration testing modules...</div>
379
- <div class="log-entry log-success">[OK] Modules loaded: 156/156</div>
380
- <div class="log-entry log-info">[INFO] Waiting for target specification...</div>
381
- <div class="typing text-slate-400 mt-2">root@white-hat:~# <span class="text-slate-600">_</span></div>
382
- </div>
383
- </div>
384
-
385
- <!-- Quick Actions -->
386
- <div class="glass-panel p-4">
387
- <h3 class="text-sm font-bold text-slate-700 mb-3 uppercase tracking-wider">أدوات سريعة</h3>
388
- <div class="grid grid-cols-4 gap-2">
389
- <button onclick="runTool('nmap')" class="p-3 bg-slate-50 hover:bg-blue-50 border border-slate-200 hover:border-blue-300 rounded-lg transition-all group">
390
- <i class="fas fa-network-wired text-slate-400 group-hover:text-blue-600 text-lg mb-1 block"></i>
391
- <span class="text-xs text-slate-600 font-medium">Nmap</span>
392
- </button>
393
- <button onclick="runTool('metasploit')" class="p-3 bg-slate-50 hover:bg-blue-50 border border-slate-200 hover:border-blue-300 rounded-lg transition-all group">
394
- <i class="fas fa-bug text-slate-400 group-hover:text-blue-600 text-lg mb-1 block"></i>
395
- <span class="text-xs text-slate-600 font-medium">Metasploit</span>
396
- </button>
397
- <button onclick="runTool('wireshark')" class="p-3 bg-slate-50 hover:bg-blue-50 border border-slate-200 hover:border-blue-300 rounded-lg transition-all group">
398
- <i class="fas fa-shark text-slate-400 group-hover:text-blue-600 text-lg mb-1 block"></i>
399
- <span class="text-xs text-slate-600 font-medium">Wireshark</span>
400
- </button>
401
- <button onclick="runTool('burp')" class="p-3 bg-slate-50 hover:bg-blue-50 border border-slate-200 hover:border-blue-300 rounded-lg transition-all group">
402
- <i class="fas fa-search text-slate-400 group-hover:text-blue-600 text-lg mb-1 block"></i>
403
- <span class="text-xs text-slate-600 font-medium">Burp Suite</span>
404
- </button>
405
- </div>
406
- </div>
407
- </section>
408
-
409
- <!-- Right Panel - Results -->
410
- <aside class="lg:w-1/4 flex flex-col gap-4">
411
- <!-- Vulnerability Scanner -->
412
- <div class="glass-panel p-5 flex-1">
413
- <h3 class="text-lg mb-4 text-slate-800 font-bold border-b border-slate-200 pb-3 flex items-center">
414
- <i class="fas fa-bug ml-2 text-red-500"></i>
415
- الثغرات المكتشفة
416
- </h3>
417
- <div id="vulnerabilities" class="space-y-3 overflow-y-auto max-h-96">
418
- <div class="p-3 bg-red-50 border border-red-100 rounded-lg warning-pulse">
419
- <div class="flex items-center gap-2 mb-1">
420
- <i class="fas fa-exclamation-triangle text-red-600"></i>
421
- <span class="font-bold text-red-700 text-sm">CVE-2023-38408</span>
422
- </div>
423
- <p class="text-xs text-red-600 leading-relaxed">OpenSSH Forwarded SSH-Agent Remote Code Execution</p>
424
- <div class="mt-2 flex gap-2">
425
- <span class="text-xs bg-red-200 text-red-800 px-2 py-0.5 rounded font-bold">CVSS: 9.8</span>
426
- <span class="text-xs bg-red-100 text-red-700 px-2 py-0.5 rounded">Critical</span>
427
  </div>
428
- </div>
429
 
430
- <div class="p-3 bg-amber-50 border border-amber-100 rounded-lg">
431
- <div class="flex items-center gap-2 mb-1">
432
- <i class="fas fa-exclamation-circle text-amber-600"></i>
433
- <span class="font-bold text-amber-700 text-sm">CVE-2023-29357</span>
 
 
 
 
 
 
434
  </div>
435
- <p class="text-xs text-amber-700 leading-relaxed">Microsoft SharePoint Server Elevation of Privilege</p>
436
- <div class="mt-2 flex gap-2">
437
- <span class="text-xs bg-amber-200 text-amber-800 px-2 py-0.5 rounded font-bold">CVSS: 8.8</span>
438
- <span class="text-xs bg-amber-100 text-amber-700 px-2 py-0.5 rounded">High</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
439
  </div>
440
- </div>
441
 
442
- <div class="p-3 bg-blue-50 border border-blue-100 rounded-lg">
443
- <div class="flex items-center gap-2 mb-1">
444
- <i class="fas fa-info-circle text-blue-600"></i>
445
- <span class="font-bold text-blue-700 text-sm">CVE-2023-36884</span>
446
  </div>
447
- <p class="text-xs text-blue-700 leading-relaxed">Office and Windows HTML Remote Code Execution</p>
448
- <div class="mt-2 flex gap-2">
449
- <span class="text-xs bg-blue-200 text-blue-800 px-2 py-0.5 rounded font-bold">CVSS: 7.5</span>
450
- <span class="text-xs bg-blue-100 text-blue-700 px-2 py-0.5 rounded">Medium</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
451
  </div>
452
- </div>
453
- </div>
454
- </div>
455
-
456
- <!-- Network Map -->
457
- <div class="glass-panel p-5">
458
- <h3 class="text-lg mb-4 text-slate-800 font-bold border-b border-slate-200 pb-3 flex items-center">
459
- <i class="fas fa-project-diagram ml-2 text-blue-600"></i>
460
- خريطة الشبكة
461
- </h3>
462
- <div class="relative h-48 bg-slate-50 rounded-lg border border-slate-200 overflow-hidden">
463
- <canvas id="networkCanvas" class="w-full h-full"></canvas>
464
- <div class="absolute bottom-2 right-2 text-xs text-slate-400 bg-white/80 px-2 py-1 rounded backdrop-blur">
465
- Live Topology
466
- </div>
467
- </div>
468
- </div>
469
- </aside>
470
-
471
- </main>
472
-
473
- <script>
474
- // System Stats Simulation
475
- function updateStats() {
476
- const cpu = Math.floor(Math.random() * 30) + 20;
477
- const mem = Math.floor(Math.random() * 20) + 40;
478
- const net = Math.floor(Math.random() * 50) + 10;
479
-
480
- document.getElementById('cpuPercent').textContent = cpu + '%';
481
- document.getElementById('cpuBar').style.width = cpu + '%';
482
-
483
- document.getElementById('memPercent').textContent = mem + '%';
484
- document.getElementById('memBar').style.width = mem + '%';
485
-
486
- document.getElementById('netPercent').textContent = net + '%';
487
- document.getElementById('netBar').style.width = net + '%';
488
- }
489
-
490
- setInterval(updateStats, 2000);
491
- updateStats();
492
-
493
- // Terminal Functions
494
- function addLog(message, type = 'info') {
495
- const terminal = document.getElementById('terminal');
496
- const entry = document.createElement('div');
497
- entry.className = `log-entry log-${type}`;
498
-
499
- const timestamp = new Date().toLocaleTimeString('en-US', { hour12: false });
500
- entry.textContent = `[${timestamp}] ${message}`;
501
-
502
- terminal.insertBefore(entry, terminal.lastElementChild);
503
- terminal.scrollTop = terminal.scrollHeight;
504
- }
505
-
506
- function clearTerminal() {
507
- const terminal = document.getElementById('terminal');
508
- terminal.innerHTML = '<div class="typing text-slate-400 mt-2">root@white-hat:~# <span class="text-slate-600">_</span></div>';
509
- }
510
-
511
- function copyTerminal() {
512
- const terminal = document.getElementById('terminal');
513
- const text = terminal.innerText;
514
- navigator.clipboard.writeText(text);
515
- addLog('Terminal content copied to clipboard', 'success');
516
- }
517
-
518
- // Attack Simulation
519
- function startHack() {
520
- const target = document.getElementById('targetInput').value || '192.168.1.1';
521
- const type = document.getElementById('attackType').value;
522
-
523
- addLog(`Initializing ${type} attack on ${target}...`, 'warning');
524
-
525
- let steps = 0;
526
- const maxSteps = 5;
527
-
528
- const interval = setInterval(() => {
529
- steps++;
530
- const progress = (steps / maxSteps) * 100;
531
-
532
- if (steps === 1) addLog('Establishing secure connection...', 'info');
533
- if (steps === 2) addLog('Bypassing firewall rules...', 'warning');
534
- if (steps === 3) addLog('Exploiting vulnerability...', 'warning');
535
- if (steps === 4) addLog('Deploying payload...', 'error');
536
- if (steps === 5) {
537
- addLog('Attack completed successfully!', 'success');
538
- addLog(`Access gained to ${target}`, 'success');
539
- clearInterval(interval);
540
- }
541
- }, 1500);
542
- }
543
-
544
- function runTool(tool) {
545
- addLog(`Launching ${tool}...`, 'info');
546
- setTimeout(() => {
547
- addLog(`${tool} initialized successfully`, 'success');
548
- }, 800);
549
- }
550
-
551
- // Network Canvas Animation
552
- const canvas = document.getElementById('networkCanvas');
553
- const ctx = canvas.getContext('2d');
554
-
555
- function resizeCanvas() {
556
- canvas.width = canvas.offsetWidth;
557
- canvas.height = canvas.offsetHeight;
558
- }
559
- resizeCanvas();
560
- window.addEventListener('resize', resizeCanvas);
561
-
562
- const nodes = [];
563
- for (let i = 0; i < 8; i++) {
564
- nodes.push({
565
- x: Math.random() * canvas.width,
566
- y: Math.random() * canvas.height,
567
- vx: (Math.random() - 0.5) * 0.5,
568
- vy: (Math.random() - 0.5) * 0.5
569
- });
570
- }
571
-
572
- function drawNetwork() {
573
- ctx.clearRect(0, 0, canvas.width, canvas.height);
574
-
575
- // Draw connections
576
- ctx.strokeStyle = 'rgba(148, 163, 184, 0.3)';
577
- ctx.lineWidth = 1;
578
- for (let i = 0; i < nodes.length; i++) {
579
- for (let j = i + 1; j < nodes.length; j++) {
580
- const dx = nodes[i].x - nodes[j].x;
581
- const dy = nodes[i].y - nodes[j].y;
582
- const dist = Math.sqrt(dx * dx + dy * dy);
583
- if (dist < 100) {
584
- ctx.beginPath();
585
- ctx.moveTo(nodes[i].x, nodes[i].y);
586
- ctx.lineTo(nodes[j].x, nodes[j].y);
587
- ctx.stroke();
588
- }
589
- }
590
- }
591
-
592
- // Draw nodes
593
- nodes.forEach(node => {
594
- node.x += node.vx;
595
- node.y += node.vy;
596
-
597
- if (node.x < 0 || node.x > canvas.width) node.vx *= -1;
598
- if (node.y < 0 || node.y > canvas.height) node.vy *= -1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
599
 
600
- ctx.beginPath();
601
- ctx.arc(node.x, node.y, 4, 0, Math.PI * 2);
602
- ctx.fillStyle = '#3b82f6';
603
- ctx.fill();
604
- });
605
-
606
- requestAnimationFrame(drawNetwork);
607
- }
608
- drawNetwork();
609
-
610
- // Add random hex patterns
611
- function addHexPatterns() {
612
- const container = document.body;
613
- for (let i = 0; i < 20; i++) {
614
- const hex = document.createElement('div');
615
- hex.className = 'hex-pattern';
616
- hex.style.left = Math.random() * 100 + '%';
617
- hex.style.top = Math.random() * 100 + '%';
618
- hex.textContent = Math.random().toString(16).substr(2, 8).toUpperCase();
619
- container.appendChild(hex);
620
- }
621
- }
622
- addHexPatterns();
623
- </script>
624
  </body>
625
-
626
  </html>
 
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>AI Studio - مساعد الذكاء الاصطناعي</title>
7
+ <link rel="preconnect" href="https://fonts.googleapis.com">
8
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
9
+ <link href="https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@300;400;600;700&family=Inter:wght@300;400;500;600&display=swap" rel="stylesheet">
10
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
11
+
12
+ <style>
13
+ :root {
14
+ --primary: #6366f1;
15
+ --primary-hover: #4f46e5;
16
+ --secondary: #ec4899;
17
+ --bg-dark: #0f172a;
18
+ --bg-card: rgba(30, 41, 59, 0.7);
19
+ --text-primary: #f8fafc;
20
+ --text-secondary: #cbd5e1;
21
+ --border: rgba(148, 163, 184, 0.2);
22
+ --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
23
+ --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
24
+ --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
25
+ }
26
+
27
+ * {
28
+ margin: 0;
29
+ padding: 0;
30
+ box-sizing: border-box;
31
+ }
32
+
33
+ body {
34
+ font-family: 'Noto Kufi Arabic', 'Inter', sans-serif;
35
+ background: var(--bg-dark);
36
+ color: var(--text-primary);
37
+ height: 100vh;
38
+ overflow: hidden;
39
+ background-image:
40
+ radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 20%),
41
+ radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 20%);
42
+ }
43
+
44
+ /* Glassmorphism Utilities */
45
+ .glass {
46
+ background: var(--bg-card);
47
+ backdrop-filter: blur(12px);
48
+ -webkit-backdrop-filter: blur(12px);
49
+ border: 1px solid var(--border);
50
+ }
51
+
52
+ /* Layout */
53
+ .app-container {
54
+ display: grid;
55
+ grid-template-columns: 280px 1fr;
56
+ height: 100vh;
57
+ gap: 1px;
58
+ background: var(--border);
59
+ }
60
+
61
+ /* Sidebar */
62
+ .sidebar {
63
+ background: rgba(15, 23, 42, 0.95);
64
+ display: flex;
65
+ flex-direction: column;
66
+ padding: 1.5rem;
67
+ gap: 1.5rem;
68
+ overflow-y: auto;
69
+ }
70
+
71
+ .logo {
72
+ display: flex;
73
+ align-items: center;
74
+ gap: 0.75rem;
75
+ font-size: 1.5rem;
76
+ font-weight: 700;
77
+ background: var(--gradient-1);
78
+ -webkit-background-clip: text;
79
+ -webkit-text-fill-color: transparent;
80
+ background-clip: text;
81
+ padding-bottom: 1rem;
82
+ border-bottom: 1px solid var(--border);
83
+ }
84
+
85
+ .nav-section {
86
+ display: flex;
87
+ flex-direction: column;
88
+ gap: 0.5rem;
89
+ }
90
+
91
+ .nav-title {
92
+ font-size: 0.75rem;
93
+ text-transform: uppercase;
94
+ letter-spacing: 0.05em;
95
+ color: var(--text-secondary);
96
+ margin-bottom: 0.5rem;
97
+ }
98
+
99
+ .nav-item {
100
+ display: flex;
101
+ align-items: center;
102
+ gap: 0.75rem;
103
+ padding: 0.75rem 1rem;
104
+ border-radius: 0.75rem;
105
+ cursor: pointer;
106
+ transition: all 0.3s ease;
107
+ color: var(--text-secondary);
108
+ border: 1px solid transparent;
109
+ }
110
+
111
+ .nav-item:hover {
112
+ background: rgba(99, 102, 241, 0.1);
113
+ color: var(--text-primary);
114
+ border-color: var(--border);
115
+ }
116
+
117
+ .nav-item.active {
118
+ background: rgba(99, 102, 241, 0.2);
119
+ color: var(--primary);
120
+ border-color: var(--primary);
121
+ }
122
+
123
+ .new-chat-btn {
124
+ background: var(--gradient-1);
125
+ color: white;
126
+ border: none;
127
+ padding: 1rem;
128
+ border-radius: 1rem;
129
+ font-family: inherit;
130
+ font-weight: 600;
131
+ cursor: pointer;
132
+ display: flex;
133
+ align-items: center;
134
+ justify-content: center;
135
+ gap: 0.5rem;
136
+ transition: transform 0.2s, box-shadow 0.2s;
137
+ box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
138
+ }
139
+
140
+ .new-chat-btn:hover {
141
+ transform: translateY(-2px);
142
+ box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
143
+ }
144
+
145
+ /* Main Content */
146
+ .main-content {
147
+ display: flex;
148
+ flex-direction: column;
149
+ background: var(--bg-dark);
150
+ position: relative;
151
+ }
152
+
153
+ .top-bar {
154
+ display: flex;
155
+ justify-content: space-between;
156
+ align-items: center;
157
+ padding: 1rem 2rem;
158
+ border-bottom: 1px solid var(--border);
159
+ background: rgba(15, 23, 42, 0.8);
160
+ backdrop-filter: blur(10px);
161
+ }
162
+
163
+ .model-selector {
164
+ display: flex;
165
+ align-items: center;
166
+ gap: 0.5rem;
167
+ padding: 0.5rem 1rem;
168
+ background: rgba(30, 41, 59, 0.5);
169
+ border: 1px solid var(--border);
170
+ border-radius: 0.5rem;
171
+ color: var(--text-primary);
172
+ font-family: inherit;
173
+ cursor: pointer;
174
+ }
175
+
176
+ .top-actions {
177
+ display: flex;
178
+ gap: 1rem;
179
+ align-items: center;
180
+ }
181
+
182
+ .icon-btn {
183
+ width: 40px;
184
+ height: 40px;
185
+ border-radius: 50%;
186
+ border: 1px solid var(--border);
187
+ background: transparent;
188
+ color: var(--text-secondary);
189
+ cursor: pointer;
190
+ display: flex;
191
+ align-items: center;
192
+ justify-content: center;
193
+ transition: all 0.3s;
194
+ }
195
+
196
+ .icon-btn:hover {
197
+ background: rgba(255,255,255,0.1);
198
+ color: var(--text-primary);
199
+ transform: rotate(15deg);
200
+ }
201
+
202
+ /* Chat Area */
203
+ .chat-container {
204
+ flex: 1;
205
+ overflow-y: auto;
206
+ padding: 2rem;
207
+ display: flex;
208
+ flex-direction: column;
209
+ gap: 1.5rem;
210
+ }
211
+
212
+ .welcome-screen {
213
+ display: flex;
214
+ flex-direction: column;
215
+ align-items: center;
216
+ justify-content: center;
217
+ height: 100%;
218
+ text-align: center;
219
+ gap: 2rem;
220
+ opacity: 0;
221
+ animation: fadeIn 0.8s forwards;
222
+ }
223
+
224
+ @keyframes fadeIn {
225
+ to { opacity: 1; }
226
+ }
227
+
228
+ .welcome-title {
229
+ font-size: 3rem;
230
+ font-weight: 700;
231
+ background: linear-gradient(to right, #fff, #a5b4fc);
232
+ -webkit-background-clip: text;
233
+ -webkit-text-fill-color: transparent;
234
+ }
235
+
236
+ .welcome-subtitle {
237
+ color: var(--text-secondary);
238
+ font-size: 1.1rem;
239
+ max-width: 600px;
240
+ line-height: 1.8;
241
+ }
242
+
243
+ .features-grid {
244
+ display: grid;
245
+ grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
246
+ gap: 1rem;
247
+ width: 100%;
248
+ max-width: 800px;
249
+ margin-top: 2rem;
250
+ }
251
+
252
+ .feature-card {
253
+ background: var(--bg-card);
254
+ border: 1px solid var(--border);
255
+ padding: 1.5rem;
256
+ border-radius: 1rem;
257
+ text-align: right;
258
+ transition: transform 0.3s, border-color 0.3s;
259
+ cursor: pointer;
260
+ }
261
+
262
+ .feature-card:hover {
263
+ transform: translateY(-5px);
264
+ border-color: var(--primary);
265
+ }
266
+
267
+ .feature-icon {
268
+ font-size: 2rem;
269
+ margin-bottom: 1rem;
270
+ background: var(--gradient-2);
271
+ -webkit-background-clip: text;
272
+ -webkit-text-fill-color: transparent;
273
+ }
274
+
275
+ /* Messages */
276
+ .message {
277
+ display: flex;
278
+ gap: 1rem;
279
+ max-width: 80%;
280
+ animation: slideIn 0.3s ease;
281
+ }
282
+
283
+ @keyframes slideIn {
284
+ from {
285
+ opacity: 0;
286
+ transform: translateY(10px);
287
+ }
288
+ to {
289
+ opacity: 1;
290
+ transform: translateY(0);
291
+ }
292
+ }
293
+
294
+ .message.user {
295
+ margin-left: auto;
296
+ flex-direction: row-reverse;
297
+ }
298
+
299
+ .message-avatar {
300
+ width: 40px;
301
+ height: 40px;
302
+ border-radius: 50%;
303
+ display: flex;
304
+ align-items: center;
305
+ justify-content: center;
306
+ font-weight: 600;
307
+ flex-shrink: 0;
308
+ }
309
+
310
+ .message.user .message-avatar {
311
+ background: var(--gradient-1);
312
+ color: white;
313
+ }
314
+
315
+ .message.ai .message-avatar {
316
+ background: var(--bg-card);
317
+ border: 1px solid var(--border);
318
+ color: var(--secondary);
319
+ }
320
+
321
+ .message-content {
322
+ background: var(--bg-card);
323
+ padding: 1rem 1.5rem;
324
+ border-radius: 1.5rem;
325
+ border: 1px solid var(--border);
326
+ line-height: 1.8;
327
+ position: relative;
328
+ }
329
+
330
+ .message.user .message-content {
331
+ background: var(--gradient-1);
332
+ border: none;
333
+ color: white;
334
+ }
335
+
336
+ .message-image {
337
+ max-width: 100%;
338
+ border-radius: 1rem;
339
+ margin-top: 0.5rem;
340
+ border: 1px solid var(--border);
341
+ }
342
+
343
+ /* Input Area */
344
+ .input-container {
345
+ padding: 1.5rem 2rem;
346
+ background: rgba(15, 23, 42, 0.9);
347
+ border-top: 1px solid var(--border);
348
+ }
349
+
350
+ .input-wrapper {
351
+ max-width: 900px;
352
+ margin: 0 auto;
353
+ position: relative;
354
+ background: var(--bg-card);
355
+ border: 1px solid var(--border);
356
+ border-radius: 1.5rem;
357
+ padding: 0.75rem;
358
+ display: flex;
359
+ align-items: flex-end;
360
+ gap: 0.5rem;
361
+ transition: border-color 0.3s, box-shadow 0.3s;
362
+ }
363
+
364
+ .input-wrapper:focus-within {
365
+ border-color: var(--primary);
366
+ box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
367
+ }
368
+
369
+ .input-field {
370
+ flex: 1;
371
+ background: transparent;
372
+ border: none;
373
+ color: var(--text-primary);
374
+ font-family: inherit;
375
+ font-size: 1rem;
376
+ resize: none;
377
+ max-height: 200px;
378
+ padding: 0.5rem;
379
+ outline: none;
380
+ line-height: 1.5;
381
+ }
382
+
383
+ .input-field::placeholder {
384
+ color: var(--text-secondary);
385
+ }
386
+
387
+ .input-actions {
388
+ display: flex;
389
+ gap: 0.5rem;
390
+ padding: 0.25rem;
391
+ }
392
+
393
+ .input-btn {
394
+ width: 36px;
395
+ height: 36px;
396
+ border-radius: 50%;
397
+ border: none;
398
+ background: transparent;
399
+ color: var(--text-secondary);
400
+ cursor: pointer;
401
+ display: flex;
402
+ align-items: center;
403
+ justify-content: center;
404
+ transition: all 0.3s;
405
+ }
406
+
407
+ .input-btn:hover {
408
+ background: rgba(255,255,255,0.1);
409
+ color: var(--text-primary);
410
+ }
411
+
412
+ .send-btn {
413
+ background: var(--primary) !important;
414
+ color: white !important;
415
+ transform: scale(1);
416
+ transition: transform 0.2s, background 0.2s !important;
417
+ }
418
+
419
+ .send-btn:hover {
420
+ background: var(--primary-hover) !important;
421
+ transform: scale(1.05);
422
+ }
423
+
424
+ .send-btn:disabled {
425
+ opacity: 0.5;
426
+ cursor: not-allowed;
427
+ transform: scale(1);
428
+ }
429
+
430
+ /* Typing Indicator */
431
+ .typing-indicator {
432
+ display: none;
433
+ align-items: center;
434
+ gap: 0.5rem;
435
+ padding: 1rem 1.5rem;
436
+ background: var(--bg-card);
437
+ border-radius: 1.5rem;
438
+ border: 1px solid var(--border);
439
+ width: fit-content;
440
+ }
441
+
442
+ .typing-indicator.active {
443
+ display: flex;
444
+ }
445
+
446
+ .dot {
447
+ width: 8px;
448
+ height: 8px;
449
+ background: var(--text-secondary);
450
+ border-radius: 50%;
451
+ animation: bounce 1.4s infinite ease-in-out both;
452
+ }
453
+
454
+ .dot:nth-child(1) { animation-delay: -0.32s; }
455
+ .dot:nth-child(2) { animation-delay: -0.16s; }
456
+
457
+ @keyframes bounce {
458
+ 0%, 80%, 100% { transform: scale(0); }
459
+ 40% { transform: scale(1); }
460
+ }
461
 
462
+ /* Responsive */
463
+ @media (max-width: 768px) {
464
+ .app-container {
465
+ grid-template-columns: 1fr;
466
+ }
467
+
468
+ .sidebar {
469
+ display: none;
470
+ position: absolute;
471
+ z-index: 100;
472
+ width: 100%;
473
+ height: 100%;
474
+ }
475
+
476
+ .sidebar.active {
477
+ display: flex;
478
+ }
479
+
480
+ .welcome-title {
481
+ font-size: 2rem;
482
+ }
483
+
484
+ .message {
485
+ max-width: 90%;
486
+ }
487
+ }
488
+
489
+ /* Scrollbar */
490
+ ::-webkit-scrollbar {
491
+ width: 8px;
492
+ height: 8px;
493
+ }
494
+
495
+ ::-webkit-scrollbar-track {
496
+ background: transparent;
497
+ }
498
+
499
+ ::-webkit-scrollbar-thumb {
500
+ background: var(--border);
501
+ border-radius: 4px;
502
+ }
503
+
504
+ ::-webkit-scrollbar-thumb:hover {
505
+ background: var(--text-secondary);
506
+ }
507
+
508
+ /* Built with anycoder link */
509
+ .anycoder-badge {
510
+ position: fixed;
511
+ top: 20px;
512
+ left: 20px;
513
+ background: rgba(99, 102, 241, 0.2);
514
+ border: 1px solid var(--primary);
515
+ color: var(--primary);
516
+ padding: 0.5rem 1rem;
517
+ border-radius: 2rem;
518
+ font-size: 0.875rem;
519
+ text-decoration: none;
520
+ backdrop-filter: blur(10px);
521
+ z-index: 1000;
522
+ transition: all 0.3s;
523
+ }
524
+
525
+ .anycoder-badge:hover {
526
+ background: var(--primary);
527
+ color: white;
528
+ transform: translateY(-2px);
529
+ box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
530
+ }
531
+
532
+ .disclaimer {
533
+ position: fixed;
534
+ bottom: 10px;
535
+ left: 50%;
536
+ transform: translateX(-50%);
537
+ font-size: 0.75rem;
538
+ color: var(--text-secondary);
539
+ opacity: 0.7;
540
+ text-align: center;
541
+ pointer-events: none;
542
+ }
543
+ </style>
544
+ </head>
545
  <body>
546
+
547
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-badge">
548
+ <i class="fas fa-code"></i> Built with anycoder
549
+ </a>
550
+
551
+ <div class="app-container">
552
+ <!-- Sidebar -->
553
+ <aside class="sidebar glass">
554
+ <div class="logo">
555
+ <i class="fas fa-robot"></i>
556
+ <span>AI Studio</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
557
  </div>
558
+
559
+ <button class="new-chat-btn" onclick="startNewChat()">
560
+ <i class="fas fa-plus"></i>
561
+ محادثة جديدة
 
562
  </button>
563
+
564
+ <div class="nav-section">
565
+ <div class="nav-title">النماذج المتاحة</div>
566
+ <div class="nav-item active" onclick="selectModel('gpt-4')">
567
+ <i class="fas fa-brain"></i>
568
+ <span>GPT-4</span>
569
+ </div>
570
+ <div class="nav-item" onclick="selectModel('dalle')">
571
+ <i class="fas fa-image"></i>
572
+ <span>DALL-E 3</span>
573
+ </div>
574
+ <div class="nav-item" onclick="selectModel('claude')">
575
+ <i class="fas fa-comments"></i>
576
+ <span>Claude 3</span>
577
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
578
  </div>
 
579
 
580
+ <div class="nav-section" style="margin-top: auto;">
581
+ <div class="nav-title">الإعدادات</div>
582
+ <div class="nav-item" onclick="toggleTheme()">
583
+ <i class="fas fa-moon"></i>
584
+ <span>الوضع الليلي</span>
585
+ </div>
586
+ <div class="nav-item">
587
+ <i class="fas fa-key"></i>
588
+ <span>إعدادات API</span>
589
+ </div>
590
  </div>
591
+ </aside>
592
+
593
+ <!-- Main Content -->
594
+ <main class="main-content">
595
+ <header class="top-bar">
596
+ <div class="model-selector">
597
+ <i class="fas fa-chevron-down"></i>
598
+ <span id="current-model">GPT-4</span>
599
+ </div>
600
+
601
+ <div class="top-actions">
602
+ <button class="icon-btn" onclick="clearChat()" title="مسح المحادثة">
603
+ <i class="fas fa-trash-alt"></i>
604
+ </button>
605
+ <button class="icon-btn" onclick="toggleSidebar()" title="القائمة">
606
+ <i class="fas fa-bars"></i>
607
+ </button>
608
+ </div>
609
+ </header>
610
+
611
+ <div class="chat-container" id="chatContainer">
612
+ <div class="welcome-screen" id="welcomeScreen">
613
+ <h1 class="welcome-title">مرحباً بك في AI Studio</h1>
614
+ <p class="welcome-subtitle">
615
+ مساعد ذكي متقدم يدعم المحادثات النصية وتوليد الصور الإبداعية.
616
+ اختر نموذجاً من القائمة وابدأ المحادثة.
617
+ </p>
618
+
619
+ <div class="features-grid">
620
+ <div class="feature-card" onclick="setPrompt('اكتب قصة قصيرة عن المستقبل')">
621
+ <div class="feature-icon">
622
+ <i class="fas fa-pen-fancy"></i>
623
+ </div>
624
+ <h3>كتابة إبداعية</h3>
625
+ <p style="color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.5rem;">
626
+ قصص، مقالات، ومحتوى نصي متنوع
627
+ </p>
628
+ </div>
629
+
630
+ <div class="feature-card" onclick="setPrompt('ارسم منظر طبيعي لجبال مغطاة بالثلج')">
631
+ <div class="feature-icon">
632
+ <i class="fas fa-palette"></i>
633
+ </div>
634
+ <h3>توليد صور</h3>
635
+ <p style="color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.5rem;">
636
+ صور فنية وإبداعية عالية الجودة
637
+ </p>
638
+ </div>
639
+
640
+ <div class="feature-card" onclick="setPrompt('اشرح لي نظرية النسبية ببساطة')">
641
+ <div class="feature-icon">
642
+ <i class="fas fa-graduation-cap"></i>
643
+ </div>
644
+ <h3>شرح المفاهيم</h3>
645
+ <p style="color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.5rem;">
646
+ تبسيط العلوم والمعارف المعقدة
647
+ </p>
648
+ </div>
649
+ </div>
650
+ </div>
651
  </div>
 
652
 
653
+ <div class="typing-indicator" id="typingIndicator">
654
+ <div class="dot"></div>
655
+ <div class="dot"></div>
656
+ <div class="dot"></div>
657
  </div>
658
+
659
+ <div class="input-container">
660
+ <div class="input-wrapper">
661
+ <textarea
662
+ class="input-field"
663
+ id="userInput"
664
+ placeholder="اكتب رسالتك هنا..."
665
+ rows="1"
666
+ oninput="autoResize(this)"
667
+ onkeydown="handleKeyDown(event)"
668
+ ></textarea>
669
+ <div class="input-actions">
670
+ <button class="input-btn" title="إرفاق ملف" onclick="attachFile()">
671
+ <i class="fas fa-paperclip"></i>
672
+ </button>
673
+ <button class="input-btn send-btn" id="sendBtn" onclick="sendMessage()" title="إرسال">
674
+ <i class="fas fa-paper-plane"></i>
675
+ </button>
676
+ </div>
677
+ </div>
678
  </div>
679
+ </main>
680
+ </div>
681
+
682
+ <div class="disclaimer">
683
+ ملاحظة: هذا التطبيق يتطلب مفاتيح API للعمل. يجب الالتزام بشروط استخدام مزودي الخدمة.
684
+ </div>
685
+
686
+ <script>
687
+ let currentModel = 'gpt-4';
688
+ let chatHistory = [];
689
+ let isGenerating = false;
690
+
691
+ // Auto-resize textarea
692
+ function autoResize(textarea) {
693
+ textarea.style.height = 'auto';
694
+ textarea.style.height = Math.min(textarea.scrollHeight, 200) + 'px';
695
+ }
696
+
697
+ // Handle Enter key
698
+ function handleKeyDown(e) {
699
+ if (e.key === 'Enter' && !e.shiftKey) {
700
+ e.preventDefault();
701
+ sendMessage();
702
+ }
703
+ }
704
+
705
+ // Set prompt from feature cards
706
+ function setPrompt(text) {
707
+ document.getElementById('userInput').value = text;
708
+ document.getElementById('userInput').focus();
709
+ autoResize(document.getElementById('userInput'));
710
+ }
711
+
712
+ // Select model
713
+ function selectModel(model) {
714
+ currentModel = model;
715
+ document.getElementById('current-model').textContent =
716
+ model === 'gpt-4' ? 'GPT-4' :
717
+ model === 'dalle' ? 'DALL-E 3' : 'Claude 3';
718
+
719
+ // Update active state
720
+ document.querySelectorAll('.nav-item').forEach(item => {
721
+ item.classList.remove('active');
722
+ });
723
+ event.currentTarget.classList.add('active');
724
+ }
725
+
726
+ // Send message
727
+ async function sendMessage() {
728
+ const input = document.getElementById('userInput');
729
+ const message = input.value.trim();
730
+
731
+ if (!message || isGenerating) return;
732
+
733
+ // Hide welcome screen
734
+ document.getElementById('welcomeScreen').style.display = 'none';
735
+
736
+ // Add user message
737
+ addMessage(message, 'user');
738
+ input.value = '';
739
+ input.style.height = 'auto';
740
+
741
+ // Show typing indicator
742
+ isGenerating = true;
743
+ document.getElementById('sendBtn').disabled = true;
744
+ document.getElementById('typingIndicator').classList.add('active');
745
+
746
+ // Simulate AI response (In real app, this would call API)
747
+ setTimeout(() => {
748
+ let response;
749
+ if (currentModel === 'dalle') {
750
+ response = "لقد تم توليد الصورة بنجاح (تجريبي). في التطبيق الفعلي، ستظهر الصورة هنا.";
751
+ // Simulate image generation
752
+ addMessage(response, 'ai', true);
753
+ } else {
754
+ response = generateMockResponse(message);
755
+ addMessage(response, 'ai');
756
+ }
757
+
758
+ document.getElementById('typingIndicator').classList.remove('active');
759
+ isGenerating = false;
760
+ document.getElementById('sendBtn').disabled = false;
761
+ }, 1500 + Math.random() * 1000);
762
+ }
763
+
764
+ // Add message to chat
765
+ function addMessage(content, sender, isImage = false) {
766
+ const container = document.getElementById('chatContainer');
767
+ const messageDiv = document.createElement('div');
768
+ messageDiv.className = `message ${sender}`;
769
+
770
+ const avatar = document.createElement('div');
771
+ avatar.className = 'message-avatar';
772
+ avatar.innerHTML = sender === 'user' ? '<i class="fas fa-user"></i>' : '<i class="fas fa-robot"></i>';
773
+
774
+ const contentDiv = document.createElement('div');
775
+ contentDiv.className = 'message-content';
776
+
777
+ if (isImage && currentModel === 'dalle') {
778
+ // Simulate image placeholder
779
+ contentDiv.innerHTML = `
780
+ <div style="margin-bottom: 0.5rem;">${content}</div>
781
+ <div style="background: linear-gradient(45deg, #1e293b, #334155); height: 300px; border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; color: var(--text-secondary);">
782
+ <i class="fas fa-image" style="font-size: 3rem; opacity: 0.5;"></i>
783
+ </div>
784
+ <div style="font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.5rem;">
785
+ <i class="fas fa-info-circle"></i>
786
+ ملاحظة: يتطلب الاستخدام الفعلي ربط مفتاح API من OpenAI
787
+ </div>
788
+ `;
789
+ } else {
790
+ contentDiv.textContent = content;
791
+ }
792
+
793
+ messageDiv.appendChild(avatar);
794
+ messageDiv.appendChild(contentDiv);
795
+ container.appendChild(messageDiv);
796
+
797
+ // Scroll to bottom
798
+ container.scrollTop = container.scrollHeight;
799
+
800
+ // Save to history
801
+ chatHistory.push({ sender, content });
802
+ }
803
+
804
+ // Mock response generator
805
+ function generateMockResponse(input) {
806
+ const responses = [
807
+ "هذا رد تجريبي. في التطبيق الفعلي، سيتم الاتصال بـ API للحصول على رد حقيقي.",
808
+ "أفهم سؤالك. يمكنني مساعدتك في هذا الموضوع عند ربط التطبيق بمفتاح API.",
809
+ "شكراً لسؤالك! هذا تطبيق واجهة مستخدم (UI) يحتاج إلى ربط خدمات الذكاء الاصطناعي للعمل.",
810
+ "يمكنني مساعدتك في: الكتابة الإبداعية، البرمجة، التحليل، والإجابة على الأسئلة العامة."
811
+ ];
812
+ return responses[Math.floor(Math.random() * responses.length)];
813
+ }
814
+
815
+ // Clear chat
816
+ function clearChat() {
817
+ const container = document.getElementById('chatContainer');
818
+ container.innerHTML = `
819
+ <div class="welcome-screen" id="welcomeScreen">
820
+ <h1 class="welcome-title">مرحباً بك في AI Studio</h1>
821
+ <p class="welcome-subtitle">
822
+ مساعد ذكي متقدم يدعم المحادثات النصية وتوليد الصور الإبداعية.
823
+ اختر نموذجاً من القائمة وابدأ المحادثة.
824
+ </p>
825
+
826
+ <div class="features-grid">
827
+ <div class="feature-card" onclick="setPrompt('اكتب قصة قصيرة عن المستقبل')">
828
+ <div class="feature-icon">
829
+ <i class="fas fa-pen-fancy"></i>
830
+ </div>
831
+ <h3>كتابة إبداعية</h3>
832
+ <p style="color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.5rem;">
833
+ قصص، مقالات، ومحتوى نصي متنوع
834
+ </p>
835
+ </div>
836
+
837
+ <div class="feature-card" onclick="setPrompt('ارسم منظر طبيعي لجبال مغطاة بالثلج')">
838
+ <div class="feature-icon">
839
+ <i class="fas fa-palette"></i>
840
+ </div>
841
+ <h3>توليد صور</h3>
842
+ <p style="color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.5rem;">
843
+ صور فنية وإبداعية عالية الجودة
844
+ </p>
845
+ </div>
846
+
847
+ <div class="feature-card" onclick="setPrompt('اشرح لي نظرية النسبية ببساطة')">
848
+ <div class="feature-icon">
849
+ <i class="fas fa-graduation-cap"></i>
850
+ </div>
851
+ <h3>شرح المفاهيم</h3>
852
+ <p style="color: var(--text-secondary); font-size: 0.9rem; margin-top: 0.5rem;">
853
+ تبسيط العلوم والمعارف المعقدة
854
+ </p>
855
+ </div>
856
+ </div>
857
+ </div>
858
+ `;
859
+ chatHistory = [];
860
+ }
861
+
862
+ // Start new chat
863
+ function startNewChat() {
864
+ clearChat();
865
+ }
866
+
867
+ // Toggle sidebar on mobile
868
+ function toggleSidebar() {
869
+ document.querySelector('.sidebar').classList.toggle('active');
870
+ }
871
+
872
+ // Toggle theme (placeholder)
873
+ function toggleTheme() {
874
+ alert('ميزة تغيير الثيم قيد التطوير');
875
+ }
876
+
877
+ // Attach file (placeholder)
878
+ function attachFile() {
879
+ alert('ميزة إرفاق الملفات تتطلب إعدادات خادم (Backend)');
880
+ }
881
+
882
+ // Note: To make this functional with real AI, you would need to:
883
+ // 1. Add your API keys securely (preferably through a backend)
884
+ // 2. Implement fetch() calls to OpenAI, Anthropic, or other APIs
885
+ // 3. Handle streaming responses for better UX
886
+ // 4. Implement proper error handling and rate limiting
887
 
888
+ console.log('AI Studio Loaded - Ready for integration');
889
+ </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
890
  </body>
 
891
  </html>