suicideproject / web /static /style.css
Antigravity Deploy Agent
Deploy Suicide Risk Detection web application to Hugging Face Spaces
0be18fb
Raw
History Blame Contribute Delete
16.7 kB
/* CSS Reset and Core Theme */
:root {
--bg-primary: #0f172a; /* Slate-900 */
--bg-secondary: #1e293b; /* Slate-800 */
--bg-tertiary: #334155; /* Slate-700 */
--text-primary: #f8fafc; /* Slate-50 */
--text-secondary: #94a3b8;/* Slate-400 */
--text-muted: #64748b; /* Slate-500 */
/* Risk Levels (Premium HSL colors) */
--color-low: #10b981; /* Emerald-500 */
--color-low-bg: rgba(16, 185, 129, 0.1);
--color-medium: #f59e0b; /* Amber-500 */
--color-medium-bg: rgba(245, 158, 11, 0.1);
--color-high: #ef4444; /* Red-500 */
--color-high-bg: rgba(239, 68, 68, 0.15);
--accent-blue: #3b82f6; /* Blue-500 */
--accent-blue-bg: rgba(59, 130, 246, 0.2);
--accent-teal: #14b8a6; /* Teal-500 */
--border-color: rgba(255, 255, 255, 0.08);
--border-hover: rgba(255, 255, 255, 0.16);
--font-heading: 'Outfit', 'Inter', sans-serif;
--font-body: 'Inter', sans-serif;
--radius-lg: 16px;
--radius-md: 10px;
--radius-sm: 6px;
--shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
--transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
background-color: var(--bg-primary);
color: var(--text-primary);
font-family: var(--font-body);
font-size: 14px;
line-height: 1.5;
height: 100vh;
overflow: hidden;
}
/* Layout Container */
.app-container {
display: flex;
flex-direction: column;
height: 100vh;
}
/* Header */
.app-header {
background: rgba(30, 41, 59, 0.7);
backdrop-filter: blur(16px);
border-bottom: 1px solid var(--border-color);
padding: 12px 24px;
display: flex;
justify-content: space-between;
align-items: center;
height: 60px;
z-index: 10;
}
.header-logo {
display: flex;
align-items: center;
gap: 12px;
}
.header-logo i {
font-size: 24px;
color: var(--color-high);
}
.header-logo h1 {
font-family: var(--font-heading);
font-size: 22px;
font-weight: 700;
letter-spacing: -0.5px;
}
.logo-accent {
color: var(--accent-blue);
}
.header-status {
display: flex;
gap: 12px;
}
.badge {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
border-radius: 20px;
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
background: var(--bg-tertiary);
border: 1px solid var(--border-color);
}
.badge-model {
border-color: rgba(59, 130, 246, 0.4);
color: var(--accent-blue);
}
.badge-status.online i {
color: var(--color-low);
animation: status-blink 2s infinite;
}
/* Main Grid Layout */
.app-content {
display: grid;
grid-template-columns: 280px 1fr 340px;
height: calc(100vh - 60px);
overflow: hidden;
}
/* Panels */
.panel {
background: var(--bg-primary);
border-right: 1px solid var(--border-color);
display: flex;
flex-direction: column;
overflow: hidden;
}
.panel-left {
border-right: 1px solid var(--border-color);
}
.panel-center {
background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
border-right: 1px solid var(--border-color);
}
.panel-right {
border-right: none;
background: #0f172a;
}
.panel-header {
padding: 20px;
border-bottom: 1px solid var(--border-color);
}
.panel-header h2 {
font-family: var(--font-heading);
font-size: 16px;
font-weight: 600;
display: flex;
align-items: center;
gap: 10px;
color: var(--text-primary);
}
.panel-subtitle {
font-size: 12px;
color: var(--text-secondary);
margin-top: 4px;
}
/* Scrollbar styles */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--bg-tertiary);
border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--text-muted);
}
/* Form Styles */
.profile-form {
padding: 20px;
overflow-y: auto;
flex: 1;
display: flex;
flex-direction: column;
gap: 20px;
}
.form-section h3 {
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--text-muted);
margin-bottom: 12px;
}
.form-group {
margin-bottom: 16px;
display: flex;
flex-direction: column;
gap: 6px;
}
.form-group label {
font-size: 12px;
font-weight: 500;
color: var(--text-secondary);
display: flex;
align-items: center;
gap: 6px;
}
.form-group input[type="number"],
.form-group select,
.form-group textarea {
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
color: var(--text-primary);
padding: 8px 12px;
font-family: var(--font-body);
font-size: 13px;
outline: none;
transition: var(--transition);
}
.form-group input[type="number"]:focus,
.form-group select:focus,
.form-group textarea:focus {
border-color: var(--accent-blue);
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}
/* Collapsible Section */
.collapsible {
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
background: var(--bg-secondary);
padding: 10px 14px;
}
.collapse-trigger {
width: 100%;
background: none;
border: none;
color: var(--text-primary);
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
font-family: var(--font-heading);
font-weight: 500;
font-size: 13px;
text-align: left;
outline: none;
}
.arrow-icon {
font-size: 11px;
transition: transform 0.3s ease;
color: var(--text-muted);
}
.arrow-icon.rotated {
transform: rotate(180deg);
}
.collapsible-content {
margin-top: 14px;
transition: max-height 0.3s ease-out;
}
.hidden {
display: none !important;
}
/* Sliders */
.slider-group {
gap: 4px;
}
.slider-label-val {
display: flex;
justify-content: space-between;
font-size: 12px;
}
.slider-label-val span {
font-weight: 600;
color: var(--accent-blue);
}
.form-group input[type="range"] {
-webkit-appearance: none;
width: 100%;
height: 5px;
border-radius: 5px;
background: var(--bg-tertiary);
outline: none;
}
.form-group input[type="range"]::-webkit-slider-thumb {
-webkit-appearance: none;
appearance: none;
width: 14px;
height: 14px;
border-radius: 50%;
background: var(--accent-blue);
cursor: pointer;
transition: var(--transition);
}
.form-group input[type="range"]::-webkit-slider-thumb:hover {
transform: scale(1.2);
}
/* Chat Styles */
.chat-wrapper {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
padding: 20px;
}
.chat-messages {
flex: 1;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 16px;
padding-right: 8px;
}
.msg {
max-width: 80%;
animation: fade-slide-in 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.msg-user {
align-self: flex-end;
}
.msg-bot {
align-self: flex-start;
}
.msg-system {
align-self: center;
max-width: 90%;
}
.msg-content {
padding: 12px 16px;
border-radius: var(--radius-lg);
word-wrap: break-word;
}
.msg-user .msg-content {
background: linear-gradient(135deg, var(--accent-blue) 0%, #1e40af 100%);
color: white;
border-bottom-right-radius: 4px;
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}
.msg-bot .msg-content {
background: var(--bg-secondary);
color: var(--text-primary);
border-bottom-left-radius: 4px;
border: 1px solid var(--border-color);
}
.msg-system .msg-content {
background: rgba(30, 41, 59, 0.4);
color: var(--text-secondary);
font-size: 12px;
text-align: center;
border-radius: var(--radius-md);
border: 1px solid var(--border-color);
}
.msg-meta {
display: flex;
align-items: center;
gap: 8px;
margin-top: 6px;
font-size: 10px;
color: var(--text-muted);
}
.msg-user .msg-meta {
justify-content: flex-end;
}
.badge-risk {
font-weight: 700;
padding: 2px 6px;
border-radius: 10px;
text-transform: uppercase;
font-size: 9px;
}
.badge-risk.low {
background: var(--color-low-bg);
color: var(--color-low);
border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-risk.medium {
background: var(--color-medium-bg);
color: var(--color-medium);
border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-risk.high {
background: var(--color-high-bg);
color: var(--color-high);
border: 1px solid rgba(239, 68, 68, 0.4);
}
/* Chat Input Area */
.chat-input-area {
margin-top: 20px;
display: flex;
gap: 12px;
align-items: center;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 8px 12px;
box-shadow: var(--shadow-premium);
}
.chat-input-area textarea {
flex: 1;
background: none;
border: none;
outline: none;
resize: none;
color: var(--text-primary);
font-family: var(--font-body);
font-size: 14px;
max-height: 80px;
padding: 8px 4px;
}
.btn {
border: none;
outline: none;
cursor: pointer;
font-family: var(--font-body);
font-weight: 600;
border-radius: var(--radius-md);
transition: var(--transition);
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
}
.btn-primary {
background: var(--accent-blue);
color: white;
width: 44px;
height: 44px;
border-radius: 50%;
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover {
background: #2563eb;
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}
.btn-outline {
border: 1px solid var(--border-color);
background: transparent;
color: var(--text-primary);
padding: 8px 16px;
font-size: 13px;
}
.btn-outline:hover {
background: var(--bg-tertiary);
border-color: var(--border-hover);
}
/* Typing Indicator Animation */
.typing-indicator {
display: flex;
align-items: center;
gap: 4px;
padding: 12px;
background: var(--bg-secondary);
border-radius: var(--radius-md);
align-self: flex-start;
border: 1px solid var(--border-color);
margin-bottom: 12px;
width: fit-content;
}
.typing-indicator span {
width: 6px;
height: 6px;
background: var(--text-muted);
border-radius: 50%;
animation: typing-dots 1.4s infinite ease-in-out both;
}
.typing-indicator span:nth-child(2) {
animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
animation-delay: 0.4s;
}
.typing-indicator small {
margin-left: 8px;
color: var(--text-secondary);
font-size: 11px;
}
/* Analytics Dashboard */
.analytics-content {
padding: 20px;
display: flex;
flex-direction: column;
gap: 24px;
overflow-y: auto;
flex: 1;
}
/* Risk Card */
.risk-card {
border-radius: var(--radius-lg);
padding: 20px;
border: 1px solid var(--border-color);
background: var(--bg-secondary);
display: flex;
flex-direction: column;
gap: 16px;
transition: var(--transition);
}
.risk-card-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.risk-card-header h3 {
font-family: var(--font-heading);
font-size: 14px;
font-weight: 600;
color: var(--text-secondary);
}
.risk-level-badge {
font-family: var(--font-heading);
font-size: 13px;
font-weight: 800;
letter-spacing: 0.5px;
padding: 4px 12px;
border-radius: 12px;
}
/* Dynamic styles for cards */
.risk-card.level-low {
border-color: rgba(16, 185, 129, 0.4);
box-shadow: 0 10px 25px -10px rgba(16, 185, 129, 0.2);
}
.risk-card.level-low .risk-level-badge {
background: var(--color-low-bg);
color: var(--color-low);
}
.risk-card.level-medium {
border-color: rgba(245, 158, 11, 0.5);
box-shadow: 0 10px 25px -10px rgba(245, 158, 11, 0.2);
}
.risk-card.level-medium .risk-level-badge {
background: var(--color-medium-bg);
color: var(--color-medium);
}
.risk-card.level-high {
border-color: rgba(239, 68, 68, 0.6);
box-shadow: 0 10px 25px -10px rgba(239, 68, 68, 0.3);
}
.risk-card.level-high .risk-level-badge {
background: var(--color-high-bg);
color: var(--color-high);
}
/* Gauges */
.gauge-container {
display: flex;
flex-direction: column;
gap: 8px;
}
.gauge-bar {
width: 100%;
height: 8px;
background: var(--bg-tertiary);
border-radius: 4px;
overflow: hidden;
}
.gauge-fill {
height: 100%;
transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.level-low .gauge-fill { background: var(--color-low); }
.level-medium .gauge-fill { background: var(--color-medium); }
.level-high .gauge-fill { background: var(--color-high); }
.gauge-labels {
display: flex;
justify-content: space-between;
font-size: 12px;
}
.calc-formula {
font-size: 10px;
color: var(--text-muted);
}
/* Metric Breakdown Rows */
.metrics-breakdown {
display: flex;
flex-direction: column;
gap: 20px;
}
.metric-row {
display: flex;
flex-direction: column;
gap: 8px;
}
.metric-meta {
display: flex;
justify-content: space-between;
font-size: 12px;
color: var(--text-secondary);
}
.metric-level {
font-weight: 700;
font-size: 10px;
text-transform: uppercase;
}
.metric-level.badge-low { color: var(--color-low); }
.metric-level.badge-medium { color: var(--color-medium); }
.metric-level.badge-high { color: var(--color-high); }
.metric-bar {
width: 100%;
height: 6px;
background: var(--bg-secondary);
border: 1px solid var(--border-color);
border-radius: 3px;
overflow: hidden;
}
.metric-fill {
height: 100%;
transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.bg-blue { background: var(--accent-blue); }
.bg-teal { background: var(--accent-teal); }
.metric-value {
align-self: flex-end;
font-size: 11px;
color: var(--text-muted);
}
/* Crisis Support Box */
.crisis-support {
background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.02) 100%);
border: 1px dashed rgba(239, 68, 68, 0.4);
border-radius: var(--radius-lg);
padding: 20px;
display: flex;
gap: 16px;
animation: fade-in 0.5s ease;
}
.support-icon-wrap {
color: var(--color-high);
font-size: 24px;
animation: heartbeat 1.5s infinite;
}
.support-info {
display: flex;
flex-direction: column;
gap: 8px;
}
.support-info h4 {
font-family: var(--font-heading);
font-size: 14px;
color: var(--color-high);
font-weight: 600;
}
.support-info p {
font-size: 12px;
color: var(--text-secondary);
}
.helplines {
list-style: none;
font-size: 12px;
margin: 4px 0;
display: flex;
flex-direction: column;
gap: 4px;
}
.helplines li {
padding-left: 12px;
position: relative;
}
.helplines li::before {
content: "•";
color: var(--color-high);
position: absolute;
left: 0;
}
/* Animations */
@keyframes status-blink {
0%, 100% { opacity: 1; }
50% { opacity: 0.3; }
}
@keyframes typing-dots {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.4); }
}
@keyframes fade-slide-in {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes fade-in {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes heartbeat {
0%, 100% { transform: scale(1); }
14% { transform: scale(1.2); }
28% { transform: scale(1); }
42% { transform: scale(1.2); }
70% { transform: scale(1); }
}
.brain-pulse {
animation: pulse-glow 2s infinite ease-in-out;
}
@keyframes pulse-glow {
0%, 100% { text-shadow: 0 0 0 rgba(239, 68, 68, 0); }
50% { text-shadow: 0 0 10px var(--color-high); color: #f87171; }
}
/* Responsive Layout */
@media (max-width: 1024px) {
.app-content {
grid-template-columns: 240px 1fr;
}
.panel-right {
display: none; /* Hide analytics panel on small layouts or toggle */
}
}
@media (max-width: 768px) {
body {
overflow: auto;
}
.app-content {
grid-template-columns: 1fr;
height: auto;
}
.panel-left {
height: auto;
border-right: none;
border-bottom: 1px solid var(--border-color);
}
.chat-wrapper {
height: 500px;
}
}