/* Reset e estilos gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0f0f1f 0%, #1a1a2e 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Background com partículas */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
}

/* Container principal */
.cadastro-container {
    width: 100%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Decoração superior */
.decoracao-topo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #4d7cfe, #00d4ff, #4d7cfe);
}

/* Cabeçalho */
.cadastro-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-cadastro {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.logo-icon {
    font-size: 40px;
    color: #4d7cfe;
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #4d7cfe, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cadastro-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    margin-bottom: 10px;
    color: #fff;
}

.cadastro-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

/* Formulário */
#formCadastro {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Grupos de input */
.input-group {
    position: relative;
    width: 100%;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.input-group label i {
    margin-right: 10px;
    color: #4d7cfe;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper input {
    width: 100%;
    padding: 18px 50px 18px 20px;
    background: rgba(255, 255, 255, 0.07);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #4d7cfe;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(77, 124, 254, 0.2);
}

.input-wrapper input:focus + .input-highlight {
    width: 100%;
}

.input-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, #4d7cfe, #00d4ff);
    border-radius: 2px;
    transition: width 0.4s;
    z-index: 2;
}

.input-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
    z-index: 2;
}

.input-wrapper input:focus ~ .input-icon {
    color: #4d7cfe;
}

/* Validação visual */
.input-wrapper input.valid {
    border-color: #2ecc71;
}

.input-wrapper input.invalid {
    border-color: #e74c3c;
}

.validation-message {
    font-size: 0.85rem;
    margin-top: 5px;
    padding-left: 5px;
    height: 20px;
    transition: all 0.3s;
}

.validation-message.valid {
    color: #2ecc71;
}

.validation-message.invalid {
    color: #e74c3c;
}

/* Botão de submit */
.submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(90deg, #4d7cfe, #00d4ff);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(77, 124, 254, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(77, 124, 254, 0.4);
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-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.7s;
}

.submit-btn:hover::before {
    left: 100%;
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #4d7cfe, #00d4ff);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    border-radius: 12px;
}

.btn-loader.active {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 25px;
    height: 25px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mensagem de status */
.status-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 0.95rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
}

.status-message.show {
    opacity: 1;
    transform: translateY(0);
}

.status-message.success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #2ecc71;
}

.status-message.error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

/* Links de navegação */
.cadastro-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.link-voltar {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4d7cfe;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.link-voltar:hover {
    color: #00d4ff;
    transform: translateX(-5px);
}

.link-login {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.link-login a {
    color: #4d7cfe;
    text-decoration: none;
    font-weight: 500;
}

.link-login a:hover {
    color: #00d4ff;
    text-decoration: underline;
}

/* Informações de segurança */
.security-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
    border-left: 4px solid #4d7cfe;
}

.security-info h4 {
    color: #4d7cfe;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.security-info ul {
    list-style: none;
    padding-left: 10px;
}

.security-info li {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 10px;
}

.security-info li i {
    color: #2ecc71;
    font-size: 0.8rem;
}

/* Máscara para inputs */
.input-wrapper input {
    letter-spacing: 0.5px;
}

/* Responsividade */
@media (max-width: 768px) {
    .cadastro-container {
        padding: 30px 25px;
        margin: 20px;
    }
    
    .logo-text {
        font-size: 2rem;
    }
    
    .cadastro-header h2 {
        font-size: 1.7rem;
    }
    
    .cadastro-links {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .cadastro-container {
        padding: 25px 20px;
    }
    
    .logo-cadastro {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .input-wrapper input {
        padding: 16px 45px 16px 16px;
    }
    
    .security-info {
        padding: 15px;
    }
}

/* Animações para entrada dos campos */
@keyframes fieldSlide {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.input-group {
    animation: fieldSlide 0.5s ease-out forwards;
}

.input-group:nth-child(1) { animation-delay: 0.1s; }
.input-group:nth-child(2) { animation-delay: 0.2s; }
.input-group:nth-child(3) { animation-delay: 0.3s; }
.input-group:nth-child(4) { animation-delay: 0.4s; }
.input-group:nth-child(5) { animation-delay: 0.5s; }
.input-group:nth-child(6) { animation-delay: 0.6s; }

/* Efeito de shake para erros */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}