body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
}

.container {
  background-color: #fff;
  padding: 20px 30px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  width: 400px;
}

h1 {
  text-align: center;
  color: #333;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  width: calc(100% - 22px); /* Account for padding and border */
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box; /* Makes width calculation easier */
}

.form-group input:invalid {
  border-color: #e74c3c; /* Light red for invalid built-in states */
}
/* You can add a .valid class if you want to style valid inputs too */

.form-group .error-message {
  display: block;
  color: #e74c3c; /* Red for error messages */
  font-size: 0.9em;
  margin-top: 5px;
  min-height: 1em; /* Reserve space to prevent layout shifts */
}

.form-group small {
  display: block;
  font-size: 0.8em;
  color: #777;
  margin-top: 3px;
}

button[type="submit"] {
  width: 100%;
  padding: 10px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

button[type="submit"]:hover {
  background-color: #2980b9;
}
