English
lavanya251104 commited on
Commit
624bec6
·
verified ·
1 Parent(s): 5298dd8

SOURCE_CODE

Browse files

This repository contains the source code for the AI BATTERY OPTIMIZER Android app designed to extend smartphone battery life by learning from user behavior and applying adaptive optimizations in real-time.

ai-battery-optimizer/app.js ADDED
@@ -0,0 +1,899 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // Futuristic Battery Optimizer App - JavaScript
2
+ class BatteryOptimizerApp {
3
+ constructor() {
4
+ this.data = {
5
+ batteryStatus: {
6
+ level: 73,
7
+ isCharging: false,
8
+ timeRemaining: "8h 42m",
9
+ health: "Excellent",
10
+ cycleCount: 432,
11
+ temperature: 32.1
12
+ },
13
+ aiPredictions: {
14
+ nextApp: {
15
+ name: "Instagram",
16
+ confidence: 87,
17
+ timeToLaunch: "~15 min",
18
+ icon: "📸"
19
+ },
20
+ alternatives: [
21
+ {"name": "YouTube", "confidence": 72, "icon": "📺"},
22
+ {"name": "Gaming", "confidence": 68, "icon": "🎮"},
23
+ {"name": "Messages", "confidence": 45, "icon": "💬"}
24
+ ]
25
+ },
26
+ performance: {
27
+ currentFPS: 60,
28
+ availableFPS: [30, 60, 90, 120],
29
+ mode: "Balanced",
30
+ cpuUsage: 45,
31
+ gpuUsage: 32,
32
+ temperature: 38.5
33
+ },
34
+ backgroundApps: [
35
+ {"name": "Spotify", "status": "optimized", "powerUsage": "Low", "icon": "🎵"},
36
+ {"name": "WhatsApp", "status": "normal", "powerUsage": "Medium", "icon": "💬"},
37
+ {"name": "Facebook", "status": "restricted", "powerUsage": "High", "icon": "📘"},
38
+ {"name": "Instagram", "status": "optimized", "powerUsage": "Medium", "icon": "📸"},
39
+ {"name": "YouTube", "status": "normal", "powerUsage": "High", "icon": "📺"}
40
+ ],
41
+ brightness: {
42
+ current: 65,
43
+ auto: true,
44
+ gazeDetected: true,
45
+ ambientLight: 240,
46
+ userPresent: true
47
+ },
48
+ stats: {
49
+ powerSavedToday: "2h 34m",
50
+ appsOptimized: 12,
51
+ efficiencyScore: 94,
52
+ predictionAccuracy: 91
53
+ },
54
+ batteryHistory: [
55
+ {"time": "00:00", "level": 100},
56
+ {"time": "06:00", "level": 92},
57
+ {"time": "12:00", "level": 85},
58
+ {"time": "18:00", "level": 73},
59
+ {"time": "24:00", "level": 65}
60
+ ],
61
+ appUsageData: [
62
+ {"app": "Social Media", "usage": 3.2, "prediction": 3.8},
63
+ {"app": "Gaming", "usage": 2.1, "prediction": 2.3},
64
+ {"app": "Video", "usage": 1.8, "prediction": 2.1},
65
+ {"app": "Productivity", "usage": 1.5, "prediction": 1.2},
66
+ {"app": "Music", "usage": 0.9, "prediction": 1.1}
67
+ ]
68
+ };
69
+
70
+ this.charts = {};
71
+ this.updateIntervals = [];
72
+
73
+ this.init();
74
+ }
75
+
76
+ init() {
77
+ this.setupTabNavigation();
78
+ this.setupCharts();
79
+ this.setupControls();
80
+ this.setupRealTimeUpdates();
81
+ this.setupPredictionPanelNavigation();
82
+ this.animateElements();
83
+ }
84
+
85
+ setupTabNavigation() {
86
+ const navButtons = document.querySelectorAll('.nav-btn');
87
+ const tabContents = document.querySelectorAll('.tab-content');
88
+
89
+ navButtons.forEach(button => {
90
+ button.addEventListener('click', () => {
91
+ const targetTab = button.getAttribute('data-tab');
92
+
93
+ // Remove active classes
94
+ navButtons.forEach(btn => btn.classList.remove('active'));
95
+ tabContents.forEach(tab => tab.classList.remove('active'));
96
+
97
+ // Add active classes
98
+ button.classList.add('active');
99
+ document.getElementById(targetTab).classList.add('active');
100
+
101
+ // Trigger tab-specific animations
102
+ this.animateTabContent(targetTab);
103
+ });
104
+ });
105
+ }
106
+
107
+ setupPredictionPanelNavigation() {
108
+ const predictionWidget = document.querySelector('.prediction-widget');
109
+ if (predictionWidget) {
110
+ predictionWidget.addEventListener('click', () => {
111
+ // Navigate to predictions tab
112
+ const predictionsNavBtn = document.querySelector('[data-tab="predictions"]');
113
+ if (predictionsNavBtn) {
114
+ predictionsNavBtn.click();
115
+ }
116
+ });
117
+
118
+ // Add visual feedback for clickability
119
+ predictionWidget.style.cursor = 'pointer';
120
+ predictionWidget.addEventListener('mouseenter', () => {
121
+ predictionWidget.style.transform = 'translateY(-2px)';
122
+ });
123
+ predictionWidget.addEventListener('mouseleave', () => {
124
+ predictionWidget.style.transform = 'translateY(0)';
125
+ });
126
+ }
127
+ }
128
+
129
+ setupCharts() {
130
+ this.createBatteryChart();
131
+ this.createBatteryHistoryChart();
132
+ this.createAppUsageChart();
133
+ }
134
+
135
+ createBatteryChart() {
136
+ const ctx = document.getElementById('batteryChart');
137
+ if (!ctx) return;
138
+
139
+ this.charts.battery = new Chart(ctx, {
140
+ type: 'doughnut',
141
+ data: {
142
+ datasets: [{
143
+ data: [this.data.batteryStatus.level, 100 - this.data.batteryStatus.level],
144
+ backgroundColor: [
145
+ 'rgba(0, 212, 255, 0.8)',
146
+ 'rgba(255, 255, 255, 0.1)'
147
+ ],
148
+ borderWidth: 0,
149
+ cutout: '80%'
150
+ }]
151
+ },
152
+ options: {
153
+ responsive: true,
154
+ maintainAspectRatio: true,
155
+ plugins: {
156
+ legend: {
157
+ display: false
158
+ }
159
+ },
160
+ animation: {
161
+ animateRotate: true,
162
+ duration: 2000
163
+ }
164
+ }
165
+ });
166
+ }
167
+
168
+ createBatteryHistoryChart() {
169
+ const ctx = document.getElementById('batteryHistoryChart');
170
+ if (!ctx) return;
171
+
172
+ const gradient = ctx.getContext('2d').createLinearGradient(0, 0, 0, 200);
173
+ gradient.addColorStop(0, 'rgba(0, 212, 255, 0.4)');
174
+ gradient.addColorStop(1, 'rgba(0, 212, 255, 0.1)');
175
+
176
+ this.charts.batteryHistory = new Chart(ctx, {
177
+ type: 'line',
178
+ data: {
179
+ labels: this.data.batteryHistory.map(item => item.time),
180
+ datasets: [{
181
+ label: 'Battery Level',
182
+ data: this.data.batteryHistory.map(item => item.level),
183
+ borderColor: '#00d4ff',
184
+ backgroundColor: gradient,
185
+ borderWidth: 3,
186
+ fill: true,
187
+ tension: 0.4,
188
+ pointBackgroundColor: '#00d4ff',
189
+ pointBorderColor: '#ffffff',
190
+ pointBorderWidth: 2,
191
+ pointRadius: 6,
192
+ pointHoverRadius: 8
193
+ }]
194
+ },
195
+ options: {
196
+ responsive: true,
197
+ maintainAspectRatio: false,
198
+ plugins: {
199
+ legend: {
200
+ display: false
201
+ }
202
+ },
203
+ scales: {
204
+ x: {
205
+ grid: {
206
+ color: 'rgba(255, 255, 255, 0.1)'
207
+ },
208
+ ticks: {
209
+ color: 'rgba(255, 255, 255, 0.7)'
210
+ }
211
+ },
212
+ y: {
213
+ grid: {
214
+ color: 'rgba(255, 255, 255, 0.1)'
215
+ },
216
+ ticks: {
217
+ color: 'rgba(255, 255, 255, 0.7)'
218
+ },
219
+ min: 0,
220
+ max: 100
221
+ }
222
+ },
223
+ animation: {
224
+ duration: 2000,
225
+ easing: 'easeOutCubic'
226
+ }
227
+ }
228
+ });
229
+ }
230
+
231
+ createAppUsageChart() {
232
+ const ctx = document.getElementById('appUsageChart');
233
+ if (!ctx) return;
234
+
235
+ this.charts.appUsage = new Chart(ctx, {
236
+ type: 'bar',
237
+ data: {
238
+ labels: this.data.appUsageData.map(item => item.app),
239
+ datasets: [
240
+ {
241
+ label: 'Actual Usage',
242
+ data: this.data.appUsageData.map(item => item.usage),
243
+ backgroundColor: '#1FB8CD',
244
+ borderRadius: 6
245
+ },
246
+ {
247
+ label: 'AI Prediction',
248
+ data: this.data.appUsageData.map(item => item.prediction),
249
+ backgroundColor: '#FFC185',
250
+ borderRadius: 6
251
+ }
252
+ ]
253
+ },
254
+ options: {
255
+ responsive: true,
256
+ maintainAspectRatio: false,
257
+ plugins: {
258
+ legend: {
259
+ display: true,
260
+ position: 'top',
261
+ labels: {
262
+ color: 'rgba(255, 255, 255, 0.8)',
263
+ usePointStyle: true,
264
+ pointStyle: 'rectRounded'
265
+ }
266
+ }
267
+ },
268
+ scales: {
269
+ x: {
270
+ grid: {
271
+ color: 'rgba(255, 255, 255, 0.1)'
272
+ },
273
+ ticks: {
274
+ color: 'rgba(255, 255, 255, 0.7)'
275
+ }
276
+ },
277
+ y: {
278
+ grid: {
279
+ color: 'rgba(255, 255, 255, 0.1)'
280
+ },
281
+ ticks: {
282
+ color: 'rgba(255, 255, 255, 0.7)'
283
+ },
284
+ beginAtZero: true
285
+ }
286
+ },
287
+ animation: {
288
+ duration: 1500,
289
+ easing: 'easeOutCubic'
290
+ }
291
+ }
292
+ });
293
+ }
294
+
295
+ setupControls() {
296
+ this.setupFPSControl();
297
+ this.setupPerformanceModes();
298
+ this.setupBrightnessControl();
299
+ this.setupAppToggles();
300
+ this.setupOptimizeButton();
301
+ this.setupSwitches();
302
+ }
303
+
304
+ setupFPSControl() {
305
+ const fpsButtons = document.querySelectorAll('.fps-btn');
306
+ const fpsValue = document.querySelector('.fps-value');
307
+ const smartToggle = document.getElementById('smartFpsToggle');
308
+
309
+ fpsButtons.forEach(button => {
310
+ button.addEventListener('click', () => {
311
+ if (smartToggle && smartToggle.checked) return; // Don't allow manual control in smart mode
312
+
313
+ const fps = parseInt(button.getAttribute('data-fps'));
314
+
315
+ // Update UI
316
+ fpsButtons.forEach(btn => btn.classList.remove('active'));
317
+ button.classList.add('active');
318
+
319
+ // Animate FPS value change
320
+ this.animateNumberChange(fpsValue, this.data.performance.currentFPS, fps);
321
+ this.data.performance.currentFPS = fps;
322
+ });
323
+ });
324
+
325
+ if (smartToggle) {
326
+ smartToggle.addEventListener('change', (e) => {
327
+ const fpsOptions = document.querySelector('.fps-options');
328
+ if (e.target.checked) {
329
+ fpsOptions.style.opacity = '0.5';
330
+ fpsOptions.style.pointerEvents = 'none';
331
+ } else {
332
+ fpsOptions.style.opacity = '1';
333
+ fpsOptions.style.pointerEvents = 'auto';
334
+ }
335
+ });
336
+ }
337
+ }
338
+
339
+ setupPerformanceModes() {
340
+ const modeButtons = document.querySelectorAll('.mode-btn');
341
+
342
+ modeButtons.forEach(button => {
343
+ button.addEventListener('click', () => {
344
+ const mode = button.getAttribute('data-mode');
345
+
346
+ // Update UI
347
+ modeButtons.forEach(btn => btn.classList.remove('active'));
348
+ button.classList.add('active');
349
+
350
+ // Update data and trigger performance changes
351
+ this.data.performance.mode = mode;
352
+ this.updatePerformanceMetrics(mode);
353
+ });
354
+ });
355
+ }
356
+
357
+ setupBrightnessControl() {
358
+ const brightnessSlider = document.getElementById('brightnessSlider');
359
+ const brightnessValue = document.querySelector('.brightness-value');
360
+ const autoToggle = document.getElementById('autoBrightnessToggle');
361
+
362
+ if (brightnessSlider) {
363
+ brightnessSlider.addEventListener('input', (e) => {
364
+ const value = parseInt(e.target.value);
365
+ brightnessValue.textContent = value + '%';
366
+ this.data.brightness.current = value;
367
+
368
+ // Disable auto brightness when manually adjusted
369
+ if (autoToggle && autoToggle.checked) {
370
+ autoToggle.checked = false;
371
+ this.data.brightness.auto = false;
372
+ }
373
+ });
374
+ }
375
+
376
+ if (autoToggle) {
377
+ autoToggle.addEventListener('change', (e) => {
378
+ this.data.brightness.auto = e.target.checked;
379
+ if (e.target.checked) {
380
+ // Simulate auto brightness adjustment
381
+ this.simulateAutoBrightness();
382
+ }
383
+ });
384
+ }
385
+ }
386
+
387
+ setupAppToggles() {
388
+ const appToggles = document.querySelectorAll('.app-toggle');
389
+
390
+ appToggles.forEach((toggle, index) => {
391
+ toggle.addEventListener('click', () => {
392
+ const app = this.data.backgroundApps[index];
393
+
394
+ // Cycle through statuses
395
+ const statuses = ['normal', 'optimized', 'restricted'];
396
+ const currentIndex = statuses.indexOf(app.status);
397
+ const nextIndex = (currentIndex + 1) % statuses.length;
398
+ app.status = statuses[nextIndex];
399
+
400
+ // Update UI
401
+ toggle.className = `app-toggle ${app.status}`;
402
+ const statusElement = toggle.previousElementSibling;
403
+ statusElement.className = `app-status ${app.status}`;
404
+ statusElement.textContent = app.status.charAt(0).toUpperCase() + app.status.slice(1);
405
+
406
+ // Add animation
407
+ toggle.style.transform = 'scale(0.9)';
408
+ setTimeout(() => {
409
+ toggle.style.transform = 'scale(1)';
410
+ }, 150);
411
+ });
412
+ });
413
+ }
414
+
415
+ setupOptimizeButton() {
416
+ const optimizeBtn = document.getElementById('optimizeNowBtn');
417
+ if (optimizeBtn) {
418
+ optimizeBtn.addEventListener('click', () => {
419
+ this.runOptimization();
420
+ });
421
+ }
422
+ }
423
+
424
+ setupSwitches() {
425
+ const switches = document.querySelectorAll('.switch input[type="checkbox"]');
426
+
427
+ switches.forEach(switchInput => {
428
+ switchInput.addEventListener('change', (e) => {
429
+ // Add animation to slider
430
+ const slider = e.target.nextElementSibling;
431
+ slider.style.transform = 'scale(0.95)';
432
+ setTimeout(() => {
433
+ slider.style.transform = 'scale(1)';
434
+ }, 100);
435
+ });
436
+ });
437
+ }
438
+
439
+ setupRealTimeUpdates() {
440
+ // Update time every second
441
+ const updateTime = () => {
442
+ const now = new Date();
443
+ const timeString = now.toLocaleTimeString('en-US', {
444
+ hour12: false,
445
+ hour: '2-digit',
446
+ minute: '2-digit'
447
+ });
448
+ const timeElement = document.querySelector('.time');
449
+ if (timeElement) {
450
+ timeElement.textContent = timeString;
451
+ }
452
+ };
453
+
454
+ updateTime();
455
+ this.updateIntervals.push(setInterval(updateTime, 1000));
456
+
457
+ // Simulate battery drain
458
+ this.updateIntervals.push(setInterval(() => {
459
+ if (!this.data.batteryStatus.isCharging && this.data.batteryStatus.level > 0) {
460
+ this.data.batteryStatus.level = Math.max(0, this.data.batteryStatus.level - 0.1);
461
+ this.updateBatteryDisplay();
462
+ }
463
+ }, 30000)); // Update every 30 seconds
464
+
465
+ // Simulate AI predictions updates
466
+ this.updateIntervals.push(setInterval(() => {
467
+ this.updateAIPredictions();
468
+ }, 45000)); // Update every 45 seconds
469
+
470
+ // Simulate gaze detection
471
+ this.updateIntervals.push(setInterval(() => {
472
+ this.simulateGazeDetection();
473
+ }, 3000)); // Update every 3 seconds
474
+
475
+ // Update performance metrics
476
+ this.updateIntervals.push(setInterval(() => {
477
+ this.updateSystemMetrics();
478
+ }, 5000)); // Update every 5 seconds
479
+ }
480
+
481
+ updateBatteryDisplay() {
482
+ const batteryPercentage = document.querySelector('.battery-percentage');
483
+ const batteryLevel = document.querySelector('.battery-level');
484
+
485
+ const level = Math.round(this.data.batteryStatus.level);
486
+
487
+ if (batteryPercentage) {
488
+ batteryPercentage.textContent = level + '%';
489
+ }
490
+
491
+ if (batteryLevel) {
492
+ batteryLevel.textContent = level + '%';
493
+ }
494
+
495
+ // Update battery chart
496
+ if (this.charts.battery) {
497
+ this.charts.battery.data.datasets[0].data = [level, 100 - level];
498
+ this.charts.battery.update('none');
499
+ }
500
+ }
501
+
502
+ updateAIPredictions() {
503
+ const predictions = [
504
+ { name: "Instagram", icon: "📸", confidence: 87 },
505
+ { name: "YouTube", icon: "📺", confidence: 82 },
506
+ { name: "Gaming", icon: "🎮", confidence: 75 },
507
+ { name: "Messages", icon: "💬", confidence: 68 },
508
+ { name: "Music", icon: "🎵", confidence: 62 }
509
+ ];
510
+
511
+ const randomPrediction = predictions[Math.floor(Math.random() * predictions.length)];
512
+ this.data.aiPredictions.nextApp = {
513
+ ...randomPrediction,
514
+ timeToLaunch: `~${Math.floor(Math.random() * 30) + 5} min`
515
+ };
516
+
517
+ // Update UI
518
+ const appIcon = document.querySelector('.next-app-prediction .app-icon');
519
+ const appName = document.querySelector('.prediction-info h4');
520
+ const confidenceFill = document.querySelector('.confidence-fill');
521
+ const confidenceText = document.querySelector('.confidence-text');
522
+ const launchTime = document.querySelector('.launch-time');
523
+
524
+ if (appIcon) appIcon.textContent = randomPrediction.icon;
525
+ if (appName) appName.textContent = `Next App: ${randomPrediction.name}`;
526
+ if (confidenceFill) {
527
+ confidenceFill.style.width = randomPrediction.confidence + '%';
528
+ }
529
+ if (confidenceText) confidenceText.textContent = randomPrediction.confidence + '% confidence';
530
+ if (launchTime) launchTime.textContent = `Expected in ${this.data.aiPredictions.nextApp.timeToLaunch}`;
531
+ }
532
+
533
+ simulateGazeDetection() {
534
+ const userPresent = Math.random() > 0.3; // 70% chance user is present
535
+ const gazeDetected = userPresent && Math.random() > 0.2; // 80% chance gaze is detected when present
536
+
537
+ this.data.brightness.userPresent = userPresent;
538
+ this.data.brightness.gazeDetected = gazeDetected;
539
+
540
+ // Update UI
541
+ const faceIndicator = document.querySelector('.face-indicator');
542
+ const statusIndicators = document.querySelectorAll('.gaze-status .status-indicator');
543
+
544
+ if (faceIndicator) {
545
+ if (gazeDetected) {
546
+ faceIndicator.classList.add('active');
547
+ } else {
548
+ faceIndicator.classList.remove('active');
549
+ }
550
+ }
551
+
552
+ // Update status indicators
553
+ if (statusIndicators.length >= 2) {
554
+ statusIndicators[0].classList.toggle('active', userPresent);
555
+ statusIndicators[1].classList.toggle('active', gazeDetected);
556
+ }
557
+
558
+ // Auto-adjust brightness based on gaze
559
+ if (this.data.brightness.auto) {
560
+ const targetBrightness = gazeDetected ?
561
+ Math.max(50, this.data.brightness.current) :
562
+ Math.max(20, this.data.brightness.current * 0.6);
563
+
564
+ this.animateBrightnessChange(targetBrightness);
565
+ }
566
+ }
567
+
568
+ updateSystemMetrics() {
569
+ // Simulate realistic system metrics
570
+ const baseTemp = 35 + Math.random() * 10;
571
+ const baseCPU = 20 + Math.random() * 60;
572
+ const baseGPU = 15 + Math.random() * 50;
573
+
574
+ this.data.performance.temperature = Math.round(baseTemp * 10) / 10;
575
+ this.data.performance.cpuUsage = Math.round(baseCPU);
576
+ this.data.performance.gpuUsage = Math.round(baseGPU);
577
+
578
+ // Update UI
579
+ const metricFills = document.querySelectorAll('.metric-fill');
580
+ const metricValues = document.querySelectorAll('.metric-value');
581
+
582
+ if (metricFills.length >= 3 && metricValues.length >= 3) {
583
+ // CPU
584
+ metricFills[0].style.width = this.data.performance.cpuUsage + '%';
585
+ metricValues[0].textContent = this.data.performance.cpuUsage + '%';
586
+
587
+ // GPU
588
+ metricFills[1].style.width = this.data.performance.gpuUsage + '%';
589
+ metricValues[1].textContent = this.data.performance.gpuUsage + '%';
590
+
591
+ // Temperature
592
+ const tempPercentage = Math.min(100, (this.data.performance.temperature - 30) * 2);
593
+ metricFills[2].style.width = tempPercentage + '%';
594
+ metricValues[2].textContent = this.data.performance.temperature + '°C';
595
+ }
596
+ }
597
+
598
+ updatePerformanceMetrics(mode) {
599
+ let cpuMultiplier = 1;
600
+ let gpuMultiplier = 1;
601
+ let fpsTarget = 60;
602
+
603
+ switch (mode) {
604
+ case 'ultra-low':
605
+ cpuMultiplier = 0.6;
606
+ gpuMultiplier = 0.5;
607
+ fpsTarget = 30;
608
+ break;
609
+ case 'balanced':
610
+ cpuMultiplier = 1;
611
+ gpuMultiplier = 1;
612
+ fpsTarget = 60;
613
+ break;
614
+ case 'performance':
615
+ cpuMultiplier = 1.3;
616
+ gpuMultiplier = 1.4;
617
+ fpsTarget = 90;
618
+ break;
619
+ }
620
+
621
+ // Auto-adjust FPS if smart mode is enabled
622
+ const smartToggle = document.getElementById('smartFpsToggle');
623
+ if (smartToggle && smartToggle.checked) {
624
+ const fpsValue = document.querySelector('.fps-value');
625
+ const fpsButtons = document.querySelectorAll('.fps-btn');
626
+
627
+ this.animateNumberChange(fpsValue, this.data.performance.currentFPS, fpsTarget);
628
+ this.data.performance.currentFPS = fpsTarget;
629
+
630
+ // Update active FPS button
631
+ fpsButtons.forEach(btn => btn.classList.remove('active'));
632
+ const targetBtn = document.querySelector(`[data-fps="${fpsTarget}"]`);
633
+ if (targetBtn) targetBtn.classList.add('active');
634
+ }
635
+
636
+ // Simulate performance changes
637
+ setTimeout(() => {
638
+ this.data.performance.cpuUsage = Math.round(this.data.performance.cpuUsage * cpuMultiplier);
639
+ this.data.performance.gpuUsage = Math.round(this.data.performance.gpuUsage * gpuMultiplier);
640
+ this.updateSystemMetrics();
641
+ }, 500);
642
+ }
643
+
644
+ simulateAutoBrightness() {
645
+ const ambientLight = 180 + Math.random() * 120; // 180-300 lux
646
+ this.data.brightness.ambientLight = Math.round(ambientLight);
647
+
648
+ // Calculate target brightness based on ambient light
649
+ const targetBrightness = Math.round(Math.min(100, Math.max(20, ambientLight / 4)));
650
+
651
+ this.animateBrightnessChange(targetBrightness);
652
+
653
+ // Update ambient light display
654
+ const ambientValue = document.querySelector('.ambient-value');
655
+ if (ambientValue) {
656
+ ambientValue.textContent = this.data.brightness.ambientLight + ' lux';
657
+ }
658
+ }
659
+
660
+ runOptimization() {
661
+ const optimizeBtn = document.getElementById('optimizeNowBtn');
662
+ if (!optimizeBtn) return;
663
+
664
+ // Show loading state
665
+ optimizeBtn.innerHTML = '<span class="btn-icon">⏳</span>Optimizing...';
666
+ optimizeBtn.disabled = true;
667
+
668
+ // Simulate optimization process
669
+ setTimeout(() => {
670
+ // Update app statuses
671
+ this.data.backgroundApps.forEach((app, index) => {
672
+ if (app.powerUsage === 'High' && Math.random() > 0.5) {
673
+ app.status = 'optimized';
674
+ const appToggle = document.querySelectorAll('.app-toggle')[index];
675
+ const statusElement = document.querySelectorAll('.app-status')[index];
676
+ if (appToggle && statusElement) {
677
+ appToggle.className = 'app-toggle optimized';
678
+ statusElement.className = 'app-status optimized';
679
+ statusElement.textContent = 'Optimized';
680
+ }
681
+ }
682
+ });
683
+
684
+ // Update stats
685
+ this.data.stats.appsOptimized += 3;
686
+ this.data.stats.efficiencyScore = Math.min(100, this.data.stats.efficiencyScore + 2);
687
+
688
+ // Update UI
689
+ const appsOptimizedElement = document.querySelector('.stats-grid .stat-card:nth-child(2) .stat-value');
690
+ const efficiencyElement = document.querySelector('.stats-grid .stat-card:nth-child(3) .stat-value');
691
+
692
+ if (appsOptimizedElement) {
693
+ this.animateNumberChange(appsOptimizedElement,
694
+ parseInt(appsOptimizedElement.textContent),
695
+ this.data.stats.appsOptimized);
696
+ }
697
+
698
+ if (efficiencyElement) {
699
+ this.animateNumberChange(efficiencyElement,
700
+ parseInt(efficiencyElement.textContent.replace('%', '')),
701
+ this.data.stats.efficiencyScore, '%');
702
+ }
703
+
704
+ // Reset button
705
+ optimizeBtn.innerHTML = '<span class="btn-icon">✅</span>Optimization Complete!';
706
+
707
+ setTimeout(() => {
708
+ optimizeBtn.innerHTML = '<span class="btn-icon">🚀</span>Optimize Now';
709
+ optimizeBtn.disabled = false;
710
+ }, 2000);
711
+ }, 3000);
712
+ }
713
+
714
+ animateTabContent(tabId) {
715
+ const tab = document.getElementById(tabId);
716
+ if (!tab) return;
717
+
718
+ const cards = tab.querySelectorAll('.card');
719
+ cards.forEach((card, index) => {
720
+ card.style.opacity = '0';
721
+ card.style.transform = 'translateY(20px)';
722
+
723
+ setTimeout(() => {
724
+ card.style.transition = 'all 0.6s ease-out';
725
+ card.style.opacity = '1';
726
+ card.style.transform = 'translateY(0)';
727
+ }, index * 100);
728
+ });
729
+ }
730
+
731
+ animateElements() {
732
+ // Initial page load animations
733
+ const cards = document.querySelectorAll('.card');
734
+ cards.forEach((card, index) => {
735
+ card.style.opacity = '0';
736
+ card.style.transform = 'translateY(30px)';
737
+
738
+ setTimeout(() => {
739
+ card.classList.add('loading');
740
+ card.style.transition = 'all 0.8s cubic-bezier(0.16, 1, 0.3, 1)';
741
+ card.style.opacity = '1';
742
+ card.style.transform = 'translateY(0)';
743
+ }, index * 150);
744
+ });
745
+
746
+ // Animate confidence bars
747
+ setTimeout(() => {
748
+ const confidenceFills = document.querySelectorAll('.confidence-fill');
749
+ confidenceFills.forEach(fill => {
750
+ const width = fill.style.width;
751
+ fill.style.width = '0%';
752
+ setTimeout(() => {
753
+ fill.style.width = width;
754
+ }, 500);
755
+ });
756
+ }, 1000);
757
+ }
758
+
759
+ animateNumberChange(element, from, to, suffix = '') {
760
+ const duration = 1000;
761
+ const steps = 60;
762
+ const increment = (to - from) / steps;
763
+ let current = from;
764
+ let step = 0;
765
+
766
+ const animate = () => {
767
+ if (step < steps) {
768
+ current += increment;
769
+ element.textContent = Math.round(current) + suffix;
770
+ step++;
771
+ requestAnimationFrame(animate);
772
+ } else {
773
+ element.textContent = to + suffix;
774
+ }
775
+ };
776
+
777
+ animate();
778
+ }
779
+
780
+ animateBrightnessChange(targetBrightness) {
781
+ const brightnessValue = document.querySelector('.brightness-value');
782
+ const brightnessSlider = document.getElementById('brightnessSlider');
783
+
784
+ if (brightnessValue && brightnessSlider) {
785
+ const currentBrightness = this.data.brightness.current;
786
+ this.animateNumberChange(brightnessValue, currentBrightness, targetBrightness, '%');
787
+
788
+ // Animate slider
789
+ const steps = 30;
790
+ const increment = (targetBrightness - currentBrightness) / steps;
791
+ let current = currentBrightness;
792
+ let step = 0;
793
+
794
+ const animateSlider = () => {
795
+ if (step < steps) {
796
+ current += increment;
797
+ brightnessSlider.value = Math.round(current);
798
+ step++;
799
+ requestAnimationFrame(animateSlider);
800
+ } else {
801
+ brightnessSlider.value = targetBrightness;
802
+ this.data.brightness.current = targetBrightness;
803
+ }
804
+ };
805
+
806
+ animateSlider();
807
+ }
808
+ }
809
+
810
+ destroy() {
811
+ // Clean up intervals
812
+ this.updateIntervals.forEach(interval => clearInterval(interval));
813
+
814
+ // Destroy charts
815
+ Object.values(this.charts).forEach(chart => {
816
+ if (chart && typeof chart.destroy === 'function') {
817
+ chart.destroy();
818
+ }
819
+ });
820
+ }
821
+ }
822
+
823
+ // Initialize the app when the DOM is loaded
824
+ document.addEventListener('DOMContentLoaded', () => {
825
+ const app = new BatteryOptimizerApp();
826
+
827
+ // Make app globally accessible for debugging
828
+ window.batteryApp = app;
829
+
830
+ // Handle page unload
831
+ window.addEventListener('beforeunload', () => {
832
+ app.destroy();
833
+ });
834
+ });
835
+
836
+ // Add some utility functions for enhanced UX
837
+ function addHapticFeedback() {
838
+ if ('vibrate' in navigator) {
839
+ navigator.vibrate(50);
840
+ }
841
+ }
842
+
843
+ // Add haptic feedback to buttons
844
+ document.addEventListener('click', (e) => {
845
+ if (e.target.matches('button, .nav-btn, .app-toggle, .fps-btn, .mode-btn')) {
846
+ addHapticFeedback();
847
+ }
848
+ });
849
+
850
+ // Add swipe gesture support for tab navigation
851
+ let startX = 0;
852
+ let startY = 0;
853
+ let isSwipingHorizontally = false;
854
+
855
+ document.addEventListener('touchstart', (e) => {
856
+ startX = e.touches[0].clientX;
857
+ startY = e.touches[0].clientY;
858
+ isSwipingHorizontally = false;
859
+ });
860
+
861
+ document.addEventListener('touchmove', (e) => {
862
+ if (!startX || !startY) return;
863
+
864
+ const currentX = e.touches[0].clientX;
865
+ const currentY = e.touches[0].clientY;
866
+
867
+ const diffX = Math.abs(currentX - startX);
868
+ const diffY = Math.abs(currentY - startY);
869
+
870
+ if (diffX > diffY && diffX > 50) {
871
+ isSwipingHorizontally = true;
872
+ e.preventDefault(); // Prevent scrolling
873
+ }
874
+ });
875
+
876
+ document.addEventListener('touchend', (e) => {
877
+ if (!startX || !isSwipingHorizontally) return;
878
+
879
+ const endX = e.changedTouches[0].clientX;
880
+ const diff = startX - endX;
881
+
882
+ const activeTab = document.querySelector('.nav-btn.active');
883
+ const tabs = Array.from(document.querySelectorAll('.nav-btn'));
884
+ const currentIndex = tabs.indexOf(activeTab);
885
+
886
+ if (Math.abs(diff) > 100) { // Minimum swipe distance
887
+ if (diff > 0 && currentIndex < tabs.length - 1) {
888
+ // Swipe left - next tab
889
+ tabs[currentIndex + 1].click();
890
+ } else if (diff < 0 && currentIndex > 0) {
891
+ // Swipe right - previous tab
892
+ tabs[currentIndex - 1].click();
893
+ }
894
+ }
895
+
896
+ startX = 0;
897
+ startY = 0;
898
+ isSwipingHorizontally = false;
899
+ });
ai-battery-optimizer/index.html ADDED
@@ -0,0 +1,452 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>AI Battery Optimizer</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
9
+ </head>
10
+ <body>
11
+ <div class="app-container">
12
+ <!-- Header -->
13
+ <header class="app-header">
14
+ <div class="status-bar">
15
+ <span class="time">20:00</span>
16
+ <div class="status-icons">
17
+ <span class="signal-icon">📶</span>
18
+ <span class="wifi-icon">📶</span>
19
+ <span class="battery-icon">🔋</span>
20
+ <span class="battery-percentage">73%</span>
21
+ </div>
22
+ </div>
23
+ <div class="header-content">
24
+ <h1 class="app-title">AI Battery Optimizer</h1>
25
+ <div class="optimization-status">
26
+ <div class="status-indicator active"></div>
27
+ <span>Smart Mode Active</span>
28
+ </div>
29
+ </div>
30
+ </header>
31
+
32
+ <!-- Main Content -->
33
+ <main class="main-content">
34
+ <!-- Dashboard Tab -->
35
+ <section class="tab-content active" id="dashboard">
36
+ <!-- Battery Status -->
37
+ <div class="battery-widget card">
38
+ <div class="battery-circle" style="position: relative;">
39
+ <canvas id="batteryChart" width="120" height="120"></canvas>
40
+ <div class="battery-info">
41
+ <span class="battery-level">73%</span>
42
+ <span class="time-remaining">8h 42m</span>
43
+ </div>
44
+ </div>
45
+ <div class="battery-details">
46
+ <div class="detail-item">
47
+ <span class="label">Health</span>
48
+ <span class="value excellent">Excellent</span>
49
+ </div>
50
+ <div class="detail-item">
51
+ <span class="label">Temperature</span>
52
+ <span class="value">32.1°C</span>
53
+ </div>
54
+ <div class="detail-item">
55
+ <span class="label">Cycles</span>
56
+ <span class="value">432</span>
57
+ </div>
58
+ </div>
59
+ </div>
60
+
61
+ <!-- AI Prediction Widget -->
62
+ <div class="prediction-widget card">
63
+ <div class="widget-header">
64
+ <h3>🧠 Smart Prediction</h3>
65
+ <div class="accuracy-badge">91% accurate</div>
66
+ </div>
67
+ <div class="next-app-prediction">
68
+ <div class="app-icon">📸</div>
69
+ <div class="prediction-info">
70
+ <h4>Next App: Instagram</h4>
71
+ <div class="confidence-bar">
72
+ <div class="confidence-fill" style="width: 87%"></div>
73
+ <span class="confidence-text">87% confidence</span>
74
+ </div>
75
+ <p class="launch-time">Expected in ~15 min</p>
76
+ </div>
77
+ </div>
78
+ <div class="alternative-predictions">
79
+ <div class="alt-app">
80
+ <span class="app-icon">📺</span>
81
+ <span class="app-name">YouTube</span>
82
+ <span class="confidence">72%</span>
83
+ </div>
84
+ <div class="alt-app">
85
+ <span class="app-icon">🎮</span>
86
+ <span class="app-name">Gaming</span>
87
+ <span class="confidence">68%</span>
88
+ </div>
89
+ <div class="alt-app">
90
+ <span class="app-icon">💬</span>
91
+ <span class="app-name">Messages</span>
92
+ <span class="confidence">45%</span>
93
+ </div>
94
+ </div>
95
+ </div>
96
+
97
+ <!-- Quick Stats -->
98
+ <div class="stats-grid">
99
+ <div class="stat-card card">
100
+ <div class="stat-icon">⚡</div>
101
+ <div class="stat-value">2h 34m</div>
102
+ <div class="stat-label">Power Saved</div>
103
+ </div>
104
+ <div class="stat-card card">
105
+ <div class="stat-icon">📱</div>
106
+ <div class="stat-value">12</div>
107
+ <div class="stat-label">Apps Optimized</div>
108
+ </div>
109
+ <div class="stat-card card">
110
+ <div class="stat-icon">📊</div>
111
+ <div class="stat-value">94%</div>
112
+ <div class="stat-label">Efficiency Score</div>
113
+ </div>
114
+ </div>
115
+
116
+ <!-- Battery Usage Chart -->
117
+ <div class="chart-widget card">
118
+ <h3>Battery Usage Today</h3>
119
+ <div class="chart-container" style="position: relative; height: 200px;">
120
+ <canvas id="batteryHistoryChart"></canvas>
121
+ </div>
122
+ </div>
123
+
124
+ <!-- Action Buttons -->
125
+ <div class="action-buttons">
126
+ <button class="btn btn--primary btn--lg btn--full-width" id="optimizeNowBtn">
127
+ <span class="btn-icon">🚀</span>
128
+ Optimize Now
129
+ </button>
130
+ </div>
131
+ </section>
132
+
133
+ <!-- Smart Prediction Tab -->
134
+ <section class="tab-content" id="predictions">
135
+ <div class="prediction-header card">
136
+ <h2>🧠 Smart Predictions</h2>
137
+ <p>AI learns your patterns to predict app usage</p>
138
+ </div>
139
+
140
+ <div class="usage-patterns card">
141
+ <h3>Today's Usage Patterns</h3>
142
+ <div class="patterns-list">
143
+ <div class="pattern-item">
144
+ <span class="pattern-time">6:00 AM</span>
145
+ <div class="pattern-apps">
146
+ <span class="app-tag">Clock</span>
147
+ <span class="app-tag">Weather</span>
148
+ </div>
149
+ <span class="pattern-confidence">95%</span>
150
+ </div>
151
+ <div class="pattern-item">
152
+ <span class="pattern-time">8:00 AM</span>
153
+ <div class="pattern-apps">
154
+ <span class="app-tag">Email</span>
155
+ <span class="app-tag">News</span>
156
+ </div>
157
+ <span class="pattern-confidence">88%</span>
158
+ </div>
159
+ <div class="pattern-item">
160
+ <span class="pattern-time">12:00 PM</span>
161
+ <div class="pattern-apps">
162
+ <span class="app-tag">Social</span>
163
+ <span class="app-tag">Food</span>
164
+ </div>
165
+ <span class="pattern-confidence">92%</span>
166
+ </div>
167
+ <div class="pattern-item">
168
+ <span class="pattern-time">6:00 PM</span>
169
+ <div class="pattern-apps">
170
+ <span class="app-tag">Entertainment</span>
171
+ <span class="app-tag">Games</span>
172
+ </div>
173
+ <span class="pattern-confidence">85%</span>
174
+ </div>
175
+ <div class="pattern-item">
176
+ <span class="pattern-time">10:00 PM</span>
177
+ <div class="pattern-apps">
178
+ <span class="app-tag">Reading</span>
179
+ <span class="app-tag">Music</span>
180
+ </div>
181
+ <span class="pattern-confidence">78%</span>
182
+ </div>
183
+ </div>
184
+ </div>
185
+
186
+ <div class="app-usage-chart card">
187
+ <h3>App Usage vs AI Predictions</h3>
188
+ <div class="chart-container" style="position: relative; height: 250px;">
189
+ <canvas id="appUsageChart"></canvas>
190
+ </div>
191
+ </div>
192
+
193
+ <div class="learned-behaviors card">
194
+ <h3>💡 Learned Behaviors</h3>
195
+ <div class="behavior-list">
196
+ <div class="behavior-item">
197
+ <span class="behavior-icon">🎮</span>
198
+ <span class="behavior-text">Usually games at 7PM</span>
199
+ </div>
200
+ <div class="behavior-item">
201
+ <span class="behavior-icon">🍔</span>
202
+ <span class="behavior-text">Social media during lunch</span>
203
+ </div>
204
+ <div class="behavior-item">
205
+ <span class="behavior-icon">📧</span>
206
+ <span class="behavior-text">Email check every 2 hours</span>
207
+ </div>
208
+ <div class="behavior-item">
209
+ <span class="behavior-icon">��</span>
210
+ <span class="behavior-text">Music before sleep</span>
211
+ </div>
212
+ </div>
213
+ </div>
214
+ </section>
215
+
216
+ <!-- Performance Tab -->
217
+ <section class="tab-content" id="performance">
218
+ <div class="performance-header card">
219
+ <h2>⚡ Performance Control</h2>
220
+ <p>Smart FPS and background app management</p>
221
+ </div>
222
+
223
+ <div class="fps-control card">
224
+ <div class="control-header">
225
+ <h3>🖥️ FPS Control</h3>
226
+ <div class="mode-toggle">
227
+ <label class="switch">
228
+ <input type="checkbox" id="smartFpsToggle" checked>
229
+ <span class="slider"></span>
230
+ </label>
231
+ <span>Smart Mode</span>
232
+ </div>
233
+ </div>
234
+ <div class="fps-display">
235
+ <div class="current-fps">
236
+ <span class="fps-value">60</span>
237
+ <span class="fps-label">FPS</span>
238
+ </div>
239
+ <div class="fps-options">
240
+ <button class="fps-btn" data-fps="30">30</button>
241
+ <button class="fps-btn active" data-fps="60">60</button>
242
+ <button class="fps-btn" data-fps="90">90</button>
243
+ <button class="fps-btn" data-fps="120">120</button>
244
+ </div>
245
+ </div>
246
+ </div>
247
+
248
+ <div class="performance-modes card">
249
+ <h3>🔋 Performance Modes</h3>
250
+ <div class="mode-selector">
251
+ <button class="mode-btn" data-mode="ultra-low">Ultra-Low Power</button>
252
+ <button class="mode-btn active" data-mode="balanced">Balanced</button>
253
+ <button class="mode-btn" data-mode="performance">Performance</button>
254
+ </div>
255
+ </div>
256
+
257
+ <div class="system-metrics card">
258
+ <h3>📊 System Metrics</h3>
259
+ <div class="metrics-grid">
260
+ <div class="metric-item">
261
+ <span class="metric-label">CPU Usage</span>
262
+ <div class="metric-bar">
263
+ <div class="metric-fill cpu" style="width: 45%"></div>
264
+ </div>
265
+ <span class="metric-value">45%</span>
266
+ </div>
267
+ <div class="metric-item">
268
+ <span class="metric-label">GPU Usage</span>
269
+ <div class="metric-bar">
270
+ <div class="metric-fill gpu" style="width: 32%"></div>
271
+ </div>
272
+ <span class="metric-value">32%</span>
273
+ </div>
274
+ <div class="metric-item">
275
+ <span class="metric-label">Temperature</span>
276
+ <div class="metric-bar">
277
+ <div class="metric-fill temp" style="width: 38%"></div>
278
+ </div>
279
+ <span class="metric-value">38.5°C</span>
280
+ </div>
281
+ </div>
282
+ </div>
283
+
284
+ <div class="background-apps card">
285
+ <h3>📱 Background Apps</h3>
286
+ <div class="apps-list">
287
+ <div class="app-item">
288
+ <span class="app-icon">🎵</span>
289
+ <div class="app-info">
290
+ <span class="app-name">Spotify</span>
291
+ <span class="power-usage low">Low Power</span>
292
+ </div>
293
+ <div class="app-status optimized">Optimized</div>
294
+ <button class="app-toggle optimized"></button>
295
+ </div>
296
+ <div class="app-item">
297
+ <span class="app-icon">💬</span>
298
+ <div class="app-info">
299
+ <span class="app-name">WhatsApp</span>
300
+ <span class="power-usage medium">Medium Power</span>
301
+ </div>
302
+ <div class="app-status normal">Normal</div>
303
+ <button class="app-toggle normal"></button>
304
+ </div>
305
+ <div class="app-item">
306
+ <span class="app-icon">📘</span>
307
+ <div class="app-info">
308
+ <span class="app-name">Facebook</span>
309
+ <span class="power-usage high">High Power</span>
310
+ </div>
311
+ <div class="app-status restricted">Restricted</div>
312
+ <button class="app-toggle restricted"></button>
313
+ </div>
314
+ <div class="app-item">
315
+ <span class="app-icon">📸</span>
316
+ <div class="app-info">
317
+ <span class="app-name">Instagram</span>
318
+ <span class="power-usage medium">Medium Power</span>
319
+ </div>
320
+ <div class="app-status optimized">Optimized</div>
321
+ <button class="app-toggle optimized"></button>
322
+ </div>
323
+ <div class="app-item">
324
+ <span class="app-icon">📺</span>
325
+ <div class="app-info">
326
+ <span class="app-name">YouTube</span>
327
+ <span class="power-usage high">High Power</span>
328
+ </div>
329
+ <div class="app-status normal">Normal</div>
330
+ <button class="app-toggle normal"></button>
331
+ </div>
332
+ </div>
333
+ </div>
334
+ </section>
335
+
336
+ <!-- Brightness Tab -->
337
+ <section class="tab-content" id="brightness">
338
+ <div class="brightness-header card">
339
+ <h2>👁️ Smart Brightness</h2>
340
+ <p>AI-powered gaze detection and adaptive brightness</p>
341
+ </div>
342
+
343
+ <div class="gaze-detection card">
344
+ <h3>👀 Gaze Detection</h3>
345
+ <div class="gaze-status">
346
+ <div class="camera-preview">
347
+ <div class="face-indicator active">
348
+ <div class="eye left"></div>
349
+ <div class="eye right"></div>
350
+ <div class="mouth"></div>
351
+ </div>
352
+ </div>
353
+ <div class="gaze-info">
354
+ <div class="status-item">
355
+ <span class="status-label">User Present</span>
356
+ <div class="status-indicator active"></div>
357
+ </div>
358
+ <div class="status-item">
359
+ <span class="status-label">Gaze Detected</span>
360
+ <div class="status-indicator active"></div>
361
+ </div>
362
+ <div class="status-item">
363
+ <span class="status-label">Auto Brightness</span>
364
+ <label class="switch">
365
+ <input type="checkbox" id="autoBrightnessToggle" checked>
366
+ <span class="slider"></span>
367
+ </label>
368
+ </div>
369
+ </div>
370
+ </div>
371
+ </div>
372
+
373
+ <div class="brightness-control card">
374
+ <h3>💡 Brightness Control</h3>
375
+ <div class="brightness-display">
376
+ <div class="brightness-value">65%</div>
377
+ <div class="brightness-slider-container">
378
+ <input type="range" id="brightnessSlider" min="0" max="100" value="65" class="brightness-slider">
379
+ <div class="brightness-labels">
380
+ <span>🌑</span>
381
+ <span>🌞</span>
382
+ </div>
383
+ </div>
384
+ </div>
385
+ <div class="ambient-light">
386
+ <span class="ambient-label">Ambient Light</span>
387
+ <span class="ambient-value">240 lux</span>
388
+ </div>
389
+ </div>
390
+
391
+ <div class="brightness-features card">
392
+ <h3>⚙️ Smart Features</h3>
393
+ <div class="feature-list">
394
+ <div class="feature-item">
395
+ <div class="feature-info">
396
+ <span class="feature-name">Eye Tracking Mode</span>
397
+ <span class="feature-desc">Adjust based on eye movement</span>
398
+ </div>
399
+ <label class="switch">
400
+ <input type="checkbox" checked>
401
+ <span class="slider"></span>
402
+ </label>
403
+ </div>
404
+ <div class="feature-item">
405
+ <div class="feature-info">
406
+ <span class="feature-name">Blue Light Filter</span>
407
+ <span class="feature-desc">Reduce strain during night</span>
408
+ </div>
409
+ <label class="switch">
410
+ <input type="checkbox" checked>
411
+ <span class="slider"></span>
412
+ </label>
413
+ </div>
414
+ <div class="feature-item">
415
+ <div class="feature-info">
416
+ <span class="feature-name">Adaptive Dimming</span>
417
+ <span class="feature-desc">Dim when user looks away</span>
418
+ </div>
419
+ <label class="switch">
420
+ <input type="checkbox" checked>
421
+ <span class="slider"></span>
422
+ </label>
423
+ </div>
424
+ </div>
425
+ </div>
426
+ </section>
427
+ </main>
428
+
429
+ <!-- Bottom Navigation -->
430
+ <nav class="bottom-nav">
431
+ <button class="nav-btn active" data-tab="dashboard">
432
+ <span class="nav-icon">🏠</span>
433
+ <span class="nav-label">Dashboard</span>
434
+ </button>
435
+ <button class="nav-btn" data-tab="predictions">
436
+ <span class="nav-icon">🧠</span>
437
+ <span class="nav-label">Predictions</span>
438
+ </button>
439
+ <button class="nav-btn" data-tab="performance">
440
+ <span class="nav-icon">⚡</span>
441
+ <span class="nav-label">Performance</span>
442
+ </button>
443
+ <button class="nav-btn" data-tab="brightness">
444
+ <span class="nav-icon">💡</span>
445
+ <span class="nav-label">Brightness</span>
446
+ </button>
447
+ </nav>
448
+ </div>
449
+
450
+ <script src="app.js"></script>
451
+ </body>
452
+ </html>
ai-battery-optimizer/style.css ADDED
@@ -0,0 +1,1849 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ :root {
2
+ /* Primitive Color Tokens */
3
+ --color-white: rgba(255, 255, 255, 1);
4
+ --color-black: rgba(0, 0, 0, 1);
5
+ --color-cream-50: rgba(252, 252, 249, 1);
6
+ --color-cream-100: rgba(255, 255, 253, 1);
7
+ --color-gray-200: rgba(245, 245, 245, 1);
8
+ --color-gray-300: rgba(167, 169, 169, 1);
9
+ --color-gray-400: rgba(119, 124, 124, 1);
10
+ --color-slate-500: rgba(98, 108, 113, 1);
11
+ --color-brown-600: rgba(94, 82, 64, 1);
12
+ --color-charcoal-700: rgba(31, 33, 33, 1);
13
+ --color-charcoal-800: rgba(38, 40, 40, 1);
14
+ --color-slate-900: rgba(19, 52, 59, 1);
15
+ --color-teal-300: rgba(50, 184, 198, 1);
16
+ --color-teal-400: rgba(45, 166, 178, 1);
17
+ --color-teal-500: rgba(33, 128, 141, 1);
18
+ --color-teal-600: rgba(29, 116, 128, 1);
19
+ --color-teal-700: rgba(26, 104, 115, 1);
20
+ --color-teal-800: rgba(41, 150, 161, 1);
21
+ --color-red-400: rgba(255, 84, 89, 1);
22
+ --color-red-500: rgba(192, 21, 47, 1);
23
+ --color-orange-400: rgba(230, 129, 97, 1);
24
+ --color-orange-500: rgba(168, 75, 47, 1);
25
+
26
+ /* RGB versions for opacity control */
27
+ --color-brown-600-rgb: 94, 82, 64;
28
+ --color-teal-500-rgb: 33, 128, 141;
29
+ --color-slate-900-rgb: 19, 52, 59;
30
+ --color-slate-500-rgb: 98, 108, 113;
31
+ --color-red-500-rgb: 192, 21, 47;
32
+ --color-red-400-rgb: 255, 84, 89;
33
+ --color-orange-500-rgb: 168, 75, 47;
34
+ --color-orange-400-rgb: 230, 129, 97;
35
+
36
+ /* Background color tokens (Light Mode) */
37
+ --color-bg-1: rgba(59, 130, 246, 0.08); /* Light blue */
38
+ --color-bg-2: rgba(245, 158, 11, 0.08); /* Light yellow */
39
+ --color-bg-3: rgba(34, 197, 94, 0.08); /* Light green */
40
+ --color-bg-4: rgba(239, 68, 68, 0.08); /* Light red */
41
+ --color-bg-5: rgba(147, 51, 234, 0.08); /* Light purple */
42
+ --color-bg-6: rgba(249, 115, 22, 0.08); /* Light orange */
43
+ --color-bg-7: rgba(236, 72, 153, 0.08); /* Light pink */
44
+ --color-bg-8: rgba(6, 182, 212, 0.08); /* Light cyan */
45
+
46
+ /* Semantic Color Tokens (Light Mode) */
47
+ --color-background: var(--color-cream-50);
48
+ --color-surface: var(--color-cream-100);
49
+ --color-text: var(--color-slate-900);
50
+ --color-text-secondary: var(--color-slate-500);
51
+ --color-primary: var(--color-teal-500);
52
+ --color-primary-hover: var(--color-teal-600);
53
+ --color-primary-active: var(--color-teal-700);
54
+ --color-secondary: rgba(var(--color-brown-600-rgb), 0.12);
55
+ --color-secondary-hover: rgba(var(--color-brown-600-rgb), 0.2);
56
+ --color-secondary-active: rgba(var(--color-brown-600-rgb), 0.25);
57
+ --color-border: rgba(var(--color-brown-600-rgb), 0.2);
58
+ --color-btn-primary-text: var(--color-cream-50);
59
+ --color-card-border: rgba(var(--color-brown-600-rgb), 0.12);
60
+ --color-card-border-inner: rgba(var(--color-brown-600-rgb), 0.12);
61
+ --color-error: var(--color-red-500);
62
+ --color-success: var(--color-teal-500);
63
+ --color-warning: var(--color-orange-500);
64
+ --color-info: var(--color-slate-500);
65
+ --color-focus-ring: rgba(var(--color-teal-500-rgb), 0.4);
66
+ --color-select-caret: rgba(var(--color-slate-900-rgb), 0.8);
67
+
68
+ /* Common style patterns */
69
+ --focus-ring: 0 0 0 3px var(--color-focus-ring);
70
+ --focus-outline: 2px solid var(--color-primary);
71
+ --status-bg-opacity: 0.15;
72
+ --status-border-opacity: 0.25;
73
+ --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
74
+ --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
75
+
76
+ /* RGB versions for opacity control */
77
+ --color-success-rgb: 33, 128, 141;
78
+ --color-error-rgb: 192, 21, 47;
79
+ --color-warning-rgb: 168, 75, 47;
80
+ --color-info-rgb: 98, 108, 113;
81
+
82
+ /* Typography */
83
+ --font-family-base: "FKGroteskNeue", "Geist", "Inter", -apple-system,
84
+ BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
85
+ --font-family-mono: "Berkeley Mono", ui-monospace, SFMono-Regular, Menlo,
86
+ Monaco, Consolas, monospace;
87
+ --font-size-xs: 11px;
88
+ --font-size-sm: 12px;
89
+ --font-size-base: 14px;
90
+ --font-size-md: 14px;
91
+ --font-size-lg: 16px;
92
+ --font-size-xl: 18px;
93
+ --font-size-2xl: 20px;
94
+ --font-size-3xl: 24px;
95
+ --font-size-4xl: 30px;
96
+ --font-weight-normal: 400;
97
+ --font-weight-medium: 500;
98
+ --font-weight-semibold: 550;
99
+ --font-weight-bold: 600;
100
+ --line-height-tight: 1.2;
101
+ --line-height-normal: 1.5;
102
+ --letter-spacing-tight: -0.01em;
103
+
104
+ /* Spacing */
105
+ --space-0: 0;
106
+ --space-1: 1px;
107
+ --space-2: 2px;
108
+ --space-4: 4px;
109
+ --space-6: 6px;
110
+ --space-8: 8px;
111
+ --space-10: 10px;
112
+ --space-12: 12px;
113
+ --space-16: 16px;
114
+ --space-20: 20px;
115
+ --space-24: 24px;
116
+ --space-32: 32px;
117
+
118
+ /* Border Radius */
119
+ --radius-sm: 6px;
120
+ --radius-base: 8px;
121
+ --radius-md: 10px;
122
+ --radius-lg: 12px;
123
+ --radius-full: 9999px;
124
+
125
+ /* Shadows */
126
+ --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.02);
127
+ --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
128
+ --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04),
129
+ 0 2px 4px -1px rgba(0, 0, 0, 0.02);
130
+ --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04),
131
+ 0 4px 6px -2px rgba(0, 0, 0, 0.02);
132
+ --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.15),
133
+ inset 0 -1px 0 rgba(0, 0, 0, 0.03);
134
+
135
+ /* Animation */
136
+ --duration-fast: 150ms;
137
+ --duration-normal: 250ms;
138
+ --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);
139
+
140
+ /* Layout */
141
+ --container-sm: 640px;
142
+ --container-md: 768px;
143
+ --container-lg: 1024px;
144
+ --container-xl: 1280px;
145
+ }
146
+
147
+ /* Dark mode colors */
148
+ @media (prefers-color-scheme: dark) {
149
+ :root {
150
+ /* RGB versions for opacity control (Dark Mode) */
151
+ --color-gray-400-rgb: 119, 124, 124;
152
+ --color-teal-300-rgb: 50, 184, 198;
153
+ --color-gray-300-rgb: 167, 169, 169;
154
+ --color-gray-200-rgb: 245, 245, 245;
155
+
156
+ /* Background color tokens (Dark Mode) */
157
+ --color-bg-1: rgba(29, 78, 216, 0.15); /* Dark blue */
158
+ --color-bg-2: rgba(180, 83, 9, 0.15); /* Dark yellow */
159
+ --color-bg-3: rgba(21, 128, 61, 0.15); /* Dark green */
160
+ --color-bg-4: rgba(185, 28, 28, 0.15); /* Dark red */
161
+ --color-bg-5: rgba(107, 33, 168, 0.15); /* Dark purple */
162
+ --color-bg-6: rgba(194, 65, 12, 0.15); /* Dark orange */
163
+ --color-bg-7: rgba(190, 24, 93, 0.15); /* Dark pink */
164
+ --color-bg-8: rgba(8, 145, 178, 0.15); /* Dark cyan */
165
+
166
+ /* Semantic Color Tokens (Dark Mode) */
167
+ --color-background: var(--color-charcoal-700);
168
+ --color-surface: var(--color-charcoal-800);
169
+ --color-text: var(--color-gray-200);
170
+ --color-text-secondary: rgba(var(--color-gray-300-rgb), 0.7);
171
+ --color-primary: var(--color-teal-300);
172
+ --color-primary-hover: var(--color-teal-400);
173
+ --color-primary-active: var(--color-teal-800);
174
+ --color-secondary: rgba(var(--color-gray-400-rgb), 0.15);
175
+ --color-secondary-hover: rgba(var(--color-gray-400-rgb), 0.25);
176
+ --color-secondary-active: rgba(var(--color-gray-400-rgb), 0.3);
177
+ --color-border: rgba(var(--color-gray-400-rgb), 0.3);
178
+ --color-error: var(--color-red-400);
179
+ --color-success: var(--color-teal-300);
180
+ --color-warning: var(--color-orange-400);
181
+ --color-info: var(--color-gray-300);
182
+ --color-focus-ring: rgba(var(--color-teal-300-rgb), 0.4);
183
+ --color-btn-primary-text: var(--color-slate-900);
184
+ --color-card-border: rgba(var(--color-gray-400-rgb), 0.2);
185
+ --color-card-border-inner: rgba(var(--color-gray-400-rgb), 0.15);
186
+ --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.1),
187
+ inset 0 -1px 0 rgba(0, 0, 0, 0.15);
188
+ --button-border-secondary: rgba(var(--color-gray-400-rgb), 0.2);
189
+ --color-border-secondary: rgba(var(--color-gray-400-rgb), 0.2);
190
+ --color-select-caret: rgba(var(--color-gray-200-rgb), 0.8);
191
+
192
+ /* Common style patterns - updated for dark mode */
193
+ --focus-ring: 0 0 0 3px var(--color-focus-ring);
194
+ --focus-outline: 2px solid var(--color-primary);
195
+ --status-bg-opacity: 0.15;
196
+ --status-border-opacity: 0.25;
197
+ --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
198
+ --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
199
+
200
+ /* RGB versions for dark mode */
201
+ --color-success-rgb: var(--color-teal-300-rgb);
202
+ --color-error-rgb: var(--color-red-400-rgb);
203
+ --color-warning-rgb: var(--color-orange-400-rgb);
204
+ --color-info-rgb: var(--color-gray-300-rgb);
205
+ }
206
+ }
207
+
208
+ /* Data attribute for manual theme switching */
209
+ [data-color-scheme="dark"] {
210
+ /* RGB versions for opacity control (dark mode) */
211
+ --color-gray-400-rgb: 119, 124, 124;
212
+ --color-teal-300-rgb: 50, 184, 198;
213
+ --color-gray-300-rgb: 167, 169, 169;
214
+ --color-gray-200-rgb: 245, 245, 245;
215
+
216
+ /* Colorful background palette - Dark Mode */
217
+ --color-bg-1: rgba(29, 78, 216, 0.15); /* Dark blue */
218
+ --color-bg-2: rgba(180, 83, 9, 0.15); /* Dark yellow */
219
+ --color-bg-3: rgba(21, 128, 61, 0.15); /* Dark green */
220
+ --color-bg-4: rgba(185, 28, 28, 0.15); /* Dark red */
221
+ --color-bg-5: rgba(107, 33, 168, 0.15); /* Dark purple */
222
+ --color-bg-6: rgba(194, 65, 12, 0.15); /* Dark orange */
223
+ --color-bg-7: rgba(190, 24, 93, 0.15); /* Dark pink */
224
+ --color-bg-8: rgba(8, 145, 178, 0.15); /* Dark cyan */
225
+
226
+ /* Semantic Color Tokens (Dark Mode) */
227
+ --color-background: var(--color-charcoal-700);
228
+ --color-surface: var(--color-charcoal-800);
229
+ --color-text: var(--color-gray-200);
230
+ --color-text-secondary: rgba(var(--color-gray-300-rgb), 0.7);
231
+ --color-primary: var(--color-teal-300);
232
+ --color-primary-hover: var(--color-teal-400);
233
+ --color-primary-active: var(--color-teal-800);
234
+ --color-secondary: rgba(var(--color-gray-400-rgb), 0.15);
235
+ --color-secondary-hover: rgba(var(--color-gray-400-rgb), 0.25);
236
+ --color-secondary-active: rgba(var(--color-gray-400-rgb), 0.3);
237
+ --color-border: rgba(var(--color-gray-400-rgb), 0.3);
238
+ --color-error: var(--color-red-400);
239
+ --color-success: var(--color-teal-300);
240
+ --color-warning: var(--color-orange-400);
241
+ --color-info: var(--color-gray-300);
242
+ --color-focus-ring: rgba(var(--color-teal-300-rgb), 0.4);
243
+ --color-btn-primary-text: var(--color-slate-900);
244
+ --color-card-border: rgba(var(--color-gray-400-rgb), 0.15);
245
+ --color-card-border-inner: rgba(var(--color-gray-400-rgb), 0.15);
246
+ --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.1),
247
+ inset 0 -1px 0 rgba(0, 0, 0, 0.15);
248
+ --color-border-secondary: rgba(var(--color-gray-400-rgb), 0.2);
249
+ --color-select-caret: rgba(var(--color-gray-200-rgb), 0.8);
250
+
251
+ /* Common style patterns - updated for dark mode */
252
+ --focus-ring: 0 0 0 3px var(--color-focus-ring);
253
+ --focus-outline: 2px solid var(--color-primary);
254
+ --status-bg-opacity: 0.15;
255
+ --status-border-opacity: 0.25;
256
+ --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23134252' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
257
+ --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
258
+
259
+ /* RGB versions for dark mode */
260
+ --color-success-rgb: var(--color-teal-300-rgb);
261
+ --color-error-rgb: var(--color-red-400-rgb);
262
+ --color-warning-rgb: var(--color-orange-400-rgb);
263
+ --color-info-rgb: var(--color-gray-300-rgb);
264
+ }
265
+
266
+ [data-color-scheme="light"] {
267
+ /* RGB versions for opacity control (light mode) */
268
+ --color-brown-600-rgb: 94, 82, 64;
269
+ --color-teal-500-rgb: 33, 128, 141;
270
+ --color-slate-900-rgb: 19, 52, 59;
271
+
272
+ /* Semantic Color Tokens (Light Mode) */
273
+ --color-background: var(--color-cream-50);
274
+ --color-surface: var(--color-cream-100);
275
+ --color-text: var(--color-slate-900);
276
+ --color-text-secondary: var(--color-slate-500);
277
+ --color-primary: var(--color-teal-500);
278
+ --color-primary-hover: var(--color-teal-600);
279
+ --color-primary-active: var(--color-teal-700);
280
+ --color-secondary: rgba(var(--color-brown-600-rgb), 0.12);
281
+ --color-secondary-hover: rgba(var(--color-brown-600-rgb), 0.2);
282
+ --color-secondary-active: rgba(var(--color-brown-600-rgb), 0.25);
283
+ --color-border: rgba(var(--color-brown-600-rgb), 0.2);
284
+ --color-btn-primary-text: var(--color-cream-50);
285
+ --color-card-border: rgba(var(--color-brown-600-rgb), 0.12);
286
+ --color-card-border-inner: rgba(var(--color-brown-600-rgb), 0.12);
287
+ --color-error: var(--color-red-500);
288
+ --color-success: var(--color-teal-500);
289
+ --color-warning: var(--color-orange-500);
290
+ --color-info: var(--color-slate-500);
291
+ --color-focus-ring: rgba(var(--color-teal-500-rgb), 0.4);
292
+
293
+ /* RGB versions for light mode */
294
+ --color-success-rgb: var(--color-teal-500-rgb);
295
+ --color-error-rgb: var(--color-red-500-rgb);
296
+ --color-warning-rgb: var(--color-orange-500-rgb);
297
+ --color-info-rgb: var(--color-slate-500-rgb);
298
+ }
299
+
300
+ /* Base styles */
301
+ html {
302
+ font-size: var(--font-size-base);
303
+ font-family: var(--font-family-base);
304
+ line-height: var(--line-height-normal);
305
+ color: var(--color-text);
306
+ background-color: var(--color-background);
307
+ -webkit-font-smoothing: antialiased;
308
+ box-sizing: border-box;
309
+ }
310
+
311
+ body {
312
+ margin: 0;
313
+ padding: 0;
314
+ }
315
+
316
+ *,
317
+ *::before,
318
+ *::after {
319
+ box-sizing: inherit;
320
+ }
321
+
322
+ /* Typography */
323
+ h1,
324
+ h2,
325
+ h3,
326
+ h4,
327
+ h5,
328
+ h6 {
329
+ margin: 0;
330
+ font-weight: var(--font-weight-semibold);
331
+ line-height: var(--line-height-tight);
332
+ color: var(--color-text);
333
+ letter-spacing: var(--letter-spacing-tight);
334
+ }
335
+
336
+ h1 {
337
+ font-size: var(--font-size-4xl);
338
+ }
339
+ h2 {
340
+ font-size: var(--font-size-3xl);
341
+ }
342
+ h3 {
343
+ font-size: var(--font-size-2xl);
344
+ }
345
+ h4 {
346
+ font-size: var(--font-size-xl);
347
+ }
348
+ h5 {
349
+ font-size: var(--font-size-lg);
350
+ }
351
+ h6 {
352
+ font-size: var(--font-size-md);
353
+ }
354
+
355
+ p {
356
+ margin: 0 0 var(--space-16) 0;
357
+ }
358
+
359
+ a {
360
+ color: var(--color-primary);
361
+ text-decoration: none;
362
+ transition: color var(--duration-fast) var(--ease-standard);
363
+ }
364
+
365
+ a:hover {
366
+ color: var(--color-primary-hover);
367
+ }
368
+
369
+ code,
370
+ pre {
371
+ font-family: var(--font-family-mono);
372
+ font-size: calc(var(--font-size-base) * 0.95);
373
+ background-color: var(--color-secondary);
374
+ border-radius: var(--radius-sm);
375
+ }
376
+
377
+ code {
378
+ padding: var(--space-1) var(--space-4);
379
+ }
380
+
381
+ pre {
382
+ padding: var(--space-16);
383
+ margin: var(--space-16) 0;
384
+ overflow: auto;
385
+ border: 1px solid var(--color-border);
386
+ }
387
+
388
+ pre code {
389
+ background: none;
390
+ padding: 0;
391
+ }
392
+
393
+ /* Buttons */
394
+ .btn {
395
+ display: inline-flex;
396
+ align-items: center;
397
+ justify-content: center;
398
+ padding: var(--space-8) var(--space-16);
399
+ border-radius: var(--radius-base);
400
+ font-size: var(--font-size-base);
401
+ font-weight: 500;
402
+ line-height: 1.5;
403
+ cursor: pointer;
404
+ transition: all var(--duration-normal) var(--ease-standard);
405
+ border: none;
406
+ text-decoration: none;
407
+ position: relative;
408
+ }
409
+
410
+ .btn:focus-visible {
411
+ outline: none;
412
+ box-shadow: var(--focus-ring);
413
+ }
414
+
415
+ .btn--primary {
416
+ background: var(--color-primary);
417
+ color: var(--color-btn-primary-text);
418
+ }
419
+
420
+ .btn--primary:hover {
421
+ background: var(--color-primary-hover);
422
+ }
423
+
424
+ .btn--primary:active {
425
+ background: var(--color-primary-active);
426
+ }
427
+
428
+ .btn--secondary {
429
+ background: var(--color-secondary);
430
+ color: var(--color-text);
431
+ }
432
+
433
+ .btn--secondary:hover {
434
+ background: var(--color-secondary-hover);
435
+ }
436
+
437
+ .btn--secondary:active {
438
+ background: var(--color-secondary-active);
439
+ }
440
+
441
+ .btn--outline {
442
+ background: transparent;
443
+ border: 1px solid var(--color-border);
444
+ color: var(--color-text);
445
+ }
446
+
447
+ .btn--outline:hover {
448
+ background: var(--color-secondary);
449
+ }
450
+
451
+ .btn--sm {
452
+ padding: var(--space-4) var(--space-12);
453
+ font-size: var(--font-size-sm);
454
+ border-radius: var(--radius-sm);
455
+ }
456
+
457
+ .btn--lg {
458
+ padding: var(--space-10) var(--space-20);
459
+ font-size: var(--font-size-lg);
460
+ border-radius: var(--radius-md);
461
+ }
462
+
463
+ .btn--full-width {
464
+ width: 100%;
465
+ }
466
+
467
+ .btn:disabled {
468
+ opacity: 0.5;
469
+ cursor: not-allowed;
470
+ }
471
+
472
+ /* Form elements */
473
+ .form-control {
474
+ display: block;
475
+ width: 100%;
476
+ padding: var(--space-8) var(--space-12);
477
+ font-size: var(--font-size-md);
478
+ line-height: 1.5;
479
+ color: var(--color-text);
480
+ background-color: var(--color-surface);
481
+ border: 1px solid var(--color-border);
482
+ border-radius: var(--radius-base);
483
+ transition: border-color var(--duration-fast) var(--ease-standard),
484
+ box-shadow var(--duration-fast) var(--ease-standard);
485
+ }
486
+
487
+ textarea.form-control {
488
+ font-family: var(--font-family-base);
489
+ font-size: var(--font-size-base);
490
+ }
491
+
492
+ select.form-control {
493
+ padding: var(--space-8) var(--space-12);
494
+ -webkit-appearance: none;
495
+ -moz-appearance: none;
496
+ appearance: none;
497
+ background-image: var(--select-caret-light);
498
+ background-repeat: no-repeat;
499
+ background-position: right var(--space-12) center;
500
+ background-size: 16px;
501
+ padding-right: var(--space-32);
502
+ }
503
+
504
+ /* Add a dark mode specific caret */
505
+ @media (prefers-color-scheme: dark) {
506
+ select.form-control {
507
+ background-image: var(--select-caret-dark);
508
+ }
509
+ }
510
+
511
+ /* Also handle data-color-scheme */
512
+ [data-color-scheme="dark"] select.form-control {
513
+ background-image: var(--select-caret-dark);
514
+ }
515
+
516
+ [data-color-scheme="light"] select.form-control {
517
+ background-image: var(--select-caret-light);
518
+ }
519
+
520
+ .form-control:focus {
521
+ border-color: var(--color-primary);
522
+ outline: var(--focus-outline);
523
+ }
524
+
525
+ .form-label {
526
+ display: block;
527
+ margin-bottom: var(--space-8);
528
+ font-weight: var(--font-weight-medium);
529
+ font-size: var(--font-size-sm);
530
+ }
531
+
532
+ .form-group {
533
+ margin-bottom: var(--space-16);
534
+ }
535
+
536
+ /* Card component */
537
+ .card {
538
+ background-color: var(--color-surface);
539
+ border-radius: var(--radius-lg);
540
+ border: 1px solid var(--color-card-border);
541
+ box-shadow: var(--shadow-sm);
542
+ overflow: hidden;
543
+ transition: box-shadow var(--duration-normal) var(--ease-standard);
544
+ }
545
+
546
+ .card:hover {
547
+ box-shadow: var(--shadow-md);
548
+ }
549
+
550
+ .card__body {
551
+ padding: var(--space-16);
552
+ }
553
+
554
+ .card__header,
555
+ .card__footer {
556
+ padding: var(--space-16);
557
+ border-bottom: 1px solid var(--color-card-border-inner);
558
+ }
559
+
560
+ /* Status indicators - simplified with CSS variables */
561
+ .status {
562
+ display: inline-flex;
563
+ align-items: center;
564
+ padding: var(--space-6) var(--space-12);
565
+ border-radius: var(--radius-full);
566
+ font-weight: var(--font-weight-medium);
567
+ font-size: var(--font-size-sm);
568
+ }
569
+
570
+ .status--success {
571
+ background-color: rgba(
572
+ var(--color-success-rgb, 33, 128, 141),
573
+ var(--status-bg-opacity)
574
+ );
575
+ color: var(--color-success);
576
+ border: 1px solid
577
+ rgba(var(--color-success-rgb, 33, 128, 141), var(--status-border-opacity));
578
+ }
579
+
580
+ .status--error {
581
+ background-color: rgba(
582
+ var(--color-error-rgb, 192, 21, 47),
583
+ var(--status-bg-opacity)
584
+ );
585
+ color: var(--color-error);
586
+ border: 1px solid
587
+ rgba(var(--color-error-rgb, 192, 21, 47), var(--status-border-opacity));
588
+ }
589
+
590
+ .status--warning {
591
+ background-color: rgba(
592
+ var(--color-warning-rgb, 168, 75, 47),
593
+ var(--status-bg-opacity)
594
+ );
595
+ color: var(--color-warning);
596
+ border: 1px solid
597
+ rgba(var(--color-warning-rgb, 168, 75, 47), var(--status-border-opacity));
598
+ }
599
+
600
+ .status--info {
601
+ background-color: rgba(
602
+ var(--color-info-rgb, 98, 108, 113),
603
+ var(--status-bg-opacity)
604
+ );
605
+ color: var(--color-info);
606
+ border: 1px solid
607
+ rgba(var(--color-info-rgb, 98, 108, 113), var(--status-border-opacity));
608
+ }
609
+
610
+ /* Container layout */
611
+ .container {
612
+ width: 100%;
613
+ margin-right: auto;
614
+ margin-left: auto;
615
+ padding-right: var(--space-16);
616
+ padding-left: var(--space-16);
617
+ }
618
+
619
+ @media (min-width: 640px) {
620
+ .container {
621
+ max-width: var(--container-sm);
622
+ }
623
+ }
624
+ @media (min-width: 768px) {
625
+ .container {
626
+ max-width: var(--container-md);
627
+ }
628
+ }
629
+ @media (min-width: 1024px) {
630
+ .container {
631
+ max-width: var(--container-lg);
632
+ }
633
+ }
634
+ @media (min-width: 1280px) {
635
+ .container {
636
+ max-width: var(--container-xl);
637
+ }
638
+ }
639
+
640
+ /* Utility classes */
641
+ .flex {
642
+ display: flex;
643
+ }
644
+ .flex-col {
645
+ flex-direction: column;
646
+ }
647
+ .items-center {
648
+ align-items: center;
649
+ }
650
+ .justify-center {
651
+ justify-content: center;
652
+ }
653
+ .justify-between {
654
+ justify-content: space-between;
655
+ }
656
+ .gap-4 {
657
+ gap: var(--space-4);
658
+ }
659
+ .gap-8 {
660
+ gap: var(--space-8);
661
+ }
662
+ .gap-16 {
663
+ gap: var(--space-16);
664
+ }
665
+
666
+ .m-0 {
667
+ margin: 0;
668
+ }
669
+ .mt-8 {
670
+ margin-top: var(--space-8);
671
+ }
672
+ .mb-8 {
673
+ margin-bottom: var(--space-8);
674
+ }
675
+ .mx-8 {
676
+ margin-left: var(--space-8);
677
+ margin-right: var(--space-8);
678
+ }
679
+ .my-8 {
680
+ margin-top: var(--space-8);
681
+ margin-bottom: var(--space-8);
682
+ }
683
+
684
+ .p-0 {
685
+ padding: 0;
686
+ }
687
+ .py-8 {
688
+ padding-top: var(--space-8);
689
+ padding-bottom: var(--space-8);
690
+ }
691
+ .px-8 {
692
+ padding-left: var(--space-8);
693
+ padding-right: var(--space-8);
694
+ }
695
+ .py-16 {
696
+ padding-top: var(--space-16);
697
+ padding-bottom: var(--space-16);
698
+ }
699
+ .px-16 {
700
+ padding-left: var(--space-16);
701
+ padding-right: var(--space-16);
702
+ }
703
+
704
+ .block {
705
+ display: block;
706
+ }
707
+ .hidden {
708
+ display: none;
709
+ }
710
+
711
+ /* Accessibility */
712
+ .sr-only {
713
+ position: absolute;
714
+ width: 1px;
715
+ height: 1px;
716
+ padding: 0;
717
+ margin: -1px;
718
+ overflow: hidden;
719
+ clip: rect(0, 0, 0, 0);
720
+ white-space: nowrap;
721
+ border-width: 0;
722
+ }
723
+
724
+ :focus-visible {
725
+ outline: var(--focus-outline);
726
+ outline-offset: 2px;
727
+ }
728
+
729
+ /* Dark mode specifics */
730
+ [data-color-scheme="dark"] .btn--outline {
731
+ border: 1px solid var(--color-border-secondary);
732
+ }
733
+
734
+ @font-face {
735
+ font-family: 'FKGroteskNeue';
736
+ src: url('https://r2cdn.perplexity.ai/fonts/FKGroteskNeue.woff2')
737
+ format('woff2');
738
+ }
739
+
740
+ /* END PERPLEXITY DESIGN SYSTEM */
741
+ /* Mobile-first futuristic battery optimizer app styles */
742
+
743
+ .app-container {
744
+ max-width: 375px;
745
+ margin: 0 auto;
746
+ background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
747
+ min-height: 100vh;
748
+ overflow-x: hidden;
749
+ position: relative;
750
+ }
751
+
752
+ /* Add subtle animated background particles */
753
+ .app-container::before {
754
+ content: '';
755
+ position: absolute;
756
+ top: 0;
757
+ left: 0;
758
+ width: 100%;
759
+ height: 100%;
760
+ background:
761
+ radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
762
+ radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
763
+ radial-gradient(circle at 40% 80%, rgba(0, 212, 255, 0.05) 0%, transparent 50%);
764
+ pointer-events: none;
765
+ animation: backgroundPulse 8s ease-in-out infinite;
766
+ }
767
+
768
+ @keyframes backgroundPulse {
769
+ 0%, 100% { opacity: 0.5; }
770
+ 50% { opacity: 1; }
771
+ }
772
+
773
+ /* Header Styles */
774
+ .app-header {
775
+ padding: var(--space-16) var(--space-20);
776
+ background: rgba(10, 10, 15, 0.9);
777
+ backdrop-filter: blur(20px);
778
+ border-bottom: 1px solid rgba(0, 212, 255, 0.2);
779
+ position: sticky;
780
+ top: 0;
781
+ z-index: 100;
782
+ }
783
+
784
+ .status-bar {
785
+ display: flex;
786
+ justify-content: space-between;
787
+ align-items: center;
788
+ margin-bottom: var(--space-16);
789
+ font-size: var(--font-size-sm);
790
+ color: rgba(255, 255, 255, 0.8);
791
+ }
792
+
793
+ .status-icons {
794
+ display: flex;
795
+ align-items: center;
796
+ gap: var(--space-8);
797
+ }
798
+
799
+ .battery-percentage {
800
+ color: #00d4ff;
801
+ font-weight: var(--font-weight-bold);
802
+ }
803
+
804
+ .header-content {
805
+ display: flex;
806
+ justify-content: space-between;
807
+ align-items: center;
808
+ }
809
+
810
+ .app-title {
811
+ font-size: var(--font-size-xl);
812
+ background: linear-gradient(135deg, #00d4ff 0%, #8b5cf6 100%);
813
+ -webkit-background-clip: text;
814
+ -webkit-text-fill-color: transparent;
815
+ background-clip: text;
816
+ font-weight: var(--font-weight-bold);
817
+ }
818
+
819
+ .optimization-status {
820
+ display: flex;
821
+ align-items: center;
822
+ gap: var(--space-8);
823
+ font-size: var(--font-size-sm);
824
+ color: rgba(255, 255, 255, 0.8);
825
+ }
826
+
827
+ .status-indicator {
828
+ width: 8px;
829
+ height: 8px;
830
+ border-radius: 50%;
831
+ background: #10b981;
832
+ animation: pulse 2s ease-in-out infinite;
833
+ }
834
+
835
+ .status-indicator.active {
836
+ background: #00d4ff;
837
+ box-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
838
+ }
839
+
840
+ @keyframes pulse {
841
+ 0%, 100% { opacity: 1; transform: scale(1); }
842
+ 50% { opacity: 0.7; transform: scale(1.1); }
843
+ }
844
+
845
+ /* Main Content */
846
+ .main-content {
847
+ padding: var(--space-20);
848
+ padding-bottom: 100px; /* Space for bottom nav */
849
+ }
850
+
851
+ /* Tab System */
852
+ .tab-content {
853
+ display: none;
854
+ animation: fadeIn 0.3s ease-out;
855
+ }
856
+
857
+ .tab-content.active {
858
+ display: block;
859
+ }
860
+
861
+ @keyframes fadeIn {
862
+ from { opacity: 0; transform: translateY(10px); }
863
+ to { opacity: 1; transform: translateY(0); }
864
+ }
865
+
866
+ /* Card Styles with Futuristic Design */
867
+ .card {
868
+ background: rgba(26, 26, 46, 0.8);
869
+ border: 1px solid rgba(0, 212, 255, 0.2);
870
+ border-radius: var(--radius-lg);
871
+ padding: var(--space-20);
872
+ margin-bottom: var(--space-20);
873
+ backdrop-filter: blur(20px);
874
+ position: relative;
875
+ overflow: hidden;
876
+ transition: all var(--duration-normal) var(--ease-standard);
877
+ }
878
+
879
+ .card::before {
880
+ content: '';
881
+ position: absolute;
882
+ top: 0;
883
+ left: 0;
884
+ width: 100%;
885
+ height: 1px;
886
+ background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.8), transparent);
887
+ animation: shimmer 3s ease-in-out infinite;
888
+ }
889
+
890
+ @keyframes shimmer {
891
+ 0% { transform: translateX(-100%); }
892
+ 100% { transform: translateX(100%); }
893
+ }
894
+
895
+ .card:hover {
896
+ border-color: rgba(0, 212, 255, 0.4);
897
+ box-shadow: 0 8px 32px rgba(0, 212, 255, 0.1);
898
+ transform: translateY(-2px);
899
+ }
900
+
901
+ /* Battery Widget */
902
+ .battery-widget {
903
+ display: flex;
904
+ gap: var(--space-24);
905
+ align-items: center;
906
+ }
907
+
908
+ .battery-circle {
909
+ position: relative;
910
+ flex-shrink: 0;
911
+ }
912
+
913
+ .battery-info {
914
+ position: absolute;
915
+ top: 50%;
916
+ left: 50%;
917
+ transform: translate(-50%, -50%);
918
+ text-align: center;
919
+ }
920
+
921
+ .battery-level {
922
+ display: block;
923
+ font-size: var(--font-size-2xl);
924
+ font-weight: var(--font-weight-bold);
925
+ color: #00d4ff;
926
+ line-height: 1;
927
+ }
928
+
929
+ .time-remaining {
930
+ display: block;
931
+ font-size: var(--font-size-sm);
932
+ color: rgba(255, 255, 255, 0.7);
933
+ margin-top: var(--space-4);
934
+ }
935
+
936
+ .battery-details {
937
+ flex: 1;
938
+ }
939
+
940
+ .detail-item {
941
+ display: flex;
942
+ justify-content: space-between;
943
+ align-items: center;
944
+ margin-bottom: var(--space-12);
945
+ }
946
+
947
+ .detail-item:last-child {
948
+ margin-bottom: 0;
949
+ }
950
+
951
+ .label {
952
+ color: rgba(255, 255, 255, 0.7);
953
+ font-size: var(--font-size-sm);
954
+ }
955
+
956
+ .value {
957
+ color: #ffffff;
958
+ font-weight: var(--font-weight-medium);
959
+ }
960
+
961
+ .value.excellent {
962
+ color: #10b981;
963
+ }
964
+
965
+ /* AI Prediction Widget */
966
+ .prediction-widget .widget-header {
967
+ display: flex;
968
+ justify-content: space-between;
969
+ align-items: center;
970
+ margin-bottom: var(--space-20);
971
+ }
972
+
973
+ .widget-header h3 {
974
+ color: #ffffff;
975
+ margin: 0;
976
+ }
977
+
978
+ .accuracy-badge {
979
+ background: rgba(139, 92, 246, 0.2);
980
+ color: #8b5cf6;
981
+ padding: var(--space-4) var(--space-8);
982
+ border-radius: var(--radius-full);
983
+ font-size: var(--font-size-xs);
984
+ border: 1px solid rgba(139, 92, 246, 0.3);
985
+ }
986
+
987
+ .next-app-prediction {
988
+ display: flex;
989
+ gap: var(--space-16);
990
+ align-items: center;
991
+ margin-bottom: var(--space-24);
992
+ }
993
+
994
+ .app-icon {
995
+ font-size: 32px;
996
+ width: 48px;
997
+ height: 48px;
998
+ display: flex;
999
+ align-items: center;
1000
+ justify-content: center;
1001
+ background: rgba(0, 212, 255, 0.1);
1002
+ border-radius: var(--radius-md);
1003
+ border: 1px solid rgba(0, 212, 255, 0.3);
1004
+ }
1005
+
1006
+ .prediction-info {
1007
+ flex: 1;
1008
+ }
1009
+
1010
+ .prediction-info h4 {
1011
+ color: #ffffff;
1012
+ margin: 0 0 var(--space-8) 0;
1013
+ font-size: var(--font-size-lg);
1014
+ }
1015
+
1016
+ .confidence-bar {
1017
+ background: rgba(255, 255, 255, 0.1);
1018
+ height: 6px;
1019
+ border-radius: var(--radius-sm);
1020
+ position: relative;
1021
+ margin-bottom: var(--space-8);
1022
+ }
1023
+
1024
+ .confidence-fill {
1025
+ height: 100%;
1026
+ background: linear-gradient(90deg, #00d4ff 0%, #10b981 100%);
1027
+ border-radius: var(--radius-sm);
1028
+ transition: width 1s ease-out;
1029
+ }
1030
+
1031
+ .confidence-text {
1032
+ position: absolute;
1033
+ right: 0;
1034
+ top: -20px;
1035
+ font-size: var(--font-size-xs);
1036
+ color: #00d4ff;
1037
+ font-weight: var(--font-weight-bold);
1038
+ }
1039
+
1040
+ .launch-time {
1041
+ color: rgba(255, 255, 255, 0.7);
1042
+ font-size: var(--font-size-sm);
1043
+ margin: 0;
1044
+ }
1045
+
1046
+ .alternative-predictions {
1047
+ display: grid;
1048
+ grid-template-columns: repeat(3, 1fr);
1049
+ gap: var(--space-12);
1050
+ }
1051
+
1052
+ .alt-app {
1053
+ display: flex;
1054
+ flex-direction: column;
1055
+ align-items: center;
1056
+ gap: var(--space-4);
1057
+ padding: var(--space-8);
1058
+ background: rgba(255, 255, 255, 0.05);
1059
+ border-radius: var(--radius-base);
1060
+ border: 1px solid rgba(255, 255, 255, 0.1);
1061
+ }
1062
+
1063
+ .alt-app .app-icon {
1064
+ font-size: 16px;
1065
+ width: 24px;
1066
+ height: 24px;
1067
+ }
1068
+
1069
+ .alt-app .app-name {
1070
+ font-size: var(--font-size-xs);
1071
+ color: rgba(255, 255, 255, 0.8);
1072
+ }
1073
+
1074
+ .alt-app .confidence {
1075
+ font-size: var(--font-size-xs);
1076
+ color: #00d4ff;
1077
+ font-weight: var(--font-weight-bold);
1078
+ }
1079
+
1080
+ /* Stats Grid */
1081
+ .stats-grid {
1082
+ display: grid;
1083
+ grid-template-columns: repeat(3, 1fr);
1084
+ gap: var(--space-16);
1085
+ margin-bottom: var(--space-20);
1086
+ }
1087
+
1088
+ .stat-card {
1089
+ text-align: center;
1090
+ padding: var(--space-16);
1091
+ }
1092
+
1093
+ .stat-icon {
1094
+ font-size: 24px;
1095
+ display: block;
1096
+ margin-bottom: var(--space-8);
1097
+ }
1098
+
1099
+ .stat-value {
1100
+ display: block;
1101
+ font-size: var(--font-size-lg);
1102
+ font-weight: var(--font-weight-bold);
1103
+ color: #00d4ff;
1104
+ margin-bottom: var(--space-4);
1105
+ }
1106
+
1107
+ .stat-label {
1108
+ font-size: var(--font-size-xs);
1109
+ color: rgba(255, 255, 255, 0.7);
1110
+ }
1111
+
1112
+ /* Chart Container */
1113
+ .chart-widget h3 {
1114
+ color: #ffffff;
1115
+ margin: 0 0 var(--space-16) 0;
1116
+ }
1117
+
1118
+ /* Action Buttons */
1119
+ .action-buttons {
1120
+ margin-top: var(--space-32);
1121
+ }
1122
+
1123
+ .btn-icon {
1124
+ margin-right: var(--space-8);
1125
+ }
1126
+
1127
+ /* Button Overrides for Futuristic Style */
1128
+ .btn--primary {
1129
+ background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
1130
+ border: 1px solid rgba(0, 212, 255, 0.5);
1131
+ box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
1132
+ color: #0a0a0f;
1133
+ font-weight: var(--font-weight-bold);
1134
+ }
1135
+
1136
+ .btn--primary:hover {
1137
+ box-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
1138
+ transform: translateY(-2px);
1139
+ }
1140
+
1141
+ /* Usage Patterns */
1142
+ .prediction-header {
1143
+ text-align: center;
1144
+ }
1145
+
1146
+ .prediction-header h2 {
1147
+ color: #ffffff;
1148
+ margin: 0 0 var(--space-8) 0;
1149
+ }
1150
+
1151
+ .prediction-header p {
1152
+ color: rgba(255, 255, 255, 0.7);
1153
+ margin: 0;
1154
+ }
1155
+
1156
+ .patterns-list {
1157
+ display: flex;
1158
+ flex-direction: column;
1159
+ gap: var(--space-12);
1160
+ }
1161
+
1162
+ .pattern-item {
1163
+ display: flex;
1164
+ align-items: center;
1165
+ gap: var(--space-16);
1166
+ padding: var(--space-12);
1167
+ background: rgba(255, 255, 255, 0.05);
1168
+ border-radius: var(--radius-base);
1169
+ border: 1px solid rgba(255, 255, 255, 0.1);
1170
+ }
1171
+
1172
+ .pattern-time {
1173
+ font-weight: var(--font-weight-bold);
1174
+ color: #00d4ff;
1175
+ min-width: 60px;
1176
+ }
1177
+
1178
+ .pattern-apps {
1179
+ flex: 1;
1180
+ display: flex;
1181
+ gap: var(--space-8);
1182
+ }
1183
+
1184
+ .app-tag {
1185
+ background: rgba(139, 92, 246, 0.2);
1186
+ color: #8b5cf6;
1187
+ padding: var(--space-2) var(--space-8);
1188
+ border-radius: var(--radius-full);
1189
+ font-size: var(--font-size-xs);
1190
+ border: 1px solid rgba(139, 92, 246, 0.3);
1191
+ }
1192
+
1193
+ .pattern-confidence {
1194
+ color: #10b981;
1195
+ font-weight: var(--font-weight-bold);
1196
+ font-size: var(--font-size-sm);
1197
+ }
1198
+
1199
+ /* Learned Behaviors */
1200
+ .behavior-list {
1201
+ display: flex;
1202
+ flex-direction: column;
1203
+ gap: var(--space-12);
1204
+ }
1205
+
1206
+ .behavior-item {
1207
+ display: flex;
1208
+ align-items: center;
1209
+ gap: var(--space-12);
1210
+ padding: var(--space-12);
1211
+ background: rgba(255, 255, 255, 0.05);
1212
+ border-radius: var(--radius-base);
1213
+ border: 1px solid rgba(255, 255, 255, 0.1);
1214
+ }
1215
+
1216
+ .behavior-icon {
1217
+ font-size: 20px;
1218
+ }
1219
+
1220
+ .behavior-text {
1221
+ color: rgba(255, 255, 255, 0.9);
1222
+ }
1223
+
1224
+ /* Performance Tab Styles */
1225
+ .performance-header {
1226
+ text-align: center;
1227
+ }
1228
+
1229
+ .fps-control .control-header {
1230
+ display: flex;
1231
+ justify-content: space-between;
1232
+ align-items: center;
1233
+ margin-bottom: var(--space-20);
1234
+ }
1235
+
1236
+ .fps-control h3 {
1237
+ color: #ffffff;
1238
+ margin: 0;
1239
+ }
1240
+
1241
+ .mode-toggle {
1242
+ display: flex;
1243
+ align-items: center;
1244
+ gap: var(--space-8);
1245
+ color: rgba(255, 255, 255, 0.8);
1246
+ font-size: var(--font-size-sm);
1247
+ }
1248
+
1249
+ .fps-display {
1250
+ display: flex;
1251
+ align-items: center;
1252
+ gap: var(--space-24);
1253
+ }
1254
+
1255
+ .current-fps {
1256
+ text-align: center;
1257
+ }
1258
+
1259
+ .fps-value {
1260
+ display: block;
1261
+ font-size: 48px;
1262
+ font-weight: var(--font-weight-bold);
1263
+ color: #00d4ff;
1264
+ line-height: 1;
1265
+ }
1266
+
1267
+ .fps-label {
1268
+ display: block;
1269
+ color: rgba(255, 255, 255, 0.7);
1270
+ font-size: var(--font-size-sm);
1271
+ margin-top: var(--space-4);
1272
+ }
1273
+
1274
+ .fps-options {
1275
+ display: flex;
1276
+ gap: var(--space-8);
1277
+ flex: 1;
1278
+ }
1279
+
1280
+ .fps-btn {
1281
+ flex: 1;
1282
+ padding: var(--space-8);
1283
+ background: rgba(255, 255, 255, 0.1);
1284
+ border: 1px solid rgba(255, 255, 255, 0.2);
1285
+ border-radius: var(--radius-base);
1286
+ color: rgba(255, 255, 255, 0.8);
1287
+ cursor: pointer;
1288
+ transition: all var(--duration-fast) var(--ease-standard);
1289
+ }
1290
+
1291
+ .fps-btn:hover {
1292
+ background: rgba(0, 212, 255, 0.1);
1293
+ border-color: rgba(0, 212, 255, 0.3);
1294
+ }
1295
+
1296
+ .fps-btn.active {
1297
+ background: rgba(0, 212, 255, 0.2);
1298
+ border-color: #00d4ff;
1299
+ color: #00d4ff;
1300
+ }
1301
+
1302
+ /* Performance Modes */
1303
+ .mode-selector {
1304
+ display: flex;
1305
+ gap: var(--space-8);
1306
+ }
1307
+
1308
+ .mode-btn {
1309
+ flex: 1;
1310
+ padding: var(--space-12);
1311
+ background: rgba(255, 255, 255, 0.05);
1312
+ border: 1px solid rgba(255, 255, 255, 0.1);
1313
+ border-radius: var(--radius-base);
1314
+ color: rgba(255, 255, 255, 0.8);
1315
+ cursor: pointer;
1316
+ transition: all var(--duration-fast) var(--ease-standard);
1317
+ font-size: var(--font-size-sm);
1318
+ }
1319
+
1320
+ .mode-btn:hover {
1321
+ background: rgba(139, 92, 246, 0.1);
1322
+ border-color: rgba(139, 92, 246, 0.3);
1323
+ }
1324
+
1325
+ .mode-btn.active {
1326
+ background: rgba(139, 92, 246, 0.2);
1327
+ border-color: #8b5cf6;
1328
+ color: #8b5cf6;
1329
+ }
1330
+
1331
+ /* System Metrics */
1332
+ .metrics-grid {
1333
+ display: flex;
1334
+ flex-direction: column;
1335
+ gap: var(--space-16);
1336
+ }
1337
+
1338
+ .metric-item {
1339
+ display: flex;
1340
+ align-items: center;
1341
+ gap: var(--space-12);
1342
+ }
1343
+
1344
+ .metric-label {
1345
+ min-width: 80px;
1346
+ color: rgba(255, 255, 255, 0.8);
1347
+ font-size: var(--font-size-sm);
1348
+ }
1349
+
1350
+ .metric-bar {
1351
+ flex: 1;
1352
+ height: 8px;
1353
+ background: rgba(255, 255, 255, 0.1);
1354
+ border-radius: var(--radius-sm);
1355
+ overflow: hidden;
1356
+ position: relative;
1357
+ }
1358
+
1359
+ .metric-fill {
1360
+ height: 100%;
1361
+ border-radius: var(--radius-sm);
1362
+ transition: width 1s ease-out;
1363
+ }
1364
+
1365
+ .metric-fill.cpu {
1366
+ background: linear-gradient(90deg, #10b981 0%, #00d4ff 100%);
1367
+ }
1368
+
1369
+ .metric-fill.gpu {
1370
+ background: linear-gradient(90deg, #8b5cf6 0%, #00d4ff 100%);
1371
+ }
1372
+
1373
+ .metric-fill.temp {
1374
+ background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
1375
+ }
1376
+
1377
+ .metric-value {
1378
+ min-width: 50px;
1379
+ text-align: right;
1380
+ color: #00d4ff;
1381
+ font-weight: var(--font-weight-bold);
1382
+ font-size: var(--font-size-sm);
1383
+ }
1384
+
1385
+ /* Background Apps */
1386
+ .apps-list {
1387
+ display: flex;
1388
+ flex-direction: column;
1389
+ gap: var(--space-12);
1390
+ }
1391
+
1392
+ .app-item {
1393
+ display: flex;
1394
+ align-items: center;
1395
+ gap: var(--space-12);
1396
+ padding: var(--space-12);
1397
+ background: rgba(255, 255, 255, 0.05);
1398
+ border-radius: var(--radius-base);
1399
+ border: 1px solid rgba(255, 255, 255, 0.1);
1400
+ }
1401
+
1402
+ .app-item .app-icon {
1403
+ font-size: 20px;
1404
+ width: 32px;
1405
+ height: 32px;
1406
+ }
1407
+
1408
+ .app-info {
1409
+ flex: 1;
1410
+ }
1411
+
1412
+ .app-name {
1413
+ display: block;
1414
+ color: #ffffff;
1415
+ font-weight: var(--font-weight-medium);
1416
+ margin-bottom: var(--space-2);
1417
+ }
1418
+
1419
+ .power-usage {
1420
+ font-size: var(--font-size-xs);
1421
+ }
1422
+
1423
+ .power-usage.low {
1424
+ color: #10b981;
1425
+ }
1426
+
1427
+ .power-usage.medium {
1428
+ color: #f59e0b;
1429
+ }
1430
+
1431
+ .power-usage.high {
1432
+ color: #ef4444;
1433
+ }
1434
+
1435
+ .app-status {
1436
+ padding: var(--space-4) var(--space-8);
1437
+ border-radius: var(--radius-full);
1438
+ font-size: var(--font-size-xs);
1439
+ font-weight: var(--font-weight-medium);
1440
+ }
1441
+
1442
+ .app-status.optimized {
1443
+ background: rgba(16, 185, 129, 0.2);
1444
+ color: #10b981;
1445
+ border: 1px solid rgba(16, 185, 129, 0.3);
1446
+ }
1447
+
1448
+ .app-status.normal {
1449
+ background: rgba(245, 158, 11, 0.2);
1450
+ color: #f59e0b;
1451
+ border: 1px solid rgba(245, 158, 11, 0.3);
1452
+ }
1453
+
1454
+ .app-status.restricted {
1455
+ background: rgba(239, 68, 68, 0.2);
1456
+ color: #ef4444;
1457
+ border: 1px solid rgba(239, 68, 68, 0.3);
1458
+ }
1459
+
1460
+ .app-toggle {
1461
+ width: 40px;
1462
+ height: 20px;
1463
+ border-radius: var(--radius-full);
1464
+ border: none;
1465
+ cursor: pointer;
1466
+ position: relative;
1467
+ transition: all var(--duration-fast) var(--ease-standard);
1468
+ }
1469
+
1470
+ .app-toggle::before {
1471
+ content: '';
1472
+ position: absolute;
1473
+ width: 16px;
1474
+ height: 16px;
1475
+ border-radius: 50%;
1476
+ background: #ffffff;
1477
+ top: 2px;
1478
+ left: 2px;
1479
+ transition: all var(--duration-fast) var(--ease-standard);
1480
+ }
1481
+
1482
+ .app-toggle.optimized {
1483
+ background: #10b981;
1484
+ }
1485
+
1486
+ .app-toggle.optimized::before {
1487
+ transform: translateX(20px);
1488
+ }
1489
+
1490
+ .app-toggle.normal {
1491
+ background: rgba(255, 255, 255, 0.3);
1492
+ }
1493
+
1494
+ .app-toggle.restricted {
1495
+ background: #ef4444;
1496
+ }
1497
+
1498
+ /* Brightness Tab Styles */
1499
+ .brightness-header {
1500
+ text-align: center;
1501
+ }
1502
+
1503
+ .gaze-detection h3 {
1504
+ color: #ffffff;
1505
+ margin: 0 0 var(--space-16) 0;
1506
+ }
1507
+
1508
+ .gaze-status {
1509
+ display: flex;
1510
+ gap: var(--space-20);
1511
+ align-items: center;
1512
+ }
1513
+
1514
+ .camera-preview {
1515
+ width: 100px;
1516
+ height: 100px;
1517
+ background: rgba(0, 0, 0, 0.5);
1518
+ border: 2px solid rgba(0, 212, 255, 0.5);
1519
+ border-radius: var(--radius-lg);
1520
+ display: flex;
1521
+ align-items: center;
1522
+ justify-content: center;
1523
+ position: relative;
1524
+ overflow: hidden;
1525
+ }
1526
+
1527
+ .face-indicator {
1528
+ position: relative;
1529
+ width: 60px;
1530
+ height: 60px;
1531
+ }
1532
+
1533
+ .face-indicator.active {
1534
+ animation: facePulse 2s ease-in-out infinite;
1535
+ }
1536
+
1537
+ @keyframes facePulse {
1538
+ 0%, 100% { opacity: 0.8; }
1539
+ 50% { opacity: 1; }
1540
+ }
1541
+
1542
+ .eye {
1543
+ position: absolute;
1544
+ width: 8px;
1545
+ height: 8px;
1546
+ background: #00d4ff;
1547
+ border-radius: 50%;
1548
+ top: 15px;
1549
+ animation: blink 3s ease-in-out infinite;
1550
+ }
1551
+
1552
+ .eye.left {
1553
+ left: 15px;
1554
+ }
1555
+
1556
+ .eye.right {
1557
+ right: 15px;
1558
+ }
1559
+
1560
+ @keyframes blink {
1561
+ 0%, 90%, 100% { transform: scaleY(1); }
1562
+ 95% { transform: scaleY(0.1); }
1563
+ }
1564
+
1565
+ .mouth {
1566
+ position: absolute;
1567
+ width: 20px;
1568
+ height: 10px;
1569
+ border: 2px solid #00d4ff;
1570
+ border-top: none;
1571
+ border-radius: 0 0 20px 20px;
1572
+ bottom: 15px;
1573
+ left: 50%;
1574
+ transform: translateX(-50%);
1575
+ }
1576
+
1577
+ .gaze-info {
1578
+ flex: 1;
1579
+ }
1580
+
1581
+ .status-item {
1582
+ display: flex;
1583
+ justify-content: space-between;
1584
+ align-items: center;
1585
+ margin-bottom: var(--space-12);
1586
+ }
1587
+
1588
+ .status-item:last-child {
1589
+ margin-bottom: 0;
1590
+ }
1591
+
1592
+ .status-label {
1593
+ color: rgba(255, 255, 255, 0.8);
1594
+ }
1595
+
1596
+ /* Brightness Control */
1597
+ .brightness-display {
1598
+ text-align: center;
1599
+ margin-bottom: var(--space-20);
1600
+ }
1601
+
1602
+ .brightness-value {
1603
+ font-size: 48px;
1604
+ font-weight: var(--font-weight-bold);
1605
+ color: #00d4ff;
1606
+ margin-bottom: var(--space-16);
1607
+ }
1608
+
1609
+ .brightness-slider-container {
1610
+ position: relative;
1611
+ margin-bottom: var(--space-12);
1612
+ }
1613
+
1614
+ .brightness-slider {
1615
+ width: 100%;
1616
+ height: 8px;
1617
+ background: rgba(255, 255, 255, 0.1);
1618
+ border-radius: var(--radius-sm);
1619
+ outline: none;
1620
+ -webkit-appearance: none;
1621
+ appearance: none;
1622
+ }
1623
+
1624
+ .brightness-slider::-webkit-slider-thumb {
1625
+ -webkit-appearance: none;
1626
+ width: 20px;
1627
+ height: 20px;
1628
+ border-radius: 50%;
1629
+ background: #00d4ff;
1630
+ cursor: pointer;
1631
+ box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
1632
+ }
1633
+
1634
+ .brightness-slider::-moz-range-thumb {
1635
+ width: 20px;
1636
+ height: 20px;
1637
+ border-radius: 50%;
1638
+ background: #00d4ff;
1639
+ cursor: pointer;
1640
+ border: none;
1641
+ box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
1642
+ }
1643
+
1644
+ .brightness-labels {
1645
+ display: flex;
1646
+ justify-content: space-between;
1647
+ margin-top: var(--space-8);
1648
+ font-size: 20px;
1649
+ }
1650
+
1651
+ .ambient-light {
1652
+ display: flex;
1653
+ justify-content: space-between;
1654
+ align-items: center;
1655
+ padding: var(--space-12);
1656
+ background: rgba(255, 255, 255, 0.05);
1657
+ border-radius: var(--radius-base);
1658
+ border: 1px solid rgba(255, 255, 255, 0.1);
1659
+ }
1660
+
1661
+ .ambient-label {
1662
+ color: rgba(255, 255, 255, 0.8);
1663
+ }
1664
+
1665
+ .ambient-value {
1666
+ color: #00d4ff;
1667
+ font-weight: var(--font-weight-bold);
1668
+ }
1669
+
1670
+ /* Smart Features */
1671
+ .feature-list {
1672
+ display: flex;
1673
+ flex-direction: column;
1674
+ gap: var(--space-16);
1675
+ }
1676
+
1677
+ .feature-item {
1678
+ display: flex;
1679
+ justify-content: space-between;
1680
+ align-items: center;
1681
+ padding: var(--space-16);
1682
+ background: rgba(255, 255, 255, 0.05);
1683
+ border-radius: var(--radius-base);
1684
+ border: 1px solid rgba(255, 255, 255, 0.1);
1685
+ }
1686
+
1687
+ .feature-info {
1688
+ flex: 1;
1689
+ }
1690
+
1691
+ .feature-name {
1692
+ display: block;
1693
+ color: #ffffff;
1694
+ font-weight: var(--font-weight-medium);
1695
+ margin-bottom: var(--space-4);
1696
+ }
1697
+
1698
+ .feature-desc {
1699
+ display: block;
1700
+ color: rgba(255, 255, 255, 0.7);
1701
+ font-size: var(--font-size-sm);
1702
+ }
1703
+
1704
+ /* Switch Component */
1705
+ .switch {
1706
+ position: relative;
1707
+ display: inline-block;
1708
+ width: 40px;
1709
+ height: 20px;
1710
+ }
1711
+
1712
+ .switch input {
1713
+ opacity: 0;
1714
+ width: 0;
1715
+ height: 0;
1716
+ }
1717
+
1718
+ .slider {
1719
+ position: absolute;
1720
+ cursor: pointer;
1721
+ top: 0;
1722
+ left: 0;
1723
+ right: 0;
1724
+ bottom: 0;
1725
+ background-color: rgba(255, 255, 255, 0.3);
1726
+ transition: var(--duration-fast) var(--ease-standard);
1727
+ border-radius: var(--radius-full);
1728
+ }
1729
+
1730
+ .slider:before {
1731
+ position: absolute;
1732
+ content: "";
1733
+ height: 16px;
1734
+ width: 16px;
1735
+ left: 2px;
1736
+ bottom: 2px;
1737
+ background-color: white;
1738
+ transition: var(--duration-fast) var(--ease-standard);
1739
+ border-radius: 50%;
1740
+ }
1741
+
1742
+ input:checked + .slider {
1743
+ background-color: #00d4ff;
1744
+ box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
1745
+ }
1746
+
1747
+ input:checked + .slider:before {
1748
+ transform: translateX(20px);
1749
+ }
1750
+
1751
+ /* Bottom Navigation */
1752
+ .bottom-nav {
1753
+ position: fixed;
1754
+ bottom: 0;
1755
+ left: 50%;
1756
+ transform: translateX(-50%);
1757
+ width: 100%;
1758
+ max-width: 375px;
1759
+ background: rgba(10, 10, 15, 0.95);
1760
+ backdrop-filter: blur(20px);
1761
+ border-top: 1px solid rgba(0, 212, 255, 0.2);
1762
+ display: flex;
1763
+ padding: var(--space-12) var(--space-16);
1764
+ z-index: 100;
1765
+ }
1766
+
1767
+ .nav-btn {
1768
+ flex: 1;
1769
+ background: none;
1770
+ border: none;
1771
+ padding: var(--space-8);
1772
+ display: flex;
1773
+ flex-direction: column;
1774
+ align-items: center;
1775
+ gap: var(--space-4);
1776
+ cursor: pointer;
1777
+ transition: all var(--duration-fast) var(--ease-standard);
1778
+ border-radius: var(--radius-base);
1779
+ }
1780
+
1781
+ .nav-btn:hover {
1782
+ background: rgba(255, 255, 255, 0.1);
1783
+ }
1784
+
1785
+ .nav-btn.active {
1786
+ background: rgba(0, 212, 255, 0.1);
1787
+ border: 1px solid rgba(0, 212, 255, 0.3);
1788
+ }
1789
+
1790
+ .nav-icon {
1791
+ font-size: 20px;
1792
+ opacity: 0.7;
1793
+ transition: opacity var(--duration-fast) var(--ease-standard);
1794
+ }
1795
+
1796
+ .nav-btn.active .nav-icon {
1797
+ opacity: 1;
1798
+ }
1799
+
1800
+ .nav-label {
1801
+ font-size: var(--font-size-xs);
1802
+ color: rgba(255, 255, 255, 0.7);
1803
+ transition: color var(--duration-fast) var(--ease-standard);
1804
+ }
1805
+
1806
+ .nav-btn.active .nav-label {
1807
+ color: #00d4ff;
1808
+ }
1809
+
1810
+ /* Responsive Design */
1811
+ @media (max-width: 375px) {
1812
+ .main-content {
1813
+ padding: var(--space-16);
1814
+ }
1815
+
1816
+ .stats-grid {
1817
+ grid-template-columns: 1fr;
1818
+ gap: var(--space-12);
1819
+ }
1820
+
1821
+ .alternative-predictions {
1822
+ grid-template-columns: 1fr;
1823
+ }
1824
+
1825
+ .battery-widget {
1826
+ flex-direction: column;
1827
+ text-align: center;
1828
+ }
1829
+
1830
+ .fps-display {
1831
+ flex-direction: column;
1832
+ gap: var(--space-16);
1833
+ }
1834
+
1835
+ .gaze-status {
1836
+ flex-direction: column;
1837
+ gap: var(--space-16);
1838
+ }
1839
+ }
1840
+
1841
+ /* Loading animations */
1842
+ .loading {
1843
+ opacity: 0;
1844
+ animation: fadeInLoad 0.5s ease-out forwards;
1845
+ }
1846
+
1847
+ @keyframes fadeInLoad {
1848
+ to { opacity: 1; }
1849
+ }