* {
  box-sizing: border-box;
}

body {
  font-family: "Poppins", system-ui, sans-serif;
  background-color: #fef6f9; /* soft pink-ish background */
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

main {
  background: #ffffff;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  max-width: 450px;
  width: 100%;
}

h1 {
  text-align: center;
  color: #4f46e5; /* nice purple accent */
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}

input,
textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: 12px;
  border: 1px solid #ccc;
  transition: all 0.2s ease;
  background-color: #fafafa;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background-color: #4f46e5;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  margin-top: 0.75rem;
}

button:hover {
  background-color: #3730a3;
  box-shadow: 0 4px 8px rgba(79, 70, 229, 0.2);
}

button:focus {
  outline: 3px solid #c7d2fe;
  outline-offset: 2px;
}

.error {
  color: #e02424;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

#success-message {
  color: #16a34a;
  font-weight: 600;
  text-align: center;
  margin-top: 1rem;
}

/* Optional: subtle animation for error messages */
.error {
  animation: shake 0.2s ease;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px);
  }
  50% {
    transform: translateX(3px);
  }
  75% {
    transform: translateX(-3px);
  }
  100% {
    transform: translateX(0);
  }
}

.send-a-message {
  border: 2px solid #4f46e5; /* purple border */
  border-radius: 12px;        /* optional rounded corners */
  padding: 1.5rem;
}

.send-a-message legend {
  color: #4f46e5; /* same purple as border */
  font-weight: 600;
  padding: 0 0.5rem; /* prevent touching border */
  font-size: 1.1rem;
}