Tschoui's picture
:lipstick: Improve frontend
3ba0b02
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
* {
font-family: 'Inter', sans-serif !important;
}
/* Center page content */
body, .gradio-container {
font-family: Inter, sans-serif;
}
/* Ensure the whole header centers no matter parent container rules */
.header-section {
width: 100%;
display: flex;
flex-direction: column;
align-items: center; /* horizontally center children */
justify-content: center;
margin-top: 10px;
margin-bottom: 40px;
}
/* BIG emoji above the title */
.header-emoji {
font-size: 70px; /* adjust size here */
line-height: 1;
margin-bottom: 12px; /* spacing between emoji and title */
}
/* Make the title big like the Open LLM Leaderboard */
.header-title {
font-size: 40px; /* ← MUCH BIGGER */
font-weight: 650;
text-align: center;
margin: 0;
line-height: 1.1;
}
/* Center subtitle */
.header-subtitle {
text-align: center;
font-size: 27px;
color: #666;
margin-top: 12px;
max-width: 900px; /* prevents single long line */
}
a {
color: #20C2D9;
text-decoration: none;
}
/* Visited link */
a:visited {
color: #20C2D9;
}
/* Hover */
a:hover {
color: #20C2D9;
text-decoration: none;
}
/* Active (when clicked) */
a:active {
color: #20C2D9;
}
:root {
--border: #d1d5db;
--bg-header: #F5F5F5;
--bg-cell: white;
--text-color: black;
--scroll-thumb: #cbd5e1;
--scroll-thumb-hover: #7E848C;
/* Override Gradio's theme colors for checkboxes and radio buttons */
--checkbox-border-color: #20C2D9;
--checkbox-border-color-focus: #20C2D9;
--checkbox-border-color-hover: #20C2D9;
--checkbox-background-color-selected: #20C2D9;
--radio-circle: #20C2D9;
--color-accent: #20C2D9;
--color-accent-soft: #20C2D9;
}
.dark {
--border: #444;
--bg-header: #1f1f1f;
--bg-cell: #121212;
--text-color: #e5e5e5;
--scroll-thumb: #555;
--scroll-thumb-hover: #777;
}
@media (prefers-color-scheme: dark) {
.leaderboard-container {
border-color: #444 !important;
}
.leaderboard-table th {
background-color: #1f1f1f !important;
color: #e5e5e5 !important;
border-color: #444 !important;
}
.leaderboard-table td {
background-color: #121212 !important;
color: #e0e0e0 !important;
border-color: #444 !important;
}
.leaderboard-container::-webkit-scrollbar-thumb {
background: #555 !important;
}
.leaderboard-container::-webkit-scrollbar-thumb:hover {
background: #777 !important;
}
}
.leaderboard-container {
overflow: auto;
max-height: 600px;
border: 1px solid var(--border);
border-radius: 10px;
margin-top: 3px;
position: relative; /* good practice for sticky inside */
}
.leaderboard-table {
width: max-content;
min-width: 100%;
border-collapse: separate; /* important */
border-spacing: 0; /* keeps it looking like collapse */
table-layout: auto; /* Allow columns to size based on content */
border: none !important;
}
.leaderboard-table th,
.leaderboard-table td {
border: 1px solid var(--border);
max-width: 300px;
word-break: break-word;
}
.leaderboard-table td {
text-align: left;
padding: 10px 14px;
font-size: 14px;
vertical-align: top;
white-space: normal;
line-height: 1.5;
}
.leaderboard-table tbody tr:last-child td {
border-bottom: none;
}
.leaderboard-table thead tr:first-child th {
font-weight: 700;
}
/* base header cell */
.leaderboard-table thead th {
text-align: center;
vertical-align: middle;
padding: 10px 14px;
font-weight: 600;
font-size: 14px;
background-color: var(--bg-header);
position: sticky;
z-index: 2;
}
/* first header row (group headers like "ROC-AUC") */
.leaderboard-table thead tr:first-child th {
top: 0;
z-index: 3; /* above second row */
font-weight: 700;
}
/* second header row (NR-AR, NR-ER, …) */
.leaderboard-table thead tr:nth-child(2) th {
/* set this to EXACT height of first header row */
top: 40px; /* tweak this value if needed */
z-index: 2;
}
.leaderboard-container::-webkit-scrollbar {
height: 8px;
border: none !important;
}
.leaderboard-container::-webkit-scrollbar-thumb {
background: var(--scroll-thumb);
border-radius: 4px;
}
.leaderboard-container::-webkit-scrollbar-thumb:hover {
background: var(--scroll-thumb-hover);
}
#leaderboard-tab,
#leaderboard-tab .gr-panel,
#leaderboard-tab .gr-block,
#leaderboard-tab .gr-box {
border: none !important;
box-shadow: none !important;
padding: 0 !important;
}
/* Prettier search bar */
#leaderboard-search {
width: 100% !important;
min-width: 320px;
padding: 10px 14px !important;
font-size: 16px !important;
border-radius: 8px !important;
border: 1px solid #d1d5db !important;
background-repeat: no-repeat;
background-position: 14px center;
background-size: 18px;
box-shadow: none;
display: block !important;
margin: 6px auto 6px auto !important;
transition: all 0.2s ease;
}
#leaderboard-search:focus {
border-color: #6366f1 !important;
box-shadow: 0 0 0 2px rgba(99,102,241,0.1) !important;
outline: none !important;
}
#leaderboard-search {
margin-bottom: 4px !important;
}
/* Pretty refresh button */
.refresh-button {
width: auto !important;
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
gap: 8px !important;
padding: 20px !important;
background-color: white;
font-weight: 700 !important;
font-size: 25px !important;
border-radius: 30px !important;
cursor: pointer !important;
transition: all 0.2s ease-in-out !important;
box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25) !important;
margin-top: 0px !important; /* tighter to search bar */
margin-bottom: 20px !important; /* more breathing room before table */
}
/* Remove tab panel border + shadow */
#submission-tab,
#submission-tab .gr-block,
#submission-tab .gr-box,
#submission-tab .column {
margin: 0 !important;
padding: 0 !important;
gap: 0 !important;
}
#submission-tab .form-wrapper * {
margin: 0 !important;
padding: 0 !important;
gap: 0 !important;
box-shadow: none !important;
border: none !important;
}
/* Remove default underline bar from the whole tab area */
.tab-nav {
border-bottom: none !important;
display: flex !important;
justify-content: center !important;
align-items: center;
padding: 0.4rem 0 !important;
}
/* Add spacing only horizontally */
.tab-nav button {
position: relative;
margin: 0 2.75rem; /* horizontal spacing only */
background: none !important;
border: none !important;
box-shadow: none !important;
padding: 0.3rem 0 !important;
font-weight: 600 !important;
color: #666 !important;
}
/* Active tab text bold */
.tab-nav button[aria-selected="true"] {
font-weight: 700 !important;
}
/* Make the underline visible and above everything */
.tab-nav button[aria-selected="true"]::after {
content: "";
position: absolute;
bottom: -3px; /* pull it close under the text */
left: 0;
width: 100%; /* match text width, no centering needed */
height: 2px;
display: block;
pointer-events: none;
z-index: 10; /* ensures it's visible */
border-bottom: #666 5px
}
/* Dark mode: highlight active tab with light blue */
@media (prefers-color-scheme: dark) {
.tab-nav button[aria-selected="true"] {
color: #20C2D9 !important;
}
.tab-nav button[aria-selected="true"]::after {
border-bottom: #20C2D9 5px solid !important;
}
}
/* === Form wrapper (outer layout) === */
.form-wrapper {
margin: 0 auto !important;
padding: 16px 5px !important;
border: none !important;
max-width: 80%;
display: flex;
flex-direction: column;
align-items: flex-start; /* ✅ modern, replaces old -ms-flex-align */
}
/* === Label wrapper === */
.field-label {
color: #111827;
font-size: 14px !important;
font-weight: 500;
margin-bottom: 2px !important; /* tighter spacing below */
margin-top: 10px !important; /* consistent space above */
line-height: 1.3;
padding-left: 2px; /* ✅ tiny indent for visual alignment */
}
/* === Textboxes === */
.form-container {
width: 100%;
border: 1px solid #e5e7eb;
border-radius: 8px;
padding: 8px 10px;
font-size: 14px;
color: #111827;
box-sizing: border-box;
transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-container:focus,
.form-container:active {
border-color: #3b82f6;
outline: none;
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}
/* === Placeholder === */
.form-container::placeholder {
color: #9ca3af;
}
/* === Checkbox alignment === */
.form-container-checkbox {
display: flex; /* ✅ aligns checkbox + label nicely */
align-items: center;
gap: 8px; /* space between checkbox and text */
padding: 8px 10px;
margin-top: 15px !important;
margin-bottom: 5px !important;
font-size: 14px !important;
font-weight: 500;
color: #111827;
width: 100%;
box-sizing: border-box;
background: transparent;
border-radius: 8px;
}
/* === Checkbox input itself === */
.form-container-checkbox input[type="checkbox"] {
accent-color: #20C2D9;
transform: scale(1.1);
margin-left: 4px;
cursor: pointer;
}
/* === Subtle hover cue for inputs === */
.form-container:hover {
border-color: #d1d5db;
}
.form-container-radio {
display: flex; /* ✅ aligns checkbox + label nicely */
align-items: center;
gap: 8px; /* space between checkbox and text */
padding: 8px 10px;
margin-top: 5px !important;
margin-bottom: 5px !important;
font-size: 14px !important;
font-weight: 500;
width: 100%;
background: transparent !important;
border: none !important;
}
/* === Radio button input itself === */
.form-container-radio input[type="radio"] {
accent-color: #20C2D9;
transform: scale(1.1);
cursor: pointer;
}
/* === Global styles for all checkboxes and radio buttons === */
input[type="checkbox"],
input[type="radio"] {
accent-color: #20C2D9 !important;
}
/* === Gradio-specific checkbox and radio button overrides === */
.gradio-container input[type="checkbox"],
.gradio-container input[type="radio"],
label input[type="checkbox"],
label input[type="radio"],
.gr-checkbox input[type="checkbox"],
.gr-radio input[type="radio"],
.gr-check-radio input[type="checkbox"],
.gr-check-radio input[type="radio"] {
accent-color: #20C2D9 !important;
}
/* Additional Gradio 5.x specific selectors */
.svelte-1gfkn6j input[type="checkbox"],
.svelte-1gfkn6j input[type="radio"],
input[type="checkbox"]:checked,
input[type="radio"]:checked {
accent-color: #20C2D9 !important;
border-color: #20C2D9 !important;
background-color: #20C2D9 !important;
}
/* Override any Gradio checkbox/radio SVG or background */
input[type="checkbox"]::before,
input[type="radio"]::before {
background-color: #20C2D9 !important;
}
/* Target Gradio's custom checkbox/radio wrapper */
.wrap input[type="checkbox"],
.wrap input[type="radio"] {
accent-color: #20C2D9 !important;
}
/* === Submit Button === */
.submit-button:not(:disabled) {
background-color: #E67F0D !important;
color: #fff !important;
border: none !important;
border-radius: 8px !important;
padding: 10px 50px !important;
font-size: 15px !important;
font-weight: 600 !important;
cursor: pointer !important;
width:fit-content;
align-self: flex-start !important; /* ✅ anchors left within flex parent */
margin-top: 16px !important; /* ✅ small top gap */
margin-left: 0 !important;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
/* === Hover state === */
.submit-button:hover:not(:disabled) {
background-color: #FE4E00 !important; /* darker indigo */
box-shadow: 0 4px 10px rgba(99, 102, 241, 0.35) !important;
transform: translateY(-1px);
}
/* === Active (pressed) state === */
.submit-button:active:not(:disabled) {
background-color: #FE4E00 !important;
transform: scale(0.98);
box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25) !important;
}
/* === Disabled state === */
.submit-button:disabled {
background-color: #9CA3AF !important; /* Light gray */
color: #4B5563 !important; /* Muted gray text */
cursor: not-allowed !important;
box-shadow: none !important;
opacity: 0.75 !important;
transform: none !important;
padding: 10px 50px !important;
width:fit-content;
align-self: flex-start !important;
margin-left: 0 !important;
margin-top: 16px;
font-size: 15px !important;
font-weight: 600 !important;
border: none !important;
border-radius: 8px !important;
}
:root {
--bg-code: #ececff;
}
.dark {
--bg-code: #444;
}
.instructions-section {
padding: 10px 18px;
font-size: 15px;
line-height: 1.5;
margin-bottom: 20px;
margin-top: 20px;
}
.instructions-section code {
background: var(--bg-code);
padding: 2px 5px;
border-radius: 4px;
font-size: 90%;
}
.instructions-section ul {
margin: 8px 0 12px 20px;
}
.instructions-section p {
margin: 6px 0;
}
.info-leaderboard {
margin-top: 10px;
margin-left: 20px;
}
/* Hide horizontal scrollbar in accordion/filter section */
.filter-accordion,
.filter-accordion *,
.filter-accordion > div,
.filter-accordion div {
overflow-x: hidden !important;
max-width: 100% !important;
}
/* Also target generic accordion elements */
.accordion,
.gr-accordion,
[class*="accordion"],
.gr-box.gr-accordion {
overflow-x: hidden !important;
}
.accordion .content,
.gr-accordion .content,
[class*="accordion"] .content,
.accordion > div,
.gr-accordion > div {
overflow-x: hidden !important;
}