/* Modal de Autenticação */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.auth-modal-content {
    background: white;
    border-radius: 16px;
    width: 400px;
    /* Reduzido de 600px para 360px (40% menor) */
    max-width: 90vw;
    max-height: 90vh;
    /* Reduzido de 90vh para 70vh */
    overflow-y: auto;
    /* Permitir scroll se necessário */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-modal-header {
    background: #f8f9fa;
    /* Removido gradiente roxo, usando cinza claro */
    color: #333;
    /* Mudado para texto escuro */
    padding: 15px 10px;
    /* Reduzido ainda mais o padding */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
    /* Adicionado borda sutil */
}

.auth-modal-header h2 {
    margin: 0;
    font-size: 1.1em;
    /* Reduzido ainda mais */
    font-weight: 600;
}

.auth-close {
    background: none;
    border: none;
    color: #666;
    /* Mudado para cinza escuro */
    font-size: 24px;
    /* Reduzido tamanho */
    cursor: pointer;
    padding: 0;
    width: 25px;
    /* Reduzido tamanho */
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.auth-close:hover {
    background: rgba(0, 0, 0, 0.1);
    /* Mudado para hover escuro */
}

.auth-modal-body {
    padding: 20px 15px;
    /* Reduzido ainda mais o padding */
}

/* Formulário de Login */
.auth-form {
    text-align: center;
}

.auth-intro {
    margin-bottom: 8px;
    /* Reduzido ainda mais */
}

.auth-intro h3 {
    margin: 0 0 5px 0;
    /* Reduzido margin */
    font-size: 1.1em;
    /* Reduzido tamanho */
    color: #333;
}

.auth-intro p {
    color: #666;
    font-size: 0.9em;
    /* Reduzido tamanho */
    margin: 0;
}

.auth-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Reduzido ainda mais o gap */
}

/* Botão Google */
.google-btn {
    background: white;
    color: #333;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.google-btn:hover {
    background: #f8f9fa;
    border-color: #dadce0;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.google-btn img {
    width: 20px;
    height: 20px;
}

/* Divisor */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 10px 0;
    /* Reduzido ainda mais o margin */
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.auth-divider span {
    background: white;
    padding: 0 15px;
    color: #666;
    font-size: 14px;
}

/* Formulário de Email */
.email-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Reduzido ainda mais o gap */
}

.email-form .form-group {
    text-align: left;
}

.email-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.email-form input {
    width: 100%;
    padding: 12px;
    /* Reduzido padding */
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    /* Reduzido border-radius */
    font-size: 14px;
    /* Reduzido tamanho da fonte */
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.email-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.email-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.email-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* Botões Gerais */
.auth-btn {
    padding: 12px 20px;
    /* Reduzido padding */
    border-radius: 8px;
    /* Reduzido border-radius */
    cursor: pointer;
    font-size: 14px;
    /* Reduzido tamanho da fonte */
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    /* Reduzido gap */
    text-decoration: none;
}

.retry-btn {
    background: #6c757d;
    color: white;
}

.retry-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Estados do Modal */
.auth-loading,
.auth-error,
.auth-success {
    text-align: center;
    padding: 25px 15px;
    /* Reduzido padding */
}

/* Loading */
.auth-loading .spinner {
    border: 3px solid #f3f3f3;
    /* Reduzido border */
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    /* Reduzido tamanho */
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
    /* Reduzido margin */
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.auth-loading p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Error */
.auth-error .error-icon {
    font-size: 36px;
    /* Reduzido tamanho */
    margin-bottom: 15px;
    /* Reduzido margin */
}

.auth-error h3 {
    color: #dc3545;
    margin-bottom: 12px;
    /* Reduzido margin */
    font-size: 1.1em;
    /* Reduzido tamanho */
}

.auth-error p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Success */
.auth-success .success-icon {
    font-size: 36px;
    /* Reduzido tamanho */
    margin-bottom: 15px;
    /* Reduzido margin */
}

.auth-success h3 {
    color: #28a745;
    margin-bottom: 12px;
    /* Reduzido margin */
    font-size: 1.1em;
    /* Reduzido tamanho */
}

.auth-success p {
    color: #666;
    margin: 0;
    font-size: 16px;
}

/* Info */
.auth-info {
    margin-top: 15px;
    /* Reduzido ainda mais */
    padding: 10px;
    /* Reduzido ainda mais */
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #ffc107;
}

.auth-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Responsividade */
@media (max-width: 768px) {
    .auth-modal-content {
        width: 95vw;
        margin: 20px;
    }

    .auth-modal-header {
        padding: 20px 25px;
    }

    .auth-modal-body {
        padding: 30px 25px;
    }

    .auth-modal-header h2 {
        font-size: 1.3em;
    }

    .google-btn,
    .email-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .email-form input {
        padding: 12px;
        font-size: 14px;
    }
}

/* Animações de entrada */
.auth-modal.show {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Efeitos de hover melhorados */
.auth-btn:active {
    transform: translateY(0);
}

/* Foco melhorado para acessibilidade */
.auth-btn:focus,
.auth-close:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Estados de loading nos botões */
.auth-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}