body {
  font-family: 'Open Sans', sans-serif;
  background: #e9e3e3;
  margin: 0;
  padding: 0;
}

nav {
  background: #f5af2d;
  padding: 1rem 2rem;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

.container {
  max-width: 400px;
  margin: 40px auto;
  background: #fffcfc;
  padding: 30px 40px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.form-title {
  font-size: 1.4rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.input-group {
  position: relative;
  margin-bottom: 25px;
}

.input-group input,
.input-group select {
  font-size: 1rem;
  padding: 10px;
  display: block;
  width: 100%;
  border: 1px solid #000000;
  border-radius: 4px;
  background: transparent;
  max-width: -webkit-fill-available;
}

/* Remove native select arrow and use a custom SVG chevron so we can position it */
.input-group select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  /* Ensure extra space on the right so the chevron doesn't overlap the text */
  padding-right: 40px;
  /* Custom chevron (blue) encoded as inline SVG */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%233498db' d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  /* Move the chevron a bit left from the very edge */
  background-position: calc(100% - 14px) center;
}

.input-group label {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #6f6565;
  font-size: 1rem;
  pointer-events: none;
  transition: 0.2s ease all;
  background-color: #fff;
  padding: 0 5px;
}

/* Append red asterisk to required fields (except where .no-asterisk is used) */
.input-group label:not(.no-asterisk)::after {
  content: " *";
  color: #e74c3c; /* red */
  margin-left: 2px;
  font-weight: 700;
}

/* Strong override: ensure labels explicitly marked with .no-asterisk never get an asterisk */
.input-group label.no-asterisk::after {
  content: none !important;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group select:focus ~ label,
.input-group select:not([value=""]) ~ label {
  top: -10px;
  left: 8px;
  font-size: 0.75rem;
  color: #3498db;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

button {
  padding: 1em 6em;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background-color: #2980b9;
}

/* Responsive rules for mobile and small screens */
@media (max-width: 768px) {
  nav {
    font-size: 1.25rem;
    padding: 0.75rem 1.25rem;
  }

  .container {
    max-width: 520px;
    margin: 24px auto;
    padding: 24px;
  }

  .form-title {
    font-size: 1.25rem;
  }

  .input-group input,
  .input-group select {
    font-size: 1rem;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  nav {
    font-size: 1.1rem;
    padding: 0.6rem 1rem;
  }

  .container {
    max-width: 95%;
    margin: 16px auto;
    padding: 18px;
    border-radius: 6px;
  }

  .form-title {
    font-size: 1.1rem;
    margin-bottom: 14px;
  }

  .input-group {
    margin-bottom: 18px;
  }

  .input-group input,
  .input-group select {
    font-size: 1rem;
    padding: 12px;
  }

  .input-group label {
    left: 12px;
    top: 12px;
    font-size: 0.95rem;
  }

  /* Make buttons full-width on mobile for easier tapping */
  button {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;
  }

  /* Nudge the custom chevron further left on small screens so it doesn't feel too far right */
  .input-group select {
    background-position: calc(100% - 18px) center;
    padding-right: 44px;
  }
}