LaxmiVarshithaCH
Deploy NeuralKarma to HuggingFace Spaces
553a798
/*
* NeuralKarma β€” Light Matte Design System
* Clean, premium light theme with soft matte colors.
* No mock data β€” all values powered by real ML models.
*/
/* ═══ Design Tokens ═══ */
:root {
/* Matte Light Backgrounds */
--bg-base: #F5F3F0;
--bg-card: #FFFFFF;
--bg-hero: linear-gradient(135deg, #E8E4DF 0%, #F0EDE8 50%, #E5E1DC 100%);
--bg-input: #F0EDE8;
--bg-hover: #EBE8E3;
--bg-glass: rgba(255, 255, 255, 0.85);
/* Text */
--text-primary: #2D2B29;
--text-secondary: #5C5955;
--text-muted: #9B9790;
--text-accent: #6C5CE7;
/* Matte Accent Colors */
--accent-primary: #6C5CE7;
--accent-secondary: #A29BFE;
--accent-soft: rgba(108, 92, 231, 0.08);
--accent-gradient: linear-gradient(135deg, #6C5CE7 0%, #A29BFE 100%);
--btn-primary: linear-gradient(135deg, #6C5CE7 0%, #845EF7 100%);
--btn-hover: linear-gradient(135deg, #5A4BD1 0%, #7248E6 100%);
/* Borders */
--border-light: rgba(0, 0, 0, 0.06);
--border-medium: rgba(0, 0, 0, 0.10);
--border-accent: rgba(108, 92, 231, 0.20);
/* Shadows */
--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
--shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
--shadow-accent: 0 4px 14px rgba(108, 92, 231, 0.15);
/* Score Colors */
--score-great: #00B894;
--score-good: #0984E3;
--score-neutral: #636E72;
--score-warning: #E17055;
--score-danger: #D63031;
/* Spacing */
--space-xs: 4px;
--space-sm: 8px;
--space-md: 16px;
--space-lg: 24px;
--space-xl: 32px;
--space-2xl: 48px;
/* Radius */
--radius-sm: 8px;
--radius-md: 12px;
--radius-lg: 16px;
--radius-xl: 20px;
--radius-full: 100px;
/* Easing */
--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
--ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}
/* ═══ Reset & Base ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
font-size: 16px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body {
background: var(--bg-base);
color: var(--text-primary);
min-height: 100vh;
line-height: 1.6;
}
a { color: var(--accent-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
/* ═══ Container ═══ */
.container {
max-width: 1100px;
margin: 0 auto;
padding: 0 var(--space-lg);
}
/* ═══ Hero ═══ */
.hero {
background: var(--bg-hero);
padding: var(--space-2xl) var(--space-lg);
text-align: center;
border-bottom: 1px solid var(--border-light);
position: relative;
overflow: hidden;
}
.hero::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: radial-gradient(ellipse at 30% 50%, rgba(108, 92, 231, 0.04) 0%, transparent 60%),
radial-gradient(ellipse at 70% 50%, rgba(162, 155, 254, 0.03) 0%, transparent 60%);
animation: subtleFloat 20s ease-in-out infinite;
pointer-events: none;
}
@keyframes subtleFloat {
0%, 100% { transform: translateY(0) rotate(0deg); }
50% { transform: translateY(-10px) rotate(1deg); }
}
.hero-badge {
display: inline-flex;
align-items: center;
gap: 8px;
background: var(--bg-card);
border: 1px solid var(--border-medium);
padding: 6px 18px;
border-radius: var(--radius-full);
font-size: 0.8rem;
color: var(--text-secondary);
margin-bottom: var(--space-lg);
box-shadow: var(--shadow-sm);
position: relative;
}
.hero-badge .pulse {
width: 8px;
height: 8px;
background: var(--score-great);
border-radius: 50%;
animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.6; transform: scale(0.85); }
}
.hero h1 {
font-size: clamp(2.5rem, 5vw, 4rem);
font-weight: 800;
color: var(--accent-primary);
letter-spacing: -1px;
margin-bottom: var(--space-md);
position: relative;
}
.hero .subtitle {
font-size: 1.05rem;
color: var(--text-secondary);
max-width: 650px;
margin: 0 auto;
line-height: 1.7;
position: relative;
}
/* ═══ Cards ═══ */
.card {
background: var(--bg-card);
border: 1px solid var(--border-light);
border-radius: var(--radius-lg);
padding: var(--space-lg);
box-shadow: var(--shadow-sm);
transition: box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.card:hover {
box-shadow: var(--shadow-md);
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: var(--space-md);
padding-bottom: var(--space-md);
border-bottom: 1px solid var(--border-light);
}
.card-title {
display: flex;
align-items: center;
gap: 10px;
font-size: 1.1rem;
font-weight: 700;
color: var(--text-primary);
}
.card-title .icon {
font-size: 1.25rem;
}
/* ═══ Scoring Panel ═══ */
.scoring-panel {
background: var(--bg-card);
border: 1px solid var(--border-medium);
border-radius: var(--radius-xl);
padding: var(--space-xl);
margin: var(--space-xl) auto;
max-width: 1100px;
box-shadow: var(--shadow-md);
}
.input-group {
display: flex;
gap: var(--space-md);
margin-bottom: var(--space-md);
}
.text-input {
width: 100%;
padding: 14px 18px;
background: var(--bg-input);
color: var(--text-primary);
border: 1px solid var(--border-medium);
border-radius: var(--radius-md);
font-size: 0.95rem;
font-family: inherit;
resize: vertical;
transition: all 0.2s var(--ease-out);
outline: none;
}
.text-input::placeholder {
color: var(--text-muted);
}
.text-input:focus {
border-color: var(--accent-primary);
box-shadow: 0 0 0 3px var(--accent-soft);
}
.username-input {
max-width: 200px;
resize: none;
}
textarea.text-input {
min-height: 80px;
max-height: 200px;
}
/* ═══ Buttons ═══ */
.btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 12px 24px;
font-size: 0.95rem;
font-weight: 600;
font-family: inherit;
border: none;
border-radius: var(--radius-md);
cursor: pointer;
transition: all 0.2s var(--ease-out);
white-space: nowrap;
}
.btn-primary {
background: var(--btn-primary);
color: white;
box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
background: var(--btn-hover);
transform: translateY(-1px);
box-shadow: 0 6px 20px rgba(108, 92, 231, 0.25);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-secondary {
background: var(--bg-input);
color: var(--text-primary);
border: 1px solid var(--border-medium);
}
.btn-secondary:hover {
background: var(--bg-hover);
}
/* ═══ Live Indicator ═══ */
.live-indicator {
display: flex;
align-items: center;
gap: 6px;
font-size: 0.85rem;
color: var(--text-muted);
}
.live-dot {
width: 8px;
height: 8px;
background: #ccc;
border-radius: 50%;
transition: all 0.3s;
}
.live-dot.connected {
background: var(--score-great);
box-shadow: 0 0 8px rgba(0, 184, 148, 0.4);
animation: pulse 2s ease-in-out infinite;
}
/* ═══ Karma Display ═══ */
.result-container {
display: none;
margin-bottom: var(--space-xl);
padding: 0 var(--space-lg);
}
.result-container.active {
display: block;
animation: fadeInUp 0.5s var(--ease-out);
}
@keyframes fadeInUp {
from { opacity: 0; transform: translateY(16px); }
to { opacity: 1; transform: translateY(0); }
}
.karma-display {
display: flex;
align-items: center;
gap: var(--space-xl);
background: var(--bg-card);
border: 1px solid var(--border-light);
border-radius: var(--radius-xl);
padding: var(--space-xl);
margin-bottom: var(--space-lg);
box-shadow: var(--shadow-md);
}
.karma-score-circle {
width: 110px;
height: 110px;
border-radius: 50%;
background: var(--bg-input);
border: 3px solid var(--accent-primary);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex-shrink: 0;
}
.karma-score-value {
font-size: 2rem;
font-weight: 800;
color: var(--accent-primary);
font-family: 'JetBrains Mono', monospace;
line-height: 1;
}
.karma-score-label {
font-size: 0.7rem;
text-transform: uppercase;
letter-spacing: 1.5px;
color: var(--text-muted);
margin-top: 2px;
}
.karma-details {
flex: 1;
}
.karma-tier-badge {
display: inline-flex;
align-items: center;
padding: 6px 16px;
border-radius: var(--radius-full);
font-size: 0.9rem;
font-weight: 700;
margin-bottom: var(--space-sm);
letter-spacing: 0.5px;
}
.karma-tier-label {
color: var(--text-secondary);
font-size: 0.9rem;
margin-bottom: var(--space-sm);
}
.confidence-bar {
width: 100%;
max-width: 300px;
height: 6px;
background: var(--bg-input);
border-radius: var(--radius-full);
overflow: hidden;
border: 1px solid var(--border-light);
}
.confidence-fill {
height: 100%;
background: var(--accent-gradient);
border-radius: var(--radius-full);
transition: width 0.8s var(--ease-out);
}
/* ═══ Radar Container ═══ */
.radar-container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: var(--space-lg);
align-items: center;
}
.radar-chart-wrapper {
max-width: 320px;
margin: 0 auto;
padding: var(--space-md);
}
/* ═══ Axis Items ═══ */
.axis-list {
display: flex;
flex-direction: column;
gap: var(--space-sm);
}
.axis-item {
display: flex;
align-items: center;
gap: var(--space-md);
padding: 12px 16px;
background: var(--bg-input);
border-radius: var(--radius-sm);
border: 1px solid var(--border-light);
transition: background 0.2s;
}
.axis-item:hover {
background: var(--bg-hover);
}
.axis-name {
width: 120px;
font-size: 0.85rem;
font-weight: 600;
color: var(--text-primary);
text-transform: capitalize;
flex-shrink: 0;
}
.axis-bar {
flex: 1;
height: 8px;
background: var(--bg-base);
border-radius: var(--radius-full);
overflow: hidden;
border: 1px solid var(--border-light);
}
.axis-bar-fill {
height: 100%;
border-radius: var(--radius-full);
transition: width 0.8s var(--ease-out);
}
.axis-score {
font-family: 'JetBrains Mono', monospace;
font-weight: 700;
font-size: 0.9rem;
width: 45px;
text-align: right;
color: var(--text-primary);
}
.score-good { color: var(--score-great); }
.score-neutral { color: var(--score-neutral); }
.score-warning { color: var(--score-warning); }
.score-danger { color: var(--score-danger); }
/* ═══ Ripple Effect ═══ */
.ripple-viz {
padding: var(--space-lg);
text-align: center;
}
.ripple-rings {
position: relative;
width: 200px;
height: 200px;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
}
.ripple-center {
width: 54px;
height: 54px;
border-radius: 50%;
background: var(--accent-gradient);
color: white;
font-weight: 700;
font-size: 0.75rem;
display: flex;
align-items: center;
justify-content: center;
z-index: 3;
position: relative;
box-shadow: var(--shadow-accent);
}
.ripple-ring {
position: absolute;
border-radius: 50%;
border: 1.5px solid var(--accent-secondary);
opacity: 0.3;
animation: rippleWave 3s ease-out infinite;
}
.ripple-ring:nth-child(2) { width: 100px; height: 100px; animation-delay: 0s; }
.ripple-ring:nth-child(3) { width: 150px; height: 150px; animation-delay: 1s; }
.ripple-ring:nth-child(4) { width: 200px; height: 200px; animation-delay: 2s; }
@keyframes rippleWave {
0% { opacity: 0.4; transform: scale(0.9); }
100% { opacity: 0; transform: scale(1.1); }
}
.ripple-stats {
display: flex;
justify-content: center;
gap: var(--space-xl);
flex-wrap: wrap;
}
.ripple-stat {
text-align: center;
padding: var(--space-md);
background: var(--bg-input);
border-radius: var(--radius-md);
border: 1px solid var(--border-light);
min-width: 120px;
}
.ripple-stat-value {
font-family: 'JetBrains Mono', monospace;
font-size: 1.5rem;
font-weight: 700;
color: var(--accent-primary);
}
.ripple-stat-label {
font-size: 0.75rem;
color: var(--text-muted);
margin-top: 4px;
}
/* ═══ Stats Grid ═══ */
.section {
padding: 0 var(--space-lg);
margin-bottom: var(--space-xl);
}
.section-header {
margin-bottom: var(--space-lg);
}
.section-title {
display: flex;
align-items: center;
gap: 10px;
font-size: 1.3rem;
font-weight: 700;
color: var(--text-primary);
}
.grid {
display: grid;
gap: var(--space-md);
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) {
.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
.radar-container { grid-template-columns: 1fr; }
.karma-display { flex-direction: column; text-align: center; }
.input-group { flex-direction: column; }
.username-input { max-width: 100%; }
}
.stat-value {
font-family: 'JetBrains Mono', monospace;
font-size: 1.8rem;
font-weight: 700;
color: var(--accent-primary);
margin-bottom: 4px;
}
.stat-label {
font-size: 0.8rem;
color: var(--text-muted);
font-weight: 500;
}
/* ═══ Tier Distribution Bar ═══ */
.tier-bar {
display: flex;
height: 12px;
border-radius: var(--radius-full);
overflow: hidden;
background: var(--bg-input);
border: 1px solid var(--border-light);
}
.tier-segment {
display: flex;
align-items: center;
justify-content: center;
font-size: 0.65rem;
font-weight: 700;
color: rgba(0, 0, 0, 0.6);
transition: flex 0.5s var(--ease-out);
}
.tier-legend {
display: flex;
gap: var(--space-md);
flex-wrap: wrap;
font-size: 0.75rem;
color: var(--text-muted);
}
.tier-legend-item {
display: flex;
align-items: center;
gap: 6px;
}
.tier-legend-dot {
width: 10px;
height: 10px;
border-radius: 50%;
}
/* ═══ Tabs ═══ */
.tabs {
display: flex;
gap: 0;
margin-bottom: var(--space-md);
background: var(--bg-card);
border-radius: var(--radius-lg);
padding: 4px;
border: 1px solid var(--border-light);
box-shadow: var(--shadow-sm);
}
.tab {
flex: 1;
padding: 10px 16px;
font-size: 0.9rem;
font-weight: 600;
font-family: inherit;
color: var(--text-muted);
background: transparent;
border: none;
border-radius: var(--radius-md);
cursor: pointer;
transition: all 0.2s var(--ease-out);
text-align: center;
}
.tab:hover {
color: var(--text-primary);
background: var(--bg-input);
}
.tab.active {
color: white;
background: var(--accent-gradient);
box-shadow: var(--shadow-accent);
}
.tab-content {
display: none;
}
.tab-content.active {
display: block;
animation: fadeInUp 0.3s var(--ease-out);
}
/* ═══ Leaderboard ═══ */
.leaderboard-row {
display: flex;
align-items: center;
gap: var(--space-md);
padding: 14px var(--space-md);
border-radius: var(--radius-md);
margin-bottom: var(--space-sm);
background: var(--bg-input);
border: 1px solid var(--border-light);
transition: all 0.2s var(--ease-out);
}
.leaderboard-row:hover {
background: var(--bg-hover);
transform: translateX(4px);
}
.leaderboard-rank {
width: 36px;
height: 36px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
font-size: 0.85rem;
flex-shrink: 0;
background: var(--bg-base);
color: var(--text-secondary);
border: 1px solid var(--border-light);
}
.leaderboard-rank.gold {
background: linear-gradient(135deg, #FFD700 0%, #FFC107 100%);
color: #5D4E00;
border: none;
box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}
.leaderboard-rank.silver {
background: linear-gradient(135deg, #C0C0C0 0%, #B0BEC5 100%);
color: #37474F;
border: none;
}
.leaderboard-rank.bronze {
background: linear-gradient(135deg, #CD7F32 0%, #D4A574 100%);
color: #3E2723;
border: none;
}
.leaderboard-name {
flex: 1;
font-weight: 600;
color: var(--text-primary);
}
.leaderboard-actions {
font-size: 0.8rem;
color: var(--text-muted);
}
.leaderboard-score {
font-family: 'JetBrains Mono', monospace;
font-size: 1.2rem;
font-weight: 700;
}
/* ═══ Timeline ═══ */
.timeline-item {
padding: 14px var(--space-md);
margin-bottom: var(--space-sm);
background: var(--bg-input);
border-radius: var(--radius-md);
border-left: 3px solid var(--accent-secondary);
animation: fadeInUp 0.3s var(--ease-out) both;
}
.timeline-text {
font-size: 0.9rem;
color: var(--text-primary);
line-height: 1.5;
}
.timeline-score {
font-family: 'JetBrains Mono', monospace;
font-size: 0.85rem;
font-weight: 600;
}
.timeline-time {
font-size: 0.75rem;
color: var(--text-muted);
}
/* ═══ Social Norms ═══ */
.norm-item {
padding: 14px var(--space-md);
margin-bottom: var(--space-sm);
background: var(--bg-input);
border-radius: var(--radius-md);
border-left: 3px solid var(--accent-secondary);
transition: background 0.2s;
}
.norm-item:hover {
background: var(--bg-hover);
}
.norm-text {
font-style: italic;
color: var(--text-primary);
font-size: 0.9rem;
line-height: 1.5;
margin-bottom: 6px;
}
.norm-label {
display: inline-block;
font-size: 0.7rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
padding: 3px 10px;
border-radius: var(--radius-full);
}
.norm-label.prosocial {
background: rgba(0, 184, 148, 0.1);
color: #00B894;
border: 1px solid rgba(0, 184, 148, 0.2);
}
.norm-label.neutral {
background: rgba(108, 92, 231, 0.08);
color: #6C5CE7;
border: 1px solid rgba(108, 92, 231, 0.2);
}
.norm-label.cautionary {
background: rgba(225, 112, 85, 0.1);
color: #E17055;
border: 1px solid rgba(225, 112, 85, 0.2);
}
/* ═══ Pagination ═══ */
.pagination {
display: flex;
justify-content: center;
align-items: center;
gap: var(--space-md);
margin-top: var(--space-md);
padding-top: var(--space-md);
border-top: 1px solid var(--border-light);
}
.pagination button {
padding: 8px 16px;
font-size: 0.85rem;
font-weight: 600;
font-family: inherit;
background: var(--bg-input);
color: var(--text-primary);
border: 1px solid var(--border-medium);
border-radius: var(--radius-sm);
cursor: pointer;
transition: all 0.2s;
}
.pagination button:hover:not(:disabled) {
background: var(--accent-primary);
color: white;
border-color: var(--accent-primary);
}
.pagination button:disabled {
opacity: 0.4;
cursor: not-allowed;
}
.page-info {
font-size: 0.85rem;
color: var(--text-muted);
}
/* ═══ Dataset Cards ═══ */
.dataset-card {
padding: var(--space-lg);
background: var(--bg-input);
border-radius: var(--radius-md);
border: 1px solid var(--border-light);
}
.dataset-name {
font-size: 1.1rem;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 4px;
}
.dataset-source {
font-size: 0.8rem;
color: var(--accent-primary);
font-weight: 500;
margin-bottom: var(--space-sm);
}
.dataset-desc {
font-size: 0.85rem;
color: var(--text-secondary);
line-height: 1.5;
}
.dataset-rows {
font-family: 'JetBrains Mono', monospace;
font-weight: 700;
color: var(--accent-primary);
}
/* ═══ Empty State ═══ */
.empty-state {
text-align: center;
padding: var(--space-2xl);
color: var(--text-muted);
}
.empty-state .icon {
font-size: 2.5rem;
margin-bottom: var(--space-md);
opacity: 0.5;
}
/* ═══ Toast ═══ */
.toast-container {
position: fixed;
top: var(--space-lg);
right: var(--space-lg);
z-index: 1000;
display: flex;
flex-direction: column;
gap: var(--space-sm);
}
.toast {
padding: 12px 20px;
border-radius: var(--radius-md);
font-size: 0.9rem;
font-weight: 500;
color: var(--text-primary);
background: var(--bg-card);
border: 1px solid var(--border-medium);
box-shadow: var(--shadow-lg);
animation: toastIn 0.3s var(--ease-spring);
max-width: 380px;
}
.toast.success {
border-left: 3px solid var(--score-great);
}
.toast.error {
border-left: 3px solid var(--score-danger);
}
.toast.info {
border-left: 3px solid var(--accent-primary);
}
@keyframes toastIn {
from { opacity: 0; transform: translateX(30px) scale(0.95); }
to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
from { opacity: 1; transform: translateX(0); }
to { opacity: 0; transform: translateX(30px); }
}
/* ═══ Spinner ═══ */
.spinner {
display: inline-block;
width: 16px;
height: 16px;
border: 2px solid rgba(255, 255, 255, 0.3);
border-top-color: white;
border-radius: 50%;
animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
/* ═══ Footer ═══ */
.footer {
padding: var(--space-xl) var(--space-lg);
border-top: 1px solid var(--border-light);
text-align: center;
font-size: 0.85rem;
color: var(--text-muted);
background: var(--bg-card);
margin-top: var(--space-2xl);
}
.footer a {
color: var(--accent-primary);
font-weight: 500;
}
/* ═══ How It Works Grid ═══ */
.grid-3 h3 {
font-size: 0.95rem;
}
.grid-3 p {
color: var(--text-secondary) !important;
}