body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    /* background: linear-gradient(135deg, #667eea, #764ba2); */

    background: linear-gradient(135deg, #5f2c82, #49a09d);

    /*  FIX START */
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* key fix */
    padding: 30px 10px;
    overflow-y: auto; /* allow scroll */
    /*  FIX END */
}

.container {
    width: 100%;
    max-width: 500px;
}

.card {
    /* background: white; */
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);

  
}

.card h2 {
    margin-bottom: 20px;
}

/* Make ALL inputs consistent */
input {
    width: 100%;
    height: 45px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 16px;
    box-sizing: border-box;
}
form input,
.iti,
.password-box,
.captcha-box,
.consent-box {
    margin-bottom: 12px; /* ✅ uniform spacing */
}
button {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background: #5a67d8;
}

#message {
    margin-top: 15px;
    font-weight: bold;
}   

/* Fix intl-tel-input wrapper */
.iti {
    width: 100%;
    display: block;
}

/* Fix internal wrapper */
.iti--allow-dropdown {
    width: 100%;
}

/* Fix actual phone input */
.iti input {
    width: 100% !important;
    height: 45px;
    padding-left: 60px; /* space for flag */
    box-sizing: border-box;
}

.consent-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    font-size: 14px;
}

.captcha-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

#captchaText {
    display: inline-block;
    background: #eee;
    padding: 10px 15px;
    font-weight: bold;
    white-space: nowrap;
    letter-spacing: 3px;
    margin-bottom: 10px;
}
.captcha-box input {
    
    height: 45px;
    margin: 0;      /* remove extra spacing */
}
.password-box {
    position: relative;
}

.password-box input {
    width: 100%;
    padding-right: 40px;
}

#togglePassword {
    position: absolute;
    right: 17px;
    font-size: 29px;
    cursor: pointer;
}

#passwordHint {
    font-size: 12px;
    color: #888;
    display: block;
    margin-top: -10px;
    margin-bottom: 10px;
}

.consent-box input[type="checkbox"] {
    width: auto;      /* remove full width */
    height: auto;     /* remove 45px height */
    margin: 0;        /* remove extra spacing */
    cursor: pointer;
}

.captcha-box input:focus {
    outline: none;
    border: 1px solid #667eea;
}

/* =========================
   USERNAME STATUS TEXT
========================= */
#usernameStatus,#dbStatus {
    display: block;
    font-size: 12px;
    margin-top: 5px;
    text-align: left;
    POSITION: relative;
    TOP: -9PX;
    LEFT: 163PX;
}

/* Optional colors */
.username-valid {
    color: green;
}

.username-error {
    color: red;
}

.username-checking {
    color: gray;
}

input.valid {
    border: 1px solid green;
}

input.error {
    border: 1px solid red;
}

#passwordStrength {
    display: block;
    font-size: 12px;
    margin-top: 5px;
    text-align: left;
}

.username-row {
    display: flex;
    gap: 10px;
}

.username-row select,
.username-row input {
    width: 50%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
}
.username-row input {
    width: 65%;
}
.username-row select {
    height: 45px;
    width: 35%;
    cursor: pointer;
}

.username-row input[readonly] {
    background: #eee;
}