UNPKG

facezkp

Version:

Face analysis library with liveness detection, biometric template extraction, and fuzzy hashing for privacy-preserving identity verification.

339 lines (291 loc) 5.72 kB
* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #000; color: #fff; overflow-x: hidden; width: 100vw; height: 100vh; } .container { width: 100%; height: 100vh; display: flex; flex-direction: column; padding: 20px; } .header { text-align: center; margin-bottom: 20px; } .header h1 { font-size: 3rem; font-weight: 100; margin-bottom: 10px; text-shadow: 2px 2px #303030; } .header p { font-size: 1.1rem; color: #b0b8c9; font-weight: 100; } .status-bar { display: flex; justify-content: space-between; margin-bottom: 20px; padding: 15px; background: #303030; border-radius: 8px; } .status-item { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: #fff; padding: 8px 12px; border-radius: 6px; transition: all 0.3s ease; } .status-item.loading { background: rgba(59, 130, 246, 0.2); color: #60a5fa; } .status-item.success { background: rgba(34, 197, 94, 0.2); color: #4ade80; } .status-item.error { background: rgba(239, 68, 68, 0.2); color: #f87171; } .status-item.waiting { background: rgba(245, 158, 11, 0.2); color: #fbbf24; } .status-icon { font-size: 1.2rem; } .main-content { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 20px; } .video-container { position: relative; width: 100%; max-width: 800px; border-radius: 12px; overflow: hidden; background: #000; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); transition: all 0.3s ease; } .video-container.face-detected { box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3); border: 2px solid rgba(34, 197, 94, 0.5); } #video { width: 100%; height: auto; display: block; } #overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; } .instructions { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.8); color: white; padding: 12px 20px; border-radius: 25px; font-size: 0.9rem; font-weight: 500; text-align: center; backdrop-filter: blur(10px); transition: all 0.3s ease; } .spinner { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border: 4px solid rgba(255, 255, 255, 0.3); border-top: 4px solid #f15e41; border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin { 0% { transform: translate(-50%, -50%) rotate(0deg); } 100% { transform: translate(-50%, -50%) rotate(360deg); } } .controls { display: flex; gap: 15px; justify-content: center; } .btn-primary, .btn-secondary { padding: 12px 24px; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; min-width: 140px; text-shadow: 1px 1px #000; } .btn-primary { background: linear-gradient(135deg, #f15e41, #e53e3e); color: white; box-shadow: 0 4px 15px rgba(241, 94, 65, 0.3); } .btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(241, 94, 65, 0.4); } .btn-primary:disabled { background: #4a5568; cursor: not-allowed; transform: none; box-shadow: none; } .btn-secondary { background: linear-gradient(135deg, #4a5568, #2d3748); color: white; box-shadow: 0 4px 15px rgba(74, 85, 104, 0.3); } .btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(74, 85, 104, 0.4); } .result { padding: 15px 20px; border-radius: 10px; font-weight: 500; text-align: center; min-height: 20px; transition: all 0.3s ease; max-width: 600px; } .result.success { background: rgba(34, 197, 94, 0.1); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); } .result.error { background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); } .result.info { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); } .debug-panel { background: rgba(48, 48, 48, 0.9); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 20px; margin-top: 20px; max-width: 800px; width: 100%; } .debug-panel h3 { color: #fff; margin-bottom: 15px; font-size: 1.1rem; } #debugInfo { font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; font-size: 0.85rem; line-height: 1.5; color: #b0b8c9; background: rgba(0, 0, 0, 0.5); padding: 15px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.1); max-height: 300px; overflow-y: auto; } .debug-item { margin-bottom: 8px; padding: 5px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); } .debug-item:last-child { border-bottom: none; } .debug-label { font-weight: 600; color: #fff; } .debug-value { color: #b0b8c9; margin-left: 10px; } .performance-panel { display: flex; justify-content: space-around; background: #303030; padding: 15px; border-radius: 8px; margin-top: 20px; } .perf-item { display: flex; flex-direction: column; align-items: center; gap: 5px; } .perf-label { font-size: 0.8rem; color: #b0b8c9; font-weight: 100; } .perf-value { font-size: 1.1rem; color: #fff; font-weight: 600; } @media (max-width: 768px) { .container { padding: 10px; } .header h1 { font-size: 2rem; } .status-bar { flex-direction: column; gap: 10px; } .controls { flex-direction: column; align-items: center; } .btn-primary, .btn-secondary { width: 100%; max-width: 200px; } .performance-panel { flex-direction: column; gap: 10px; } }