|
5 | 5 | --bg-page: #f0f4f8; |
6 | 6 | --bg-card: #ffffff; |
7 | 7 | --bg-footer: #e2e8f0; |
8 | | - --text-main: #1a202c; |
| 8 | + --text-main: #1e293b; /* Default Light */ |
9 | 9 | --text-muted: #4a5568; |
10 | 10 | --border-color: #cbd5e0; |
11 | | - --accent: #2563eb; |
| 11 | + --accent: #94a3b8; /* Default */ |
12 | 12 | --accent-light: #eff6ff; |
13 | 13 | --accent-rgb: 37, 99, 235; |
14 | 14 | --danger: #dc2626; |
|
17 | 17 |
|
18 | 18 | .dark { |
19 | 19 | --bg-page: #05070a; |
20 | | - --bg-card: #0f172a; |
| 20 | + --bg-card: #1e293b; |
21 | 21 | --bg-footer: #020617; |
22 | | - --text-main: #f1f5f9; |
| 22 | + --text-main: #f8fafc; |
23 | 23 | --text-muted: #94a3b8; |
24 | 24 | --border-color: #1e293b; |
25 | 25 | --accent: #38bdf8; |
@@ -412,10 +412,6 @@ body[data-level="6"]::after { |
412 | 412 | pointer-events: none; |
413 | 413 | opacity: 0.2; /* Very subtle scanlines */ |
414 | 414 | } |
415 | | -#total-xp-display { |
416 | | - display: inline-block; |
417 | | - transition: transform 0.1s ease; |
418 | | -} |
419 | 415 |
|
420 | 416 | /* Added via JS when XP increases */ |
421 | 417 | .xp-pulse { |
@@ -463,20 +459,86 @@ body[data-level="6"]::after { |
463 | 459 | --glow-color: #ef4444; /* Sith Red */ |
464 | 460 | } |
465 | 461 |
|
466 | | -/* Force Shadow ripple for the container */ |
467 | | -.force-glow::after { |
468 | | - content: ""; |
| 462 | +/* Override the Tailwind duration-1000 for a better feel */ |
| 463 | +#level-progress { |
| 464 | + transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important; |
| 465 | +} |
| 466 | + |
| 467 | + |
| 468 | +/* Force Glow for the Badge */ |
| 469 | +@keyframes force-pulse { |
| 470 | + 0% { filter: drop-shadow(0 0 2px var(--accent)); transform: scale(1); } |
| 471 | + 50% { filter: drop-shadow(0 0 15px var(--accent)); transform: scale(1.1); } |
| 472 | + 100% { filter: drop-shadow(0 0 2px var(--accent)); transform: scale(1); } |
| 473 | +} |
| 474 | + |
| 475 | +.force-glow { |
| 476 | + animation: force-pulse 1.5s infinite ease-in-out; |
| 477 | +} |
| 478 | +#level-name { |
| 479 | + font-weight: 900; |
| 480 | + text-transform: uppercase; |
| 481 | + letter-spacing: 0.02em; |
| 482 | + |
| 483 | + /* Remove any existing filters that cause fuzziness */ |
| 484 | + filter: none !important; |
| 485 | + transition: color 0.3s ease; |
| 486 | +} |
| 487 | + |
| 488 | +/* Adjust the stroke for Dark/Random themes to keep it crisp */ |
| 489 | +.dark #level-name { |
| 490 | + text-shadow: 1px 1px 0px rgba(0,0,0,0.5); |
| 491 | +} |
| 492 | + |
| 493 | +#level-badge { |
| 494 | + transition: background-color 0.4s ease, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); |
| 495 | +} |
| 496 | + |
| 497 | +/* Ensure the XP numbers are always legible */ |
| 498 | +#total-xp-display { |
| 499 | + color: var(--text-main); |
| 500 | + filter: brightness(1.2); /* Pops slightly more in dark mode */ |
| 501 | +} |
| 502 | + |
| 503 | +/* Progress bar should always have a high-contrast background */ |
| 504 | +.xp-bar-container { |
| 505 | + background: rgba(0, 0, 0, 0.1); |
| 506 | +} |
| 507 | +.dark .xp-bar-container { |
| 508 | + background: rgba(255, 255, 255, 0.1); |
| 509 | +} |
| 510 | +.xp-popup { |
469 | 511 | position: absolute; |
470 | | - inset: -10px; |
471 | | - border-radius: 50%; |
472 | | - background: var(--glow-color); |
473 | | - opacity: 0.2; |
474 | | - filter: blur(15px); |
475 | | - z-index: -1; |
| 512 | + pointer-events: none; |
| 513 | + z-index: 9999; |
| 514 | + animation: floatUp 1s ease-out forwards; |
| 515 | + color: var(--accent); /* This uses our dynamic level color! */ |
| 516 | + font-size: 0.75rem; |
476 | 517 | } |
477 | | -#level-progress { |
478 | | - height: 100%; |
479 | | - width: 0%; /* Initial state */ |
480 | | - transition: width 0.3s ease-in-out; /* This makes it "fill" instead of "jump" */ |
481 | | - box-shadow: 0 0 10px var(--accent); |
| 518 | + |
| 519 | +@keyframes floatUp { |
| 520 | + 0% { |
| 521 | + transform: translateY(0); |
| 522 | + opacity: 1; |
| 523 | + } |
| 524 | + 100% { |
| 525 | + transform: translateY(-50px); |
| 526 | + opacity: 0; |
| 527 | + } |
| 528 | +} |
| 529 | +@keyframes xpFloat { |
| 530 | + 0% { |
| 531 | + transform: translateY(0) scale(1); |
| 532 | + opacity: 1; |
| 533 | + } |
| 534 | + 100% { |
| 535 | + transform: translateY(-40px) scale(1.2); |
| 536 | + opacity: 0; |
| 537 | + } |
| 538 | +} |
| 539 | + |
| 540 | +.animate-xp-float { |
| 541 | + animation: xpFloat 1s ease-out forwards; |
| 542 | + /* This makes sure the text is crisp on light/dark themes */ |
| 543 | + text-shadow: 0 0 4px rgba(0,0,0,0.3); |
482 | 544 | } |
0 commit comments