-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
2242 lines (2085 loc) · 110 KB
/
Copy pathindex.html
File metadata and controls
2242 lines (2085 loc) · 110 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>StackTime — Free Study Timer & Daily Goal Tracker</title>
<meta name="description" content="StackTime is a free study timer and daily goal tracker for students. Track sessions, time practice questions, and stay on pace for your exam deadline—no account required.">
<meta name="robots" content="index, follow">
<link rel="canonical" href="https://stacktime.me/">
<!-- Open Graph / WhatsApp / LinkedIn / Facebook link preview -->
<meta property="og:type" content="website">
<meta property="og:title" content="StackTime — Free Study Timer & Daily Goal Tracker">
<meta property="og:description" content="Track study sessions, time practice questions, and stay on pace for your exam deadline. Free, private, and account-free.">
<meta property="og:image" content="https://stacktime.me/assets/og-image.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:url" content="https://stacktime.me/">
<!-- Twitter/X card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="StackTime — Free Study Timer & Daily Goal Tracker">
<meta name="twitter:description" content="A free, private study timer that helps students stay on pace for their goals.">
<meta name="twitter:image" content="https://stacktime.me/assets/og-image.png">
<!-- Favicon / bookmark / homescreen icons -->
<link rel="icon" href="assets/favicon.ico" sizes="any">
<link rel="icon" type="image/png" sizes="16x16" href="assets/favicon-16.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/favicon-32.png">
<link rel="icon" type="image/png" sizes="48x48" href="assets/favicon-48.png">
<link rel="apple-touch-icon" sizes="180x180" href="assets/apple-touch-icon.png">
<link rel="manifest" href="assets/site.webmanifest">
<meta name="theme-color" content="#1a0a0a">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "StackTime",
"alternateName": "Stack",
"url": "https://stacktime.me/",
"description": "A free, browser-based study timer and daily goal tracker for students preparing for exams, certifications, and coursework.",
"applicationCategory": "ProductivityApplication",
"operatingSystem": "Web",
"isAccessibleForFree": true,
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "USD"
},
"featureList": [
"Study session timer",
"Practice question timer",
"Custom countdown timer",
"Daily study goals based on a deadline",
"Private browser-based storage"
]
}
</script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@200;300;400;500;600&display=swap" rel="stylesheet">
<style>
:root {
--bg: #1a0a0a; --bg-glass: rgba(40,10,10,0.55); --bg-card: rgba(60,15,15,0.6);
--accent: #ff4d4d; --accent-glow: rgba(255,77,77,0.35); --text: #f5e6e6; --text-dim: #c9a0a0;
--border: rgba(255,77,77,0.25); --progress-track: rgba(255,77,77,0.15);
--shadow: 0 8px 32px rgba(0,0,0,0.5); --font-timer: 'Anton',sans-serif; --font-body: 'Inter',sans-serif;
--green: #4ade80; --green-glow: rgba(74,222,128,0.4); --orange: #fb923c;
}
[data-theme="light"] {
--bg: #f5efe6; --bg-glass: rgba(230,220,205,0.65); --bg-card: rgba(220,210,195,0.7);
--accent: #b83b3b; --accent-glow: rgba(184,59,59,0.25); --text: #3d1f1f; --text-dim: #7a5555;
--border: rgba(184,59,59,0.3); --progress-track: rgba(184,59,59,0.15);
--shadow: 0 8px 32px rgba(0,0,0,0.12); --green: #16a34a; --green-glow: rgba(22,163,74,0.3);
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:var(--font-body); background:var(--bg); color:var(--text); min-height:100vh;
display:flex; flex-direction:column; align-items:center; justify-content:center;
transition:background 0.5s, color 0.5s; overflow-x:hidden; overflow-y:auto; position:relative; }
.ambient { position:fixed; inset:0; pointer-events:none; z-index:0; overflow:hidden; }
.cursor-trail { position:fixed; inset:0; width:100%; height:100%; pointer-events:none; z-index:0; }
.ambient .dot { position:absolute; border-radius:50%; background:var(--accent); opacity:0.25; animation:floatDot 10s infinite ease-in-out; will-change:transform,translate; }
@keyframes floatDot { 0%,100%{transform:translateY(0) scale(1); opacity:0.15} 50%{transform:translateY(-60px) scale(1.4); opacity:0.4} }
.ambient .orb { position:absolute; border-radius:50%; background:radial-gradient(circle,var(--accent) 0%,transparent 70%); opacity:0.12; filter:blur(20px); animation:driftOrb 20s infinite ease-in-out alternate; will-change:transform,translate; }
@keyframes driftOrb { 0%{transform:translate(0,0) scale(1)} 33%{transform:translate(30px,-40px) scale(1.2)} 66%{transform:translate(-20px,20px) scale(0.9)} 100%{transform:translate(10px,-10px) scale(1.1)} }
.ambient .blob { position:absolute; width:300px; height:300px; border-radius:50%; background:var(--accent); opacity:0.06; filter:blur(80px); animation:blobMove 25s infinite ease-in-out; will-change:transform,translate; }
@keyframes blobMove { 0%,100%{transform:translate(0,0) scale(1)} 25%{transform:translate(100px,-80px) scale(1.3)} 50%{transform:translate(-60px,60px) scale(0.8)} 75%{transform:translate(40px,40px) scale(1.1)} }
.brand-top-right { position:fixed; top:1.5rem; right:1.5rem; font-size:1.1rem; letter-spacing:0.5em; text-transform:uppercase; color:var(--text-dim); font-weight:400; z-index:10; opacity:0.75; pointer-events:none; }
.welcome-overlay { position:fixed; inset:0; z-index:100; background:rgba(0,0,0,0.7); backdrop-filter:blur(12px); display:flex; align-items:center; justify-content:center; padding:1.5rem; opacity:0; pointer-events:none; transition:opacity 0.4s; }
.welcome-overlay.open { opacity:1; pointer-events:all; }
.welcome-card { position:relative; background:var(--bg-card); border:1px solid var(--border); border-radius:20px; padding:2.2rem 2rem; max-width:460px; width:100%; box-shadow:var(--shadow); transform:translateY(20px); transition:transform 0.4s; max-height:90vh; overflow-y:auto; }
.welcome-overlay.open .welcome-card { transform:translateY(0); }
.welcome-card h1 { font-family:var(--font-timer); font-size:2.2rem; letter-spacing:0.05em; text-align:center; margin-bottom:0.3rem; color:var(--text); }
.welcome-card .tagline { text-align:center; font-size:0.85rem; color:var(--text-dim); margin-bottom:1.5rem; font-weight:300; }
.welcome-bullets { list-style:none; margin-bottom:1.8rem; }
.welcome-bullets li { font-size:0.82rem; color:var(--text-dim); padding:0.35rem 0; padding-left:1.2rem; position:relative; line-height:1.5; }
.welcome-bullets li::before { content:'\203A'; position:absolute; left:0; color:var(--accent); font-weight:600; }
.welcome-setup { background:var(--bg-glass); border:1px solid var(--border); border-radius:14px; padding:1.2rem; margin-bottom:1.5rem; }
.welcome-setup h3 { font-size:0.75rem; text-transform:uppercase; letter-spacing:0.15em; color:var(--text-dim); margin-bottom:1rem; text-align:center; }
.setup-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:0.8rem; }
.setup-row label { font-size:0.82rem; color:var(--text); font-weight:500; }
.setup-row input { width:130px; background:transparent; border:1px solid var(--border); border-radius:8px; color:var(--text); padding:0.4rem 0.6rem; font-family:var(--font-body); font-size:0.85rem; outline:none; text-align:right; }
.setup-row input:focus { border-color:var(--accent); }
.setup-row input[type="date"] { text-align:center; font-size:0.8rem; }
.welcome-setup .btn-main { width:100%; margin-top:0.5rem; }
.welcome-setup .btn-ghost { width:100%; margin-top:0.6rem; background:transparent; border:1px solid var(--border); color:var(--text-dim); padding:0.7rem; border-radius:50px; font-family:var(--font-body); font-weight:600; font-size:0.85rem; cursor:pointer; transition:all 0.2s; }
.welcome-setup .btn-ghost:hover { border-color:var(--accent); color:var(--accent); }
.welcome-credit { font-size:0.78rem; color:var(--text-dim); text-align:center; line-height:1.5; margin-bottom:1.2rem; font-style:italic; }
.welcome-donate { text-align:center; }
.welcome-donate > p { font-size:0.7rem; text-transform:uppercase; letter-spacing:0.12em; color:var(--text-dim); margin-bottom:0.6rem; }
.donate-links { display:flex; gap:0.5rem; justify-content:center; flex-wrap:wrap; }
.donate-placeholder { font-size:0.72rem; color:var(--text-dim); text-decoration:none; padding:0.35rem 0.8rem; border:1px solid var(--border); border-radius:50px; opacity:0.7; transition:all 0.2s; cursor:default; }
.donate-placeholder:hover { opacity:1; border-color:var(--accent); color:var(--accent); }
.daily-goal-widget { position:fixed; top:1.5rem; left:1.5rem; z-index:10; width:240px; background:var(--bg-card); border:1px solid var(--border); border-radius:14px; padding:1rem 1.1rem; backdrop-filter:blur(14px); box-shadow:var(--shadow); transition:all 0.3s; }
.daily-goal-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:0.6rem; }
.daily-goal-header span:first-child { font-size:0.7rem; text-transform:uppercase; letter-spacing:0.12em; color:var(--text-dim); font-weight:600; }
.daily-goal-header span:last-child { font-size:0.85rem; color:var(--accent); font-weight:700; }
.daily-goal-value-original { text-decoration:line-through; text-decoration-thickness:1.5px; text-decoration-color:currentColor; opacity:0.55; }
.daily-goal-value-arrow { margin:0 0.3em; opacity:0.45; font-size:0.8em; font-weight:400; }
.daily-goal-value-updated { color:var(--green); transition:color 0.3s; }
.daily-goal-track { display:flex; width:100%; height:6px; background:var(--progress-track); border-radius:3px; overflow:visible; position:relative; }
.daily-goal-red { height:100%; background:var(--accent); border-radius:3px 0 0 3px; transition:width 0.5s cubic-bezier(0.4,0,0.2,1); box-shadow:0 0 6px var(--accent-glow); }
.daily-goal-red.full { border-radius:3px; }
.daily-goal-green { height:100%; background:var(--green); border-radius:0 3px 3px 0; transition:width 0.5s cubic-bezier(0.4,0,0.2,1); box-shadow:0 0 10px var(--green-glow); }
.daily-goal-sub { font-size:0.72rem; color:var(--text-dim); margin-top:0.5rem; text-align:center; }
.daily-goal-sub .over { color:var(--green); font-weight:600; }
.container { position:relative; z-index:1; width:100%; max-width:900px; padding:2rem; display:flex; flex-direction:column; align-items:center; gap:1.8rem; }
.quote-box { background:var(--bg-card); border:1px solid var(--border); border-radius:16px; padding:1.25rem 1.5rem; text-align:center; backdrop-filter:blur(12px); box-shadow:var(--shadow); min-height:80px; display:flex; flex-direction:column; justify-content:center; gap:0.5rem; width:100%; max-width:600px; transition:all 0.5s; }
.quote-text { font-size:1rem; font-style:italic; color:var(--text); line-height:1.5; transition:opacity 0.3s; }
.quote-author { font-size:0.8rem; color:var(--text-dim); font-weight:500; transition:opacity 0.3s; }
.timer-display { font-family:var(--font-timer); font-size:clamp(7rem,18vw,13rem); line-height:0.95; letter-spacing:0.06em; color:var(--text); text-shadow:0 0 50px var(--accent-glow); transition:all 0.3s; user-select:none; text-align:center; width:100%; will-change:transform; }
.timer-display.running { text-shadow:0 0 70px var(--accent-glow), 0 0 140px var(--accent-glow); }
.timer-display.warning { color:var(--orange); text-shadow:0 0 50px rgba(251,146,60,0.4); }
.timer-display.finished { color:var(--green); text-shadow:0 0 60px var(--green-glow); animation:finishPulse 1s ease-in-out 3; }
@keyframes finishPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.03)} }
.timer-sub { font-size:0.85rem; color:var(--text-dim); letter-spacing:0.12em; text-transform:uppercase; min-height:1.4rem; text-align:center; }
.countdown-setup { display:flex; align-items:center; gap:0.4rem; justify-content:center; background:var(--bg-card); border:1px solid var(--border); border-radius:12px; padding:0.6rem 1rem; }
.countdown-setup input { width:52px; background:transparent; border:1px solid var(--border); border-radius:8px; color:var(--text); text-align:center; padding:0.35rem; font-family:var(--font-timer); font-size:1.3rem; outline:none; transition:border-color 0.2s; }
.countdown-setup input:focus { border-color:var(--accent); }
.countdown-setup span { color:var(--text-dim); font-weight:600; font-size:1.1rem; }
.countdown-setup label { font-size:0.6rem; color:var(--text-dim); text-transform:uppercase; letter-spacing:0.1em; text-align:center; display:block; margin-top:0.15rem; }
.cd-input-wrap { display:flex; flex-direction:column; align-items:center; }
.mode-selector { display:flex; gap:0.3rem; background:var(--bg-card); border:1px solid var(--border); border-radius:50px; padding:0.3rem; backdrop-filter:blur(8px); }
.mode-btn { background:transparent; border:none; color:var(--text-dim); padding:0.45rem 1.1rem; border-radius:50px; font-size:0.78rem; font-weight:500; font-family:var(--font-body); cursor:pointer; transition:all 0.25s; letter-spacing:0.03em; }
.mode-btn:hover { color:var(--text); }
.mode-btn.active { background:var(--accent); color:#fff; box-shadow:0 2px 12px var(--accent-glow); }
.mode-btn { position:relative; }
.mode-btn::after {
content:attr(data-tooltip); position:absolute; bottom:calc(100% + 11px); left:50%;
transform:translateX(-50%) translateY(4px); background:var(--bg-card); border:1px solid var(--border);
color:var(--text); font-size:0.68rem; font-weight:400; letter-spacing:normal; line-height:1.3;
padding:0.5rem 0.7rem; border-radius:8px; width:max-content; max-width:190px; text-align:center; box-shadow:var(--shadow);
opacity:0; pointer-events:none; transition:opacity 0.15s ease, transform 0.15s ease; z-index:20;
}
.mode-btn::before {
content:''; position:absolute; bottom:calc(100% + 5px); left:50%; transform:translateX(-50%) translateY(4px);
border:5px solid transparent; border-top-color:var(--bg-card); opacity:0; pointer-events:none;
transition:opacity 0.15s ease, transform 0.15s ease; z-index:21;
}
.mode-btn:hover::after, .mode-btn:hover::before { opacity:1; transform:translateX(-50%) translateY(0); }
@media (hover:none) { .mode-btn::after, .mode-btn::before { display:none; } }
.controls { display:flex; gap:1.2rem; align-items:center; }
.btn { border:none; outline:none; cursor:pointer; font-family:var(--font-body); font-weight:600; transition:all 0.25s; display:flex; align-items:center; justify-content:center; }
.btn-main { background:var(--accent); color:#fff; padding:1rem 3.5rem; border-radius:50px; font-size:1.1rem; letter-spacing:0.08em; box-shadow:0 4px 24px var(--accent-glow); min-width:160px; }
.btn-main:hover { transform:translateY(-2px); box-shadow:0 6px 32px var(--accent-glow); }
.btn-main:active { transform:translateY(0); }
.btn-icon { width:52px; height:52px; border-radius:50%; background:var(--bg-card); border:1px solid var(--border); color:var(--text); font-size:1.2rem; }
.btn-icon:hover { background:var(--accent); color:#fff; border-color:var(--accent); }
.progress-section { width:100%; max-width:500px; display:flex; flex-direction:column; gap:0.5rem; margin-top:0.5rem; }
.progress-section.no-goal .progress-bar-wrap { display:none; }
.progress-section.no-goal .progress-header span:last-child { display:none; }
.progress-section.no-goal .total-time { font-size:1.3rem; margin-top:0.5rem; }
.progress-section.no-goal .total-time span { font-size:1.5rem; }
.progress-header { display:flex; justify-content:space-between; align-items:center; font-size:0.75rem; color:var(--text-dim); text-transform:uppercase; letter-spacing:0.1em; }
.progress-bar-wrap { width:100%; height:6px; background:var(--progress-track); border-radius:3px; overflow:hidden; }
.progress-bar-fill { height:100%; background:var(--accent); border-radius:3px; transition:width 0.6s cubic-bezier(0.4,0,0.2,1); box-shadow:0 0 10px var(--accent-glow); }
.total-time { font-size:0.9rem; color:var(--text-dim); text-align:center; margin-top:0.25rem; }
.total-time span { color:var(--accent); font-weight:600; }
.about-content { line-height:1.65; }
.about-content h2, .about-content h3 { color:var(--text); }
.about-content h2 { font-size:1rem; margin:1.4rem 0 0.75rem; }
.about-content h3 { font-size:0.9rem; margin-bottom:0.35rem; }
.about-content p, .about-content details { color:var(--text-dim); font-size:0.86rem; }
.about-content-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:0.65rem; margin-top:1.1rem; }
.about-content article { padding:0.8rem; background:var(--bg-glass); border:1px solid var(--border); border-radius:10px; }
.about-content article p { font-size:0.76rem; }
.faq-list { display:grid; gap:0.55rem; }
.faq-list details { padding:0.75rem 0.85rem; background:var(--bg-glass); border:1px solid var(--border); border-radius:10px; }
.faq-list summary { color:var(--text); cursor:pointer; font-weight:600; }
.faq-list details p { margin-top:0.5rem; }
.auth-form { display:flex; flex-direction:column; gap:0.75rem; }
.auth-form input { width:100%; background:transparent; border:1px solid var(--border); border-radius:8px; color:var(--text); padding:0.7rem 0.8rem; font-family:var(--font-body); font-size:0.9rem; outline:none; }
.auth-form input:focus { border-color:var(--accent); }
.auth-message { min-height:1.25rem; color:var(--text-dim); font-size:0.78rem; line-height:1.45; text-align:center; }
.modal-close { position:absolute; top:0.85rem; right:0.85rem; width:32px; height:32px; border-radius:50%; border:1px solid var(--border); background:var(--bg-glass); color:var(--text-dim); font-size:1.25rem; line-height:1; cursor:pointer; transition:all 0.2s; }
.modal-close:hover { color:#fff; background:var(--accent); border-color:var(--accent); }
.auth-step { animation:stepIn 0.35s ease both; }
@keyframes stepIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
.auth-verification-icon { width:54px; height:54px; margin:0 auto 1rem; display:grid; place-items:center; border-radius:50%; color:var(--green); border:1px solid var(--green); font-size:1.5rem; box-shadow:0 0 18px var(--green-glow); }
.auth-divider { display:flex; align-items:center; gap:0.7rem; margin:0.9rem 0; color:var(--text-dim); font-size:0.72rem; text-transform:uppercase; letter-spacing:0.1em; }
.auth-divider::before, .auth-divider::after { content:''; height:1px; flex:1; background:var(--border); }
.cloud-status { color:var(--text-dim); font-size:0.72rem; margin-top:0.45rem; text-align:center; }
.settings-btn { position:fixed; bottom:1.5rem; right:1.5rem; width:44px; height:44px; border-radius:50%; background:var(--bg-card); border:1px solid var(--border); color:var(--text); cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:1.1rem; backdrop-filter:blur(8px); transition:all 0.3s; z-index:10; }
.settings-btn:hover { background:var(--accent); color:#fff; transform:rotate(30deg); }
.settings-panel { position:fixed; bottom:4.5rem; right:1.5rem; background:var(--bg-card); border:1px solid var(--border); border-radius:16px; padding:1.25rem; width:260px; max-height:calc(100vh - 6rem); overflow-y:auto; backdrop-filter:blur(16px); box-shadow:var(--shadow); transform:translateY(10px); opacity:0; pointer-events:none; transition:all 0.3s; z-index:10; }
.settings-panel.open { transform:translateY(0); opacity:1; pointer-events:all; }
.settings-panel h3 { font-size:0.8rem; text-transform:uppercase; letter-spacing:0.1em; color:var(--text-dim); margin-bottom:1rem; }
.setting-row { display:flex; justify-content:space-between; align-items:center; padding:0.6rem 0; border-bottom:1px solid var(--border); }
.setting-row:last-child { border-bottom:none; }
.setting-label { font-size:0.85rem; color:var(--text); }
.setting-input { width:80px; background:transparent; border:1px solid var(--border); border-radius:6px; color:var(--text); padding:0.25rem 0.4rem; font-family:var(--font-body); font-size:0.8rem; text-align:right; outline:none; }
.setting-input:focus { border-color:var(--accent); }
.setting-input[type="date"] { width:120px; text-align:center; font-size:0.75rem; }
.setting-value-wrap { display:flex; align-items:center; gap:0.5rem; }
.setting-value-text { font-size:0.85rem; color:var(--text); font-weight:600; }
.toggle { width:40px; height:22px; background:var(--progress-track); border-radius:11px; position:relative; cursor:pointer; transition:background 0.3s; }
.toggle::after { content:''; position:absolute; width:18px; height:18px; background:#fff; border-radius:50%; top:2px; left:2px; transition:transform 0.3s; }
.toggle.active { background:var(--accent); }
.toggle.active::after { transform:translateX(18px); }
.btn-small { background:transparent; border:1px solid var(--border); color:var(--text-dim); padding:0.3rem 0.7rem; border-radius:6px; font-size:0.75rem; font-family:var(--font-body); font-weight:500; cursor:pointer; transition:all 0.2s; }
.btn-small:hover { border-color:var(--accent); color:var(--accent); }
.contact-panel { margin-top:0.5rem; padding:0.6rem; background:var(--bg-glass); border-radius:8px; text-align:center; display:flex; align-items:center; justify-content:space-between; gap:0.5rem; }
.contact-panel p { font-size:0.78rem; color:var(--text); font-family:var(--font-body); }
.danger-btn { width:100%; margin-top:0.75rem; padding:0.6rem; border-radius:10px; background:transparent; border:1px solid var(--border); color:var(--accent); font-size:0.8rem; font-weight:600; cursor:pointer; transition:all 0.2s; }
.danger-btn:hover { background:var(--accent); color:#fff; }
.donate-row { margin-top:0.5rem; display:flex; flex-direction:column; gap:0.4rem; }
.donate-row span { font-size:0.72rem; color:var(--text-dim); text-decoration:none; padding:0.3rem 0.5rem; border:1px solid var(--border); border-radius:6px; text-align:center; opacity:0.7; transition:all 0.2s; cursor:default; }
.donate-row span:hover { opacity:1; border-color:var(--accent); color:var(--accent); }
.hidden { display:none !important; }
@media (max-width:600px) {
.container { padding:1.2rem 1rem; gap:1.3rem; }
.daily-goal-widget { width:150px; padding:0.7rem; top:1rem; left:1rem; }
.daily-goal-header span:first-child { font-size:0.62rem; }
.daily-goal-header span:last-child { font-size:0.78rem; }
.daily-goal-sub { font-size:0.62rem; }
.mode-btn { padding:0.4rem 0.75rem; font-size:0.72rem; }
.mode-btn::after { display:none; }
.mode-btn::before { display:none; }
.countdown-setup input { width:44px; font-size:1.1rem; }
.brand-top-right { font-size:0.85rem; letter-spacing:0.3em; top:1rem; right:1rem; }
.welcome-card { padding:1.5rem 1.2rem; }
.setup-row input { width:100px; font-size:0.8rem; }
.timer-display { font-size:clamp(2.6rem, 16vw, 6rem); letter-spacing:0.03em; }
.controls { gap:0.6rem; flex-wrap:wrap; justify-content:center; }
.btn-main { padding:0.85rem 2rem; font-size:0.95rem; min-width:0; flex:0 1 auto; }
.btn-icon { width:46px; height:46px; font-size:1rem; }
.settings-panel { width:calc(100vw - 2rem); max-width:260px; right:1rem; bottom:4rem; }
.settings-btn { bottom:1rem; right:1rem; }
.about-content-grid { grid-template-columns:1fr; }
}
@media (max-width:360px) {
.timer-display { font-size:clamp(2.2rem, 15vw, 5rem); }
.btn-main { padding:0.8rem 1.5rem; font-size:0.88rem; }
.daily-goal-widget { width:130px; }
}
</style>
</head>
<body data-theme="dark">
<div class="ambient" id="ambient"></div>
<canvas class="cursor-trail" id="cursorTrail" aria-hidden="true"></canvas>
<div class="brand-top-right">Stack</div>
<div class="welcome-overlay" id="welcomeOverlay">
<div class="welcome-card">
<h1>Stack</h1>
<p class="tagline">A study timer that keeps you accountable.</p>
<ul class="welcome-bullets">
<li>Track your study sessions with a live timer</li>
<li>Set a goal and deadline to see daily targets</li>
<li>Use Question mode to time individual attempts</li>
<li>Use Timer mode for countdown-based practice</li>
<li>Everything saves automatically to your browser</li>
</ul>
<div class="welcome-setup">
<h3>Set Your Goal</h3>
<div class="setup-row">
<label>Goal (hours)</label>
<input type="number" id="setupGoal" min="1" placeholder="e.g. 100">
</div>
<div class="setup-row">
<label>Deadline</label>
<input type="date" id="setupDeadline">
</div>
<button class="btn btn-main" id="setupStartBtn">Start Studying</button>
<button class="btn btn-ghost" id="setupSkipBtn">Start Without Goal</button>
</div>
<p class="welcome-credit">Made by Ammar, an ACCA student building tools to study more consistently.</p>
<div class="welcome-donate">
<p>Support me by donating</p>
<div class="donate-links">
<span class="donate-placeholder">GitHub Sponsors (coming soon)</span>
<button class="btn-small" id="welcomeDonateBtn" style="font-size:0.72rem;">Donate via Crypto</button>
</div>
<div class="contact-panel hidden" id="welcomeDonatePanel" style="margin-top:0.6rem; flex-direction:column; gap:0.4rem; align-items:stretch;">
<div style="font-size:0.72rem; color:var(--text-dim); text-align:left; line-height:1.5;">
<p style="margin-bottom:0.3rem; color:var(--text); font-weight:600;">⚡ Donate via Crypto</p>
<p style="margin-bottom:0.2rem;"><strong>Binance Pay</strong> (Binance Users Only): <span style="color:var(--accent); font-family:monospace;">578153159</span></p>
<p style="margin-bottom:0.2rem;"><strong>USDT – BEP20</strong> (BNB Smart Chain):</p>
<p style="font-family:monospace; font-size:0.68rem; word-break:break-all; color:var(--accent); margin-bottom:0.3rem;">0x22934a815EC095405bca01fB82D1131a02959F0A</p>
<p style="font-size:0.65rem; color:var(--orange); border:1px solid var(--border); border-radius:6px; padding:0.4rem; background:var(--bg-glass);">⚠️ <strong>Crucial:</strong> Always send USDT on <strong>BNB Smart Chain (BEP20)</strong> only. Sending via TRON (TRC20) or any other network to this address will result in <strong>permanent loss</strong> of funds.</p>
</div>
<div style="display:flex; gap:0.4rem;">
<button class="btn-small" id="copyBinanceBtn" style="flex:1;">Copy Binance ID</button>
<button class="btn-small" id="copyWalletBtn" style="flex:1;">Copy Wallet</button>
</div>
</div>
</div>
</div>
</div>
<div class="welcome-overlay" id="goalHitOverlay">
<div class="welcome-card" style="max-width:400px;">
<h1 id="goalHitTitle" style="font-size:1.6rem;">Goal Reached!</h1>
<p class="tagline" id="goalHitMessage">You hit your target. Nice work.</p>
<div class="welcome-setup">
<h3>What next?</h3>
<div class="setup-row">
<label>New goal (hours)</label>
<input type="number" id="goalHitNewHours" min="1">
</div>
<div class="setup-row">
<label>New deadline</label>
<input type="date" id="goalHitNewDeadline">
</div>
<button class="btn btn-main" id="goalHitSaveBtn">Set New Target</button>
<button class="btn btn-ghost" id="goalHitContinueBtn">Keep Logging As Is</button>
</div>
</div>
</div>
<div class="welcome-overlay" id="goalSettingsOverlay" role="dialog" aria-modal="true" aria-labelledby="goalSettingsTitle">
<div class="welcome-card" style="max-width:400px;">
<button class="modal-close" id="goalSettingsCloseBtn" type="button" aria-label="Close">×</button>
<h1 id="goalSettingsTitle" style="font-size:1.7rem;">Set your goal</h1>
<p class="tagline">Choose a total study target and the date you want to reach it.</p>
<div class="welcome-setup">
<div class="setup-row">
<label>Goal (hours)</label>
<input type="number" id="goalSettingsHours" min="1" placeholder="e.g. 100">
</div>
<div class="setup-row">
<label>Deadline</label>
<input type="date" id="goalSettingsDeadline">
</div>
<button class="btn btn-main" id="goalSettingsSaveBtn" style="width:100%;">Save goal</button>
</div>
</div>
</div>
<div class="welcome-overlay" id="timerFinishedOverlay" role="alertdialog" aria-modal="true" aria-labelledby="timerFinishedTitle">
<div class="welcome-card" style="max-width:380px; text-align:center;">
<button class="modal-close" id="timerFinishedTopCloseBtn" type="button" aria-label="Close">×</button>
<h1 id="timerFinishedTitle" style="font-size:1.8rem;">Time's Up!</h1>
<p class="tagline">Your countdown has reached zero.</p>
<button class="btn btn-main" id="dismissTimerAlertBtn" style="width:100%;">Dismiss</button>
</div>
</div>
<div class="welcome-overlay" id="aboutOverlay" role="dialog" aria-modal="true" aria-labelledby="aboutStacktimeTitle">
<div class="welcome-card" style="max-width:760px;">
<button class="modal-close" id="aboutTopCloseBtn" type="button" aria-label="Close">×</button>
<h1 id="aboutStacktimeTitle" style="font-size:1.8rem;">About StackTime</h1>
<div class="about-content">
<p>StackTime helps students build consistent study habits. Track a full study session, time individual practice questions, or run a custom countdown while your total study time keeps moving forward.</p>
<div class="about-content-grid">
<article><h3>Stay on pace</h3><p>Set a total-hours target and deadline to see the study time you need each day.</p></article>
<article><h3>Practice with intent</h3><p>Time individual questions while keeping your wider study session running.</p></article>
<article><h3>Private by default</h3><p>No account is required. Your settings and progress stay in your browser.</p></article>
</div>
<h2>Frequently asked questions</h2>
<div class="faq-list">
<details><summary>Is StackTime free?</summary><p>Yes. StackTime is free to use and does not require an account or subscription.</p></details>
<details><summary>Who is StackTime for?</summary><p>It is designed for students preparing for exams, certifications, coursework, and other long-term study goals.</p></details>
<details><summary>Where is my study progress stored?</summary><p>Your timer settings and progress are stored locally in your browser, so they are not sent to a server.</p></details>
</div>
</div>
</div>
</div>
<div class="welcome-overlay" id="authOverlay" role="dialog" aria-modal="true" aria-labelledby="authTitle">
<div class="welcome-card" style="max-width:390px;">
<button class="modal-close" id="authTopCloseBtn" type="button" aria-label="Close">×</button>
<h1 id="authTitle" style="font-size:1.8rem;">Create your account</h1>
<p class="tagline" id="authSubtitle">Back up your StackTime progress and access it on another device.</p>
<div class="auth-step" id="authEntry">
<form class="auth-form" id="authForm">
<input type="email" id="authEmail" autocomplete="email" placeholder="Email address" required>
<input type="password" id="authPassword" autocomplete="new-password" placeholder="Password (at least 6 characters)" minlength="6" required>
<button class="btn btn-main" id="authSubmitBtn" type="submit" style="width:100%;">Create account</button>
</form>
<p class="auth-message" id="authMessage" aria-live="polite"></p>
<div class="auth-divider">or</div>
<button class="btn btn-ghost" id="googleAuthBtn" type="button" style="width:100%;">Continue with Google</button>
<button class="btn btn-ghost" id="authModeBtn" type="button" style="width:100%; margin-top:0.6rem;">Already have an account? Sign in</button>
<button class="btn btn-ghost" id="authCloseBtn" type="button" style="width:100%; margin-top:0.6rem;">Continue without an account</button>
</div>
<div class="auth-step hidden" id="authVerification">
<div class="auth-verification-icon">✓</div>
<p class="tagline" style="margin-bottom:0.7rem;">Your account is almost ready.</p>
<p class="auth-message" id="authVerificationMessage">Open the verification email we sent you, then click its confirmation link to finish.</p>
<button class="btn btn-ghost" id="authVerificationCloseBtn" type="button" style="width:100%; margin-top:1rem;">Continue locally for now</button>
</div>
</div>
</div>
<div class="welcome-overlay" id="cloudChoiceOverlay" role="dialog" aria-modal="true" aria-labelledby="cloudChoiceTitle">
<div class="welcome-card" style="max-width:430px;">
<button class="modal-close" id="cloudChoiceCloseBtn" type="button" aria-label="Close">×</button>
<h1 id="cloudChoiceTitle" style="font-size:1.6rem;">Save your progress?</h1>
<p class="tagline" id="cloudChoiceMessage"></p>
<button class="btn btn-main" id="cloudPrimaryBtn" style="width:100%;">Upload to cloud</button>
<button class="btn btn-ghost" id="cloudSecondaryBtn" style="width:100%; margin-top:0.6rem;">Keep local only</button>
<button class="btn btn-ghost hidden" id="cloudTertiaryBtn" style="width:100%; margin-top:0.6rem;"></button>
</div>
</div>
<div class="welcome-overlay" id="accountOverlay" role="dialog" aria-modal="true" aria-labelledby="accountTitle">
<div class="welcome-card" style="max-width:390px; text-align:center;">
<button class="modal-close" id="accountCloseBtn" type="button" aria-label="Close">×</button>
<h1 id="accountTitle" style="font-size:1.7rem;">Your account</h1>
<p class="tagline" id="accountEmail"></p>
<p class="auth-message" id="accountCloudMessage"></p>
<button class="btn btn-main hidden" id="enableCloudBtn" type="button" style="width:100%;">Switch to cloud backup</button>
<button class="btn btn-ghost" id="accountSignOutBtn" type="button" style="width:100%; margin-top:0.7rem;">Sign out</button>
</div>
</div>
<div class="daily-goal-widget" id="dailyGoalWidget">
<div class="daily-goal-header">
<span id="dailyGoalTitle">Today's Goal</span>
<span id="dailyGoalValue">0.0h</span>
</div>
<div class="daily-goal-track" id="dailyGoalTrack">
<div class="daily-goal-red" id="dailyGoalRed" style="width:0%"></div>
<div class="daily-goal-green" id="dailyGoalGreen" style="width:0%"></div>
</div>
<div class="daily-goal-sub" id="dailyGoalSub">0.0 / 0.0 hrs</div>
</div>
<main class="container">
<div class="quote-box" id="quoteBox">
<div class="quote-text" id="quoteText">"The secret of getting ahead is getting started."</div>
<div class="quote-author" id="quoteAuthor">— Mark Twain</div>
</div>
<div class="timer-display" id="timerDisplay">00:00:00.0</div>
<div class="timer-sub" id="timerSub">Current: 00:00:00.0</div>
<div class="countdown-setup hidden" id="countdownSetup">
<div class="cd-input-wrap">
<input type="number" id="cdH" min="0" max="99" value="0">
<label>HR</label>
</div>
<span>:</span>
<div class="cd-input-wrap">
<input type="number" id="cdM" min="0" max="59" value="10">
<label>MIN</label>
</div>
<span>:</span>
<div class="cd-input-wrap">
<input type="number" id="cdS" min="0" max="59" value="0">
<label>SEC</label>
</div>
</div>
<div class="mode-selector" id="modeSelector">
<button class="mode-btn active" data-mode="session" data-tooltip="Tracks your full study session, start to finish">Session</button>
<button class="mode-btn" data-mode="question" data-tooltip="Times how long each question or exercise takes you">Practice</button>
<button class="mode-btn" data-mode="countdown" data-tooltip="Counts down from a set time for focused, timed work">Timer</button>
</div>
<div class="controls">
<button class="btn btn-main" id="startBtn">Start</button>
<button class="btn btn-icon hidden" id="pauseBtn" title="Pause">II</button>
<button class="btn btn-icon" id="resetBtn" title="Reset">↻</button>
</div>
<div class="progress-section" id="progressSection">
<div class="progress-header">
<span id="progressLabel">Goal: 100 Hours</span>
<span id="progressPercent">0%</span>
</div>
<div class="progress-bar-wrap" id="progressBarWrap">
<div class="progress-bar-fill" id="progressBar" style="width: 0%"></div>
</div>
<div class="total-time" id="totalTimeEl">Total Study Time: <span id="totalTime">0h 0m 0s</span></div>
</div>
</main>
<button class="settings-btn" id="settingsBtn">⚙</button>
<div class="settings-panel" id="settingsPanel">
<h3>Settings</h3>
<div class="setting-row">
<span class="setting-label">Light Theme</span>
<div class="toggle" id="themeToggle"></div>
</div>
<div class="setting-row">
<span class="setting-label">Goal Tracking</span>
<div class="toggle" id="goalToggle"></div>
</div>
<div class="setting-row">
<span class="setting-label" id="accountLabel">Cloud Backup</span>
<button class="btn-small" id="accountBtn">Create / Sign in</button>
</div>
<div class="cloud-status" id="cloudStatus">Local only — progress stays on this device</div>
<div class="setting-row goal-setting-row" id="goalManageRow">
<span class="setting-label">Goal & deadline</span>
<button class="btn-small" id="goalManageBtn">Change</button>
</div>
<div class="setting-row goal-setting-row hidden" id="goalHoursRow">
<span class="setting-label">Goal (hours)</span>
<div class="setting-value-wrap" id="goalHoursDisplayWrap">
<span class="setting-value-text" id="goalHoursValueText">100</span>
<button class="btn-small" id="goalHoursEditBtn">Change</button>
</div>
<div class="setting-value-wrap hidden" id="goalHoursEditWrap">
<input type="number" id="settingsGoalHours" class="setting-input" value="100" min="1">
<button class="btn-small" id="goalHoursSaveBtn">Save</button>
</div>
</div>
<div class="setting-row goal-setting-row hidden" id="goalDeadlineRow">
<span class="setting-label">Deadline</span>
<div class="setting-value-wrap" id="goalDeadlineDisplayWrap">
<span class="setting-value-text" id="goalDeadlineValueText">—</span>
<button class="btn-small" id="goalDeadlineEditBtn">Change</button>
</div>
<div class="setting-value-wrap hidden" id="goalDeadlineEditWrap">
<input type="date" id="settingsDeadline" class="setting-input">
<button class="btn-small" id="goalDeadlineSaveBtn">Save</button>
</div>
</div>
<div class="setting-row">
<span class="setting-label">Contact Support</span>
<button class="btn-small" id="contactBtn">Email</button>
</div>
<div class="contact-panel hidden" id="contactPanel">
<p>ammarkhan5683@gmail.com</p>
<button class="btn-small" id="copyEmailBtn">Copy</button>
</div>
<div class="setting-row">
<span class="setting-label">About StackTime</span>
<button class="btn-small" id="aboutBtn">About</button>
</div>
<div class="setting-row">
<span class="setting-label">Support Me</span>
<button class="btn-small" id="donateBtn">Donate Now!</button>
</div>
<div class="contact-panel hidden" id="donatePanel" style="flex-direction:column; gap:0.5rem; align-items:stretch; text-align:left;">
<div style="font-size:0.72rem; color:var(--text-dim); line-height:1.5;">
<p style="margin-bottom:0.4rem; color:var(--text); font-weight:600; font-size:0.78rem;">⚡ Donate via Crypto</p>
<p style="margin-bottom:0.2rem;"><strong>Binance Pay</strong> (Binance Users Only): <span style="color:var(--accent); font-family:monospace;">578153159</span></p>
<p style="margin-bottom:0.2rem;"><strong>USDT – BEP20</strong> (BNB Smart Chain):</p>
<p style="font-family:monospace; font-size:0.68rem; word-break:break-all; color:var(--accent); margin-bottom:0.3rem;">0x22934a815EC095405bca01fB82D1131a02959F0A</p>
<p style="font-size:0.65rem; color:var(--orange); border:1px solid var(--border); border-radius:6px; padding:0.4rem; background:var(--bg-glass);">⚠️ <strong>Crucial:</strong> Always send USDT on <strong>BNB Smart Chain (BEP20)</strong> only. Sending via TRON (TRC20) or any other network to this address will result in <strong>permanent loss</strong> of funds.</p>
<p style="margin-top:0.4rem; font-size:0.7rem; opacity:0.6;">GitHub Sponsors — coming soon</p>
</div>
<div style="display:flex; gap:0.4rem;">
<button class="btn-small" id="copyBinanceIdBtn" style="flex:1;">Copy Binance ID</button>
<button class="btn-small" id="copyWalletAddrBtn" style="flex:1;">Copy Wallet</button>
</div>
</div>
<div class="setting-row">
<span class="setting-label">Advanced</span>
<button class="btn-small" id="advancedBtn">Advanced</button>
</div>
<div class="contact-panel hidden" id="advancedPanel" style="flex-direction:column; gap:0.5rem; align-items:stretch; text-align:left;">
<div style="font-size:0.72rem; color:var(--text-dim); line-height:1.5;">
<p style="margin-bottom:0.3rem; color:var(--text); font-weight:600; font-size:0.78rem;">Restore Lost Progress</p>
<p>Enter your completed total in hours and minutes. This will set your total study time and update the progress bar.</p>
</div>
<div style="display:flex; gap:0.4rem; align-items:center;">
<input type="number" id="restoreHoursInput" class="setting-input" style="flex:1; width:auto; text-align:left;" placeholder="Hours" min="0" step="1">
<input type="number" id="restoreMinutesInput" class="setting-input" style="flex:1; width:auto; text-align:left;" placeholder="Minutes" min="0" max="59" step="1">
<button class="btn-small" id="applyRestoreBtn">Apply</button>
</div>
</div>
<button class="danger-btn" id="resetAllBtn">Reset All Progress</button>
</div>
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
<script src="https://cdn.jsdelivr.net/npm/motion@13.1.1/dist/motion.js"></script>
<script>
(function() {
const quotes = [
{ text: "The secret of getting ahead is getting started.", author: "Mark Twain" },
{ text: "It always seems impossible until it's done.", author: "Nelson Mandela" },
{ text: "Don't watch the clock; do what it does. Keep going.", author: "Sam Levenson" },
{ text: "Success is the sum of small efforts, repeated day in and day out.", author: "Robert Collier" },
{ text: "The future belongs to those who believe in the beauty of their dreams.", author: "Eleanor Roosevelt" },
{ text: "Your time is limited, don't waste it living someone else's life.", author: "Steve Jobs" },
{ text: "The only way to do great work is to love what you do.", author: "Steve Jobs" },
{ text: "Believe you can and you're halfway there.", author: "Theodore Roosevelt" },
{ text: "Act as if what you do makes a difference. It does.", author: "William James" },
{ text: "Dream big and dare to fail.", author: "Norman Vaughan" },
{ text: "What we learn with pleasure we never forget.", author: "Alfred Mercier" },
{ text: "Education is the passport to the future.", author: "Malcolm X" },
{ text: "The beautiful thing about learning is that no one can take it away from you.", author: "B.B. King" },
{ text: "An investment in knowledge pays the best interest.", author: "Benjamin Franklin" },
{ text: "Live as if you were to die tomorrow. Learn as if you were to live forever.", author: "Mahatma Gandhi" },
{ text: "The more that you read, the more things you will know.", author: "Dr. Seuss" },
{ text: "Knowledge is power.", author: "Francis Bacon" },
{ text: "Learning never exhausts the mind.", author: "Leonardo da Vinci" },
{ text: "The mind is not a vessel to be filled but a fire to be kindled.", author: "Plutarch" },
{ text: "Wisdom is not a product of schooling but of the lifelong attempt to acquire it.", author: "Albert Einstein" },
{ text: "Strive for progress, not perfection.", author: "Unknown" },
{ text: "There are no shortcuts to any place worth going.", author: "Beverly Sills" },
{ text: "Start where you are. Use what you have. Do what you can.", author: "Arthur Ashe" },
{ text: "Fall seven times, stand up eight.", author: "Japanese Proverb" },
{ text: "You don't have to be great to start, but you have to start to be great.", author: "Zig Ziglar" },
{ text: "Discipline is choosing between what you want now and what you want most.", author: "Abraham Lincoln" },
{ text: "The expert in anything was once a beginner.", author: "Helen Hayes" },
{ text: "Push yourself, because no one else is going to do it for you.", author: "Unknown" },
{ text: "Great things never come from comfort zones.", author: "Unknown" },
{ text: "Success doesn't just find you. You have to go out and get it.", author: "Unknown" },
{ text: "The harder you work for something, the greater you'll feel when you achieve it.", author: "Unknown" },
{ text: "Dream it. Wish it. Do it.", author: "Unknown" },
{ text: "Sometimes later becomes never. Do it now.", author: "Unknown" },
{ text: "Don't stop when you're tired. Stop when you're done.", author: "Unknown" },
{ text: "Wake up with determination. Go to bed with satisfaction.", author: "Unknown" },
{ text: "Do something today that your future self will thank you for.", author: "Sean Patrick Flanery" },
{ text: "Little by little, a little becomes a lot.", author: "Tanzanian Proverb" },
{ text: "It does not matter how slowly you go as long as you do not stop.", author: "Confucius" },
{ text: "Everything you've ever wanted is on the other side of fear.", author: "George Addair" },
{ text: "Opportunities don't happen. You create them.", author: "Chris Grosser" },
{ text: "Hard work beats talent when talent doesn't work hard.", author: "Tim Notke" },
{ text: "I'm proud of you twin.", author: "Your Future Self" },
{ text: "You got this twin :)", author: "The Universe" },
{ text: "Lock in. No cap, you're built different.", author: "Real Talk" },
{ text: "Stay hungry, stay foolish. But like, in a chill way.", author: "Steve Jobs (paraphrased)" },
{ text: "The grind don't stop, and neither do you.", author: "Unknown" },
{ text: "You're not lazy, you're just resting before the comeback.", author: "Your Inner Hype Man" },
{ text: "Every hour you put in is a brick in your empire. Keep laying them.", author: "Unknown" },
{ text: "Slay the books, queen/king. Slay them.", author: "The Gossip" },
{ text: "Your future self is watching you right now through memories. Make them proud.", author: "Unknown" },
{ text: "One day you'll look back and be glad you started today. No cap.", author: "Unknown" },
{ text: "You're not behind. You're exactly where you need to be to get where you're going.", author: "Unknown" },
{ text: "Bet on yourself. The returns are insane.", author: "Unknown" },
{ text: "Small steps every day > giant leaps once a year.", author: "Unknown" },
{ text: "Your brain is a muscle. Flex it.", author: "Unknown" },
{ text: "They sleep, you study. That's the difference.", author: "Unknown" },
{ text: "Level up. The game doesn't pause for anyone.", author: "Unknown" },
{ text: "You didn't come this far to only come this far.", author: "Rafael Nadal" },
{ text: "Be the person your dog thinks you are. Study hard.", author: "Unknown" },
{ text: "The only bad study session is the one you didn't do.", author: "Unknown" },
{ text: "You're literally creating your own future right now. That's fire.", author: "Unknown" },
{ text: "Pain is temporary. GPA is forever. Just kidding — knowledge is forever.", author: "Unknown" },
{ text: "You are the main character. Act like it.", author: "Unknown" },
{ text: "No one is you and that is your power. Use it.", author: "Unknown" },
{ text: "Manifesting that A+ energy for you right now.", author: "The Vibes" },
{ text: "Your comfort zone is a beautiful place, but nothing ever grows there.", author: "Unknown" },
{ text: "Rome wasn't built in a day, but they were laying bricks every hour.", author: "Unknown" },
{ text: "Progress, not perfection. We move.", author: "Unknown" },
{ text: "You're doing amazing, sweetie. Keep going.", author: "Kris Jenner (probably)" },
{ text: "Study now, shine later. That's the contract.", author: "Unknown" },
{ text: "Every page you turn is a step closer to the life you want.", author: "Unknown" },
{ text: "Don't let yesterday take up too much of today. Fresh start, let's go.", author: "Will Rogers" },
{ text: "If it was easy, everyone would do it. You're not everyone.", author: "Unknown" },
{ text: "The comeback is always stronger than the setback.", author: "Unknown" },
{ text: "Your potential is endless. Go do what you were created to do.", author: "Unknown" },
{ text: "You are allowed to be both a masterpiece and a work in progress.", author: "Sophia Bush" },
{ text: "Focus on being productive instead of busy.", author: "Tim Ferriss" },
{ text: "The best way to predict the future is to create it.", author: "Peter Drucker" },
{ text: "Don't wish it were easier. Wish you were better.", author: "Jim Rohn" },
{ text: "Work hard in silence. Let success be your noise.", author: "Frank Ocean" },
{ text: "You don't get what you wish for. You get what you work for.", author: "Unknown" },
{ text: "Study like there's no tomorrow, because one day there won't be.", author: "Unknown" },
{ text: "The man who moves a mountain begins by carrying away small stones.", author: "Confucius" },
{ text: "Don't count the days. Make the days count.", author: "Muhammad Ali" },
{ text: "It always seems impossible until it's done. And then you flex.", author: "Nelson Mandela (vibes edition)" }
];
let state = {
sessionRunning: false, sessionStartTime: 0, sessionElapsed: 0,
questionRunning: false, questionStartTime: 0, questionElapsed: 0,
countdownRunning: false, countdownStartTime: 0, countdownInitialMs: 600000, countdownFinished: false,
paused: false, pauseStart: 0,
totalMs: 0, todayMs: 0, lastStudyDate: null,
goalHours: 0, goalDeadline: '', hasGoal: false,
goalHitAcked: false, deadlineHitAcked: false,
theme: 'dark', mode: 'session', firstTime: true
};
const timerDisplay = document.getElementById('timerDisplay');
const timerSub = document.getElementById('timerSub');
const startBtn = document.getElementById('startBtn');
const pauseBtn = document.getElementById('pauseBtn');
const resetBtn = document.getElementById('resetBtn');
const quoteText = document.getElementById('quoteText');
const quoteAuthor = document.getElementById('quoteAuthor');
const progressBar = document.getElementById('progressBar');
const progressPercent = document.getElementById('progressPercent');
const progressLabel = document.getElementById('progressLabel');
const progressSection = document.getElementById('progressSection');
const progressBarWrap = document.getElementById('progressBarWrap');
const totalTimeEl = document.getElementById('totalTime');
const settingsBtn = document.getElementById('settingsBtn');
const settingsPanel = document.getElementById('settingsPanel');
const themeToggle = document.getElementById('themeToggle');
const goalToggle = document.getElementById('goalToggle');
const resetAllBtn = document.getElementById('resetAllBtn');
const ambient = document.getElementById('ambient');
const cursorTrail = document.getElementById('cursorTrail');
const countdownSetup = document.getElementById('countdownSetup');
const cdH = document.getElementById('cdH');
const cdM = document.getElementById('cdM');
const cdS = document.getElementById('cdS');
const dailyGoalTitle = document.getElementById('dailyGoalTitle');
const dailyGoalValue = document.getElementById('dailyGoalValue');
const dailyGoalRed = document.getElementById('dailyGoalRed');
const dailyGoalGreen = document.getElementById('dailyGoalGreen');
const dailyGoalSub = document.getElementById('dailyGoalSub');
const dailyGoalTrack = document.getElementById('dailyGoalTrack');
const modeBtns = document.querySelectorAll('.mode-btn');
const welcomeOverlay = document.getElementById('welcomeOverlay');
const setupStartBtn = document.getElementById('setupStartBtn');
const setupSkipBtn = document.getElementById('setupSkipBtn');
const setupGoal = document.getElementById('setupGoal');
const setupDeadline = document.getElementById('setupDeadline');
const settingsGoalHours = document.getElementById('settingsGoalHours');
const settingsDeadline = document.getElementById('settingsDeadline');
const goalHoursRow = document.getElementById('goalHoursRow');
const goalDeadlineRow = document.getElementById('goalDeadlineRow');
const goalManageRow = document.getElementById('goalManageRow');
const goalManageBtn = document.getElementById('goalManageBtn');
const goalSettingsOverlay = document.getElementById('goalSettingsOverlay');
const goalSettingsCloseBtn = document.getElementById('goalSettingsCloseBtn');
const goalSettingsHours = document.getElementById('goalSettingsHours');
const goalSettingsDeadline = document.getElementById('goalSettingsDeadline');
const goalSettingsSaveBtn = document.getElementById('goalSettingsSaveBtn');
const goalHoursValueText = document.getElementById('goalHoursValueText');
const goalHoursDisplayWrap = document.getElementById('goalHoursDisplayWrap');
const goalHoursEditWrap = document.getElementById('goalHoursEditWrap');
const goalHoursEditBtn = document.getElementById('goalHoursEditBtn');
const goalHoursSaveBtn = document.getElementById('goalHoursSaveBtn');
const goalDeadlineValueText = document.getElementById('goalDeadlineValueText');
const goalDeadlineDisplayWrap = document.getElementById('goalDeadlineDisplayWrap');
const goalDeadlineEditWrap = document.getElementById('goalDeadlineEditWrap');
const goalDeadlineEditBtn = document.getElementById('goalDeadlineEditBtn');
const goalDeadlineSaveBtn = document.getElementById('goalDeadlineSaveBtn');
const contactBtn = document.getElementById('contactBtn');
const contactPanel = document.getElementById('contactPanel');
const copyEmailBtn = document.getElementById('copyEmailBtn');
const goalHitOverlay = document.getElementById('goalHitOverlay');
const goalHitTitle = document.getElementById('goalHitTitle');
const goalHitMessage = document.getElementById('goalHitMessage');
const goalHitNewHours = document.getElementById('goalHitNewHours');
const goalHitNewDeadline = document.getElementById('goalHitNewDeadline');
const goalHitSaveBtn = document.getElementById('goalHitSaveBtn');
const goalHitContinueBtn = document.getElementById('goalHitContinueBtn');
const timerFinishedOverlay = document.getElementById('timerFinishedOverlay');
const dismissTimerAlertBtn = document.getElementById('dismissTimerAlertBtn');
const timerFinishedTopCloseBtn = document.getElementById('timerFinishedTopCloseBtn');
const aboutOverlay = document.getElementById('aboutOverlay');
const aboutBtn = document.getElementById('aboutBtn');
const aboutCloseBtn = document.getElementById('aboutTopCloseBtn');
const accountLabel = document.getElementById('accountLabel');
const accountBtn = document.getElementById('accountBtn');
const cloudStatus = document.getElementById('cloudStatus');
const authOverlay = document.getElementById('authOverlay');
const authForm = document.getElementById('authForm');
const authTitle = document.getElementById('authTitle');
const authSubtitle = document.getElementById('authSubtitle');
const authEmail = document.getElementById('authEmail');
const authPassword = document.getElementById('authPassword');
const authSubmitBtn = document.getElementById('authSubmitBtn');
const authModeBtn = document.getElementById('authModeBtn');
const authCloseBtn = document.getElementById('authCloseBtn');
const authTopCloseBtn = document.getElementById('authTopCloseBtn');
const authMessage = document.getElementById('authMessage');
const authEntry = document.getElementById('authEntry');
const authVerification = document.getElementById('authVerification');
const authVerificationMessage = document.getElementById('authVerificationMessage');
const authVerificationCloseBtn = document.getElementById('authVerificationCloseBtn');
const googleAuthBtn = document.getElementById('googleAuthBtn');
const cloudChoiceOverlay = document.getElementById('cloudChoiceOverlay');
const cloudChoiceTitle = document.getElementById('cloudChoiceTitle');
const cloudChoiceMessage = document.getElementById('cloudChoiceMessage');
const cloudPrimaryBtn = document.getElementById('cloudPrimaryBtn');
const cloudSecondaryBtn = document.getElementById('cloudSecondaryBtn');
const cloudTertiaryBtn = document.getElementById('cloudTertiaryBtn');
const cloudChoiceCloseBtn = document.getElementById('cloudChoiceCloseBtn');
const accountOverlay = document.getElementById('accountOverlay');
const accountCloseBtn = document.getElementById('accountCloseBtn');
const accountEmail = document.getElementById('accountEmail');
const accountCloudMessage = document.getElementById('accountCloudMessage');
const enableCloudBtn = document.getElementById('enableCloudBtn');
const accountSignOutBtn = document.getElementById('accountSignOutBtn');
const SUPABASE_URL = 'https://arvozknuyfqodotxgytt.supabase.co';
const SUPABASE_PUBLISHABLE_KEY = 'sb_publishable_N6TFSkBsQpyhDR-KAf5k9w_J24-VWLe';
let supabaseClient = null;
let cloudUser = null;
let cloudSyncEnabled = localStorage.getItem('stackCloudSyncEnabled') === 'true';
let cloudSaveTimer = null;
let authMode = 'signup';
let cloudChoiceActions = {};
try {
if (window.supabase && window.supabase.createClient) {
supabaseClient = window.supabase.createClient(SUPABASE_URL, SUPABASE_PUBLISHABLE_KEY);
}
} catch (e) { console.warn('Cloud backup is unavailable', e); }
for (let i = 0; i < 30; i++) {
const s = document.createElement('span');
s.className = 'dot';
const size = 3 + Math.random() * 6;
s.style.width = size + 'px';
s.style.height = size + 'px';
s.style.left = Math.random() * 100 + '%';
s.style.top = Math.random() * 100 + '%';
s.style.animationDelay = Math.random() * 10 + 's';
s.style.animationDuration = (8 + Math.random() * 10) + 's';
ambient.appendChild(s);
}
for (let i = 0; i < 6; i++) {
const o = document.createElement('div');
o.className = 'orb';
const size = 80 + Math.random() * 150;
o.style.width = size + 'px';
o.style.height = size + 'px';
o.style.left = Math.random() * 100 + '%';
o.style.top = Math.random() * 100 + '%';
o.style.animationDelay = Math.random() * 20 + 's';
o.style.animationDuration = (15 + Math.random() * 15) + 's';
ambient.appendChild(o);
}
for (let i = 0; i < 3; i++) {
const b = document.createElement('div');
b.className = 'blob';
b.style.left = (Math.random() * 60) + '%';
b.style.top = (Math.random() * 60) + '%';
b.style.animationDelay = Math.random() * 25 + 's';
b.style.animationDuration = (20 + Math.random() * 15) + 's';
ambient.appendChild(b);
}
function getTodayStr() { return new Date().toISOString().split('T')[0]; }
function getDaysRemaining() {
const now = new Date();
const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
const deadline = new Date(state.goalDeadline);
deadline.setHours(0,0,0,0);
const diff = deadline - today;
const oneDay = 24 * 60 * 60 * 1000;
return Math.ceil(diff / oneDay) + 1;
}
function getDailyGoalHours() {
const totalHours = state.totalMs / (1000 * 60 * 60);
const remaining = Math.max(0, state.goalHours - totalHours);
if (remaining <= 0) return 0;
const days = getDaysRemaining();
if (days <= 0) return 0;
return remaining / days;
}
function isGoalReached() {
return state.hasGoal && (state.totalMs / (1000 * 60 * 60)) >= state.goalHours;
}
function isDeadlineReached() {
return state.hasGoal && getTodayStr() >= state.goalDeadline;
}
function checkGoalStatus() {
if (!state.hasGoal || goalHitOverlay.classList.contains('open')) return;
if (isGoalReached() && !state.goalHitAcked) {
goalHitTitle.textContent = 'Goal Reached! \uD83C\uDF89';
goalHitMessage.textContent = 'You hit ' + state.goalHours + ' hours. Keep the same target, or set a new one.';
openGoalHitModal();
} else if (isDeadlineReached() && !state.deadlineHitAcked) {
goalHitTitle.textContent = 'Deadline Reached';
goalHitMessage.textContent = "Your deadline has passed. Today's goal is 0h until you set a new date.";
openGoalHitModal();
}
}
function openGoalHitModal() {
goalHitNewHours.value = state.goalHours;
goalHitNewDeadline.value = state.goalDeadline;
goalHitOverlay.classList.add('open');
}
goalHitSaveBtn.addEventListener('click', () => {
state.goalHours = Math.max(1, parseInt(goalHitNewHours.value) || state.goalHours);
state.goalDeadline = goalHitNewDeadline.value || state.goalDeadline;
state.goalHitAcked = false;
state.deadlineHitAcked = false;
syncGoalSettingsUI();
goalHitOverlay.classList.remove('open');
saveState();
updateDisplay();
});
goalHitContinueBtn.addEventListener('click', () => {
if (isGoalReached()) state.goalHitAcked = true;
if (isDeadlineReached()) state.deadlineHitAcked = true;
goalHitOverlay.classList.remove('open');
saveState();
});
// Once today's goal is exceeded, the original target stays visible (struck through) and this
// live-projected number takes over, showing what tomorrow-onward's daily requirement would be
// if you stopped right now. Refreshed periodically rather than every frame to keep it steady.
let projectedDailyGoalHours = null;
let lastProjectionRefresh = 0;
const PROJECTION_REFRESH_MS = 20000;
function computeProjectedDailyGoalHours() {
const now = Date.now();
const currentSessionMs = state.sessionRunning && !state.paused
? state.sessionElapsed + (now - state.sessionStartTime)
: state.sessionElapsed;
const projectedTotalHours = (state.totalMs + currentSessionMs) / (1000 * 60 * 60);
const remaining = Math.max(0, state.goalHours - projectedTotalHours);
const days = getDaysRemaining();
if (days <= 0) return 0;
return remaining / days;
}
function getTodayTotalMs() {
const now = Date.now();
const currentSession = state.sessionRunning && !state.paused ? state.sessionElapsed + (now - state.sessionStartTime) : state.sessionElapsed;
return state.todayMs + currentSession;
}
function formatTime(ms) {
const totalSeconds = Math.floor(ms / 1000);
const hours = Math.floor(totalSeconds / 3600);
const minutes = Math.floor((totalSeconds % 3600) / 60);
const seconds = totalSeconds % 60;
const tenths = Math.floor((ms % 1000) / 100);
const pad = n => String(n).padStart(2, '0');
return `${pad(hours)}:${pad(minutes)}:${pad(seconds)}.${tenths}`;
}
function formatCompact(ms) {
const totalSeconds = Math.floor(ms / 1000);
const hours = Math.floor(totalSeconds / 3600);
const minutes = Math.floor((totalSeconds % 3600) / 60);
const seconds = totalSeconds % 60;
return `${hours}h ${minutes}m ${seconds}s`;
}
function rotateQuote() {
const q = quotes[Math.floor(Math.random() * quotes.length)];
quoteText.style.opacity = 0;
quoteAuthor.style.opacity = 0;
setTimeout(() => {
quoteText.textContent = '"' + q.text + '"';
quoteAuthor.textContent = '\u2014 ' + q.author;
quoteText.style.opacity = 1;
quoteAuthor.style.opacity = 1;
}, 300);
}
function updateDailyWidget() {
const todayMs = getTodayTotalMs();
const todayHours = todayMs / (1000 * 60 * 60);
if (state.hasGoal) {
dailyGoalTitle.textContent = "Today's Goal";
dailyGoalTrack.classList.remove('hidden');
const goalHours = getDailyGoalHours();
const pct = goalHours > 0 ? (todayHours / goalHours) * 100 : 100;
const redWidth = Math.min(100, pct);
const greenWidth = Math.min(100, Math.max(0, pct - 100));
dailyGoalRed.style.width = redWidth + '%';
dailyGoalRed.classList.toggle('full', redWidth >= 100);
dailyGoalGreen.style.width = greenWidth + '%';
if (pct >= 100) {
const nowTs = Date.now();
if (projectedDailyGoalHours === null || nowTs - lastProjectionRefresh >= PROJECTION_REFRESH_MS) {
projectedDailyGoalHours = computeProjectedDailyGoalHours();
lastProjectionRefresh = nowTs;
}
dailyGoalValue.innerHTML = '<span class="daily-goal-value-original">' + goalHours.toFixed(1) + 'h</span>'
+ '<span class="daily-goal-value-arrow">\u2192</span>'
+ '<span class="daily-goal-value-updated">' + projectedDailyGoalHours.toFixed(1) + 'h</span>';
const over = todayHours - goalHours;
dailyGoalSub.innerHTML = todayHours.toFixed(1) + ' hrs <span class="over">(+' + over.toFixed(1) + ' over)</span>';
} else {
projectedDailyGoalHours = null;
dailyGoalValue.textContent = goalHours.toFixed(1) + 'h';
dailyGoalSub.textContent = todayHours.toFixed(1) + ' / ' + goalHours.toFixed(1) + ' hrs';
}
} else {
dailyGoalTitle.textContent = "Today's Study";
dailyGoalTrack.classList.add('hidden');
dailyGoalValue.textContent = todayHours.toFixed(1) + 'h';
dailyGoalSub.textContent = 'Keep stacking hours';