afnrmdhn
initial commit
9950952
Raw History Blame Contribute Delete
11.9 kB
/* ==========================================
Bisindo Sign Detection - Professional UI
Dark Purple Theme | Minimalist Corporate
========================================== */
:root {
/* Dark Purple Palette */
--bg-primary: #0b0714;
--bg-secondary: #120b1e;
--bg-card: #1a1229;
--bg-elevated: #211633;
--text-primary: #f7f5ff;
--text-secondary: rgba(247, 245, 255, 0.78);
--text-tertiary: rgba(247, 245, 255, 0.56);
--accent-primary: #a67bff;
--accent-success: #48e0b8;
--accent-warning: #ffb454;
--accent-gradient: linear-gradient(135deg, #c18cff 0%, #7d5bff 100%);
--overlay-dark: rgba(12, 8, 20, 0.8);
--overlay-blur: rgba(20, 13, 34, 0.65);
--border-subtle: rgba(255, 255, 255, 0.07);
--border-light: rgba(255, 255, 255, 0.12);
--shadow-soft: 0 4px 18px rgba(0, 0, 0, 0.35);
--shadow-elevated: 0 8px 26px rgba(0, 0, 0, 0.5);
/* Reduced curvature to ~3 degrees */
--radius-sm: 3px;
--radius-md: 3px;
--radius-lg: 3px;
--transition-fast: 150ms ease;
--transition-normal: 250ms ease;
}
/* Reset & Base */
*, *::before, *::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
font-size: 16px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
background-color: var(--bg-primary);
color: var(--text-primary);
line-height: 1.5;
min-height: 100vh;
overflow-x: hidden;
}
/* App Layout */
.app-wrapper {
display: flex;
flex-direction: column;
min-height: 100vh;
max-width: 1600px;
margin: 0 auto;
padding: 0 24px;
}
/* Header */
.app-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 0;
border-bottom: 1px solid var(--border-subtle);
}
.logo {
display: flex;
align-items: center;
gap: 12px;
}
.logo-icon {
width: 36px;
height: 36px;
}
.logo-text {
font-size: 1.25rem;
font-weight: 500;
letter-spacing: -0.3px;
color: var(--text-primary);
}
.status-indicator {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 14px;
background: var(--bg-card);
border-radius: var(--radius-md);
border: 1px solid var(--border-subtle);
}
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--accent-warning);
animation: pulse 2s infinite;
}
.status-dot.connected {
background: var(--accent-success);
animation: none;
}
.status-text {
font-size: 0.8rem;
color: var(--text-secondary);
font-weight: 400;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
/* Main Content - Matched Heights */
.main-content {
display: grid;
grid-template-columns: 1fr 300px;
gap: 20px;
padding: 20px 0;
flex: 1;
align-items: start;
}
/* Video Section */
.video-section {
display: flex;
flex-direction: column;
}
.video-container {
position: relative;
width: 100%;
aspect-ratio: 16 / 9;
background: var(--bg-secondary);
border-radius: var(--radius-md);
overflow: hidden;
box-shadow: var(--shadow-elevated);
border: 1px solid var(--border-subtle);
}
#camera-stream {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
/* Loading Overlay */
.loading-overlay {
position: absolute;
inset: 0;
background: linear-gradient(135deg, rgba(11, 7, 20, 0.95) 0%, rgba(18, 11, 30, 0.95) 100%);
display: flex;
align-items: center;
justify-content: center;
z-index: 20;
transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loading-overlay.hidden {
opacity: 0;
visibility: hidden;
pointer-events: none;
}
.loading-content {
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
.loading-spinner {
position: relative;
width: 80px;
height: 80px;
}
.spinner-ring {
width: 100%;
height: 100%;
animation: spin 1.5s linear infinite;
}
.spinner-ring circle {
stroke-dasharray: 80, 200;
stroke-dashoffset: 0;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.spinner-progress {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 0.85rem;
font-weight: 500;
color: var(--text-primary);
}
.loading-title {
font-size: 1.1rem;
font-weight: 500;
color: var(--text-primary);
margin: 0;
}
.loading-subtitle {
font-size: 0.85rem;
font-weight: 400;
color: var(--text-tertiary);
margin: 0;
}
.loading-bar-container {
width: 200px;
height: 4px;
background: rgba(255, 255, 255, 0.1);
border-radius: 2px;
overflow: hidden;
}
.loading-bar {
height: 100%;
width: 0%;
background: var(--accent-gradient);
transition: width 0.2s ease;
}
/* Confidence Overlay - Top Left */
.confidence-overlay {
position: absolute;
top: 14px;
left: 14px;
z-index: 10;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
}
.confidence-badge {
display: flex;
flex-direction: column;
align-items: flex-start;
padding: 8px 12px;
background: var(--overlay-dark);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border-radius: var(--radius-md);
border: 1px solid var(--border-light);
}
.confidence-label {
font-size: 0.65rem;
font-weight: 400;
color: var(--text-tertiary);
text-transform: uppercase;
letter-spacing: 0.3px;
}
.confidence-value {
font-size: 0.95rem;
font-weight: 400;
color: var(--text-primary);
line-height: 1.3;
}
.confidence-value.high {
color: var(--accent-success);
}
.confidence-value.medium {
color: var(--accent-warning);
}
/* Subtitle Overlay - Bottom Center */
.subtitle-overlay {
position: absolute;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
z-index: 10;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
}
.subtitle-container {
background: var(--overlay-dark);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
padding: 10px 20px;
border-radius: var(--radius-md);
border: 1px solid var(--border-light);
text-align: center;
display: inline-block;
}
.prediction-text {
font-size: 1.25rem;
font-weight: 500;
color: var(--text-primary);
margin: 0;
text-transform: capitalize;
letter-spacing: 0.3px;
white-space: nowrap;
}
.prediction-text.waiting {
color: var(--text-tertiary);
font-weight: 400;
}
/* Buffer Indicator - Only visible during loading */
.buffer-indicator {
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: 3px;
background: rgba(255, 255, 255, 0.08);
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
}
.buffer-indicator.loading {
opacity: 1;
visibility: visible;
}
.buffer-progress {
height: 100%;
width: 0%;
background: var(--accent-gradient);
transition: width var(--transition-fast);
}
.buffer-progress.full {
opacity: 0;
}
/* Info Panel - Match Video Height (video is 16:9, panel is 300px wide, gap is 20px) */
/* Height = (available width - 300px - 20px gap) * 9/16 */
.info-panel {
display: flex;
flex-direction: column;
gap: 12px;
height: calc((100vw - 300px - 20px - 48px) * 9 / 16);
max-height: calc((1600px - 300px - 20px - 48px) * 9 / 16);
}
.panel-card {
background: var(--bg-card);
border-radius: var(--radius-md);
padding: 16px;
border: 1px solid var(--border-subtle);
flex: 1;
display: flex;
flex-direction: column;
}
.panel-title {
font-size: 0.75rem;
font-weight: 500;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.4px;
margin-bottom: 12px;
}
/* Stats Grid */
.stat-grid {
display: flex;
flex-direction: column;
gap: 10px;
flex: 1;
}
.stat-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 12px;
background: var(--bg-elevated);
border-radius: var(--radius-sm);
}
.stat-label {
font-size: 0.8rem;
font-weight: 400;
color: var(--text-tertiary);
}
.stat-value {
font-size: 0.8rem;
font-weight: 500;
color: var(--text-primary);
}
/* History List */
.history-list {
list-style: none;
display: flex;
flex-direction: column;
gap: 6px;
flex: 1;
overflow-y: auto;
}
.history-list::-webkit-scrollbar {
width: 3px;
}
.history-list::-webkit-scrollbar-track {
background: transparent;
}
.history-list::-webkit-scrollbar-thumb {
background: var(--border-light);
border-radius: 2px;
}
.history-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 10px;
background: var(--bg-elevated);
border-radius: var(--radius-sm);
font-size: 0.8rem;
min-height: 36px;
gap: 8px;
}
.history-item.placeholder {
color: var(--text-tertiary);
justify-content: center;
font-style: italic;
font-size: 0.75rem;
}
.history-item .label {
font-weight: 400;
color: var(--text-primary);
flex: 1;
}
.history-item .recency {
font-size: 0.65rem;
color: var(--text-tertiary);
background: rgba(255, 255, 255, 0.05);
padding: 2px 6px;
border-radius: 3px;
flex-shrink: 0;
}
.history-item .recency.active {
color: var(--accent);
background: rgba(193, 140, 255, 0.15);
}
.history-item .confidence {
color: var(--text-tertiary);
font-size: 0.75rem;
font-weight: 400;
flex-shrink: 0;
min-width: 36px;
text-align: right;
}
/* Instructions */
.instructions .instruction-list {
padding-left: 18px;
display: flex;
flex-direction: column;
gap: 4px;
flex: 1;
}
.instructions-card {
flex: 1;
}
.instruction-list li {
font-size: 0.78rem;
font-weight: 400;
color: var(--text-tertiary);
line-height: 1.4;
}
.instruction-list li::marker {
color: var(--accent-primary);
}
/* Footer */
.app-footer {
padding: 16px 0;
text-align: center;
border-top: 1px solid var(--border-subtle);
}
.app-footer p {
font-size: 0.7rem;
font-weight: 400;
color: var(--text-tertiary);
letter-spacing: 0.2px;
}
/* Responsive Design */
@media (max-width: 1024px) {
.main-content {
grid-template-columns: 1fr;
}
.info-panel {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12px;
height: auto;
max-height: none;
}
.panel-card {
min-height: 160px;
}
}
@media (max-width: 768px) {
.app-wrapper {
padding: 0 16px;
}
.app-header {
padding: 12px 0;
}
.logo-text {
font-size: 1.1rem;
}
.main-content {
padding: 16px 0;
gap: 12px;
}
.info-panel {
grid-template-columns: 1fr;
}
.prediction-text {
font-size: 1.1rem;
}
.subtitle-overlay {
bottom: 14px;
}
}
/* Smooth Transitions */
.panel-card,
.stat-item,
.history-item,
.confidence-badge,
.subtitle-container {
transition: transform var(--transition-fast),
box-shadow var(--transition-fast);
}
.panel-card:hover {
transform: translateY(-1px);
box-shadow: var(--shadow-soft);
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(-8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}