@jjlmoya/utils-creative 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jjlmoya/utils-creative",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  import { Icon } from 'astro-icon/components';
3
- import './style.css';
4
3
  import type { ExcuseGeneratorUI } from './index';
5
4
 
6
5
  interface Props {
@@ -138,3 +137,322 @@ const { ui } = Astro.props;
138
137
 
139
138
  els.genBtn?.addEventListener('click', generateExcuse);
140
139
  </script>
140
+
141
+ <style>
142
+ .excuse-generator {
143
+ --excuse-generator-bg: #fff;
144
+ --excuse-generator-bg-transparent: rgba(255, 255, 255, 0.8);
145
+ --excuse-generator-bg-muted: #f1f5f9;
146
+ --excuse-generator-text: #0f172a;
147
+ --excuse-generator-text-muted: #475569;
148
+ --excuse-generator-text-dim: #64748b;
149
+ --excuse-generator-border: #e2e8f0;
150
+ --excuse-generator-shadow: rgba(0, 0, 0, 0.05);
151
+ --excuse-generator-primary: #ec4899;
152
+ --excuse-generator-primary-on: #fff;
153
+ --excuse-generator-accent: #f43f5e;
154
+ --excuse-generator-success: #10b981;
155
+ --excuse-generator-warning: #f59e0b;
156
+ --excuse-generator-error: #f43f5e;
157
+ --excuse-generator-ring: rgba(236, 72, 153, 0.2);
158
+ }
159
+
160
+ :global(.theme-dark) .excuse-generator {
161
+ --excuse-generator-bg: #0f172a;
162
+ --excuse-generator-bg-transparent: rgba(15, 23, 42, 0.8);
163
+ --excuse-generator-bg-muted: #1e293b;
164
+ --excuse-generator-text: #f8fafc;
165
+ --excuse-generator-text-muted: #94a3b8;
166
+ --excuse-generator-text-dim: #64748b;
167
+ --excuse-generator-border: #334155;
168
+ --excuse-generator-shadow: rgba(0, 0, 0, 0.3);
169
+ --excuse-generator-primary: #f472b6;
170
+ --excuse-generator-primary-on: #fff;
171
+ --excuse-generator-accent: #fb7185;
172
+ --excuse-generator-success: #34d399;
173
+ --excuse-generator-warning: #fbbf24;
174
+ --excuse-generator-error: #fb7185;
175
+ --excuse-generator-ring: rgba(244, 114, 182, 0.2);
176
+ }
177
+
178
+ .excuse-generator-root {
179
+ max-width: 64rem;
180
+ margin-left: auto;
181
+ margin-right: auto;
182
+ padding: 1rem;
183
+ }
184
+
185
+ @media (min-width: 768px) {
186
+ .excuse-generator-root {
187
+ padding: 2rem;
188
+ }
189
+ }
190
+
191
+ .excuse-generator-card {
192
+ position: relative;
193
+ background-color: var(--excuse-generator-bg-transparent);
194
+ backdrop-filter: blur(24px);
195
+ border-radius: 2rem;
196
+ padding: 2rem;
197
+ box-shadow: 0 25px 50px -12px var(--excuse-generator-shadow);
198
+ border: 1px solid var(--excuse-generator-border);
199
+ min-height: 500px;
200
+ display: flex;
201
+ flex-direction: column;
202
+ align-items: center;
203
+ justify-content: center;
204
+ text-align: center;
205
+ overflow: hidden;
206
+ }
207
+
208
+ @media (min-width: 768px) {
209
+ .excuse-generator-card {
210
+ padding: 3rem;
211
+ }
212
+ }
213
+
214
+ .excuse-generator-blob {
215
+ position: absolute;
216
+ width: 24rem;
217
+ height: 24rem;
218
+ border-radius: 9999px;
219
+ filter: blur(64px);
220
+ pointer-events: none;
221
+ }
222
+
223
+ .excuse-generator-blob-1 {
224
+ top: 0;
225
+ right: 0;
226
+ transform: translate(50%, -50%);
227
+ background-color: rgba(244, 114, 182, 0.2);
228
+ }
229
+
230
+ .excuse-generator-blob-2 {
231
+ bottom: 0;
232
+ left: 0;
233
+ transform: translate(-50%, 50%);
234
+ background-color: rgba(251, 113, 133, 0.2);
235
+ }
236
+
237
+ .excuse-generator-slots {
238
+ position: relative;
239
+ z-index: 10;
240
+ width: 100%;
241
+ max-width: 80rem;
242
+ min-height: 200px;
243
+ display: flex;
244
+ flex-direction: column;
245
+ gap: 1rem;
246
+ margin-bottom: 3rem;
247
+ }
248
+
249
+ @media (min-width: 1024px) {
250
+ .excuse-generator-slots {
251
+ flex-direction: row;
252
+ align-items: center;
253
+ }
254
+ }
255
+
256
+ .excuse-generator-slot {
257
+ position: relative;
258
+ flex: 1;
259
+ min-width: 200px;
260
+ background-color: rgba(255, 255, 255, 0.6);
261
+ backdrop-filter: blur(4px);
262
+ border-radius: 1rem;
263
+ padding: 1.5rem;
264
+ border: 2px solid var(--excuse-generator-border);
265
+ box-shadow: 0 10px 15px -3px var(--excuse-generator-shadow);
266
+ display: flex;
267
+ align-items: center;
268
+ justify-content: center;
269
+ text-align: center;
270
+ transition-property: all;
271
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
272
+ transition-duration: 300ms;
273
+ }
274
+
275
+ :global(.theme-dark) .excuse-generator-slot {
276
+ background-color: rgba(15, 23, 42, 0.6);
277
+ }
278
+
279
+ .excuse-generator-slot:hover {
280
+ transform: scale(1.05);
281
+ background-color: var(--excuse-generator-bg);
282
+ border-color: var(--excuse-generator-primary);
283
+ }
284
+
285
+ .excuse-generator-slot-label {
286
+ position: absolute;
287
+ top: 0.5rem;
288
+ left: 50%;
289
+ transform: translateX(-50%);
290
+ color: var(--excuse-generator-text-dim);
291
+ font-size: 0.75rem;
292
+ line-height: 1rem;
293
+ text-transform: uppercase;
294
+ letter-spacing: 0.1em;
295
+ opacity: 0.5;
296
+ }
297
+
298
+ .excuse-generator-slot-text {
299
+ font-size: 1.5rem;
300
+ font-weight: 900;
301
+ color: var(--excuse-generator-primary);
302
+ line-height: 1.25;
303
+ overflow-wrap: break-word;
304
+ width: 100%;
305
+ transition-property: all;
306
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
307
+ transition-duration: 100ms;
308
+ }
309
+
310
+ @media (min-width: 768px) {
311
+ .excuse-generator-slot-text {
312
+ font-size: 1.875rem;
313
+ line-height: 2.25rem;
314
+ }
315
+ }
316
+
317
+ .excuse-generator-slot-text.blur {
318
+ filter: blur(3px);
319
+ opacity: 0.7;
320
+ transform: scale(0.95);
321
+ }
322
+
323
+ .excuse-generator-separator {
324
+ display: none;
325
+ font-size: 2rem;
326
+ color: var(--excuse-generator-border);
327
+ }
328
+
329
+ @media (min-width: 1024px) {
330
+ .excuse-generator-separator {
331
+ display: block;
332
+ }
333
+ }
334
+
335
+ .excuse-generator-separator-mobile {
336
+ display: flex;
337
+ justify-content: center;
338
+ color: var(--excuse-generator-border);
339
+ }
340
+
341
+ @media (min-width: 1024px) {
342
+ .excuse-generator-separator-mobile {
343
+ display: none;
344
+ }
345
+ }
346
+
347
+ .excuse-generator-actions {
348
+ position: relative;
349
+ z-index: 10;
350
+ display: flex;
351
+ flex-direction: column;
352
+ gap: 1.5rem;
353
+ align-items: center;
354
+ }
355
+
356
+ .excuse-generator-btn {
357
+ position: relative;
358
+ padding-left: 2.5rem;
359
+ padding-right: 2.5rem;
360
+ padding-top: 1.25rem;
361
+ padding-bottom: 1.25rem;
362
+ background-color: #0f172a;
363
+ border-radius: 1rem;
364
+ color: #fff;
365
+ font-weight: 900;
366
+ font-size: 1.25rem;
367
+ line-height: 1.75rem;
368
+ box-shadow: 0 25px 50px -12px rgba(236, 72, 153, 0.2);
369
+ border: none;
370
+ cursor: pointer;
371
+ overflow: hidden;
372
+ transition-property: all;
373
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
374
+ transition-duration: 300ms;
375
+ }
376
+
377
+ :global(.theme-dark) .excuse-generator-btn {
378
+ background-color: #f8fafc;
379
+ color: #0f172a;
380
+ }
381
+
382
+ .excuse-generator-btn:hover {
383
+ transform: translateY(-0.25rem);
384
+ box-shadow: 0 25px 50px -12px rgba(236, 72, 153, 0.4);
385
+ }
386
+
387
+ .excuse-generator-btn:active {
388
+ transform: translateY(0);
389
+ }
390
+
391
+ .excuse-generator-btn:disabled {
392
+ opacity: 0.7;
393
+ cursor: not-allowed;
394
+ }
395
+
396
+ .excuse-generator-btn-content {
397
+ position: relative;
398
+ z-index: 10;
399
+ display: flex;
400
+ align-items: center;
401
+ gap: 0.75rem;
402
+ }
403
+
404
+ .excuse-generator-btn-gradient {
405
+ position: absolute;
406
+ inset: 0;
407
+ background-image: linear-gradient(to right, var(--excuse-generator-primary), var(--excuse-generator-accent), var(--excuse-generator-primary));
408
+ opacity: 0;
409
+ transition-property: opacity;
410
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
411
+ transition-duration: 300ms;
412
+ }
413
+
414
+ .excuse-generator-btn:hover .excuse-generator-btn-gradient {
415
+ opacity: 1;
416
+ }
417
+
418
+ .excuse-generator-btn:hover .excuse-generator-btn-content {
419
+ color: var(--excuse-generator-primary-on);
420
+ }
421
+
422
+ .excuse-generator-copy {
423
+ background: none;
424
+ border: none;
425
+ cursor: pointer;
426
+ color: var(--excuse-generator-text-dim);
427
+ font-size: 0.875rem;
428
+ line-height: 1.25rem;
429
+ font-weight: 700;
430
+ display: flex;
431
+ align-items: center;
432
+ gap: 0.5rem;
433
+ transition-property: all;
434
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
435
+ transition-duration: 200ms;
436
+ opacity: 0;
437
+ pointer-events: none;
438
+ transform: translateY(0.5rem);
439
+ }
440
+
441
+ .excuse-generator-copy.visible {
442
+ opacity: 1;
443
+ pointer-events: auto;
444
+ transform: translateY(0);
445
+ }
446
+
447
+ .excuse-generator-copy:hover {
448
+ color: var(--excuse-generator-primary);
449
+ }
450
+
451
+ .excuse-generator-copy-success {
452
+ color: var(--excuse-generator-success);
453
+ font-weight: 700;
454
+ display: flex;
455
+ align-items: center;
456
+ gap: 0.5rem;
457
+ }
458
+ </style>
@@ -1,6 +1,5 @@
1
1
  ---
2
2
  import { Icon } from 'astro-icon/components';
3
- import './style.css';
4
3
  import type { FortuneCookieUI } from './index';
5
4
 
6
5
  interface Props {
@@ -297,3 +296,338 @@ const ASSETS = {
297
296
 
298
297
  new FortuneCookie();
299
298
  </script>
299
+
300
+ <style>
301
+ .fortune-cookie {
302
+ --fortune-cookie-bg: #fff;
303
+ --fortune-cookie-bg-muted: #fffbeb;
304
+ --fortune-cookie-text: #0f172a;
305
+ --fortune-cookie-text-muted: #475569;
306
+ --fortune-cookie-text-dim: #64748b;
307
+ --fortune-cookie-border: #fef3c7;
308
+ --fortune-cookie-shadow: rgba(0, 0, 0, 0.05);
309
+ --fortune-cookie-primary: #f59e0b;
310
+ --fortune-cookie-primary-on: #fff;
311
+ --fortune-cookie-accent: #fcd34d;
312
+ --fortune-cookie-success: #10b981;
313
+ --fortune-cookie-warning: #f59e0b;
314
+ --fortune-cookie-error: #f43f5e;
315
+ }
316
+
317
+ :global(.theme-dark) .fortune-cookie {
318
+ --fortune-cookie-bg: #0f172a;
319
+ --fortune-cookie-bg-muted: #1e293b;
320
+ --fortune-cookie-text: #f8fafc;
321
+ --fortune-cookie-text-muted: #94a3b8;
322
+ --fortune-cookie-text-dim: #64748b;
323
+ --fortune-cookie-border: #334155;
324
+ --fortune-cookie-shadow: rgba(0, 0, 0, 0.3);
325
+ --fortune-cookie-primary: #fbbf24;
326
+ --fortune-cookie-primary-on: #fff;
327
+ --fortune-cookie-accent: #fcd34d;
328
+ --fortune-cookie-success: #34d399;
329
+ --fortune-cookie-warning: #fbbf24;
330
+ --fortune-cookie-error: #fb7185;
331
+ }
332
+
333
+ .fortune-cookie-root {
334
+ width: 100%;
335
+ max-width: 64rem;
336
+ margin-left: auto;
337
+ margin-right: auto;
338
+ }
339
+
340
+ .fortune-cookie-card {
341
+ position: relative;
342
+ background-color: var(--fortune-cookie-bg);
343
+ border-radius: 1.5rem;
344
+ box-shadow: 0 25px 50px -12px var(--fortune-cookie-shadow);
345
+ overflow: hidden;
346
+ border: 1px solid var(--fortune-cookie-border);
347
+ min-height: 600px;
348
+ display: flex;
349
+ flex-direction: column;
350
+ align-items: center;
351
+ justify-content: center;
352
+ padding: 2rem;
353
+ }
354
+
355
+ .fortune-cookie-glow {
356
+ position: absolute;
357
+ inset: 0;
358
+ opacity: 0.1;
359
+ pointer-events: none;
360
+ background-image: radial-gradient(circle at center, var(--fortune-cookie-primary), transparent, transparent);
361
+ }
362
+
363
+ .fortune-cookie-content {
364
+ position: relative;
365
+ z-index: 10;
366
+ width: 100%;
367
+ display: flex;
368
+ flex-direction: column;
369
+ align-items: center;
370
+ }
371
+
372
+ .fortune-cookie-instruction {
373
+ font-size: 1.25rem;
374
+ line-height: 1.75rem;
375
+ font-weight: 700;
376
+ color: #92400e;
377
+ margin-bottom: 2rem;
378
+ text-transform: uppercase;
379
+ letter-spacing: 0.1em;
380
+ animation: fortune-cookie-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
381
+ }
382
+
383
+ :global(.theme-dark) .fortune-cookie-instruction {
384
+ color: #fbbf24;
385
+ }
386
+
387
+ @keyframes fortune-cookie-pulse {
388
+ 0%, 100% { opacity: 1; }
389
+ 50% { opacity: .5; }
390
+ }
391
+
392
+ .fortune-cookie-stage {
393
+ position: relative;
394
+ width: 20rem;
395
+ height: 20rem;
396
+ cursor: pointer;
397
+ }
398
+
399
+ @media (min-width: 768px) {
400
+ .fortune-cookie-stage {
401
+ width: 24rem;
402
+ height: 24rem;
403
+ }
404
+ }
405
+
406
+ .fortune-cookie-body {
407
+ position: absolute;
408
+ inset: 2rem;
409
+ transition-property: transform;
410
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
411
+ transition-duration: 100ms;
412
+ }
413
+
414
+ @media (min-width: 768px) {
415
+ .fortune-cookie-body {
416
+ inset: 3rem;
417
+ }
418
+ }
419
+
420
+ .fortune-cookie-body:active {
421
+ transform: scale(0.95);
422
+ }
423
+
424
+ .fortune-cookie-img {
425
+ width: 100%;
426
+ height: 100%;
427
+ object-fit: contain;
428
+ z-index: 10;
429
+ position: relative;
430
+ }
431
+
432
+ .fortune-cookie-broken {
433
+ position: absolute;
434
+ inset: 2rem;
435
+ pointer-events: none;
436
+ }
437
+
438
+ .fortune-cookie-broken.hidden {
439
+ display: none;
440
+ }
441
+
442
+ @media (min-width: 768px) {
443
+ .fortune-cookie-broken {
444
+ inset: 3rem;
445
+ }
446
+ }
447
+
448
+ .fortune-cookie-half {
449
+ position: absolute;
450
+ width: 50%;
451
+ height: 100%;
452
+ object-fit: contain;
453
+ transition-property: all;
454
+ transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
455
+ transition-duration: 1000ms;
456
+ }
457
+
458
+ .fortune-cookie-half-left {
459
+ left: 0;
460
+ transform-origin: bottom left;
461
+ }
462
+
463
+ .fortune-cookie-half-right {
464
+ right: 0;
465
+ transform-origin: bottom right;
466
+ }
467
+
468
+ .fortune-cookie-paper {
469
+ position: absolute;
470
+ top: 50%;
471
+ left: 50%;
472
+ transform: translate(-50%, -50%) scale(0.5);
473
+ width: 75%;
474
+ max-width: 280px;
475
+ opacity: 0;
476
+ transition-property: all;
477
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
478
+ transition-duration: 1000ms;
479
+ z-index: 0;
480
+ }
481
+
482
+ .fortune-cookie-paper.visible {
483
+ opacity: 1;
484
+ transform: translate(-50%, -50%) scale(1);
485
+ z-index: 20;
486
+ }
487
+
488
+ .fortune-cookie-paper-img {
489
+ width: 100%;
490
+ filter: drop-shadow(0 20px 13px rgba(0, 0, 0, 0.03)) drop-shadow(0 8px 5px rgba(0, 0, 0, 0.08));
491
+ transform: rotate(1deg);
492
+ }
493
+
494
+ .fortune-cookie-paper-content {
495
+ position: absolute;
496
+ inset: 0;
497
+ display: flex;
498
+ flex-direction: column;
499
+ align-items: center;
500
+ justify-content: center;
501
+ padding: 2rem;
502
+ text-align: center;
503
+ }
504
+
505
+ .fortune-cookie-text {
506
+ color: #0f172a;
507
+ font-weight: 900;
508
+ font-size: 1.125rem;
509
+ line-height: 1.25;
510
+ transform: rotate(-1deg);
511
+ user-select: text;
512
+ }
513
+
514
+ @media (min-width: 768px) {
515
+ .fortune-cookie-text {
516
+ font-size: 1.25rem;
517
+ line-height: 1.75rem;
518
+ }
519
+ }
520
+
521
+ .fortune-cookie-lucky-numbers {
522
+ margin-top: 1rem;
523
+ display: flex;
524
+ flex-wrap: wrap;
525
+ gap: 0.5rem;
526
+ justify-content: center;
527
+ transform: rotate(-1deg);
528
+ }
529
+
530
+ .fortune-cookie-number {
531
+ font-size: 0.75rem;
532
+ line-height: 1rem;
533
+ font-weight: 700;
534
+ background-color: rgba(255, 255, 255, 0.9);
535
+ color: #450a0a;
536
+ padding-left: 0.5rem;
537
+ padding-right: 0.5rem;
538
+ padding-top: 0.125rem;
539
+ padding-bottom: 0.125rem;
540
+ border-radius: 0.25rem;
541
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
542
+ border: 1px solid #fee2e2;
543
+ }
544
+
545
+ .fortune-cookie-particles {
546
+ position: absolute;
547
+ inset: 0;
548
+ pointer-events: none;
549
+ overflow: visible;
550
+ z-index: 20;
551
+ }
552
+
553
+ .fortune-cookie-reset {
554
+ display: none;
555
+ margin-top: 3rem;
556
+ flex-direction: column;
557
+ align-items: center;
558
+ gap: 1rem;
559
+ }
560
+
561
+ .fortune-cookie-reset.visible {
562
+ display: flex;
563
+ }
564
+
565
+ .fortune-cookie-status {
566
+ font-size: 0.875rem;
567
+ line-height: 1.25rem;
568
+ color: var(--fortune-cookie-text-dim);
569
+ }
570
+
571
+ .fortune-cookie-share-btn {
572
+ padding-left: 1.5rem;
573
+ padding-right: 1.5rem;
574
+ padding-top: 0.5rem;
575
+ padding-bottom: 0.5rem;
576
+ background-color: #f1f5f9;
577
+ color: #334155;
578
+ border-radius: 9999px;
579
+ font-size: 0.875rem;
580
+ line-height: 1.25rem;
581
+ font-weight: 700;
582
+ border: none;
583
+ cursor: pointer;
584
+ display: flex;
585
+ align-items: center;
586
+ gap: 0.5rem;
587
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
588
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
589
+ transition-duration: 150ms;
590
+ }
591
+
592
+ :global(.theme-dark) .fortune-cookie-share-btn {
593
+ background-color: #1e293b;
594
+ color: #cbd5e1;
595
+ }
596
+
597
+ .fortune-cookie-share-btn:hover {
598
+ background-color: #e2e8f0;
599
+ }
600
+
601
+ :global(.theme-dark) .fortune-cookie-share-btn:hover {
602
+ background-color: #334155;
603
+ }
604
+
605
+ .fortune-cookie-shake-1 {
606
+ animation: fortune-cookie-shake 0.3s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
607
+ }
608
+
609
+ .fortune-cookie-shake-2 {
610
+ animation: fortune-cookie-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
611
+ }
612
+
613
+ .fortune-cookie-shake-3 {
614
+ animation: fortune-cookie-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
615
+ }
616
+
617
+ @keyframes fortune-cookie-shake {
618
+ 10%, 90% { transform: translate3d(-1px, 0, 0) rotate(-1deg); }
619
+ 20%, 80% { transform: translate3d(2px, 0, 0) rotate(2deg); }
620
+ 30%, 50%, 70% { transform: translate3d(-4px, 0, 0) rotate(-4deg); }
621
+ 40%, 60% { transform: translate3d(4px, 0, 0) rotate(4deg); }
622
+ }
623
+
624
+ .fortune-cookie-crumb {
625
+ position: absolute;
626
+ width: 20px;
627
+ height: 20px;
628
+ background-image: url("/images/utilities/fortune/fc-crumbs.webp");
629
+ background-size: contain;
630
+ background-repeat: no-repeat;
631
+ pointer-events: none;
632
+ }
633
+ </style>
@@ -1,316 +0,0 @@
1
- .excuse-generator {
2
- --excuse-generator-bg: #fff;
3
- --excuse-generator-bg-transparent: rgba(255, 255, 255, 0.8);
4
- --excuse-generator-bg-muted: #f1f5f9;
5
- --excuse-generator-text: #0f172a;
6
- --excuse-generator-text-muted: #475569;
7
- --excuse-generator-text-dim: #64748b;
8
- --excuse-generator-border: #e2e8f0;
9
- --excuse-generator-shadow: rgba(0, 0, 0, 0.05);
10
- --excuse-generator-primary: #ec4899;
11
- --excuse-generator-primary-on: #fff;
12
- --excuse-generator-accent: #f43f5e;
13
- --excuse-generator-success: #10b981;
14
- --excuse-generator-warning: #f59e0b;
15
- --excuse-generator-error: #f43f5e;
16
- --excuse-generator-ring: rgba(236, 72, 153, 0.2);
17
- }
18
-
19
- .theme-dark .excuse-generator {
20
- --excuse-generator-bg: #0f172a;
21
- --excuse-generator-bg-transparent: rgba(15, 23, 42, 0.8);
22
- --excuse-generator-bg-muted: #1e293b;
23
- --excuse-generator-text: #f8fafc;
24
- --excuse-generator-text-muted: #94a3b8;
25
- --excuse-generator-text-dim: #64748b;
26
- --excuse-generator-border: #334155;
27
- --excuse-generator-shadow: rgba(0, 0, 0, 0.3);
28
- --excuse-generator-primary: #f472b6;
29
- --excuse-generator-primary-on: #fff;
30
- --excuse-generator-accent: #fb7185;
31
- --excuse-generator-success: #34d399;
32
- --excuse-generator-warning: #fbbf24;
33
- --excuse-generator-error: #fb7185;
34
- --excuse-generator-ring: rgba(244, 114, 182, 0.2);
35
- }
36
-
37
- .excuse-generator-root {
38
- max-width: 64rem;
39
- margin-left: auto;
40
- margin-right: auto;
41
- padding: 1rem;
42
- }
43
-
44
- @media (min-width: 768px) {
45
- .excuse-generator-root {
46
- padding: 2rem;
47
- }
48
- }
49
-
50
- .excuse-generator-card {
51
- position: relative;
52
- background-color: var(--excuse-generator-bg-transparent);
53
- backdrop-filter: blur(24px);
54
- border-radius: 2rem;
55
- padding: 2rem;
56
- box-shadow: 0 25px 50px -12px var(--excuse-generator-shadow);
57
- border: 1px solid var(--excuse-generator-border);
58
- min-height: 500px;
59
- display: flex;
60
- flex-direction: column;
61
- align-items: center;
62
- justify-content: center;
63
- text-align: center;
64
- overflow: hidden;
65
- }
66
-
67
- @media (min-width: 768px) {
68
- .excuse-generator-card {
69
- padding: 3rem;
70
- }
71
- }
72
-
73
- .excuse-generator-blob {
74
- position: absolute;
75
- width: 24rem;
76
- height: 24rem;
77
- border-radius: 9999px;
78
- filter: blur(64px);
79
- pointer-events: none;
80
- }
81
-
82
- .excuse-generator-blob-1 {
83
- top: 0;
84
- right: 0;
85
- transform: translate(50%, -50%);
86
- background-color: rgba(244, 114, 182, 0.2);
87
- }
88
-
89
- .excuse-generator-blob-2 {
90
- bottom: 0;
91
- left: 0;
92
- transform: translate(-50%, 50%);
93
- background-color: rgba(251, 113, 133, 0.2);
94
- }
95
-
96
- .excuse-generator-slots {
97
- position: relative;
98
- z-index: 10;
99
- width: 100%;
100
- max-width: 80rem;
101
- min-height: 200px;
102
- display: flex;
103
- flex-direction: column;
104
- gap: 1rem;
105
- margin-bottom: 3rem;
106
- }
107
-
108
- @media (min-width: 1024px) {
109
- .excuse-generator-slots {
110
- flex-direction: row;
111
- align-items: center;
112
- }
113
- }
114
-
115
- .excuse-generator-slot {
116
- position: relative;
117
- flex: 1;
118
- min-width: 200px;
119
- background-color: rgba(255, 255, 255, 0.6);
120
- backdrop-filter: blur(4px);
121
- border-radius: 1rem;
122
- padding: 1.5rem;
123
- border: 2px solid var(--excuse-generator-border);
124
- box-shadow: 0 10px 15px -3px var(--excuse-generator-shadow);
125
- display: flex;
126
- align-items: center;
127
- justify-content: center;
128
- text-align: center;
129
- transition-property: all;
130
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
131
- transition-duration: 300ms;
132
- }
133
-
134
- .theme-dark .excuse-generator-slot {
135
- background-color: rgba(15, 23, 42, 0.6);
136
- }
137
-
138
- .excuse-generator-slot:hover {
139
- transform: scale(1.05);
140
- background-color: var(--excuse-generator-bg);
141
- border-color: var(--excuse-generator-primary);
142
- }
143
-
144
- .excuse-generator-slot-label {
145
- position: absolute;
146
- top: 0.5rem;
147
- left: 50%;
148
- transform: translateX(-50%);
149
- color: var(--excuse-generator-text-dim);
150
- font-size: 0.75rem;
151
- line-height: 1rem;
152
- text-transform: uppercase;
153
- letter-spacing: 0.1em;
154
- opacity: 0.5;
155
- }
156
-
157
- .excuse-generator-slot-text {
158
- font-size: 1.5rem;
159
- font-weight: 900;
160
- color: var(--excuse-generator-primary);
161
- line-height: 1.25;
162
- overflow-wrap: break-word;
163
- width: 100%;
164
- transition-property: all;
165
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
166
- transition-duration: 100ms;
167
- }
168
-
169
- @media (min-width: 768px) {
170
- .excuse-generator-slot-text {
171
- font-size: 1.875rem;
172
- line-height: 2.25rem;
173
- }
174
- }
175
-
176
- .excuse-generator-slot-text.blur {
177
- filter: blur(3px);
178
- opacity: 0.7;
179
- transform: scale(0.95);
180
- }
181
-
182
- .excuse-generator-separator {
183
- display: none;
184
- font-size: 2rem;
185
- color: var(--excuse-generator-border);
186
- }
187
-
188
- @media (min-width: 1024px) {
189
- .excuse-generator-separator {
190
- display: block;
191
- }
192
- }
193
-
194
- .excuse-generator-separator-mobile {
195
- display: flex;
196
- justify-content: center;
197
- color: var(--excuse-generator-border);
198
- }
199
-
200
- @media (min-width: 1024px) {
201
- .excuse-generator-separator-mobile {
202
- display: none;
203
- }
204
- }
205
-
206
- .excuse-generator-actions {
207
- position: relative;
208
- z-index: 10;
209
- display: flex;
210
- flex-direction: column;
211
- gap: 1.5rem;
212
- align-items: center;
213
- }
214
-
215
- .excuse-generator-btn {
216
- position: relative;
217
- padding-left: 2.5rem;
218
- padding-right: 2.5rem;
219
- padding-top: 1.25rem;
220
- padding-bottom: 1.25rem;
221
- background-color: #0f172a;
222
- border-radius: 1rem;
223
- color: #fff;
224
- font-weight: 900;
225
- font-size: 1.25rem;
226
- line-height: 1.75rem;
227
- box-shadow: 0 25px 50px -12px rgba(236, 72, 153, 0.2);
228
- border: none;
229
- cursor: pointer;
230
- overflow: hidden;
231
- transition-property: all;
232
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
233
- transition-duration: 300ms;
234
- }
235
-
236
- .theme-dark .excuse-generator-btn {
237
- background-color: #f8fafc;
238
- color: #0f172a;
239
- }
240
-
241
- .excuse-generator-btn:hover {
242
- transform: translateY(-0.25rem);
243
- box-shadow: 0 25px 50px -12px rgba(236, 72, 153, 0.4);
244
- }
245
-
246
- .excuse-generator-btn:active {
247
- transform: translateY(0);
248
- }
249
-
250
- .excuse-generator-btn:disabled {
251
- opacity: 0.7;
252
- cursor: not-allowed;
253
- }
254
-
255
- .excuse-generator-btn-content {
256
- position: relative;
257
- z-index: 10;
258
- display: flex;
259
- align-items: center;
260
- gap: 0.75rem;
261
- }
262
-
263
- .excuse-generator-btn-gradient {
264
- position: absolute;
265
- inset: 0;
266
- background-image: linear-gradient(to right, var(--excuse-generator-primary), var(--excuse-generator-accent), var(--excuse-generator-primary));
267
- opacity: 0;
268
- transition-property: opacity;
269
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
270
- transition-duration: 300ms;
271
- }
272
-
273
- .excuse-generator-btn:hover .excuse-generator-btn-gradient {
274
- opacity: 1;
275
- }
276
-
277
- .excuse-generator-btn:hover .excuse-generator-btn-content {
278
- color: var(--excuse-generator-primary-on);
279
- }
280
-
281
- .excuse-generator-copy {
282
- background: none;
283
- border: none;
284
- cursor: pointer;
285
- color: var(--excuse-generator-text-dim);
286
- font-size: 0.875rem;
287
- line-height: 1.25rem;
288
- font-weight: 700;
289
- display: flex;
290
- align-items: center;
291
- gap: 0.5rem;
292
- transition-property: all;
293
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
294
- transition-duration: 200ms;
295
- opacity: 0;
296
- pointer-events: none;
297
- transform: translateY(0.5rem);
298
- }
299
-
300
- .excuse-generator-copy.visible {
301
- opacity: 1;
302
- pointer-events: auto;
303
- transform: translateY(0);
304
- }
305
-
306
- .excuse-generator-copy:hover {
307
- color: var(--excuse-generator-primary);
308
- }
309
-
310
- .excuse-generator-copy-success {
311
- color: var(--excuse-generator-success);
312
- font-weight: 700;
313
- display: flex;
314
- align-items: center;
315
- gap: 0.5rem;
316
- }
@@ -1,332 +0,0 @@
1
- .fortune-cookie {
2
- --fortune-cookie-bg: #fff;
3
- --fortune-cookie-bg-muted: #fffbeb;
4
- --fortune-cookie-text: #0f172a;
5
- --fortune-cookie-text-muted: #475569;
6
- --fortune-cookie-text-dim: #64748b;
7
- --fortune-cookie-border: #fef3c7;
8
- --fortune-cookie-shadow: rgba(0, 0, 0, 0.05);
9
- --fortune-cookie-primary: #f59e0b;
10
- --fortune-cookie-primary-on: #fff;
11
- --fortune-cookie-accent: #fcd34d;
12
- --fortune-cookie-success: #10b981;
13
- --fortune-cookie-warning: #f59e0b;
14
- --fortune-cookie-error: #f43f5e;
15
- }
16
-
17
- .theme-dark .fortune-cookie {
18
- --fortune-cookie-bg: #0f172a;
19
- --fortune-cookie-bg-muted: #1e293b;
20
- --fortune-cookie-text: #f8fafc;
21
- --fortune-cookie-text-muted: #94a3b8;
22
- --fortune-cookie-text-dim: #64748b;
23
- --fortune-cookie-border: #334155;
24
- --fortune-cookie-shadow: rgba(0, 0, 0, 0.3);
25
- --fortune-cookie-primary: #fbbf24;
26
- --fortune-cookie-primary-on: #fff;
27
- --fortune-cookie-accent: #fcd34d;
28
- --fortune-cookie-success: #34d399;
29
- --fortune-cookie-warning: #fbbf24;
30
- --fortune-cookie-error: #fb7185;
31
- }
32
-
33
- .fortune-cookie-root {
34
- width: 100%;
35
- max-width: 64rem;
36
- margin-left: auto;
37
- margin-right: auto;
38
- }
39
-
40
- .fortune-cookie-card {
41
- position: relative;
42
- background-color: var(--fortune-cookie-bg);
43
- border-radius: 1.5rem;
44
- box-shadow: 0 25px 50px -12px var(--fortune-cookie-shadow);
45
- overflow: hidden;
46
- border: 1px solid var(--fortune-cookie-border);
47
- min-height: 600px;
48
- display: flex;
49
- flex-direction: column;
50
- align-items: center;
51
- justify-content: center;
52
- padding: 2rem;
53
- }
54
-
55
- .fortune-cookie-glow {
56
- position: absolute;
57
- inset: 0;
58
- opacity: 0.1;
59
- pointer-events: none;
60
- background-image: radial-gradient(circle at center, var(--fortune-cookie-primary), transparent, transparent);
61
- }
62
-
63
- .fortune-cookie-content {
64
- position: relative;
65
- z-index: 10;
66
- width: 100%;
67
- display: flex;
68
- flex-direction: column;
69
- align-items: center;
70
- }
71
-
72
- .fortune-cookie-instruction {
73
- font-size: 1.25rem;
74
- line-height: 1.75rem;
75
- font-weight: 700;
76
- color: #92400e;
77
- margin-bottom: 2rem;
78
- text-transform: uppercase;
79
- letter-spacing: 0.1em;
80
- animation: fortune-cookie-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
81
- }
82
-
83
- .theme-dark .fortune-cookie-instruction {
84
- color: #fbbf24;
85
- }
86
-
87
- @keyframes fortune-cookie-pulse {
88
- 0%, 100% { opacity: 1; }
89
- 50% { opacity: .5; }
90
- }
91
-
92
- .fortune-cookie-stage {
93
- position: relative;
94
- width: 20rem;
95
- height: 20rem;
96
- cursor: pointer;
97
- }
98
-
99
- @media (min-width: 768px) {
100
- .fortune-cookie-stage {
101
- width: 24rem;
102
- height: 24rem;
103
- }
104
- }
105
-
106
- .fortune-cookie-body {
107
- position: absolute;
108
- inset: 2rem;
109
- transition-property: transform;
110
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
111
- transition-duration: 100ms;
112
- }
113
-
114
- @media (min-width: 768px) {
115
- .fortune-cookie-body {
116
- inset: 3rem;
117
- }
118
- }
119
-
120
- .fortune-cookie-body:active {
121
- transform: scale(0.95);
122
- }
123
-
124
- .fortune-cookie-img {
125
- width: 100%;
126
- height: 100%;
127
- object-fit: contain;
128
- z-index: 10;
129
- position: relative;
130
- }
131
-
132
- .fortune-cookie-broken {
133
- position: absolute;
134
- inset: 2rem;
135
- pointer-events: none;
136
- }
137
-
138
- .fortune-cookie-broken.hidden {
139
- display: none;
140
- }
141
-
142
- @media (min-width: 768px) {
143
- .fortune-cookie-broken {
144
- inset: 3rem;
145
- }
146
- }
147
-
148
- .fortune-cookie-half {
149
- position: absolute;
150
- width: 50%;
151
- height: 100%;
152
- object-fit: contain;
153
- transition-property: all;
154
- transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
155
- transition-duration: 1000ms;
156
- }
157
-
158
- .fortune-cookie-half-left {
159
- left: 0;
160
- transform-origin: bottom left;
161
- }
162
-
163
- .fortune-cookie-half-right {
164
- right: 0;
165
- transform-origin: bottom right;
166
- }
167
-
168
- .fortune-cookie-paper {
169
- position: absolute;
170
- top: 50%;
171
- left: 50%;
172
- transform: translate(-50%, -50%) scale(0.5);
173
- width: 75%;
174
- max-width: 280px;
175
- opacity: 0;
176
- transition-property: all;
177
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
178
- transition-duration: 1000ms;
179
- z-index: 0;
180
- }
181
-
182
- .fortune-cookie-paper.visible {
183
- opacity: 1;
184
- transform: translate(-50%, -50%) scale(1);
185
- z-index: 20;
186
- }
187
-
188
- .fortune-cookie-paper-img {
189
- width: 100%;
190
- filter: drop-shadow(0 20px 13px rgba(0, 0, 0, 0.03)) drop-shadow(0 8px 5px rgba(0, 0, 0, 0.08));
191
- transform: rotate(1deg);
192
- }
193
-
194
- .fortune-cookie-paper-content {
195
- position: absolute;
196
- inset: 0;
197
- display: flex;
198
- flex-direction: column;
199
- align-items: center;
200
- justify-content: center;
201
- padding: 2rem;
202
- text-align: center;
203
- }
204
-
205
- .fortune-cookie-text {
206
- color: #0f172a;
207
- font-weight: 900;
208
- font-size: 1.125rem;
209
- line-height: 1.25;
210
- transform: rotate(-1deg);
211
- user-select: text;
212
- }
213
-
214
- @media (min-width: 768px) {
215
- .fortune-cookie-text {
216
- font-size: 1.25rem;
217
- line-height: 1.75rem;
218
- }
219
- }
220
-
221
- .fortune-cookie-lucky-numbers {
222
- margin-top: 1rem;
223
- display: flex;
224
- flex-wrap: wrap;
225
- gap: 0.5rem;
226
- justify-content: center;
227
- transform: rotate(-1deg);
228
- }
229
-
230
- .fortune-cookie-number {
231
- font-size: 0.75rem;
232
- line-height: 1rem;
233
- font-weight: 700;
234
- background-color: rgba(255, 255, 255, 0.9);
235
- color: #450a0a;
236
- padding-left: 0.5rem;
237
- padding-right: 0.5rem;
238
- padding-top: 0.125rem;
239
- padding-bottom: 0.125rem;
240
- border-radius: 0.25rem;
241
- box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
242
- border: 1px solid #fee2e2;
243
- }
244
-
245
- .fortune-cookie-particles {
246
- position: absolute;
247
- inset: 0;
248
- pointer-events: none;
249
- overflow: visible;
250
- z-index: 20;
251
- }
252
-
253
- .fortune-cookie-reset {
254
- display: none;
255
- margin-top: 3rem;
256
- flex-direction: column;
257
- align-items: center;
258
- gap: 1rem;
259
- }
260
-
261
- .fortune-cookie-reset.visible {
262
- display: flex;
263
- }
264
-
265
- .fortune-cookie-status {
266
- font-size: 0.875rem;
267
- line-height: 1.25rem;
268
- color: var(--fortune-cookie-text-dim);
269
- }
270
-
271
- .fortune-cookie-share-btn {
272
- padding-left: 1.5rem;
273
- padding-right: 1.5rem;
274
- padding-top: 0.5rem;
275
- padding-bottom: 0.5rem;
276
- background-color: #f1f5f9;
277
- color: #334155;
278
- border-radius: 9999px;
279
- font-size: 0.875rem;
280
- line-height: 1.25rem;
281
- font-weight: 700;
282
- border: none;
283
- cursor: pointer;
284
- display: flex;
285
- align-items: center;
286
- gap: 0.5rem;
287
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
288
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
289
- transition-duration: 150ms;
290
- }
291
-
292
- .theme-dark .fortune-cookie-share-btn {
293
- background-color: #1e293b;
294
- color: #cbd5e1;
295
- }
296
-
297
- .fortune-cookie-share-btn:hover {
298
- background-color: #e2e8f0;
299
- }
300
-
301
- .theme-dark .fortune-cookie-share-btn:hover {
302
- background-color: #334155;
303
- }
304
-
305
- .fortune-cookie-shake-1 {
306
- animation: fortune-cookie-shake 0.3s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
307
- }
308
-
309
- .fortune-cookie-shake-2 {
310
- animation: fortune-cookie-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
311
- }
312
-
313
- .fortune-cookie-shake-3 {
314
- animation: fortune-cookie-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
315
- }
316
-
317
- @keyframes fortune-cookie-shake {
318
- 10%, 90% { transform: translate3d(-1px, 0, 0) rotate(-1deg); }
319
- 20%, 80% { transform: translate3d(2px, 0, 0) rotate(2deg); }
320
- 30%, 50%, 70% { transform: translate3d(-4px, 0, 0) rotate(-4deg); }
321
- 40%, 60% { transform: translate3d(4px, 0, 0) rotate(4deg); }
322
- }
323
-
324
- .fortune-cookie-crumb {
325
- position: absolute;
326
- width: 20px;
327
- height: 20px;
328
- background-image: url("/images/utilities/fortune/fc-crumbs.webp");
329
- background-size: contain;
330
- background-repeat: no-repeat;
331
- pointer-events: none;
332
- }