imxuma commited on
Commit
4420807
·
verified ·
1 Parent(s): ee79cfe

Add 2 files

Browse files
Files changed (2) hide show
  1. README.md +6 -4
  2. index.html +695 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Personal
3
- emoji: 🏃
4
- colorFrom: green
5
  colorTo: blue
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: personal
3
+ emoji: 🐳
4
+ colorFrom: blue
5
  colorTo: blue
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,695 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>Fullscreen Countdown Timer</title>
7
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
8
+ <style>
9
+ * {
10
+ margin: 0;
11
+ padding: 0;
12
+ box-sizing: border-box;
13
+ font-family: 'Arial', sans-serif;
14
+ }
15
+
16
+ body {
17
+ background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
18
+ color: white;
19
+ height: 100vh;
20
+ display: flex;
21
+ flex-direction: column;
22
+ justify-content: center;
23
+ align-items: center;
24
+ overflow: hidden;
25
+ position: relative;
26
+ }
27
+
28
+ .timer-container {
29
+ text-align: center;
30
+ z-index: 1;
31
+ padding: 2rem;
32
+ background: rgba(255, 255, 255, 0.1);
33
+ border-radius: 20px;
34
+ backdrop-filter: blur(10px);
35
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
36
+ border: 1px solid rgba(255, 255, 255, 0.1);
37
+ max-width: 90%;
38
+ transition: all 0.3s ease;
39
+ margin-top: -80px;
40
+ }
41
+
42
+ .timer-container:hover {
43
+ transform: scale(1.02);
44
+ }
45
+
46
+ h1 {
47
+ font-size: 2.5rem;
48
+ margin-bottom: 2.5rem;
49
+ text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
50
+ letter-spacing: 1px;
51
+ }
52
+
53
+ .timer {
54
+ display: flex;
55
+ justify-content: center;
56
+ gap: 1rem;
57
+ margin-bottom: 2rem;
58
+ }
59
+
60
+ .time-box {
61
+ position: relative;
62
+ width: 120px;
63
+ height: 180px; /* Увеличил высоту контейнера */
64
+ perspective: 1000px;
65
+ }
66
+
67
+ .time-value {
68
+ position: absolute;
69
+ width: 100%;
70
+ height: 120px; /* Высота цифр */
71
+ display: flex;
72
+ flex-direction: column;
73
+ justify-content: center;
74
+ align-items: center;
75
+ font-size: 5rem;
76
+ font-weight: bold;
77
+ background: rgba(255, 255, 255, 0.1);
78
+ border-radius: 10px;
79
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
80
+ transition: all 0.3s ease;
81
+ backface-visibility: hidden;
82
+ transform-style: preserve-3d;
83
+ top: 0;
84
+ }
85
+
86
+ .time-value.flip {
87
+ animation: flip 0.6s cubic-bezier(0.455, 0.03, 0.515, 0.955) both;
88
+ }
89
+
90
+ @keyframes flip {
91
+ 0% {
92
+ transform: rotateX(0deg);
93
+ }
94
+ 100% {
95
+ transform: rotateX(-180deg);
96
+ }
97
+ }
98
+
99
+ .time-label {
100
+ position: absolute;
101
+ bottom: 0;
102
+ width: 100%;
103
+ margin-top: 2.5rem; /* Увеличил отступ сверху */
104
+ margin-bottom: 0;
105
+ font-size: 1.2rem;
106
+ opacity: 0.8;
107
+ text-transform: uppercase;
108
+ letter-spacing: 2px;
109
+ padding-top: 10px; /* Дополнительное пространство между цифрами и текстом */
110
+ }
111
+
112
+ .controls {
113
+ display: flex;
114
+ gap: 1rem;
115
+ justify-content: center;
116
+ margin-top: 2rem;
117
+ }
118
+
119
+ button {
120
+ padding: 0.8rem 1.5rem;
121
+ font-size: 1rem;
122
+ background: rgba(255, 255, 255, 0.2);
123
+ color: white;
124
+ border: none;
125
+ border-radius: 50px;
126
+ cursor: pointer;
127
+ transition: all 0.3s ease;
128
+ display: flex;
129
+ align-items: center;
130
+ gap: 0.5rem;
131
+ backdrop-filter: blur(5px);
132
+ }
133
+
134
+ button:hover {
135
+ background: rgba(255, 255, 255, 0.3);
136
+ transform: translateY(-3px);
137
+ }
138
+
139
+ button:active {
140
+ transform: translateY(1px);
141
+ }
142
+
143
+ .set-timer {
144
+ display: flex;
145
+ gap: 1rem;
146
+ margin-top: 2rem;
147
+ justify-content: center;
148
+ align-items: center;
149
+ }
150
+
151
+ .time-input {
152
+ position: relative;
153
+ }
154
+
155
+ .time-input input {
156
+ padding: 0.8rem;
157
+ width: 100px;
158
+ text-align: center;
159
+ background: rgba(255, 255, 255, 0.1);
160
+ border: 1px solid rgba(255, 255, 255, 0.2);
161
+ border-radius: 5px;
162
+ color: white;
163
+ font-size: 1.5rem;
164
+ font-weight: bold;
165
+ appearance: textfield;
166
+ -moz-appearance: textfield;
167
+ }
168
+
169
+ .time-input input::-webkit-outer-spin-button,
170
+ .time-input input::-webkit-inner-spin-button {
171
+ -webkit-appearance: none;
172
+ margin: 0;
173
+ }
174
+
175
+ .arrows {
176
+ position: absolute;
177
+ right: 8px;
178
+ display: flex;
179
+ flex-direction: column;
180
+ gap: 0;
181
+ height: 100%;
182
+ top: 0;
183
+ pointer-events: none;
184
+ }
185
+
186
+ .arrow-btn {
187
+ position: relative;
188
+ width: 20px;
189
+ height: 50%;
190
+ padding: 0;
191
+ background: transparent;
192
+ border: none;
193
+ cursor: pointer;
194
+ pointer-events: all;
195
+ display: flex;
196
+ align-items: center;
197
+ justify-content: center;
198
+ }
199
+
200
+ .arrow-btn.up {
201
+ top: 0;
202
+ border-radius: 0 5px 0 0;
203
+ }
204
+
205
+ .arrow-btn.down {
206
+ bottom: 0;
207
+ border-radius: 0 0 5px 0;
208
+ }
209
+
210
+ .arrow-btn:after {
211
+ content: '';
212
+ width: 0;
213
+ height: 0;
214
+ border-left: 5px solid transparent;
215
+ border-right: 5px solid transparent;
216
+ border-bottom: 5px solid white;
217
+ transition: all 0.2s ease;
218
+ opacity: 0.7;
219
+ }
220
+
221
+ .arrow-btn.down:after {
222
+ transform: rotate(180deg);
223
+ }
224
+
225
+ .arrow-btn:hover:after {
226
+ opacity: 1;
227
+ transform: scale(1.2);
228
+ }
229
+
230
+ .arrow-btn.down:hover:after {
231
+ transform: rotate(180deg) scale(1.2);
232
+ }
233
+
234
+ .time-input-wrapper {
235
+ display: flex;
236
+ flex-direction: column;
237
+ align-items: center;
238
+ }
239
+
240
+ .time-label-input {
241
+ margin-top: 1rem;
242
+ font-size: 1rem;
243
+ opacity: 0.8;
244
+ text-transform: uppercase;
245
+ letter-spacing: 1px;
246
+ }
247
+
248
+ /* Responsive adjustments */
249
+ @media (max-width: 768px) {
250
+ .timer {
251
+ flex-wrap: wrap;
252
+ }
253
+ .time-box {
254
+ width: 80px;
255
+ height: 140px;
256
+ }
257
+ .time-value {
258
+ font-size: 3rem;
259
+ height: 80px;
260
+ }
261
+ .time-label {
262
+ font-size: 1rem;
263
+ margin-top: 2rem;
264
+ }
265
+ h1 {
266
+ font-size: 2rem;
267
+ }
268
+ .time-input input {
269
+ width: 80px;
270
+ font-size: 1.2rem;
271
+ }
272
+ .time-label-input {
273
+ margin-top: 0.8rem;
274
+ }
275
+ }
276
+
277
+ @media (max-width: 480px) {
278
+ .time-box {
279
+ width: 60px;
280
+ height: 120px;
281
+ }
282
+ .time-value {
283
+ font-size: 2rem;
284
+ height: 60px;
285
+ }
286
+ .time-label {
287
+ font-size: 0.8rem;
288
+ margin-top: 1.5rem;
289
+ }
290
+ button {
291
+ padding: 0.6rem 1rem;
292
+ font-size: 0.9rem;
293
+ }
294
+ .set-timer {
295
+ flex-direction: column;
296
+ }
297
+ .time-input input {
298
+ width: 100px;
299
+ }
300
+ .time-label-input {
301
+ margin-top: 0.6rem;
302
+ }
303
+ }
304
+
305
+ .confetti {
306
+ position: absolute;
307
+ width: 10px;
308
+ height: 10px;
309
+ background: #f00;
310
+ opacity: 0;
311
+ }
312
+
313
+ .modal {
314
+ display: none;
315
+ position: fixed;
316
+ top: 0;
317
+ left: 0;
318
+ width: 100%;
319
+ height: 100%;
320
+ background: rgba(0, 0, 0, 0.8);
321
+ z-index: 100;
322
+ justify-content: center;
323
+ align-items: center;
324
+ flex-direction: column;
325
+ animation: fadeIn 0.5s ease;
326
+ }
327
+
328
+ .modal-content {
329
+ background: linear-gradient(135deg, #16213e, #0f3460);
330
+ padding: 2rem;
331
+ border-radius: 15px;
332
+ text-align: center;
333
+ max-width: 90%;
334
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
335
+ position: relative;
336
+ }
337
+
338
+ .close-modal {
339
+ position: absolute;
340
+ top: -10px;
341
+ right: -10px;
342
+ background: #ff6b6b;
343
+ width: 40px;
344
+ height: 40px;
345
+ border-radius: 50%;
346
+ display: flex;
347
+ justify-content: center;
348
+ align-items: center;
349
+ cursor: pointer;
350
+ transition: all 0.3s ease;
351
+ }
352
+
353
+ .close-modal:hover {
354
+ transform: rotate(90deg) scale(1.1);
355
+ }
356
+
357
+ .modal h2 {
358
+ font-size: 3rem;
359
+ margin-bottom: 1rem;
360
+ color: #ff6b6b;
361
+ text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
362
+ }
363
+
364
+ .modal p {
365
+ font-size: 1.2rem;
366
+ margin-bottom: 1.5rem;
367
+ }
368
+
369
+ @keyframes fadeIn {
370
+ from { opacity: 0; }
371
+ to { opacity: 1; }
372
+ }
373
+
374
+ .progress-bar {
375
+ width: 100%;
376
+ height: 8px;
377
+ background: rgba(255, 255, 255, 0.1);
378
+ border-radius: 4px;
379
+ margin-top: 1rem;
380
+ overflow: hidden;
381
+ }
382
+
383
+ .progress {
384
+ height: 100%;
385
+ background: linear gradient(90deg, #ff6b6b, #ff8e8e);
386
+ width: 100%;
387
+ transition: width 0.3s ease;
388
+ }
389
+ </style>
390
+ </head>
391
+ <body>
392
+ <div class="particles" id="particles"></div>
393
+
394
+ <div class="timer-container">
395
+ <h1>Countdown Timer</h1>
396
+ <div class="timer">
397
+ <div class="time-box">
398
+ <div class="time-value" id="hours">00</div>
399
+ <div class="time-label">Hours</div>
400
+ </div>
401
+ <div class="time-box">
402
+ <div class="time-value" id="minutes">00</div>
403
+ <div class="time-label">Minutes</div>
404
+ </div>
405
+ <div class="time-box">
406
+ <div class="time-value" id="seconds">00</div>
407
+ <div class="time-label">Seconds</div>
408
+ </div>
409
+ </div>
410
+
411
+ <div class="progress-bar">
412
+ <div class="progress" id="progress"></div>
413
+ </div>
414
+
415
+ <div class="controls">
416
+ <button id="startBtn"><i class="fas fa-play"></i> Start</button>
417
+ <button id="pauseBtn"><i class="fas fa-pause"></i> Pause</button>
418
+ <button id="resetBtn"><i class="fas fa-redo"></i> Reset</button>
419
+ </div>
420
+
421
+ <div class="set-timer">
422
+ <div class="time-input-wrapper">
423
+ <div class="time-input">
424
+ <input type="number" id="inputHours" min="0" max="99" value="0">
425
+ <div class="arrows">
426
+ <button class="arrow-btn up" onclick="incrementHours()"></button>
427
+ <button class="arrow-btn down" onclick="decrementHours()"></button>
428
+ </div>
429
+ </div>
430
+ <div class="time-label-input">Hours</div>
431
+ </div>
432
+ <div class="time-input-wrapper">
433
+ <div class="time-input">
434
+ <input type="number" id="inputMinutes" min="0" max="59" value="10">
435
+ <div class="arrows">
436
+ <button class="arrow-btn up" onclick="incrementMinutes()"></button>
437
+ <button class="arrow-btn down" onclick="decrementMinutes()"></button>
438
+ </div>
439
+ </div>
440
+ <div class="time-label-input">Minutes</div>
441
+ </div>
442
+ <div class="time-input-wrapper">
443
+ <div class="time-input">
444
+ <input type="number" id="inputSeconds" min="0" max="59" value="0">
445
+ <div class="arrows">
446
+ <button class="arrow-btn up" onclick="incrementSeconds()"></button>
447
+ <button class="arrow-btn down" onclick="decrementSeconds()"></button>
448
+ </div>
449
+ </div>
450
+ <div class="time-label-input">Seconds</div>
451
+ </div>
452
+ </div>
453
+ </div>
454
+
455
+ <div class="modal" id="modal">
456
+ <div class="modal-content">
457
+ <div class="close-modal" id="closeModal">
458
+ <i class="fas fa-times"></i>
459
+ </div>
460
+ <h2>Time's Up!</h2>
461
+ <p>Your countdown has reached zero.</p>
462
+ <button id="newTimerBtn"><i class="fas fa-plus"></i> Start New Timer</button>
463
+ </div>
464
+ </div>
465
+
466
+ <script>
467
+ // DOM Elements
468
+ const hoursElement = document.getElementById('hours');
469
+ const minutesElement = document.getElementById('minutes');
470
+ const secondsElement = document.getElementById('seconds');
471
+ const startBtn = document.getElementById('startBtn');
472
+ const pauseBtn = document.getElementById('pauseBtn');
473
+ const resetBtn = document.getElementById('resetBtn');
474
+ const inputHours = document.getElementById('inputHours');
475
+ const inputMinutes = document.getElementById('inputMinutes');
476
+ const inputSeconds = document.getElementById('inputSeconds');
477
+ const modal = document.getElementById('modal');
478
+ const closeModal = document.getElementById('closeModal');
479
+ const newTimerBtn = document.getElementById('newTimerBtn');
480
+ const progress = document.getElementById('progress');
481
+ const particles = document.getElementById('particles');
482
+
483
+ // Variables
484
+ let countdownInterval;
485
+ let totalSeconds = 0;
486
+ let remainingSeconds = 0;
487
+ let isRunning = false;
488
+
489
+ // Create particles
490
+ function createParticles() {
491
+ for (let i = 0; i < 50; i++) {
492
+ const particle = document.createElement('div');
493
+ particle.className = 'confetti';
494
+ particle.style.left = `${Math.random() * 100}vw`;
495
+ particle.style.top = `${Math.random() * 100}vh`;
496
+ particle.style.width = `${5 + Math.random() * 10}px`;
497
+ particle.style.height = particle.style.width;
498
+ particle.style.backgroundColor = `hsl(${Math.random() * 360}, 100%, 50%)`;
499
+ particles.appendChild(particle);
500
+ }
501
+ }
502
+
503
+ // Initialize particles
504
+ createParticles();
505
+
506
+ // Update time display
507
+ function updateDisplay(seconds) {
508
+ const hours = Math.floor(seconds / 3600);
509
+ const minutes = Math.floor((seconds % 3600) / 60);
510
+ const secs = seconds % 60;
511
+
512
+ // Flip animation for changing numbers
513
+ if (hoursElement.textContent !== hours.toString().padStart(2, '0')) {
514
+ hoursElement.classList.add('flip');
515
+ setTimeout(() => {
516
+ hoursElement.textContent = hours.toString().padStart(2, '0');
517
+ hoursElement.classList.remove('flip');
518
+ }, 300);
519
+ } else {
520
+ hoursElement.textContent = hours.toString().padStart(2, '0');
521
+ }
522
+
523
+ if (minutesElement.textContent !== minutes.toString().padStart(2, '0')) {
524
+ minutesElement.classList.add('flip');
525
+ setTimeout(() => {
526
+ minutesElement.textContent = minutes.toString().padStart(2, '0');
527
+ minutesElement.classList.remove('flip');
528
+ }, 300);
529
+ } else {
530
+ minutesElement.textContent = minutes.toString().padStart(2, '0');
531
+ }
532
+
533
+ if (secondsElement.textContent !== secs.toString().padStart(2, '0')) {
534
+ secondsElement.classList.add('flip');
535
+ setTimeout(() => {
536
+ secondsElement.textContent = secs.toString().padStart(2, '0');
537
+ secondsElement.classList.remove('flip');
538
+ }, 300);
539
+ } else {
540
+ secondsElement.textContent = secs.toString().padStart(2, '0');
541
+ }
542
+
543
+ // Update progress bar
544
+ if (totalSeconds > 0) {
545
+ const progressPercent = (seconds / totalSeconds) * 100;
546
+ progress.style.width = `${progressPercent}%`;
547
+ // Change color as time runs out
548
+ if (progressPercent < 20) {
549
+ progress.style.background = 'linear-gradient(90deg, #ff6b6b, #ff3e3e)';
550
+ } else if (progressPercent < 50) {
551
+ progress.style.background = 'linear-gradient(90deg, #ffa36b, #ff6b6b)';
552
+ }
553
+ }
554
+ }
555
+
556
+ // Start countdown
557
+ function startCountdown() {
558
+ if (isRunning) return;
559
+
560
+ // Get initial values
561
+ const hours = parseInt(inputHours.value) || 0;
562
+ const minutes = parseInt(inputMinutes.value) || 0;
563
+ const seconds = parseInt(inputSeconds.value) || 0;
564
+
565
+ if (hours === 0 && minutes === 0 && seconds === 0) {
566
+ alert('Please set a valid time before starting the timer.');
567
+ return;
568
+ }
569
+
570
+ remainingSeconds = hours * 3600 + minutes * 60 + seconds;
571
+ totalSeconds = remainingSeconds;
572
+
573
+ isRunning = true;
574
+ updateDisplay(remainingSeconds);
575
+
576
+ countdownInterval = setInterval(() {
577
+ remainingSeconds--;
578
+
579
+ if (remainingSeconds < 0) {
580
+ clearInterval(countdownInterval);
581
+ isRunning = false;
582
+ showModal();
583
+ triggerConfetti();
584
+ return;
585
+ }
586
+
587
+ updateDisplay(remainingSeconds);
588
+ }, 1000);
589
+ }
590
+
591
+ // Pause countdown
592
+ function pauseCountdown() {
593
+ if (!isRunning) return;
594
+ clearInterval(countdownInterval);
595
+ isRunning = false;
596
+ }
597
+
598
+ // Reset countdown
599
+ function resetCountdown() {
600
+ clearInterval(countdownInterval);
601
+ isRunning = false;
602
+ // Reset to initial input values
603
+ const hours = parseInt(inputHours.value) || 0;
604
+ const minutes = parseInt(inputMinutes.value) || 0;
605
+ const seconds = parseInt(inputSeconds.value) || 0;
606
+ remainingSeconds = hours * 3600 + minutes * 60 + seconds;
607
+ totalSeconds = remainingSeconds;
608
+ updateDisplay(remainingSeconds);
609
+ progress.style.background = 'linear-gradient(90deg, #ff6b6b, #ff8e8e)';
610
+ }
611
+
612
+ // Show modal when timer completes
613
+ function showModal() {
614
+ modal.style.display = 'flex';
615
+ }
616
+
617
+ // Close modal
618
+ function closeModalFunc() {
619
+ modal.style.display = 'none';
620
+ }
621
+
622
+ // Start new timer
623
+ function startNewTimer() {
624
+ closeModalFunc();
625
+ inputHours.value = '0';
626
+ inputMinutes.value = '10';
627
+ inputSeconds.value = '0';
628
+ resetCountdown();
629
+ }
630
+
631
+ // Trigger confetti effect
632
+ function triggerConfetti() {
633
+ const confettiElements = document.querySelectorAll('.confetti');
634
+ confettiElements.forEach((el, index) => {
635
+ setTimeout(() => {
636
+ el.style.opacity = '1';
637
+ el.style.transform = `translate(${(Math.random() - 0.5) * 200}px, ${(Math.random() - 0.5) * 200}px) rotate(${Math.random() * 360}deg)`;
638
+ el.style.transition = 'all 1s ease';
639
+
640
+ setTimeout(() => {
641
+ el.style.opacity = '0';
642
+ el.style.transform = 'translate(0, 0) rotate(0deg)';
643
+ el.style.transition = 'none';
644
+ }, 1000);
645
+ }, index * 50);
646
+ });
647
+ }
648
+
649
+ // Input increment/decrement functions
650
+ function incrementHours() {
651
+ const current = parseInt(inputHours.value) || 0;
652
+ if (current < 99) inputHours.value = current + 1;
653
+ }
654
+
655
+ function decrementHours() {
656
+ const current = parseInt(inputHours.value) || 0;
657
+ if (current > 0) inputHours.value = current - 1;
658
+ }
659
+
660
+ function incrementMinutes() {
661
+ const current = parseInt(inputMinutes.value) || 0;
662
+ if (current < 59) inputMinutes.value = current + 1;
663
+ else inputMinutes.value = 0;
664
+ }
665
+
666
+ function decrementMinutes() {
667
+ const current = parseInt(inputMinutes.value) || 0;
668
+ if (current > 0) inputMinutes.value = current - 1;
669
+ else inputMinutes.value = 59;
670
+ }
671
+
672
+ function incrementSeconds() {
673
+ const current = parseInt(inputSeconds.value) || 0;
674
+ if (current < 59) inputSeconds.value = current + 1;
675
+ else inputSeconds.value = 0;
676
+ }
677
+
678
+ function decrementSeconds() {
679
+ const current = parseInt(inputSeconds.value) || 0;
680
+ if (current > 0) inputSeconds.value = current - 1;
681
+ else inputSeconds.value = 59;
682
+ }
683
+
684
+ // Event listeners
685
+ startBtn.addEventListener('click', startCountdown);
686
+ pauseBtn.addEventListener('click', pauseCountdown);
687
+ resetBtn.addEventListener('click', resetCountdown);
688
+ closeModal.addEventListener('click', closeModalFunc);
689
+ newTimerBtn.addEventListener('click', startNewTimer);
690
+
691
+ // Initialize with default time
692
+ resetCountdown();
693
+ </script>
694
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: absolute; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">This website has been generated by <a href="https://enzostvs-deepsite.hf.space" style="color: #fff;" target="_blank" >DeepSite</a> <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;"></p></body>
695
+ </html>