body {
  font-family: Arial, sans-serif;
  background: #f0f4f8;
  margin: 0;
  padding: 0;
  text-align: center;
}

/* Header + Footer */
header, footer {
  background: #470661;
  color: white;
  padding: 15px 0;
}

nav a {
  color: white;
  margin: 0 15px;
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
}

/* Form container */
.form-container {
  background: #faf7f7;
  max-width: 420px;
  margin: 40px auto;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.15);
}

h2 {
  margin-bottom: 15px;
  color: #2c2c2c;
}

/* Label styling */
label {
  display: block;
  text-align: left;
  font-weight: bold;
  margin-top: 10px;
  color: #000;
}

/* Input, select, and button styles */
input,
select,
button {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border-radius: 5px;
  border: 1px solid #ccc;
  transition: border 0.3s ease, box-shadow 0.3s ease;
  color: #000;
  background-color: #fff;
}

input::placeholder {
  color: #777;
}

/* 👇 Red placeholder when error */
.input-error::placeholder {
  color: #e50914 !important;
  opacity: 1;
}

input:focus,
select:focus {
  border-color: #8e24aa;
  box-shadow: 0 0 6px rgba(142, 36, 170, 0.3);
  outline: none;
}

/* Button styling */
button {
  background: linear-gradient(90deg, #6a1b9a, #8e24aa);
  color: white;
  border: none;
  margin-top: 20px;
  cursor: pointer;
  border-radius: 6px;
  padding: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

button:hover {
  background: linear-gradient(90deg, #8e24aa, #6a1b9a);
  transform: scale(1.03);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.25);
}

/* 👇 Error message styling */
.error-msg {
  color: #e50914;
  font-size: 0.9rem;
  margin-top: 4px;
  margin-bottom: 8px;
  text-align: left;
}

/* 👇 Input red border when invalid */
.input-error {
  border: 2px solid #e50914 !important;
  box-shadow: 0 0 6px rgba(229, 9, 20, 0.3);
}

/* Gender section */
.gender-group {
  margin-top: 15px;
}

.gender-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  text-align: left;
}

.gender-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.gender-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: normal;
  cursor: pointer;
}

.gender-options input[type="radio"] {
  accent-color: #8e24aa;
  transform: scale(1.2);
  cursor: pointer;
}

/* Country dropdown */
select.input-error {
  border: 2px solid #e50914 !important;
  box-shadow: 0 0 5px rgba(229, 9, 20, 0.25);
}

/* Terms section */
.terms {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 15px;
  margin-bottom: 5px;
  text-align: left;
  font-weight: normal;
  flex-wrap: wrap;
}

.terms input[type="checkbox"] {
  accent-color: #8e24aa;
  transform: scale(1.3);
  cursor: pointer;
  margin-top: 3px;
}

.terms label {
  flex: 1;
  font-weight: normal;
  line-height: 1.5;
  cursor: pointer;
  color: #222;
}

/* Terms error */
#termsError {
  color: #e50914;
  font-size: 0.9rem;
  margin-top: 3px;
  margin-left: 28px;
}

/* Responsive */
@media (max-width: 600px) {
  .form-container {
    width: 90%;
  }

  .gender-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .terms {
    flex-direction: row;
    align-items: flex-start;
  }
}
