Chinese-Writing-Bench / styles.css
justin-ailabs's picture
UI Overhaul: Premium Slate Aesthetic, Tabbed Interface, and Grid Refinements
384e89d
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', sans-serif;
background: #f8fafc;
min-height: 100vh;
color: #334155;
}
.container {
max-width: 1440px;
width: 95%;
margin: 0 auto;
padding: 20px 40px;
}
.header {
text-align: center;
margin-bottom: 24px;
color: #0f172a;
padding: 48px 0 36px 0;
position: relative;
background: none;
}
.header h1 {
font-size: 3.2rem;
font-weight: 800;
margin-bottom: 18px;
letter-spacing: 0.12em;
display: flex;
align-items: center;
justify-content: center;
gap: 18px;
}
.header h1 .fas {
font-size: 2.2rem;
background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
color: white;
border-radius: 50%;
padding: 16px 18px;
box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
vertical-align: middle;
}
.header p {
font-size: 1.25rem;
font-weight: 400;
color: #64748b;
margin-top: 0;
margin-bottom: 0;
letter-spacing: 0.04em;
}
.card {
background: white;
border-radius: 16px;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
border: 1px solid #e2e8f0;
padding: 32px 32px 24px 32px;
}
.section-title {
display: flex;
align-items: center;
font-size: 1.35rem;
font-weight: 700;
color: #1e293b;
margin-bottom: 28px;
letter-spacing: 0.5px;
text-transform: none;
background: none;
border: none;
padding-left: 0;
position: relative;
padding-bottom: 8px;
border-bottom: 1px solid #e2e8f0;
}
.section-title-spacer {
flex: 1 1 auto;
}
.accent-bar {
display: inline-block;
width: 6px;
height: 24px;
border-radius: 4px;
background: linear-gradient(180deg, #6366f1 0%, #a855f7 100%);
margin-right: 14px;
}
.overview-section,
.table-section,
.citation-section {
margin-bottom: 56px;
}
.overview-content {
font-size: 1.05rem;
color: #475569;
line-height: 1.7;
border-left: 3px solid #e2e8f0;
padding-left: 24px;
background: none;
}
.overview-content p {
margin-bottom: 18px;
margin-top: 0;
}
.overview-content h4 {
font-size: 1.1rem;
font-weight: 700;
color: #0f172a;
margin-top: 28px;
margin-bottom: 10px;
letter-spacing: 0.02em;
}
.overview-content ul,
.overview-content ol {
margin: 0 0 18px 24px;
padding-left: 18px;
}
.overview-content ul li,
.overview-content ol li {
margin-bottom: 8px;
line-height: 1.6;
font-size: 1.05rem;
}
.overview-content ul li:last-child,
.overview-content ol li:last-child {
margin-bottom: 0;
}
.citation-content {
font-size: 1.05rem;
color: #475569;
line-height: 1.7;
padding-left: 2px;
}
.citation-content em {
color: #334155;
font-size: 0.95rem;
font-style: italic;
background: #f1f5f9;
padding: 4px 8px;
border-radius: 6px;
}
.table-container {
overflow-x: auto;
background: white;
border-radius: 12px;
padding: 0;
max-height: 580px;
overflow-y: auto;
position: relative;
border: 1px solid #e9ecef;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
table {
width: 100%;
min-width: 1250px;
border-collapse: collapse;
background: white;
table-layout: fixed;
}
th,
td {
padding: 12px 6px;
border-bottom: 1px solid #e9ecef;
}
th {
background: #f8fafc;
color: #334155;
font-weight: 600;
font-size: 0.9rem;
cursor: pointer;
transition: background-color 0.2s ease;
position: sticky;
top: 0;
z-index: 2;
letter-spacing: 0.02em;
padding-right: 18px;
white-space: nowrap;
overflow: hidden;
border-bottom: 2px solid #e2e8f0;
}
th:hover {
background: #f1f5f9;
}
th.sortable::after {
content: '';
display: inline-block;
position: absolute;
right: 4px;
top: 50%;
transform: translateY(-50%);
width: 12px;
height: 12px;
background-repeat: no-repeat;
background-position: center;
background-size: 12px 12px;
opacity: 0.4;
/* Default: double chevron (unsorted) */
background-image: url('data:image/svg+xml;utf8,<svg width="16" height="16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6l4-4 4 4" stroke="%2364748b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 10l4 4 4-4" stroke="%2364748b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
}
th.sort-asc::after {
/* Up chevron */
background-image: url('data:image/svg+xml;utf8,<svg width="16" height="16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10l4-4 4 4" stroke="%23334155" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
opacity: 1;
}
th.sort-desc::after {
/* Down chevron */
background-image: url('data:image/svg+xml;utf8,<svg width="16" height="16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6l4 4 4-4" stroke="%23334155" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
opacity: 1;
}
.model-cell,
th:first-child {
text-align: left;
position: sticky;
left: 0;
background: white;
z-index: 1;
border-right: 1px solid #e9ecef;
width: 250px;
/* Fixed width for model column */
padding-left: 20px;
}
th:first-child {
background: #f8fafc;
z-index: 3;
}
td:not(.model-cell),
th:not(:first-child) {
text-align: center;
}
td {
font-size: 0.90rem;
color: #334155;
font-weight: 500;
}
tr:hover {
background: #f3f0fa;
}
.score-cell {
font-weight: 600;
color: #495057;
/* We'll let heatmap coloring handle the exact shade */
transition: background-color 0.3s;
}
.model-cell {
font-weight: 600;
color: #495057;
}
.loading {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 1000;
color: white;
}
.loading.hidden {
display: none;
}
.spinner {
width: 50px;
height: 50px;
border: 4px solid #f3f3f3;
border-top: 4px solid #764ba2;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 20px;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.no-data {
text-align: center;
padding: 40px;
color: #6c757d;
font-size: 1.1rem;
}
.no-data i {
font-size: 3rem;
margin-bottom: 20px;
opacity: 0.5;
}
@media (max-width: 768px) {
.container {
padding: 10px;
}
.header h1 {
font-size: 2rem;
}
.dashboard.card {
padding: 12px 4px 12px 4px;
}
.card {
padding: 12px 4px 12px 4px;
}
.table-container {
padding: 10px;
}
th,
td {
padding: 8px 8px;
font-size: 0.92rem;
}
.overview-section,
.table-section,
.citation-section {
margin-bottom: 36px;
}
}
.dashboard-controls {
margin-bottom: 20px;
display: flex;
flex-direction: column;
gap: 20px;
}
.controls-header {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 16px;
}
.judge-selector {
display: flex;
align-items: center;
gap: 16px;
}
.judge-toggle {
display: flex;
align-items: center;
background: #f1f3f5;
border-radius: 10px;
padding: 4px;
border: 1px solid #e9ecef;
}
.control-label {
font-size: 1.05rem;
font-weight: 700;
color: #1e293b;
}
.judge-btn {
padding: 8px 24px;
font-size: 0.95rem;
font-weight: 600;
font-family: 'Inter', sans-serif;
cursor: pointer;
border: none;
background: transparent;
color: #64748b;
border-radius: 8px;
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
letter-spacing: 0.03em;
}
.judge-btn:hover {
color: #0f172a;
}
.judge-btn.active {
background: white;
color: #0f172a;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
/* --- Tabs --- */
.tabs-container {
display: flex;
border-bottom: 2px solid #e9ecef;
margin-bottom: 16px;
}
.tabs-header {
display: flex;
gap: 24px;
margin-bottom: -2px;
}
.tab-btn {
padding: 12px 4px;
font-size: 1.05rem;
font-weight: 600;
font-family: 'Inter', sans-serif;
cursor: pointer;
border: none;
background: transparent;
color: #64748b;
border-bottom: 3px solid transparent;
transition: all 0.2s;
letter-spacing: 0.02em;
}
.tab-btn:hover {
color: #0f172a;
}
.tab-btn.active {
color: #0f172a;
border-bottom-color: #6366f1;
font-weight: 700;
}
.tab-content {
display: none;
animation: fadeIn 0.3s ease-in-out;
margin-bottom: 56px;
}
.tab-content.active {
display: block;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(5px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.highlight-row {
background: #f3eaff !important;
box-shadow: 0 2px 8px 0 rgba(118, 75, 162, 0.08);
}
.baseline-row {
background: #fefce8 !important;
}
.baseline-row .model-cell {
color: #ca8a04;
}
.baseline-row td {
font-style: italic;
}
.model-link {
color: #6366f1;
font-weight: 700;
text-decoration: none;
transition: color 0.2s;
}
.model-link:hover {
color: #4f46e5;
text-decoration: none;
}
.external-links {
display: flex;
justify-content: center;
align-items: center;
margin-top: 1.2rem;
margin-bottom: 0.5rem;
gap: 1.5rem;
}
.external-link {
display: flex;
align-items: center;
color: #764ba2;
text-decoration: none;
font-weight: 700;
transition: color 0.2s, transform 0.2s;
}
.external-link svg {
width: 2.1rem;
height: 2.1rem;
display: block;
}
.external-link:hover {
color: #4b2996;
transform: scale(1.08);
}
.external-links-text {
display: flex;
justify-content: flex-end;
align-items: center;
margin: 0;
font-size: 1.05rem;
font-weight: 700;
gap: 0.5rem;
width: auto;
}
.external-link-text {
color: #4b2996;
background: none;
text-decoration: none;
font-weight: 700;
letter-spacing: 0.01em;
padding: 0.18em 0.7em;
border-radius: 18px;
transition: color 0.2s, background 0.2s, box-shadow 0.2s;
box-shadow: none;
display: inline-block;
}
.external-link-text:hover {
color: #fff;
background: linear-gradient(90deg, #764ba2 60%, #667eea 100%);
text-decoration: none;
box-shadow: 0 2px 8px 0 rgba(118, 75, 162, 0.13);
}
.divider {
display: inline-block;
color: #bba6d6;
font-size: 1.1em;
font-weight: 400;
margin: 0 0.0em;
user-select: none;
vertical-align: middle;
line-height: 0.5;
letter-spacing: 0;
}
/* --- Search Bar --- */
.search-container {
position: relative;
width: 250px;
flex-shrink: 0;
}
.search-input {
width: 100%;
padding: 10px 16px 10px 38px;
border: 1.5px solid #e2e8f0;
border-radius: 8px;
font-size: 0.95rem;
font-family: 'Inter', sans-serif;
color: #334155;
transition: border-color 0.2s, box-shadow 0.2s;
background: #f8fafc;
}
.search-input:focus {
outline: none;
border-color: #6366f1;
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
background: white;
}
.search-icon {
position: absolute;
left: 14px;
top: 50%;
transform: translateY(-50%);
color: #9ba1a6;
font-size: 0.9rem;
}
/* --- Rank Medals --- */
.rank-medal {
font-size: 1.1rem;
margin-right: 6px;
vertical-align: middle;
}
/* Ensure data cells don't overflow */
.score-cell {
font-weight: 600;
color: #334155;
transition: background-color 0.3s;
}