.faceValidationContainer {
    position: relative;
    display: inline-block; 
    width: 100%;
}

.validationOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.feedbackPanel {
    padding: 18px 28px;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 70px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: none;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.feedbackPanel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.4s ease;
}

.feedbackPanel.success::before {
    animation: intelligentShimmer 3s infinite;
}

@keyframes intelligentShimmer {
    0% { left: -100%; opacity: 0; }
    50% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

.feedbackPanel.success {
    background: linear-gradient(135deg, #00c853 0%, #00e676 50%, #00c853 100%) !important;
    color: white !important;
    box-shadow: 0 10px 30px rgba(0, 200, 83, 0.4), 0 0 0 1px rgba(255,255,255,0.2) inset !important;
    transform: scale(1.02);
}

.feedbackPanel.warning {
    background: linear-gradient(135deg, #ff9800 0%, #ffb74d 50%, #ff9800 100%) !important;
    color: white !important;
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.2) inset !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.feedbackPanel.error {
    background: linear-gradient(135deg, #d32f2f 0%, #f44336 50%, #d32f2f 100%) !important;
    color: white !important;
    box-shadow: 0 8px 25px rgba(211, 47, 47, 0.4), 0 0 0 1px rgba(255,255,255,0.2) inset !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    font-size: 1rem;
    animation: subtleShake 2s ease-in-out infinite;
}

@keyframes subtleShake {
    0%, 100% { transform: translateX(0); }
    2% { transform: translateX(-1px); }
    4% { transform: translateX(1px); }
    6% { transform: translateX(0); }
}

.faceIcon {
    font-size: 1.1rem;
    display: block;
    margin-bottom: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.feedbackPanel.success .faceIcon {
    transform: scale(1.15);
    animation: intelligentSuccess 0.8s ease;
}

.feedbackPanel.error .faceIcon {
    animation: intelligentError 0.6s ease;
}

@keyframes intelligentSuccess {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.25) rotate(5deg); opacity: 1; }
    100% { transform: scale(1.15); opacity: 1; }
}

@keyframes intelligentError {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(0.95) rotate(-2deg); }
    75% { transform: scale(0.95) rotate(2deg); }
}

.instructionText {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
    animation: textPulse 0.3s ease;
}

@keyframes textPulse {
    0% { opacity: 0.7; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}

.flashOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    transition: opacity 0.1s ease;
}

.flashOverlay.active {
    opacity: 0.9;
}

.overlayCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.statusIcon.counting {
    font-size: 48px;
    font-weight: bold;
    animation: countPulse 0.5s ease;
}

@keyframes countPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

@media(max-width: 1100px){
    .div_webCamera, .div_canvas {
        max-height: 300px!important;
        object-fit: contain !important;
    }
}

@media(min-width:1100px){
    .div_webCamera, .div_canvas {
        max-height: 400px!important;
        object-fit: contain !important;
    }
}

/* Círculo guia inteligente para posicionamento do rosto */
.face-guide-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 240px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.2),
        0 0 30px rgba(255, 255, 255, 0.15);
    animation: intelligentBreath 3s ease-in-out infinite;
}

.face-guide-circle::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.4), 
        transparent 30%, 
        rgba(255, 255, 255, 0.2) 70%,
        transparent);
    z-index: -1;
    opacity: 0.7;
    animation: intelligentGlow 4s ease-in-out infinite;
}

.face-guide-circle.success {
    border-color: rgba(76, 175, 80, 0.9);
    box-shadow: 
        0 0 0 2px rgba(76, 175, 80, 0.3),
        0 0 25px rgba(76, 175, 80, 0.5);
    animation: successPulse 1.5s ease-in-out;
}

.face-guide-circle.success::before {
    background: linear-gradient(135deg, 
        rgba(76, 175, 80, 0.6), 
        transparent 40%, 
        rgba(76, 175, 80, 0.4));
    animation: successShimmer 2s ease-in-out;
}

.face-guide-circle.warning {
    border-color: rgba(255, 193, 7, 0.9);
    box-shadow: 
        0 0 0 2px rgba(255, 193, 7, 0.3),
        0 0 20px rgba(255, 193, 7, 0.4);
    animation: warningPulse 2s ease-in-out infinite;
}

.face-guide-circle.warning::before {
    background: linear-gradient(135deg, 
        rgba(255, 193, 7, 0.5), 
        transparent 30%, 
        rgba(255, 193, 7, 0.3));
}

.face-guide-circle.error {
    border-color: rgba(244, 67, 54, 0.9);
    box-shadow: 
        0 0 0 2px rgba(244, 67, 54, 0.3),
        0 0 18px rgba(244, 67, 54, 0.4);
    animation: errorShake 1s ease-in-out infinite;
}

.face-guide-circle.error::before {
    background: linear-gradient(135deg, 
        rgba(244, 67, 54, 0.5), 
        transparent 25%, 
        rgba(244, 67, 54, 0.3));
}

@keyframes intelligentBreath {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
        filter: blur(0px);
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.02);
        opacity: 0.9;
        filter: blur(0.5px);
    }
}

@keyframes intelligentGlow {
    0%, 100% { 
        opacity: 0.7;
    }
    50% { 
        opacity: 0.9;
    }
}

@keyframes floatIcon {
    0%, 100% { transform: translateX(-50%) translateY(0px); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes successPulse {
    0% { 
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3), 0 0 25px rgba(76, 175, 80, 0.5);
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.5), 0 0 35px rgba(76, 175, 80, 0.7);
    }
    100% { 
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.3), 0 0 25px rgba(76, 175, 80, 0.5);
    }
}

@keyframes successShimmer {
    0% { opacity: 0.7; }
    100% { opacity: 0.9; }
}

@keyframes warningBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes errorShake {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
    }
    25% { 
        transform: translate(-50%, -50%) scale(0.98) translateX(2px);
    }
    75% { 
        transform: translate(-50%, -50%) scale(0.98) translateX(-2px);
    }
}

@keyframes errorPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.6;
    }
    50% { 
        transform: scale(0.95);
        opacity: 0.8;
    }
}

/* Instruções inteligentes de posicionamento */
.face-guide-text {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: rgba(255, 255, 255, 0.95);
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
    z-index: 6;
    text-align: center;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: textFloat 3s ease-in-out infinite;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

@keyframes textFloat {
    0%, 100% { transform: translateX(-50%) translateY(0px); opacity: 0.9; }
    50% { transform: translateX(-50%) translateY(-2px); opacity: 1; }
}

/* Responsividade inteligente do círculo guia */
@media(max-width: 1100px){
    .face-guide-circle {
        width: 200px;
        height: 260px;
    }
    
    .face-guide-text {
        font-size: 13px;
        padding: 8px 15px;
        bottom: 20px;
    }
}

@media(max-width: 768px){
    .face-guide-circle {
        width: 170px;
        height: 220px;
    }
    
    .face-guide-text {
        font-size: 12px;
        padding: 7px 14px;
        bottom: 18px;
        border-radius: 20px;
    }
    
    .face-guide-circle::after {
        top: -30px;
        font-size: 18px;
    }
}

@media(max-width: 480px){
    .face-guide-circle {
        width: 160px;
        height: 210px;
    }
    
    .face-guide-text {
        font-size: 11px;
        padding: 6px 12px;
        bottom: 15px;
    }
}
