/* Face Detection Styles */

.face-detection-container {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    background: linear-gradient(45deg, #1a1a1a, #2a2a2a);
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.face-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.face-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.1);
    animation: pulse 2s infinite;
}

.face-circle.detected {
    border-color: #28a745;
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.5);
    animation: detected-pulse 1s infinite;
}

.face-circle.aligned {
    border-color: #007bff;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.5);
    animation: aligned-pulse 0.8s infinite;
}

.face-circle.ready {
    border-color: #ffc107;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
    animation: ready-pulse 0.6s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.1);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

@keyframes detected-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

@keyframes aligned-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(0, 123, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

@keyframes ready-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(255, 193, 7, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

.face-instructions {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.face-instructions.success {
    background: rgba(40, 167, 69, 0.9);
    border-color: rgba(40, 167, 69, 0.3);
}

.instruction-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.instruction-text i {
    font-size: 16px;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    backdrop-filter: blur(5px);
    z-index: 20;
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

.success-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(40, 167, 69, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    backdrop-filter: blur(10px);
    z-index: 30;
    animation: success-fade-in 0.5s ease-out;
}

@keyframes success-fade-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-content {
    text-align: center;
    animation: success-bounce 0.6s ease-out;
}

@keyframes success-bounce {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.status-panel {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 24px;
    border-radius: 12px;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.status-panel h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 16px;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 8px;
}

.verification-status {
    margin-top: 16px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.status-item.active {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
    border-left-color: #1976d2;
    transform: translateX(4px);
}

.status-item.success {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    color: #2e7d32;
    border-left-color: #2e7d32;
    transform: translateX(4px);
}

.status-item.error {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    border-left-color: #c62828;
    transform: translateX(4px);
}

.status-item i {
    font-size: 18px;
    min-width: 20px;
}

.instructions-panel {
    background: white;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.instructions-panel h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 12px;
}

.instruction-list {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
}

.instruction-list li {
    margin-bottom: 6px;
    color: #6c757d;
    line-height: 1.4;
}

.action-buttons {
    margin-top: 20px;
}

.action-buttons .btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alternative-login {
    text-align: center;
    margin-top: 20px;
}

.alternative-login hr {
    border-color: #dee2e6;
    margin: 16px 0;
}

.alternative-login p {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 12px;
}

.registration-step {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.registration-step.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

.registration-step.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.face-preview-final {
    max-width: 200px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.face-preview-final img {
    width: 100%;
    height: auto;
    display: block;
}

.success-animation {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-wrapper {
        height: 300px;
    }
    
    .face-circle {
        width: 150px;
        height: 150px;
    }
    
    .face-instructions {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .status-panel {
        padding: 16px;
        margin-top: 16px;
    }
    
    .instruction-list {
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .video-wrapper {
        height: 250px;
    }
    
    .face-circle {
        width: 120px;
        height: 120px;
    }
    
    .face-instructions {
        padding: 8px 16px;
        font-size: 12px;
        bottom: 10px;
    }
    
    .instruction-text {
        font-size: 12px;
    }
    
    .instruction-text i {
        font-size: 14px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .status-panel {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        color: #e2e8f0;
    }
    
    .status-panel h5 {
        color: #e2e8f0;
        border-bottom-color: #4a5568;
    }
    
    .instructions-panel {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .instruction-list li {
        color: #a0aec0;
    }
    
    .alternative-login p {
        color: #a0aec0;
    }
}
