body {
  font-family: sans-serif;
  background: #f9f9f9;
  margin: 0;
  padding: 20px;
}
h1 {
  text-align: center;
  margin-bottom: 1em;
  font-size: 1.5em;
}
form {
  max-width: 700px;
  margin: 0 auto;
  background: #fff;
  padding: 15px 20px;
  border: 1px solid #ddd;
  border-radius: 5px;
}
fieldset {
  border: 1px solid #ccc;
  padding: 1.5em 1em 1em;
  margin-bottom: 1.5em;
}
legend {
  font-weight: bold;
  padding: 0 10px;
  font-size: 1.1em;
}
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1em;
}
.form-group label {
  margin-bottom: 0.3em;
  font-weight: 500;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.4em 0.6em;
  font: 1em sans-serif;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 100%;
  box-sizing: border-box;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #66afe9;
  outline: none;
}
.inline-group {
}
.form-actions {
  text-align: right;
  margin-top: 1em;
}
.btn-submit, .button {
  background-color: #007bff;
  color: #fff;
  padding: 0.6em 1.2em;
  font-size: 1em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
  text-decoration: none;
  display: inline-block;
}
.btn-submit:hover, .button:hover {
  background: #0056b3;
}
.success {
  background: #d4edda;
  color: #155724;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 4px;
}
.error {
  background: #f8d7da;
  color: #721c24;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 4px;
}
@media (min-width: 600px) {
  .form-group {
    flex-direction: row;
    align-items: center;
  }
  .form-group label {
    width: 180px;
    margin-bottom: 0;
    margin-right: 10px;
    text-align: right;
  }
  .form-group input,
  .form-group select,
  .form-group textarea {
    width: auto;
    flex: 1;
  }
  .inline-group {
    display: flex;
    gap: 20px;
  }
  .inline-group .form-group {
    flex: 1 1 0;
    align-items: flex-start;
  }
  .inline-group .form-group label {
    width: 120px;
  }
}
