body {
            margin: 0;
            font-family: 'Roboto', sans-serif;
            background: linear-gradient(120deg, #4facfe, #ff80ab);
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh; 
            padding: 20px 0; 
        }

        .formulario {
            background: #fff;
            border-radius: 16px;
            box-shadow: 0 8px 30px rgba(0,0,0,0.2);
            padding: 30px; /* Reduz ligeiramente o padding para formulário mais longo */
            width: 100%;
            max-width: 450px;
            text-align: center;
            animation: fadeIn 0.6s ease-in-out;
            margin: 20px 15px; /* Garante margem lateral em mobile */
        }

        .formulario h2 {
            font-family: 'Oswald', sans-serif;
            margin-bottom: 25px;
            font-size: 2rem;
            color: #444;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .formulario h2 i {
            margin-right: 10px;
            color: #ff80ab;
        }

        .form-group {
            margin-bottom: 15px;
            text-align: left;
        }
        
        .form-group label {
            font-weight: 600;
            color: #333;
            display: block;
            margin-bottom: 5px;
            font-size: 0.95rem;
        }

        input[type='text'],
        input[type='password'] {
            width: 100%;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-size: 1rem;
            outline: none;
            box-sizing: border-box; /* Garante que o padding não aumenta a largura total */
            transition: border-color 0.3s, box-shadow 0.3s;
        }

        input:focus {
            border-color: #4facfe;
            box-shadow: 0 0 5px rgba(79, 172, 254, 0.5);
        }

        /* Botão de Registo */
        .btn-registar {
            background: linear-gradient(90deg, #4facfe, #ff80ab);
            border: none;
            color: white;
            padding: 12px;
            font-size: 1.1rem;
            border-radius: 25px;
            cursor: pointer;
            width: 100%;
            font-family: 'Oswald', sans-serif;
            letter-spacing: 0.5px;
            margin-top: 15px;
            transition: transform 0.2s ease, box-shadow 0.3s ease;
        }

        .btn-registar:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(0,0,0,0.15);
        }
        
        .login-link {
            margin-top: 20px;
            font-size: 0.95rem;
        }
        
        .login-link a {
            color: #4facfe;
            font-weight: bold;
            text-decoration: none;
            transition: color 0.3s;
        }

        .login-link a:hover {
            color: #ff80ab;
        }
.password-feedback {
    margin-top: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
    height: 1.2rem; 
}

.weak {
    color: #ff4d4f; /* Vermelho claro */
}
.medium {
    color: #faad14; /* Amarelo */
}
.strong {
    color: #52c41a; /* Verde */
}
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-20px); }
            to   { opacity: 1; transform: translateY(0); }
        }
        
        /* Otimização Específica para Mobile (Ecrãs muito pequenos) */
        @media (max-width: 500px) {
            .formulario {
                padding: 25px 20px;
                margin: 10px;
            }
            .formulario h2 {
                font-size: 1.8rem;
            }
            input[type='text'], input[type='password'] {
                padding: 10px;
                font-size: 0.95rem;
            }
        }