/* Reset e configuração base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: display, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #fff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Card principal de login */
.login-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background: #ffffff;
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Título da marca */
.login-brand {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Labels */
label {
    display: block;
    margin-bottom: 8px;
    margin-top: 15px;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

label:first-of-type {
    margin-top: 0;
}

/* Container para label e "Esqueceu a senha?" */
.password-label-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    margin-top: 15px;
}

.password-label-container span {
    font-size: 0.8rem;
    color: #666;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.3s ease;
}
.password-label-container span a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}
.password-label-container span a:hover {
    color: #764ba2;
    text-decoration: none;
}

/* Campos de input */
.form-input {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

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

.form-input::placeholder {
    color: #a0a7ac;
}

/* Container para input de senha com ícone do olho */
.password-input-container {
    position: relative;
    margin-bottom: 15px;
}

.password-input-container .form-input {
    margin-bottom: 0;
    padding-right: 50px;
}

/* Ajuste especial para o campo de senha do registro */
#register .password-input-container {
    margin-bottom: 5px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #667eea;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #764ba2;
    transform: translateY(-50%) scale(1.1);
}

.toggle-password:active {
    transform: translateY(-50%) scale(0.95);
}

.toggle-password i {
    transition: all 0.3s ease;
}

/* Animação quando a senha está visível */
.toggle-password .fa-eye-slash {
    color: #e74c3c;
}

/* Efeito de pulso no ícone quando clicado */
@keyframes eyePulse {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.2); }
    100% { transform: translateY(-50%) scale(1); }
}

.toggle-password:active {
    animation: eyePulse 0.2s ease-in-out;
}

/* Mensagens de erro */
.login-email-error, 
.login-password-error,
.register-fullname-error,
.register-username-error,
.register-email-error,
.register-password-error,
.register-confirm-password-error {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: -10px;
    margin-bottom: 15px;
    display: none;
    padding: 8px 0px;
    border-radius: 8px;
}

/* Indicador de força da senha */
.password-strength {
    margin-bottom: 15px;
    width: 95%;
    margin: auto;
}

.password-strength-bar {
    width: 100%;
    height: 8px;
    background: #e1e8ed;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.password-strength-text {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    transition: color 0.3s ease;
}

/* Classes para diferentes níveis de força da senha */
.strength-weak .password-strength-fill {
    width: 25%;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.strength-weak .password-strength-text {
    color: #e74c3c;
}

.strength-fair .password-strength-fill {
    width: 50%;
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.strength-fair .password-strength-text {
    color: #f39c12;
}

.strength-good .password-strength-fill {
    width: 75%;
    background: linear-gradient(135deg, #f1c40f, #f39c12);
}

.strength-good .password-strength-text {
    color: #f1c40f;
}

.strength-strong .password-strength-fill {
    width: 100%;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
}

.strength-strong .password-strength-text {
    color: #27ae60;
}

/* Animação de pulso para senha forte */
.strength-strong .password-strength-fill {
    animation: strengthPulse 2s infinite;
}

@keyframes strengthPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(39, 174, 96, 0); }
}

/* Botões */
.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn:hover::before {
    left: 100%;
}

/* Botão principal de login */
.login-button {
    background: #667eea;
    color: white;
    margin-top: 10px;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* Link de registro */
.register {
    text-align: center;
    margin: 20px 0;
    color: #666;
    font-size: 0.9rem;
}

.register a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    cursor: pointer;
}

.register a:hover {
    color: #764ba2;
    text-decoration: none;
}

/* Divisor */
.login-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
    color: #999;
    font-size: 0.9rem;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #ddd, transparent);
}

.login-divider::after {
    content: 'or';
    background: #ffffff;
    padding: 0 15px;
    position: relative;
}

/* Botões sociais */
.social-login {
    background: white;
    color: #333;
    border: 2px solid #e1e8ed;
    margin-bottom: 10px;
    position: relative;
    padding-left: 50px;
}

.social-login:hover {
    transform: translateY(-2px);
    border-color: #667eea;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Ícones dos botões sociais (usando pseudo-elementos) */

/* Responsividade */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .login-brand {
        font-size: 1.8rem;
    }
    
    .form-input {
        padding: 12px;
    }
    
    .btn {
        padding: 12px;
        font-size: 0.95rem;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Estados de foco aprimorados */
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Melhorias de acessibilidade */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}