|
| 1 | +/** |
| 2 | + * 1. THEME VARIABLES |
| 3 | + */ |
1 | 4 | :root { |
2 | | - /* Default Light Mode */ |
3 | 5 | --bg-page: #f8fafc; |
4 | 6 | --bg-card: #ffffff; |
5 | 7 | --bg-footer: #f1f5f9; |
6 | 8 | --text-main: #0f172a; |
7 | 9 | --text-muted: #64748b; |
8 | 10 | --border-color: #e2e8f0; |
9 | 11 | --accent: #4f46e5; |
| 12 | + --accent-rgb: 79, 70, 229; |
10 | 13 | } |
11 | 14 |
|
12 | | -/* Dark Mode Class */ |
13 | 15 | .dark { |
14 | 16 | --bg-page: #020617; |
15 | 17 | --bg-card: #0f172a; |
|
18 | 20 | --text-muted: #94a3b8; |
19 | 21 | --border-color: #1e293b; |
20 | 22 | --accent: #818cf8; |
| 23 | + --accent-rgb: 129, 140, 248; |
21 | 24 | } |
22 | 25 |
|
23 | | -/* Base Styles */ |
24 | | -body { |
| 26 | +/** |
| 27 | + * 2. BASE STYLES & STICKY FIXES |
| 28 | + */ |
| 29 | +html, body { |
| 30 | + overflow-x: clip; /* Important: prevents sticky break and horizontal scroll */ |
| 31 | + height: auto; |
| 32 | + min-height: 100%; |
25 | 33 | background-color: var(--bg-page); |
26 | 34 | color: var(--text-main); |
27 | 35 | transition: background-color 0.4s ease, color 0.4s ease; |
| 36 | + scroll-behavior: smooth; |
28 | 37 | } |
29 | 38 |
|
| 39 | +/** |
| 40 | + * 3. STICKY HEADER |
| 41 | + */ |
| 42 | +header { |
| 43 | + position: -webkit-sticky; |
| 44 | + position: sticky; |
| 45 | + top: 0; |
| 46 | + width: 100%; |
| 47 | + z-index: 100; |
| 48 | + background-color: var(--bg-page); |
| 49 | + backdrop-filter: blur(12px); |
| 50 | + -webkit-backdrop-filter: blur(12px); |
| 51 | + border-bottom: 2px solid var(--border-color); |
| 52 | + box-sizing: border-box; |
| 53 | +} |
| 54 | + |
| 55 | +h1 { |
| 56 | + line-height: 0.85; |
| 57 | + text-shadow: 2px 2px 0px transparent; |
| 58 | +} |
| 59 | + |
| 60 | +.dark h1 { |
| 61 | + text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3); |
| 62 | +} |
| 63 | + |
| 64 | +/** |
| 65 | + * 4. CARD STYLES |
| 66 | + */ |
30 | 67 | .user-card { |
31 | 68 | background-color: var(--bg-card); |
32 | 69 | border: 1px solid var(--border-color); |
33 | | - transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; |
| 70 | + transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), |
| 71 | + border-color 0.3s ease, |
| 72 | + box-shadow 0.3s ease; |
| 73 | +} |
| 74 | + |
| 75 | +.user-card:hover { |
| 76 | + border-color: var(--accent); |
| 77 | + box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); |
34 | 78 | } |
35 | 79 |
|
36 | 80 | .card-footer { |
37 | 81 | background-color: var(--bg-footer); |
38 | 82 | border-top: 1px solid var(--border-color); |
39 | 83 | } |
40 | 84 |
|
41 | | -/* Accent Color Overrides */ |
| 85 | +/** |
| 86 | + * 5. GAME & UTILITY |
| 87 | + */ |
42 | 88 | .text-accent { color: var(--accent); } |
43 | 89 | .bg-accent { background-color: var(--accent); } |
44 | | -.border-accent { border-color: var(--accent); } |
45 | 90 |
|
46 | | -/* Animations */ |
47 | | -@keyframes glow-pulse { |
48 | | - 0% { box-shadow: 0 0 0 0 var(--accent); opacity: 0.7; } |
49 | | - 70% { box-shadow: 0 0 0 15px transparent; } |
50 | | - 100% { box-shadow: 0 0 0 0 transparent; } |
51 | | -} |
52 | | - |
53 | | -.highlight-pulse { |
54 | | - animation: glow-pulse 2s infinite; |
55 | | - transform: translateY(-8px); |
56 | | - border-color: var(--accent) !important; |
57 | | -} |
| 91 | +#game-stats { transition: all 0.3s ease; } |
| 92 | +#level-progress { box-shadow: 0 0 8px var(--accent); } |
58 | 93 |
|
59 | | -html { scroll-behavior: smooth; } |
| 94 | +/** |
| 95 | + * 6. ANIMATIONS |
| 96 | + */ |
60 | 97 |
|
61 | | -/* Easter Egg: The Barrel Roll */ |
| 98 | +/* Konami Barrel Roll - Applied to HTML */ |
62 | 99 | .konami-roll { |
63 | | - transition: transform 2s cubic-bezier(0.65, 0, 0.35, 1); |
64 | | - transform: rotate(360deg); |
| 100 | + transition: transform 2s cubic-bezier(0.65, 0, 0.35, 1); |
| 101 | + transform: rotate(360deg); |
| 102 | + transform-style: preserve-3d; |
| 103 | + pointer-events: none; |
65 | 104 | } |
66 | 105 |
|
67 | | -/* Optional: Fun font change for the title */ |
68 | | -.leet-mode h1 { |
69 | | - font-family: "Courier New", monospace !important; |
70 | | - color: #00ff00 !important; |
71 | | - text-shadow: 2px 2px #ff0000; |
| 106 | +/* Fix sticky header jitter during rotation */ |
| 107 | +header { |
| 108 | + backface-visibility: hidden; |
| 109 | + transform: translateZ(0); |
72 | 110 | } |
73 | 111 |
|
| 112 | +/* Matrix Overlay */ |
74 | 113 | #matrix-overlay { |
75 | | - background-color: black; |
76 | | - /* Ensure it's high, but lower than the Level Up notification (z-2000) */ |
77 | | - z-index: 1500; |
| 114 | + background-color: black; |
| 115 | + z-index: 9999 !important; |
78 | 116 | } |
79 | 117 |
|
80 | | -/* Make sure the canvas fills the whole screen even if scrolling */ |
81 | 118 | #matrix-canvas { |
82 | | - display: block; |
83 | | - position: fixed; |
84 | | - top: 0; |
85 | | - left: 0; |
| 119 | + display: block; |
| 120 | + position: fixed; |
| 121 | + top: 0; |
| 122 | + left: 0; |
| 123 | +} |
| 124 | + |
| 125 | +/* Surprise Me Pulse */ |
| 126 | +@keyframes glow-pulse { |
| 127 | + 0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.4); opacity: 1; } |
| 128 | + 70% { box-shadow: 0 0 0 20px rgba(var(--accent-rgb), 0); } |
| 129 | + 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); } |
| 130 | +} |
| 131 | + |
| 132 | +.highlight-pulse { |
| 133 | + animation: glow-pulse 2s infinite; |
| 134 | + transform: translateY(-8px); |
| 135 | + border-color: var(--accent) !important; |
| 136 | +} |
| 137 | + |
| 138 | +/* Level Up Popups */ |
| 139 | +.fixed.top-24 { |
| 140 | + margin-top: 1.5rem; |
| 141 | + z-index: 10000; |
86 | 142 | } |
0 commit comments