/* Face Recognition Login Styles */

.login-method-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-radius: 12px;
    background: #f1f5f9;
    padding: 4px;
}

.method-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.method-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.method-btn.active {
    background: white;
    color: #4a90e2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.method-btn i {
    font-size: 16px;
}

/* Face Login Container */
.face-login-container {
    margin-top: 20px;
    text-align: center;
}

.face-camera-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 4/3;
}

#faceVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Mirror effect */
}

#faceCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.face-status {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.face-status i {
    font-size: 20px;
}

.face-status.recognizing {
    background: rgba(74, 144, 226, 0.9);
}

.face-status.success {
    background: rgba(34, 197, 94, 0.9);
}

.face-status.error {
    background: rgba(239, 68, 68, 0.9);
}

/* QR Login Container */
.qr-login-container {
    margin-top: 20px;
    text-align: center;
}

.qr-code-wrapper {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

#qrCode {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    min-height: 200px;
}

#qrCode img {
    cursor: pointer;
    transition: transform 0.2s;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 4px;
    display: block;
    margin: 0 auto;
}

#qrCode img:hover {
    transform: scale(1.05);
    border-color: #4a90e2;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

#qrCode canvas {
    cursor: pointer;
    transition: transform 0.2s;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 4px;
}

#qrCode canvas:hover {
    transform: scale(1.05);
    border-color: #4a90e2;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.qr-instruction {
    font-size: 14px;
    color: #64748b;
    margin: 16px 0;
    line-height: 1.6;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 12px;
    border-radius: 8px;
    background: #f8f9fa;
    border: 2px solid transparent;
}

.qr-instruction:hover {
    background: #e0f2fe;
    border-color: #4a90e2;
    color: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
}

.qr-instruction i {
    font-size: 32px;
    color: #4a90e2;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.qr-instruction:hover i {
    transform: scale(1.1);
    color: #1e40af;
}

.qr-status {
    padding: 12px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.qr-status.verifying {
    background: #dbeafe;
    color: #1e40af;
}

.qr-status.success {
    background: #d1fae5;
    color: #065f46;
}

.qr-status.error {
    background: #fee2e2;
    color: #991b1b;
}

.qr-status.expired {
    background: #fef3c7;
    color: #92400e;
}

/* Face detection box */
.face-box {
    position: absolute;
    border: 3px solid #4a90e2;
    border-radius: 8px;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.3);
    pointer-events: none;
    transition: all 0.3s;
}

.face-box.recognizing {
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .login-method-selector {
        flex-direction: column;
    }
    
    .face-camera-container {
        max-width: 100%;
    }
}

