File size: 9,318 Bytes
ed2eb44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from src.utils.config import dark_theme

def get_base_styles():
    """Returns the base CSS styles for the page"""
    return f"""
    <style>
    @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
    
    html, body, [class*="css"] {{
        font-family: 'Inter', sans-serif;
        background-color: {dark_theme['bg_color']};
        color: {dark_theme['text_color']};
    }}
    
    h1, h2, h3, h4, h5, h6 {{
        font-family: 'Inter', sans-serif;
        font-weight: 600;
        color: {dark_theme['heading_color']};
    }}
    
    .main {{
        background-color: {dark_theme['bg_color']};
    }}
    
    .title-container {{
        padding: 2rem 0;
        text-align: center;
        background: {dark_theme['gradient']};
        border-radius: 12px;
        color: white;
        margin-bottom: 2rem;
    }}
    
    .title {{
        font-size: 42px;
        font-weight: 700;
        margin-bottom: 10px;
        color: {dark_theme['title_color']};
    }}
    
    .subtitle {{
        font-size: 20px;
        font-weight: 400;
        opacity: 0.9;
        color: {dark_theme['subtitle_color']};
    }}
    
    .card {{
        background-color: {dark_theme['card_bg']};
        border-radius: 12px;
        padding: 24px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
        margin-bottom: 24px;
        transition: transform 0.2s, box-shadow 0.2s;
    }}
    
    .card:hover {{
        transform: translateY(-2px);
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    }}
    
    .card-title {{
        font-size: 20px;
        font-weight: 600;
        margin-bottom: 16px;
        color: {dark_theme['text_color']};
        display: flex;
        align-items: center;
    }}
    
    .card-title-icon {{
        margin-right: 10px;
        font-size: 22px;
    }}
    
    .task-card {{
        background-color: {dark_theme['card_bg']};
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
        margin-bottom: 16px;
        border-left: 4px solid {dark_theme['task_border']};
    }}
    
    .task-title {{
        font-size: 18px;
        font-weight: 600;
        color: {dark_theme['task_title']};
        margin-bottom: 8px;
    }}
    
    .task-description {{
        font-size: 15px;
        color: {dark_theme['text_color']};
        line-height: 1.5;
    }}
    
    /* Button styling - completely new and modern */
    div.stButton > button {{
        background-color: {dark_theme['card_bg']};
        color: {dark_theme['text_color']};
        border: 1px solid {dark_theme['border']};
        border-radius: 8px;
        padding: 8px 16px;
        font-size: 14px;
        font-weight: 500;
        margin: 4px;
        transition: all 0.2s ease;
    }}
    
    div.stButton > button:hover {{
        background-color: {dark_theme['hover']};
        border-color: {dark_theme['border']};
        transform: translateY(-1px);
    }}
    
    /* Active button styling */
    div.stButton > button.selected {{
        background-color: {dark_theme['primary']} !important;
        color: white !important;
        border-color: {dark_theme['primary']} !important;
    }}
    
    /* Table styling */
    [data-testid="stDataFrame"] {{
        background-color: {dark_theme['card_bg']};
        border-radius: 12px;
        padding: 1px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    }}
    
    [data-testid="stDataFrame"] table {{
        border-collapse: separate !important;
        border-spacing: 0 !important;
        border-radius: 8px !important;
        overflow: hidden !important;
    }}
    
    [data-testid="stDataFrame"] th {{
        background-color: {dark_theme['table_header']} !important;
        color: {dark_theme['text_color']} !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        font-size: 13px !important;
        padding: 16px 10px !important;
    }}
    
    [data-testid="stDataFrame"] td {{
        padding: 12px 10px !important;
        border-bottom: 1px solid {dark_theme['table_border']} !important;
        font-size: 14px !important;
        color: {dark_theme['text_color']} !important;
    }}
    
    /* Hide row numbers */
    [data-testid="stDataFrame"] [data-testid="stDataFrameRowNumber"] {{
        display: none !important;
    }}
    
    /* Metric header styling */
    .metric-header {{
        background-color: {dark_theme['card_bg']};
        border-radius: 8px;
        padding: 16px;
        margin-bottom: 16px;
        border-left: 4px solid {dark_theme['primary']};
    }}
    
    .metric-header h3 {{
        margin: 0;
        color: {dark_theme['primary']};
    }}
    
    .metric-header p {{
        margin: 8px 0 0 0;
        font-size: 14px;
        opacity: 0.8;
    }}
    
    /* Rank column styling */
    .rank-cell {{
        font-weight: 700 !important;
        background-color: {dark_theme['primary'] + '22'};
        border-radius: 50%;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
    }}
    
    .rank-1 {{
        background-color: gold !important;
        color: #333 !important;
    }}
    
    .rank-2 {{
        background-color: silver !important;
        color: #333 !important;
    }}
    
    .rank-3 {{
        background-color: #cd7f32 !important; /* bronze */
        color: #fff !important;
    }}
    
    /* Tabs styling */
    .stTabs [data-baseweb="tab-list"] {{
        gap: 8px;
        margin-bottom: 20px;
    }}
    
    .stTabs [data-baseweb="tab"] {{
        border-radius: 8px 8px 0 0;
        padding: 12px 24px;
        font-weight: 500;
        background-color: {dark_theme['hover']};
        color: {dark_theme['text_color']};
    }}
    
    .stTabs [data-baseweb="tab"][aria-selected="true"] {{
        background-color: {dark_theme['primary']};
        color: white;
    }}
    
    .stTabs [data-baseweb="tab-highlight"] {{
        background-color: transparent;
    }}
    
    /* Alert/info box styling */
    .info-box {{
        background-color: {dark_theme['info_bg']};
        border-left: 4px solid {dark_theme['info_border']};
        border-radius: 8px;
        padding: 16px;
        margin-bottom: 16px;
        color: {dark_theme['text_color']};
    }}
    
    .warning-box {{
        background-color: {dark_theme['warning_bg']};
        border-left: 4px solid {dark_theme['warning_border']};
        border-radius: 8px;
        padding: 16px;
        margin-bottom: 16px;
        color: {dark_theme['text_color']};
    }}
    
    /* Download buttons styling */
    .download-button {{
        background-color: {dark_theme['bg_color']};
        border: 1px solid {dark_theme['border']};
        border-radius: 8px;
        padding: 12px 20px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: {dark_theme['text_color']};
        font-weight: 500;
        margin-top: 16px;
        cursor: pointer;
        transition: all 0.2s;
    }}
    
    .download-button:hover {{
        background-color: {dark_theme['hover']};
        border-color: {dark_theme['border']};
        transform: translateY(-1px);
    }}
    
    .download-button .icon {{
        margin-right: 8px;
    }}
    
    /* Footer styling */
    .footer {{
        text-align: center;
        padding: 24px;
        margin-top: 40px;
        color: {dark_theme['footer_color']};
        font-size: 14px;
        border-top: 1px solid {dark_theme['footer_border']};
    }}
    
    /* Badge styling for model types */
    .badge {{
        display: inline-block;
        padding: 4px 8px;
        font-size: 12px;
        font-weight: 500;
        border-radius: 6px;
        margin-right: 6px;
    }}
    
    .badge-purple {{
        background-color: {dark_theme['primary'] + '33'};
        color: {dark_theme['primary']};
    }}
    
    .badge-blue {{
        background-color: {dark_theme['info_border'] + '33'};
        color: {dark_theme['info_border']};
    }}
    
    .selected-items {{
        background-color: {dark_theme['hover']};
        border-radius: 8px;
        padding: 12px 16px;
        margin-top: 16px;
        font-size: 14px;
    }}
    
    /* Selectbox styling */
    div[data-baseweb="select"] {{
        border-radius: 8px !important;
    }}
    
    div[data-baseweb="select"] > div {{
        background-color: {dark_theme['card_bg']} !important;
        border-radius: 8px !important;
        border-color: {dark_theme['border']} !important;
        color: {dark_theme['text_color']} !important;
    }}
    
    div[data-baseweb="select"] > div:hover {{
        border-color: {dark_theme['border']} !important;
    }}
    
    /* Table hover and value styling */
    .table-row:hover td {{
        background-color: #1a1a1a !important;
    }}
    .table-row:hover td.fixed-column {{
        background-color: #1a1a1a !important;
    }}
    .positive-value {{
        color: #4ade80 !important; /* Bright green for positive values */
        font-weight: 500;
    }}
    .negative-value {{
        color: #f87171 !important; /* Bright red for negative values */
        font-weight: 500;
    }}
    </style>
    """