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75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My Device App</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        /* Custom scrollbar */
        ::-webkit-scrollbar {
            width: 6px;
        }
        ::-webkit-scrollbar-track {
            background: #f1f1f1;
        }
        ::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 3px;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: #555;
        }
        
        /* Animation for battery */
        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.5; }
            100% { opacity: 1; }
        }
        
        .charging {
            animation: pulse 1.5s infinite;
        }
        
        /* Custom switch */
        .switch {
            position: relative;
            display: inline-block;
            width: 52px;
            height: 26px;
        }
        
        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 34px;
        }
        
        .slider:before {
            position: absolute;
            content: "";
            height: 20px;
            width: 20px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }
        
        input:checked + .slider {
            background-color: #3b82f6;
        }
        
        input:checked + .slider:before {
            transform: translateX(26px);
        }
    </style>
</head>
<body class="bg-gray-100 font-sans">
    <div class="max-w-md mx-auto bg-white min-h-screen shadow-lg overflow-hidden flex flex-col">
        <!-- App Header -->
        <header class="bg-blue-600 text-white p-4 shadow-md">
            <div class="flex items-center justify-between">
                <button id="backBtn" class="text-white opacity-0">
                    <i class="fas fa-arrow-left"></i>
                </button>
                <h1 class="text-xl font-bold">My Device</h1>
                <button id="settingsBtn" class="text-white">
                    <i class="fas fa-cog"></i>
                </button>
            </div>
        </header>
        
        <!-- Main Content -->
        <main class="flex-1 overflow-y-auto">
            <!-- Device Overview (Default View) -->
            <div id="overviewView" class="p-4">
                <div class="bg-white rounded-xl shadow-md p-6 mb-4">
                    <div class="flex items-center justify-between mb-6">
                        <div>
                            <h2 class="text-xl font-semibold">Device Information</h2>
                            <p class="text-gray-500 text-sm">Your device details</p>
                        </div>
                        <div class="bg-blue-100 p-2 rounded-full">
                            <i class="fas fa-mobile-alt text-blue-600 text-xl"></i>
                        </div>
                    </div>
                    
                    <div class="space-y-4">
                        <div class="flex justify-between items-center border-b pb-3">
                            <div class="flex items-center">
                                <i class="fas fa-microchip text-gray-500 mr-3"></i>
                                <span>Model</span>
                            </div>
                            <span id="deviceModel" class="font-medium">Loading...</span>
                        </div>
                        
                        <div class="flex justify-between items-center border-b pb-3">
                            <div class="flex items-center">
                                <i class="fas fa-code-branch text-gray-500 mr-3"></i>
                                <span>OS Version</span>
                            </div>
                            <span id="osVersion" class="font-medium">Loading...</span>
                        </div>
                        
                        <div class="flex justify-between items-center border-b pb-3">
                            <div class="flex items-center">
                                <i class="fas fa-wifi text-gray-500 mr-3"></i>
                                <span>Network</span>
                            </div>
                            <span id="networkType" class="font-medium">Loading...</span>
                        </div>
                        
                        <div class="flex justify-between items-center border-b pb-3">
                            <div class="flex items-center">
                                <i class="fas fa-memory text-gray-500 mr-3"></i>
                                <span>Memory</span>
                            </div>
                            <span id="deviceMemory" class="font-medium">Loading...</span>
                        </div>
                        
                        <div class="flex justify-between items-center">
                            <div class="flex items-center">
                                <i class="fas fa-battery-three-quarters text-gray-500 mr-3"></i>
                                <span>Battery</span>
                            </div>
                            <div class="flex items-center">
                                <span id="batteryLevel" class="font-medium mr-2">Loading...</span>
                                <div id="batteryIcon" class="relative w-6 h-4 border border-gray-400 rounded-sm">
                                    <div id="batteryFill" class="absolute top-0 left-0 h-full bg-green-500" style="width: 50%;"></div>
                                    <div class="absolute top-1/2 -right-1 w-1 h-2 bg-gray-400 transform -translate-y-1/2"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl shadow-md p-6 mb-4">
                    <h2 class="text-lg font-semibold mb-4">Quick Actions</h2>
                    <div class="grid grid-cols-2 gap-4">
                        <button class="bg-blue-100 text-blue-600 p-4 rounded-lg flex flex-col items-center">
                            <i class="fas fa-wifi text-xl mb-2"></i>
                            <span>Wi-Fi</span>
                        </button>
                        <button class="bg-purple-100 text-purple-600 p-4 rounded-lg flex flex-col items-center">
                            <i class="fas fa-bluetooth-b text-xl mb-2"></i>
                            <span>Bluetooth</span>
                        </button>
                        <button class="bg-green-100 text-green-600 p-4 rounded-lg flex flex-col items-center">
                            <i class="fas fa-sun text-xl mb-2"></i>
                            <span>Display</span>
                        </button>
                        <button class="bg-yellow-100 text-yellow-600 p-4 rounded-lg flex flex-col items-center">
                            <i class="fas fa-volume-up text-xl mb-2"></i>
                            <span>Sound</span>
                        </button>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl shadow-md p-6">
                    <h2 class="text-lg font-semibold mb-4">Storage</h2>
                    <div class="w-full bg-gray-200 rounded-full h-2.5 mb-2">
                        <div class="bg-blue-600 h-2.5 rounded-full" style="width: 45%"></div>
                    </div>
                    <div class="flex justify-between text-sm text-gray-600">
                        <span>45% used</span>
                        <span>32 GB of 64 GB</span>
                    </div>
                </div>
            </div>
            
            <!-- Settings View (Hidden by default) -->
            <div id="settingsView" class="p-4 hidden">
                <div class="bg-white rounded-xl shadow-md p-6 mb-4">
                    <h2 class="text-lg font-semibold mb-4">Device Settings</h2>
                    
                    <div class="space-y-4">
                        <div class="flex justify-between items-center border-b pb-3">
                            <div class="flex items-center">
                                <i class="fas fa-moon text-gray-500 mr-3"></i>
                                <span>Dark Mode</span>
                            </div>
                            <label class="switch">
                                <input type="checkbox" id="darkModeToggle">
                                <span class="slider"></span>
                            </label>
                        </div>
                        
                        <div class="flex justify-between items-center border-b pb-3">
                            <div class="flex items-center">
                                <i class="fas fa-bell text-gray-500 mr-3"></i>
                                <span>Notifications</span>
                            </div>
                            <label class="switch">
                                <input type="checkbox" id="notificationsToggle" checked>
                                <span class="slider"></span>
                            </label>
                        </div>
                        
                        <div class="flex justify-between items-center border-b pb-3">
                            <div class="flex items-center">
                                <i class="fas fa-lock text-gray-500 mr-3"></i>
                                <span>Security</span>
                            </div>
                            <i class="fas fa-chevron-right text-gray-400"></i>
                        </div>
                        
                        <div class="flex justify-between items-center border-b pb-3">
                            <div class="flex items-center">
                                <i class="fas fa-language text-gray-500 mr-3"></i>
                                <span>Language</span>
                            </div>
                            <div class="flex items-center">
                                <span class="mr-2">English</span>
                                <i class="fas fa-chevron-right text-gray-400"></i>
                            </div>
                        </div>
                        
                        <div class="flex justify-between items-center">
                            <div class="flex items-center">
                                <i class="fas fa-info-circle text-gray-500 mr-3"></i>
                                <span>About Device</span>
                            </div>
                            <i class="fas fa-chevron-right text-gray-400"></i>
                        </div>
                    </div>
                </div>
                
                <div class="bg-white rounded-xl shadow-md p-6 mb-4">
                    <h2 class="text-lg font-semibold mb-4">System</h2>
                    
                    <div class="space-y-4">
                        <div class="flex justify-between items-center border-b pb-3">
                            <div class="flex items-center">
                                <i class="fas fa-sync-alt text-gray-500 mr-3"></i>
                                <span>System Update</span>
                            </div>
                            <div class="flex items-center">
                                <span class="text-green-500 text-sm mr-2">Up to date</span>
                                <i class="fas fa-chevron-right text-gray-400"></i>
                            </div>
                        </div>
                        
                        <div class="flex justify-between items-center border-b pb-3">
                            <div class="flex items-center">
                                <i class="fas fa-trash-alt text-gray-500 mr-3"></i>
                                <span>Storage Cleanup</span>
                            </div>
                            <i class="fas fa-chevron-right text-gray-400"></i>
                        </div>
                        
                        <div class="flex justify-between items-center">
                            <div class="flex items-center">
                                <i class="fas fa-power-off text-gray-500 mr-3"></i>
                                <span>Restart Device</span>
                            </div>
                            <i class="fas fa-chevron-right text-gray-400"></i>
                        </div>
                    </div>
                </div>
                
                <button id="resetSettingsBtn" class="w-full bg-red-50 text-red-600 py-3 rounded-lg font-medium">
                    Reset All Settings
                </button>
            </div>
        </main>
        
        <!-- Bottom Navigation -->
        <nav class="bg-white border-t flex justify-around p-2">
            <button class="p-3 text-blue-600">
                <i class="fas fa-home text-xl"></i>
            </button>
            <button class="p-3 text-gray-500">
                <i class="fas fa-chart-bar text-xl"></i>
            </button>
            <button class="p-3 text-gray-500">
                <i class="fas fa-tools text-xl"></i>
            </button>
            <button class="p-3 text-gray-500">
                <i class="fas fa-user text-xl"></i>
            </button>
        </nav>
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // Get DOM elements
            const overviewView = document.getElementById('overviewView');
            const settingsView = document.getElementById('settingsView');
            const settingsBtn = document.getElementById('settingsBtn');
            const backBtn = document.getElementById('backBtn');
            const darkModeToggle = document.getElementById('darkModeToggle');
            const resetSettingsBtn = document.getElementById('resetSettingsBtn');
            
            // Device information elements
            const deviceModel = document.getElementById('deviceModel');
            const osVersion = document.getElementById('osVersion');
            const networkType = document.getElementById('networkType');
            const deviceMemory = document.getElementById('deviceMemory');
            const batteryLevel = document.getElementById('batteryLevel');
            const batteryFill = document.getElementById('batteryFill');
            const batteryIcon = document.getElementById('batteryIcon');
            
            // Simulate device information
            function loadDeviceInfo() {
                // These would normally come from device APIs
                deviceModel.textContent = navigator.userAgent.match(/\((.*?)\)/)[1] || "Unknown Device";
                osVersion.textContent = navigator.platform || "Unknown OS";
                
                // Simulate network type
                const networks = ["Wi-Fi", "4G LTE", "5G", "3G"];
                networkType.textContent = networks[Math.floor(Math.random() * networks.length)];
                
                // Simulate memory
                deviceMemory.textContent = "4 GB RAM";
                
                // Simulate battery
                updateBattery();
            }
            
            // Simulate battery level and charging status
            function updateBattery() {
                const level = Math.floor(Math.random() * 100);
                batteryLevel.textContent = `${level}%`;
                batteryFill.style.width = `${level}%`;
                
                // Change battery color based on level
                if (level > 70) {
                    batteryFill.className = "absolute top-0 left-0 h-full bg-green-500";
                } else if (level > 30) {
                    batteryFill.className = "absolute top-0 left-0 h-full bg-yellow-500";
                } else {
                    batteryFill.className = "absolute top-0 left-0 h-full bg-red-500";
                }
                
                // Randomly show charging status
                if (Math.random() > 0.7) {
                    batteryIcon.classList.add("charging");
                    batteryLevel.textContent += " (Charging)";
                } else {
                    batteryIcon.classList.remove("charging");
                }
                
                // Update every 10 seconds
                setTimeout(updateBattery, 10000);
            }
            
            // Toggle between views
            settingsBtn.addEventListener('click', function() {
                overviewView.classList.add('hidden');
                settingsView.classList.remove('hidden');
                backBtn.classList.remove('opacity-0');
                document.querySelector('header h1').textContent = "Settings";
            });
            
            backBtn.addEventListener('click', function() {
                settingsView.classList.add('hidden');
                overviewView.classList.remove('hidden');
                backBtn.classList.add('opacity-0');
                document.querySelector('header h1').textContent = "My Device";
            });
            
            // Dark mode toggle
            darkModeToggle.addEventListener('change', function() {
                if (this.checked) {
                    document.documentElement.classList.add('dark');
                    document.body.classList.add('bg-gray-900');
                    document.body.classList.remove('bg-gray-100');
                } else {
                    document.documentElement.classList.remove('dark');
                    document.body.classList.remove('bg-gray-900');
                    document.body.classList.add('bg-gray-100');
                }
            });
            
            // Reset settings button
            resetSettingsBtn.addEventListener('click', function() {
                if (confirm("Are you sure you want to reset all settings to default?")) {
                    darkModeToggle.checked = false;
                    document.getElementById('notificationsToggle').checked = true;
                    alert("All settings have been reset to default values.");
                }
            });
            
            // Initialize
            loadDeviceInfo();
            
            // Add click effect to all buttons
            document.querySelectorAll('button').forEach(button => {
                button.addEventListener('mousedown', function() {
                    this.classList.add('scale-95', 'opacity-80');
                });
                
                button.addEventListener('mouseup', function() {
                    this.classList.remove('scale-95', 'opacity-80');
                });
                
                button.addEventListener('mouseleave', function() {
                    this.classList.remove('scale-95', 'opacity-80');
                });
            });
        });
    </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=Shahid72/my" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>