File size: 2,735 Bytes
ebca337
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9241ec3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ebca337
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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

# Custom CSS for styling the leaderboard
CUSTOM_CSS = """
/* Main container styling */
.gradio-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1400px !important;
    margin: auto !important;
}

/* Header styling */
.header-text {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Tab styling */
.tabs {
    border-radius: 8px;
    overflow: hidden;
}

/* Leaderboard tab container */
.leaderboard-tab-container {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
}

/* Dataframe container */
.dataframe-container {
    max-height: 650px;
    overflow-y: auto;
    overflow-x: auto;
    margin: 10px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 5px;
}

/* Table styling */
.dataframe {
    border-collapse: collapse !important;
    width: 100% !important;
    font-size: 14px !important;
}

.dataframe thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    position: sticky;
    top: 0;
    z-index: 10;
}

.dataframe thead th {
    padding: 12px 8px !important;
    font-weight: 600 !important;
    text-align: left !important;
    border-bottom: 2px solid #ddd !important;
}

.dataframe tbody tr {
    transition: background-color 0.2s ease;
}

.dataframe tbody tr:nth-child(odd) {
    background-color: #f9f9f9 !important;
}

.dataframe tbody tr:hover {
    background-color: #e8eaf6 !important;
    cursor: pointer;
}

.dataframe tbody td {
    padding: 10px 8px !important;
    border-bottom: 1px solid #ddd !important;
}

/* Rank column styling */
.dataframe tbody td:first-child {
    font-weight: bold;
    color: #667eea;
}

/* Top 3 rows highlighting */
.dataframe tbody tr:nth-child(1) td:first-child {
    color: #FFD700;
    font-size: 16px;
}

.dataframe tbody tr:nth-child(2) td:first-child {
    color: #C0C0C0;
    font-size: 16px;
}

.dataframe tbody tr:nth-child(3) td:first-child {
    color: #CD7F32;
    font-size: 16px;
}

/* Pagination controls */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 15px;
}

/* Button styling */
.pagination-btn {
    min-width: 100px;
}

/* Page info styling */
.page-info {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
}

/* Footer styling */
.footer-text {
    text-align: center;
    padding: 15px;
    color: #666;
    font-size: 12px;
    margin-top: 20px;
}

/* Dropdown styling */
.dropdown-container {
    margin: 10px 0;
}
"""