FocusFlow / frontend /style.css
immortalindeed's picture
Fix: Ensure video overlay hides correctly when session starts
aa91cad
:root {
/* Humanistic / Creative Light Palette */
--bg-base: #faf8f5; /* Warm off-white */
--bg-surface: #ffffff;
/* Soft, organic accents */
--accent-primary: #e06d4f; /* Terracotta / Burnt Orange */
--accent-secondary: #4a7c59; /* Sage Green */
--accent-tertiary: #dfb256; /* Mustard Yellow */
/* Text */
--text-primary: #2d2a26; /* Soft black/dark brown */
--text-secondary: #6e6b66;
--text-muted: #a39e98;
/* Statuses using organic shades */
--status-success: #4a7c59;
--status-warning: #e59f4a;
--status-danger: #cb5a5e;
--border-subtle: #eae3d8;
/* Soft, diffused shadows */
--shadow-soft: 0 4px 20px rgba(45, 42, 38, 0.04);
--shadow-float: 0 12px 30px rgba(45, 42, 38, 0.08);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
/* Mixing serif and sans-serif for a more human/creative editorial feel */
font-family: 'Inter', -apple-system, sans-serif;
-webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand-text {
font-family: 'Playfair Display', serif; /* Or similar elegant serif */
}
body {
background-color: var(--bg-base);
color: var(--text-primary);
min-height: 100vh;
background-image: radial-gradient(var(--border-subtle) 1px, transparent 1px);
background-size: 24px 24px;
}
/* Custom Scrollbar for elegance */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d0c9bd; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b0a89d; }
.ambient-glow { display: none; }
.app-container {
display: flex;
min-height: 100vh;
max-width: 1440px; /* Constrain width for a more focused layout */
margin: 0 auto;
background: transparent;
}
/* Asymmetric Sidebar */
.sidebar {
width: 240px;
flex-shrink: 0; /* Prevent sidebar from shrinking when window is small */
background: transparent;
padding: 24px 20px;
display: flex;
flex-direction: column;
border-right: 2px dashed var(--border-subtle);
height: 100vh;
position: sticky;
top: 0;
}
.logo {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 32px;
}
.logo-icon {
display: flex;
align-items: center;
justify-content: center;
color: var(--accent-primary);
}
.logo h1 {
font-size: 26px;
font-weight: 700;
color: var(--text-primary);
letter-spacing: -0.5px;
margin: 0px;
line-height: 1;
}
.nav-menu {
display: flex;
flex-direction: column;
gap: 8px;
}
.nav-btn {
background: transparent;
border: none;
color: var(--text-secondary);
font-size: 15px;
font-weight: 500;
text-align: left;
padding: 10px;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 12px;
position: relative;
}
.nav-btn::before {
content: '';
position: absolute;
left: -10px;
top: 50%;
transform: translateY(-50%);
width: 4px;
height: 0;
background-color: var(--accent-primary);
transition: height 0.3s ease;
border-radius: 4px;
}
.nav-btn .icon {
font-size: 20px;
opacity: 0.7;
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.nav-btn:hover {
color: var(--text-primary);
transform: translateX(5px);
}
.nav-btn:hover .icon {
transform: scale(1.1) rotate(5deg);
}
.nav-btn.active {
color: var(--text-primary);
font-weight: 600;
}
.nav-btn.active::before {
height: 60%;
}
.tech-stack {
margin-top: auto;
padding: 16px;
background: var(--bg-surface);
border: 1px solid var(--border-subtle);
border-radius: 1px; /* Sharp corners for a more brutalist/editorial feel */
box-shadow: 4px 4px 0px var(--border-subtle); /* Hand-drawn shadow effect */
}
.tech-stack h3 {
font-size: 11px;
color: var(--accent-secondary);
text-transform: uppercase;
letter-spacing: 2px;
margin-bottom: 16px;
font-weight: 700;
font-family: 'Inter', sans-serif;
}
.tech-stack ul {
list-style: none;
display: flex;
flex-direction: column;
gap: 14px;
}
.tech-stack li {
font-size: 13px;
color: var(--text-secondary);
display: flex;
align-items: center;
gap: 12px;
font-family: 'Inter', sans-serif;
}
/* Main Content Area */
.main-content {
flex: 1;
padding: 32px 48px;
overflow-y: auto;
}
.top-header {
display: flex;
justify-content: space-between;
align-items: flex-end;
margin-bottom: 32px;
border-bottom: 2px solid var(--border-subtle);
padding-bottom: 16px;
}
.header-titles h2 {
font-size: 32px;
font-weight: 700;
color: var(--text-primary);
letter-spacing: -1px;
margin-bottom: 4px;
}
.header-titles p {
color: var(--text-muted);
font-size: 15px;
font-family: 'Inter', sans-serif;
}
.session-controls {
display: flex;
align-items: center;
gap: 20px;
}
.status-indicator {
display: flex;
align-items: center;
gap: 10px;
font-family: 'JetBrains Mono', monospace;
font-size: 14px;
color: var(--text-secondary);
padding: 8px 16px;
background: white;
border: 1px solid var(--border-subtle);
border-radius: 4px;
box-shadow: 2px 2px 0px var(--border-subtle);
}
.dot {
width: 10px; height: 10px; border-radius: 50%;
background-color: var(--border-subtle);
}
.dot.red {
background-color: var(--status-danger);
animation: pulse-organic 2s infinite ease-in-out;
}
@keyframes pulse-organic {
0% { transform: scale(0.95); opacity: 0.8; }
50% { transform: scale(1.05); opacity: 1; }
100% { transform: scale(0.95); opacity: 0.8; }
}
/* Tactile Buttons */
.btn {
padding: 12px 24px;
border-radius: 4px;
font-size: 14px;
font-weight: 600;
font-family: 'Inter', sans-serif;
cursor: pointer;
border: 2px solid transparent;
transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
display: flex;
align-items: center;
gap: 8px;
}
.btn-primary {
background: var(--accent-primary);
color: white;
border-color: var(--accent-primary);
box-shadow: 3px 3px 0px rgba(224, 109, 79, 0.3);
}
.btn-primary:hover {
transform: translate(-2px, -2px);
box-shadow: 5px 5px 0px rgba(224, 109, 79, 0.3);
}
.btn-primary:active {
transform: translate(1px, 1px);
box-shadow: 2px 2px 0px rgba(224, 109, 79, 0.3);
}
.btn-danger {
background: white;
border-color: var(--status-danger);
color: var(--status-danger);
box-shadow: 3px 3px 0px rgba(203, 90, 94, 0.1);
}
.btn-danger:hover {
background: #fffafa;
transform: translate(-2px, -2px);
box-shadow: 5px 5px 0px rgba(203, 90, 94, 0.15);
}
.hidden { display: none !important; }
/* Asymmetric Grid Layout */
.grid-layout {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
}
/* Organic Panels */
.glass-panel {
background: var(--bg-surface);
border: 1px solid var(--border-subtle);
border-radius: 2px;
box-shadow: var(--shadow-soft);
padding: 24px;
}
/* Video Frame Setup */
.video-section {
display: flex;
flex-direction: column;
gap: 24px;
}
.video-container {
position: relative;
width: 100%;
aspect-ratio: 4/3; /* Classic photography ratio */
overflow: hidden;
background: #efebe4;
border-radius: 4px;
border: 1px solid var(--border-subtle);
box-shadow: inset 0 0 20px rgba(0,0,0,0.03);
}
#webcam, #overlay {
position: absolute;
top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
mix-blend-mode: multiply; /* Gives a slightly vintage/integrated feel to the video */
}
#overlay { z-index: 10; pointer-events: none; mix-blend-mode: normal; }
.video-overlay {
position: absolute;
inset: 0;
z-index: 20;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
color: var(--text-secondary);
font-family: 'Playfair Display', serif;
font-style: italic;
background: rgba(250, 247, 242, 0.7); /* Subtle backdrop to make text readable */
}
.video-overlay .icon {
font-size: 32px;
margin-bottom: 12px;
opacity: 0.4;
font-style: normal;
}
/* Alert Banner */
.alert-banner {
background: #fdf5f5;
border-left: 4px solid var(--status-danger);
color: var(--status-danger);
padding: 16px 24px;
font-family: 'Inter', sans-serif;
font-weight: 600;
font-size: 14px;
letter-spacing: 1px;
box-shadow: var(--shadow-soft);
}
/* Metrics Section */
.metrics-section {
display: flex;
flex-direction: column;
gap: 24px;
}
/* Hero Score Card */
.hero-score-card {
text-align: center;
padding: 32px 24px;
background: white;
position: relative;
}
.hero-score-card::after {
/* Decorative element */
content: '';
position: absolute;
top: 10px; right: 10px;
width: 30px; height: 30px;
border-top: 2px solid var(--border-subtle);
border-right: 2px solid var(--border-subtle);
}
.hero-score-card::before {
content: '';
position: absolute;
bottom: 10px; left: 10px;
width: 30px; height: 30px;
border-bottom: 2px solid var(--border-subtle);
border-left: 2px solid var(--border-subtle);
}
.hero-score-card .label {
font-family: 'Inter', sans-serif;
text-transform: uppercase;
font-size: 11px;
font-weight: 600;
letter-spacing: 3px;
color: var(--text-muted);
margin-bottom: 16px;
}
.score-value {
font-family: 'Playfair Display', serif;
font-size: 72px;
font-weight: 400; /* Lighter weight for elegance */
line-height: 1;
color: var(--text-primary);
margin-bottom: 16px;
position: relative;
display: inline-block;
}
.score-value.warning { color: var(--status-warning); }
.score-value.danger { color: var(--status-danger); }
/* Editorial style progress bar */
.progress-bar {
width: 60%; /* Not full width */
margin: 0 auto 24px auto;
height: 4px;
background: var(--border-subtle);
position: relative;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: var(--text-primary);
transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1); /* Smooth elegant slide */
}
.status-text {
font-family: 'Inter', sans-serif;
font-size: 14px;
font-weight: 600;
color: var(--status-success);
letter-spacing: 2px;
text-transform: uppercase;
}
.status-text.warning { color: var(--status-warning); }
.status-text.danger { color: var(--status-danger); }
/* Dashboard Grid */
.dashboard-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20px;
margin-top: 32px;
}
.stats-grid {
display: grid;
grid-template-columns: repeat(2, 1fr); /* 2x2 instead of 4x1 for better spacing */
gap: 16px;
}
.stat-card {
padding: 16px;
display: flex;
flex-direction: column;
align-items: flex-start; /* Left aligned for editorial feel */
background: white;
border: 1px solid var(--border-subtle);
box-shadow: 2px 2px 0px rgba(0,0,0,0.02);
transition: all 0.3s ease;
}
.stat-card.highlight {
border: 1px solid var(--border-subtle);
background: linear-gradient(to bottom right, #fff, #fafafa);
}
.stat-card.highlight:hover {
transform: translateY(-4px);
box-shadow: 8px 8px 0px rgba(0,0,0,0.03);
border-color: var(--accent-primary);
}
.stat-card .icon {
font-size: 20px;
margin-bottom: 16px;
opacity: 0.8;
}
.stat-card .value {
font-family: 'Playfair Display', serif;
font-size: 32px;
color: var(--text-primary);
margin-bottom: 4px;
line-height: 1;
}
.stat-card .label {
font-family: 'Inter', sans-serif;
font-size: 11px;
font-weight: 500;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 1px;
}
/* Deep Metrics List */
.deep-metrics {
padding: 24px;
background: var(--accent-secondary); /* Sage green block */
color: white;
border-radius: 2px;
}
.deep-metrics h3 {
font-size: 18px;
font-weight: 400;
color: white;
margin-bottom: 24px;
padding-bottom: 16px;
border-bottom: 1px solid rgba(255,255,255,0.2);
font-family: 'Playfair Display', serif;
font-style: italic;
}
.metrics-list {
display: flex;
flex-direction: column;
gap: 16px;
}
.metric-item {
display: flex;
justify-content: space-between;
align-items: flex-end; /* Align to baseline */
border-bottom: 1px dotted rgba(255,255,255,0.3);
padding-bottom: 4px;
}
.metric-item .label {
color: rgba(255,255,255,0.8);
font-size: 13px;
font-family: 'Inter', sans-serif;
}
.metric-item .value {
font-family: 'JetBrains Mono', monospace;
font-size: 14px;
color: white;
}
/* Dashboard & History Views */
.welcome-box {
padding: 48px 40px;
text-align: center;
max-width: 700px;
margin: 24px auto;
background: white;
border: 1px solid var(--border-subtle);
box-shadow: var(--shadow-float);
position: relative;
}
.welcome-box h2 {
font-size: 36px;
font-weight: 400;
margin-bottom: 16px;
color: var(--text-primary);
}
.welcome-box p {
font-family: 'Playfair Display', serif;
font-size: 18px;
color: var(--text-secondary);
line-height: 1.6;
font-style: italic;
}
.history-container {
padding: 0;
max-width: 800px;
margin: 0 auto;
background: transparent;
border: none;
box-shadow: none;
}
.history-container h2 {
font-size: 32px;
margin-bottom: 40px;
text-align: center;
border-bottom: none;
}
.history-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 32px;
margin-bottom: 24px;
background: white;
border: 1px solid var(--border-subtle);
box-shadow: 4px 4px 0px rgba(0,0,0,0.03);
transition: transform 0.2s ease;
}
.history-item:hover {
transform: translateY(-2px);
box-shadow: 6px 6px 0px rgba(0,0,0,0.04);
}
.history-date {
font-family: 'Inter', sans-serif;
font-size: 14px;
font-weight: 500;
color: var(--text-secondary);
margin-bottom: 8px;
text-transform: uppercase;
letter-spacing: 1px;
}
.history-score {
font-family: 'Playfair Display', serif;
font-size: 42px;
color: var(--accent-primary);
line-height: 1;
}
.mt-20 { margin-top: 32px; }