body {
    font-family: Arial, sans-serif;
    background:#f4f4f4;
    font-size:14px;
    margin: 0;
    /* ADD THESE */
    min-height: 100vh;
    display: flex;
    align-items: center;      /* vertical center */
    justify-content: center;  /* horizontal center */
}

.container {
    width:420px !important;
    margin-top: -100px;
    max-width: 100%;
    background:#fff;
    padding:30px;
    border-radius:6px;
    box-shadow:0 0 10px rgba(0,0,0,0.1);
}

label {
    display:block;
    margin-top:10px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width:95%;
    padding:10px;
}

button {
    margin-top:20px;
    padding:10px 18px;
    cursor: pointer;
}

.links {
    margin-top:20px;
    text-align:center;
}

.links a {
    display:block;
    margin-top:8px;
    text-decoration:none;
}

.links a:hover {
    text-decoration: underline;
}

.error {
    color:red;
    margin-top:15px;
}

.success {
    color:green;
    margin-top:15px;
}

/* update_password.php uses this as "message" */
.message {
    color:red;
    margin-top:15px;
}

.actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.actions button { margin-top: 0; }

/* inline help styling (used in update_password.php) */
.pw-hint {
    display:block;
    margin-top:4px;
    color:#777;
}
.pw-hint.good { color: green; }
.pw-hint.bad  { color: red; }

/* wide container option (optional) */
.container.wide {
    max-width:600px;
    margin:40px auto;
}

@media screen and (max-width: 768px) {
  body{
    margin-top: 50px;
    min-height: 100dvh;     /* mobile-safe viewport */
    display: flex;
    justify-content: center;
    align-items: flex-start; /* stops it sitting too low */
    padding-top: 16px;       /* small breathing room */
  }

  .container{
    width: 100% !important;
    max-width: 420px;       /* keeps your desktop width intent */
    padding: 20px;
  }
}

