/* General Form Wrapper */
form {
  max-width: 700px;
  margin: 30px auto;
  padding: 25px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fafafa;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

/* Headings */
h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #222;
}

h3 {
  margin-top: 25px;
  color: #444;
  
  padding-left: 8px;
}

/* Labels */
label {
  display: block;
  font-weight: 600;
  margin: 10px 0 5px;
  color: #333;
}

/* Inputs, Selects, Textarea */
input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #bbb;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: #fff;
}

input[type="file"] {
  margin-top: 6px;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #111;
  box-shadow: 0 0 4px rgba(0,0,0,0.15);
}

/* Button */
button {
  display: block;
  width: 100%;
  background: #111;
  color: #fff;
  padding: 12px;
  margin-top: 20px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  background: #333;
}

/* Exam subject/grade rows */
select[name="subject1[]"],
select[name="grade1[]"],
select[name="subject2[]"],
select[name="grade2[]"] {
  width: 48%;
  display: inline-block;
  margin: 5px 1% 10px 0;
}

/* Responsive */
@media screen and (max-width: 600px) {
  form {
    padding: 15px;
  }

  select[name="subject1[]"],
  select[name="grade1[]"],
  select[name="subject2[]"],
  select[name="grade2[]"] {
    width: 100%;
    margin: 5px 0;
  }
}
