AI-Cardio-ECG / static /style.css
abdullah2026's picture
Upload folder using huggingface_hub
fe387ed verified
Raw
History Blame Contribute Delete
5.81 kB
:root {
--bg: #0d1117;
--surface: #161b22;
--surface2: #21262d;
--border: #30363d;
--text: #e6edf3;
--text-muted: #8b949e;
--red: #e53e3e;
--red-soft: #fc8181;
--green: #48bb78;
--yellow: #ecc94b;
--blue: #63b3ed;
--purple: #b794f4;
--radius: 12px;
--font: 'Inter', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
background: var(--bg);
color: var(--text);
font-family: var(--font);
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* HEADER */
header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 32px;
border-bottom: 1px solid var(--border);
background: var(--surface);
position: sticky;
top: 0;
z-index: 10;
}
.logo {
display: flex;
align-items: center;
gap: 10px;
font-size: 18px;
font-weight: 700;
letter-spacing: -0.3px;
}
.header-tag {
font-size: 12px;
color: var(--text-muted);
background: var(--surface2);
border: 1px solid var(--border);
border-radius: 20px;
padding: 4px 12px;
}
/* MAIN */
main {
flex: 1;
max-width: 1100px;
margin: 0 auto;
width: 100%;
padding: 40px 24px;
}
.hero {
text-align: center;
margin-bottom: 40px;
}
.hero h1 {
font-size: 32px;
font-weight: 800;
letter-spacing: -0.5px;
margin-bottom: 12px;
background: linear-gradient(135deg, #fff 0%, #8b949e 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.hero p {
color: var(--text-muted);
font-size: 16px;
max-width: 560px;
margin: 0 auto;
line-height: 1.6;
}
/* UPLOAD */
.upload-card {
border: 2px dashed var(--border);
border-radius: var(--radius);
padding: 60px 40px;
text-align: center;
cursor: pointer;
transition: all 0.2s;
background: var(--surface);
}
.upload-card:hover, .upload-card.dragover {
border-color: var(--red);
background: rgba(229, 62, 62, 0.05);
}
.upload-icon {
color: var(--text-muted);
margin-bottom: 16px;
}
.upload-label {
font-size: 16px;
font-weight: 600;
margin-bottom: 8px;
}
.upload-sub {
color: var(--text-muted);
font-size: 14px;
margin-bottom: 8px;
}
.upload-hint {
color: var(--text-muted);
font-size: 12px;
}
.link-btn {
background: none;
border: none;
color: var(--red-soft);
cursor: pointer;
font-size: inherit;
font-family: inherit;
text-decoration: underline;
}
/* RESULTS */
.results-grid {
display: grid;
grid-template-columns: 1fr 1.4fr;
gap: 24px;
margin-bottom: 24px;
}
@media (max-width: 768px) {
.results-grid { grid-template-columns: 1fr; }
}
.card {
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 28px;
}
.card h2 {
font-size: 13px;
text-transform: uppercase;
letter-spacing: 1px;
color: var(--text-muted);
margin-bottom: 20px;
}
/* DIAGNOSIS */
.diagnosis-badge {
font-size: 22px;
font-weight: 700;
margin-bottom: 8px;
color: var(--text);
}
.confidence-main {
font-size: 14px;
color: var(--text-muted);
margin-bottom: 28px;
}
.class-bars {
display: flex;
flex-direction: column;
gap: 12px;
}
.class-row {
display: flex;
flex-direction: column;
gap: 4px;
}
.class-row-header {
display: flex;
justify-content: space-between;
font-size: 13px;
}
.class-name { color: var(--text-muted); }
.class-pct { font-weight: 600; }
.bar-track {
height: 6px;
background: var(--surface2);
border-radius: 3px;
overflow: hidden;
}
.bar-fill {
height: 100%;
border-radius: 3px;
transition: width 0.6s ease;
}
.bar-fill.top { background: var(--red); }
.bar-fill.other { background: var(--blue); }
.disclaimer {
display: flex;
align-items: flex-start;
gap: 8px;
margin-top: 28px;
padding: 12px;
background: var(--surface2);
border-radius: 8px;
font-size: 12px;
color: var(--text-muted);
line-height: 1.5;
}
.disclaimer svg { flex-shrink: 0; margin-top: 1px; }
/* IMAGE TABS */
.image-tabs {
display: flex;
gap: 4px;
margin-bottom: 16px;
background: var(--surface2);
border-radius: 8px;
padding: 4px;
}
.tab {
flex: 1;
background: none;
border: none;
color: var(--text-muted);
padding: 8px 12px;
border-radius: 6px;
cursor: pointer;
font-size: 13px;
font-family: inherit;
font-weight: 500;
transition: all 0.2s;
}
.tab.active {
background: var(--surface);
color: var(--text);
box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.image-panel img {
width: 100%;
border-radius: 8px;
display: block;
border: 1px solid var(--border);
}
.gradcam-hint {
font-size: 12px;
color: var(--text-muted);
margin-top: 10px;
text-align: center;
}
/* ACTIONS */
.actions {
display: flex;
justify-content: center;
}
.btn-secondary {
background: var(--surface);
border: 1px solid var(--border);
color: var(--text);
padding: 10px 24px;
border-radius: 8px;
cursor: pointer;
font-size: 14px;
font-family: inherit;
font-weight: 500;
transition: all 0.2s;
}
.btn-secondary:hover {
border-color: var(--red);
color: var(--red-soft);
}
/* LOADING */
.loading-overlay {
position: fixed;
inset: 0;
background: rgba(13, 17, 23, 0.85);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 16px;
z-index: 100;
backdrop-filter: blur(4px);
}
.spinner {
width: 44px;
height: 44px;
border: 3px solid var(--border);
border-top-color: var(--red);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay p {
color: var(--text-muted);
font-size: 14px;
}
/* FOOTER */
footer {
text-align: center;
padding: 20px;
color: var(--text-muted);
font-size: 12px;
border-top: 1px solid var(--border);
}