/* ===== MELHORIAS PARA PÁGINA DE REGISTRO ===== */

/* Container principal do formulário de registro */
.create-account-container {
    max-width: 450px;
    margin: 30px auto;
    padding: 30px;
    border-radius: 12px;
    border: 2px solid #6b3e26;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #f4e2c6 0%, #e8d5b7 100%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Títulos do formulário */
.create-account-container h2 {
    text-align: center;
    margin: 20px 0 15px 0;
    color: #6b3e26;
    font-size: 1.4em;
    font-weight: bold;
    border-bottom: 2px solid #d4af37;
    padding-bottom: 8px;
    position: relative;
}

.create-account-container h2:first-of-type {
    margin-top: 0;
}

.create-account-container h2::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: #6b3e26;
}

/* Formulário principal */
.brown-light-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Campos de input e select */
.create-account-container input,
.create-account-container select {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 2px solid #d4af37;
    border-radius: 8px;
    background-color: #ffffff;
    font-size: 14px;
    font-family: Arial, sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.create-account-container input:focus,
.create-account-container select:focus {
    outline: none;
    border-color: #6b3e26;
    background-color: #fefefe;
    box-shadow: 0 0 0 3px rgba(107, 62, 38, 0.1);
    transform: translateY(-1px);
}

.create-account-container input:hover,
.create-account-container select:hover {
    border-color: #8b5a3c;
}

/* Labels específicas do CAPTCHA */
.captcha-label {
    font-weight: bold;
    color: #6b3e26;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
    text-align: center;
}

/* Container do CAPTCHA - mantendo o alinhamento perfeito */
.captcha-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 15px 0 25px 0;
    flex-wrap: wrap;
    padding: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    border: 1px solid #d4af37;
}

/* Display do código CAPTCHA */
.captcha-display {
    background: linear-gradient(45deg, #8B4513, #A0522D);
    border: 2px solid #654321;
    border-radius: 8px;
    padding: 15px 20px;
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: bold;
    color: #FFFFFF;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 8px;
    text-align: center;
    min-width: 120px;
    transform: rotate(-2deg);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    user-select: none;
    position: relative;
    overflow: hidden;
}

.captcha-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(255,255,255,0.1) 2px,
        rgba(255,255,255,0.1) 4px
    );
    pointer-events: none;
}

/* Input do CAPTCHA */
.captcha-input {
    padding: 12px;
    border: 2px solid #8B4513;
    border-radius: 8px;
    font-size: 18px;
    width: 120px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    background: #ffffff;
    transition: all 0.3s ease;
}

.captcha-input:focus {
    border-color: #6b3e26;
    outline: none;
    box-shadow: 0 0 0 3px rgba(107, 62, 38, 0.2);
    transform: scale(1.05);
}

/* Botão refresh do CAPTCHA */
.captcha-refresh {
    background: linear-gradient(135deg, #6b3e26, #8b5a3c);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.captcha-refresh:hover {
    background: linear-gradient(135deg, #8b5a3c, #6b3e26);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.captcha-refresh:active {
    transform: translateY(0);
}

/* Container dos botões principais */
.image-button {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 45px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    text-align: center;    
    text-decoration: none;
    margin: 10px auto;
    transition: all 0.3s ease;
}

.image-button:hover {
    transform: translateY(-2px);
}

.image-button .button-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.image-button .button-img.hover {
    opacity: 0;
}

.image-button:hover .button-img.hover {
    opacity: 1;
}

.image-button:hover .button-img.default {
    opacity: 0;
}

.image-button span {
    position: relative;
    color: white;
    font-size: 14px;
    font-weight: bold;
    z-index: 1;
    pointer-events: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Container para organizar botões */
.buttons-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
}

/* Mensagens de erro e sucesso */
.error {
    color: #d32f2f;
    text-align: center;
    margin: 15px 0;
    font-weight: bold;
    background: #ffebee;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #d32f2f;
    font-size: 14px;
}

.captcha-error {
    color: #d32f2f;
    font-size: 14px;
    margin: 10px 0;
    font-weight: bold;
    background: #ffebee;
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 4px solid #d32f2f;
    text-align: center;
}

/* Página de sucesso */
.brown-light {
    background: linear-gradient(135deg, #f4e2c6, #e8d5b7);
    border-radius: 12px;
    color: #6b3e26;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.brown-dark {
    background: linear-gradient(135deg, #e0cba9, #d4b896);
    border-radius: 8px;
    color: #6b3e26;
    padding: 15px;
    margin: 15px 0;
    border: 2px solid #d4af37;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

/* Estados visuais do input CAPTCHA */
.captcha-input.error {
    border-color: #d32f2f;
    background-color: #ffebee;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.2);
}

.captcha-input.success {
    border-color: #4caf50;
    background-color: #e8f5e8;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
    .create-account-container {
        max-width: 95%;
        margin: 20px auto;
        padding: 20px;
    }
    
    .captcha-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding: 15px;
    }
    
    .captcha-display {
        width: 180px;
        font-size: 20px;
        letter-spacing: 6px;
        padding: 12px 16px;
    }
    
    .captcha-input {
        width: 140px;
        font-size: 16px;
        padding: 10px;
    }
    
    .captcha-refresh {
        width: auto;
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .image-button {
        width: 120px;
        height: 40px;
    }
    
    .create-account-container h2 {
        font-size: 1.2em;
    }
    
    /* Botões lado a lado em tablets */
    .buttons-container {
        flex-direction: row;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .create-account-container {
        padding: 15px;
    }
    
    .captcha-display {
        font-size: 18px;
        letter-spacing: 4px;
        width: 160px;
    }
    
    .captcha-input {
        width: 120px;
        font-size: 14px;
    }
    
    .create-account-container input,
    .create-account-container select {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Animações sutis */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.create-account-container {
    animation: fadeInUp 0.6s ease-out;
}

/* Hover effects para inputs */
.create-account-container input:not(.captcha-input):hover,
.create-account-container select:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Estilo para campos obrigatórios */
.create-account-container input[required]:invalid:not(:focus) {
    border-color: #ff9800;
}

.create-account-container input[required]:valid:not(:focus) {
    border-color: #4caf50;
}

/* Melhorias no select */
.create-account-container select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%236b3e26' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    appearance: none;
}

.create-account-container select::-ms-expand {
    display: none;
}

/* Placeholder customizado */
.create-account-container input::placeholder {
    color: #999;
    font-style: italic;
}

.create-account-container input:focus::placeholder {
    color: #ccc;
}