.container {
  max-width: 500px;
  margin: 2rem auto;
  padding: 1rem;
  font-family: Arial, sans-serif;
}

h1 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #333;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  margin: 0.5rem 0;
  border: 2px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

input:first-of-type {
  border-radius: 12px;
  background-color: #f9f9f9;
}

input:focus,
textarea:focus {
  border-color: #4a90e2;
  outline: none;
}

input:valid,
select:valid,
textarea:valid {
  border-color: green;
}

input:invalid,
select:invalid,
textarea:invalid {
  border-color: red;
}

.radio-group {
  display: flex;
  gap: 1.5rem;
  margin: 1rem 0;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.radio-group input[type="radio"] {
  width: 18px;
  height: 18px;
}

.radio-group input[type="radio"]:checked {
  border: 2px solid #4a90e2;
  background-color: #e0f0ff;
  box-shadow: 0 0 5px #4a90e2;
}

.radio-group input[type="radio"]:checked + label,
.radio-group input[type="radio"]:checked ~ label {
  color: #4a90e2;
  font-weight: bold;
}

/* Because input is inside label, above selector won't work correctly. We'll fix label text color on checked with this: */
.radio-group input[type="radio"]:checked {
  /* no changes here, just keep styling */
}

.radio-group input[type="radio"]:checked + label,
.radio-group label input[type="radio"]:checked + span {
  color: #4a90e2;
  font-weight: bold;
}

/* Instead, use this trick: */
.radio-group label {
  color: #000;
  font-weight: normal;
}

.radio-group input[type="radio"]:checked + label,
.radio-group input[type="radio"]:checked + span,
.radio-group input[type="radio"]:checked ~ label {
  color: #4a90e2;
  font-weight: bold;
}

button {
  padding: 0.75rem 1.5rem;
  border: none;
  background-color: #4a90e2;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #357abd;
}


