Fhrozen's picture
rename folder
b6e1c26
# 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;
}
"""