@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@1,100&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: url('../img/forest-landscape.jpg') no-repeat;
    background-size: cover;
    background-position: center;
}

.wrapper {
    width: 420px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, .2);
    backdrop-filter: blur(20px);
    box-shadow: 0 0 10px rgba(0, 0, 0, .2);
    color: #fff;
    border-radius: 10px;
    padding: 30px;
}

.wrapper h1 {
    font-size: 36px;
    text-align: center;
}

.wrapper .input-box {
    position: relative;
    width: 100%;
    height: 40px; 
    margin: 20px 0; 
}

.input-box input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    border: 2px solid rgba(255, 255, 255, .2);
    border-radius: 40px;
    font-size: 16px;
    color: #fff;
    padding: 10px 45px 10px 20px;
    transition: 0.3s ease; 
}

/* NOVO: Estilo para quando o campo está em foco */
.input-box input:focus {
    border: 2px solid #fff; /* Altera a borda para branco sólido */
    box-shadow: 0 0 8px rgb(255, 255, 255); /* Adiciona um brilho suave */
}

/* Remover o ícone padrão do campo de data em navegadores baseados em WebKit */
input[type="date"]::-webkit-calendar-picker-indicator {
    display: none; 
}

input[type="date"] {
    -webkit-appearance: none; 
    -moz-appearance: textfield; 
    padding-right: 45px; 
}

.input-box input::placeholder {
    color: #fff;
}

.input-box i {
    position: absolute;
    right: 20px;
    top: 30%;
    font-size: 20px;
    color: #fff; 
    pointer-events: none; 
}

/* --- Ícones de Senha (Olho) --- */

.bxs-show, .bxs-hide {
    cursor: pointer; 
    pointer-events: auto !important; 
    top: 50% !important; 
    transform: translateY(-50%) !important;
}


.wrapper .btn {
    width: 100%;
    height: 40px; 
    background: #fff;
    border: none;
    outline: none;
    border-radius: 40px;
    box-shadow: 0 0 10px rgba(0, 0, 0, .1);
    cursor: pointer;
    font-size: 16px;
    color: #333;
    font-weight: 600;
    
    /* Propriedades para a animação */
    position: relative; 
    overflow: hidden; 
    transition: width 0.3s ease, border-radius 0.3s ease;
    
    /* Centraliza o conteúdo (texto) quando não está em loading */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Oculta o texto do botão por padrão */
.btn-text {
    transition: opacity 0.3s ease;
}

/* --- SPINNER (LOADING) e CHECKMARK (SUCESSO) --- */

/* Estes estilos garantem a centralização perfeita do conteúdo DENTRO do botão */
.spinner, .checkmark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.3);
    border-top-color: #333; 
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Keyframes para a animação de giro */
@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.checkmark {
    display: none;
    font-size: 24px;
    color: #4CAF50; 
    transform: translate(-50%, -50%) scale(0); 
    transition: transform 0.3s ease;
}

/* ESTADO: LOADING */
.btn.loading {
    width: 40px; 
    border-radius: 50%; 
    padding: 0;
    /* FIX: Centraliza o botão de 40px horizontalmente dentro do formulário */
    margin: 0 auto; 
}

.btn.loading .btn-text {
    opacity: 0;
    display: none;
}

.btn.loading .spinner {
    display: block;
}

/* ESTADO: SUCCESS */
.btn.success {
    background: #fff; 
    width: 40px;
    border-radius: 50%;
    /* FIX: Centraliza o botão de 40px horizontalmente dentro do formulário */
    margin: 0 auto; 
}

.btn.success .btn-text,
.btn.success .spinner {
    display: none;
}

.btn.success .checkmark {
    display: block;
    transform: translate(-50%, -50%) scale(1); 
}
/* --- FIM DOS ESTILOS DE ANIMAÇÃO AJUSTADOS --- */


.wrapper .remember-forgot {
    display: flex;
    justify-content: space-between;
    font-size: 14.5px;
    margin: -10px 0 15px; 
}

.remember-forgot label input {
    accent-color: #fff;
    margin-right: 3px;
}

.remember-forgot a {
    color: #fff;
    text-decoration: none;
}

.remember-forgot a:hover {
    text-decoration: underline;
}

.wrapper .register-link {
    font-size: 14.5px;
    text-align: center;
    margin-top: 20px;
}

.register-link p a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.register-link p a:hover {
    text-decoration: underline;
}

/* Estilos para o campo de selecionar gênero */
.gender-select {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 40px;
    margin: 20px 0;
}

.gender-button {
    flex: 1;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, .2);
    border-radius: 40px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    position: relative;
    text-align: center;
}

.gender-button:not(:last-child) {
    margin-right: 5px; 
}

.gender-button:hover {
    background: rgba(255, 255, 255, 0.1); 
}

.selected {
    background: rgba(255, 255, 255, 0.2); 
}