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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
:root {
|
2 |
+
--background-color: #121212;
|
3 |
+
--card-background: #1e1e1e;
|
4 |
+
--text-color: #e0e0e0;
|
5 |
+
--primary-color: #03dac6; /* Teal accent */
|
6 |
+
--secondary-color: #bb86fc; /* Purple accent */
|
7 |
+
--border-color: #333333;
|
8 |
+
--rank1-color: #ffd700; /* Gold */
|
9 |
+
--rank2-color: #c0c0c0; /* Silver */
|
10 |
+
--rank3-color: #cd7f32; /* Bronze */
|
11 |
+
--hover-background: #2a2a2a;
|
12 |
+
}
|
13 |
+
|
14 |
+
body {
|
15 |
+
font-family: 'Inter', sans-serif;
|
16 |
+
background-color: var(--background-color);
|
17 |
+
color: var(--text-color);
|
18 |
+
margin: 0;
|
19 |
+
padding: 20px;
|
20 |
+
line-height: 1.6;
|
21 |
+
}
|
22 |
+
|
23 |
+
.container {
|
24 |
+
max-width: 1000px;
|
25 |
+
margin: 20px auto;
|
26 |
+
background-color: var(--card-background);
|
27 |
+
border-radius: 12px;
|
28 |
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
|
29 |
+
overflow: hidden; /* Ensures footer stays inside rounded corners */
|
30 |
+
}
|
31 |
+
|
32 |
+
header {
|
33 |
+
background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
|
34 |
+
color: #000; /* Dark text on light gradient */
|
35 |
+
padding: 25px 30px;
|
36 |
+
text-align: center;
|
37 |
+
border-bottom: 1px solid var(--border-color);
|
38 |
+
}
|
39 |
+
|
40 |
+
header h1 {
|
41 |
+
margin: 0 0 10px 0;
|
42 |
+
font-size: 2.2rem;
|
43 |
+
font-weight: 700;
|
44 |
+
}
|
45 |
+
|
46 |
+
header p {
|
47 |
+
margin: 0;
|
48 |
+
font-size: 1rem;
|
49 |
+
opacity: 0.9;
|
50 |
+
}
|
51 |
+
|
52 |
+
#last-updated {
|
53 |
+
font-size: 0.8rem;
|
54 |
+
color: #333;
|
55 |
+
margin-top: 8px;
|
56 |
+
}
|
57 |
+
|
58 |
+
.leaderboard-header,
|
59 |
+
.leaderboard-row {
|
60 |
+
display: grid;
|
61 |
+
grid-template-columns: 60px 1fr 100px 170px 100px; /* Rank, User, Score, Time, Code */
|
62 |
+
align-items: center;
|
63 |
+
padding: 12px 30px;
|
64 |
+
border-bottom: 1px solid var(--border-color);
|
65 |
+
gap: 15px;
|
66 |
+
font-size: 0.95rem;
|
67 |
+
}
|
68 |
+
|
69 |
+
.leaderboard-header {
|
70 |
+
font-weight: 600;
|
71 |
+
background-color: rgba(255, 255, 255, 0.05); /* Slightly lighter header */
|
72 |
+
position: sticky; /* Make header sticky if leaderboard scrolls */
|
73 |
+
top: 0;
|
74 |
+
z-index: 10;
|
75 |
+
}
|
76 |
+
|
77 |
+
.leaderboard-row {
|
78 |
+
transition: background-color 0.2s ease-in-out, transform 0.2s ease;
|
79 |
+
}
|
80 |
+
|
81 |
+
.leaderboard-row:hover {
|
82 |
+
background-color: var(--hover-background);
|
83 |
+
transform: scale(1.01); /* Subtle zoom effect */
|
84 |
+
cursor: default;
|
85 |
+
}
|
86 |
+
|
87 |
+
.leaderboard-row:last-child {
|
88 |
+
border-bottom: none;
|
89 |
+
}
|
90 |
+
|
91 |
+
.rank {
|
92 |
+
font-weight: 700;
|
93 |
+
text-align: center;
|
94 |
+
font-size: 1.1em;
|
95 |
+
min-width: 40px; /* Ensure rank number doesn't wrap */
|
96 |
+
}
|
97 |
+
|
98 |
+
.username {
|
99 |
+
font-weight: 600;
|
100 |
+
overflow: hidden;
|
101 |
+
text-overflow: ellipsis;
|
102 |
+
white-space: nowrap;
|
103 |
+
}
|
104 |
+
|
105 |
+
.score {
|
106 |
+
text-align: right;
|
107 |
+
font-weight: 600;
|
108 |
+
color: var(--primary-color);
|
109 |
+
}
|
110 |
+
|
111 |
+
.timestamp {
|
112 |
+
font-size: 0.85em;
|
113 |
+
color: #aaa;
|
114 |
+
text-align: right;
|
115 |
+
}
|
116 |
+
|
117 |
+
.code-action {
|
118 |
+
text-align: center;
|
119 |
+
}
|
120 |
+
|
121 |
+
.view-code-btn {
|
122 |
+
background-color: var(--secondary-color);
|
123 |
+
color: var(--background-color);
|
124 |
+
border: none;
|
125 |
+
padding: 5px 12px;
|
126 |
+
border-radius: 5px;
|
127 |
+
cursor: pointer;
|
128 |
+
font-size: 0.8rem;
|
129 |
+
font-weight: 600;
|
130 |
+
transition: background-color 0.2s ease;
|
131 |
+
text-align: center;
|
132 |
+
}
|
133 |
+
|
134 |
+
.view-code-btn:hover {
|
135 |
+
background-color: #a06ef8; /* Slightly lighter purple */
|
136 |
+
}
|
137 |
+
|
138 |
+
/* Special ranks */
|
139 |
+
.leaderboard-row[data-rank="1"] .rank { color: var(--rank1-color); }
|
140 |
+
.leaderboard-row[data-rank="2"] .rank { color: var(--rank2-color); }
|
141 |
+
.leaderboard-row[data-rank="3"] .rank { color: var(--rank3-color); }
|
142 |
+
|
143 |
+
.leaderboard-row[data-rank="1"] { border-left: 4px solid var(--rank1-color); padding-left: 26px; }
|
144 |
+
.leaderboard-row[data-rank="2"] { border-left: 4px solid var(--rank2-color); padding-left: 26px; }
|
145 |
+
.leaderboard-row[data-rank="3"] { border-left: 4px solid var(--rank3-color); padding-left: 26px; }
|
146 |
+
|
147 |
+
|
148 |
+
#loading-indicator {
|
149 |
+
display: flex;
|
150 |
+
justify-content: center;
|
151 |
+
align-items: center;
|
152 |
+
padding: 50px;
|
153 |
+
font-size: 1.1rem;
|
154 |
+
color: #aaa;
|
155 |
+
gap: 10px;
|
156 |
+
}
|
157 |
+
|
158 |
+
.spinner {
|
159 |
+
border: 4px solid rgba(255, 255, 255, 0.1);
|
160 |
+
border-left-color: var(--primary-color);
|
161 |
+
border-radius: 50%;
|
162 |
+
width: 24px;
|
163 |
+
height: 24px;
|
164 |
+
animation: spin 1s linear infinite;
|
165 |
+
}
|
166 |
+
|
167 |
+
@keyframes spin {
|
168 |
+
to { transform: rotate(360deg); }
|
169 |
+
}
|
170 |
+
|
171 |
+
footer {
|
172 |
+
text-align: center;
|
173 |
+
padding: 15px;
|
174 |
+
font-size: 0.9rem;
|
175 |
+
color: #888;
|
176 |
+
border-top: 1px solid var(--border-color);
|
177 |
+
background-color: rgba(0, 0, 0, 0.1);
|
178 |
+
}
|
179 |
+
|
180 |
+
/* Modal Styles */
|
181 |
+
.modal {
|
182 |
+
display: none; /* Hidden by default */
|
183 |
+
position: fixed; /* Stay in place */
|
184 |
+
z-index: 100; /* Sit on top */
|
185 |
+
left: 0;
|
186 |
+
top: 0;
|
187 |
+
width: 100%; /* Full width */
|
188 |
+
height: 100%; /* Full height */
|
189 |
+
overflow: auto; /* Enable scroll if needed */
|
190 |
+
background-color: rgba(0, 0, 0, 0.7); /* Black w/ opacity */
|
191 |
+
padding-top: 60px; /* Location of the box */
|
192 |
+
}
|
193 |
+
|
194 |
+
.modal-content {
|
195 |
+
background-color: var(--card-background);
|
196 |
+
margin: 5% auto; /* 5% from the top and centered */
|
197 |
+
padding: 25px;
|
198 |
+
border: 1px solid var(--border-color);
|
199 |
+
border-radius: 8px;
|
200 |
+
width: 80%; /* Could be more or less, depending on screen size */
|
201 |
+
max-width: 900px;
|
202 |
+
position: relative;
|
203 |
+
box-shadow: 0 5px 15px rgba(0,0,0,0.5);
|
204 |
+
}
|
205 |
+
|
206 |
+
.close-button {
|
207 |
+
color: #aaa;
|
208 |
+
position: absolute;
|
209 |
+
top: 10px;
|
210 |
+
right: 20px;
|
211 |
+
font-size: 28px;
|
212 |
+
font-weight: bold;
|
213 |
+
cursor: pointer;
|
214 |
+
}
|
215 |
+
|
216 |
+
.close-button:hover,
|
217 |
+
.close-button:focus {
|
218 |
+
color: #fff;
|
219 |
+
text-decoration: none;
|
220 |
+
}
|
221 |
+
|
222 |
+
#modal-username {
|
223 |
+
margin-top: 0;
|
224 |
+
margin-bottom: 20px;
|
225 |
+
color: var(--primary-color);
|
226 |
+
}
|
227 |
+
|
228 |
+
#modal-code {
|
229 |
+
background-color: #282c34; /* Match highlight.js theme background */
|
230 |
+
color: #abb2bf;
|
231 |
+
padding: 15px;
|
232 |
+
border-radius: 5px;
|
233 |
+
max-height: 60vh; /* Limit height and allow scroll */
|
234 |
+
overflow: auto;
|
235 |
+
display: block; /* Needed for <pre> */
|
236 |
+
white-space: pre-wrap; /* Wrap long lines */
|
237 |
+
word-break: break-all; /* Break words if needed */
|
238 |
+
}
|
239 |
+
|
240 |
+
/* Responsive adjustments (optional) */
|
241 |
+
@media (max-width: 768px) {
|
242 |
+
.leaderboard-header,
|
243 |
+
.leaderboard-row {
|
244 |
+
grid-template-columns: 40px 1fr 80px 80px; /* Adjust for smaller screens, hide timestamp maybe */
|
245 |
+
padding: 10px 15px;
|
246 |
+
gap: 10px;
|
247 |
+
font-size: 0.9rem;
|
248 |
+
}
|
249 |
+
.timestamp {
|
250 |
+
/* Hide timestamp column on small screens */
|
251 |
+
display: none;
|
252 |
+
}
|
253 |
+
.leaderboard-header .timestamp {
|
254 |
+
display: none;
|
255 |
+
}
|
256 |
+
.code-action {
|
257 |
+
/* Adjust button text or just show icon if needed */
|
258 |
+
grid-column: 4 / 5; /* Span correctly if timestamp is hidden */
|
259 |
+
}
|
260 |
+
.view-code-btn {
|
261 |
+
padding: 4px 8px;
|
262 |
+
font-size: 0.75rem;
|
263 |
+
}
|
264 |
+
header h1 {
|
265 |
+
font-size: 1.8rem;
|
266 |
+
}
|
267 |
+
.modal-content {
|
268 |
+
width: 95%;
|
269 |
+
}
|
270 |
+
}
|