/* style.css */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
  color: #222;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  direction: rtl;
}
main {
  flex: 1 0 auto;
  max-width: 720px;
  width: 90%;
  margin: 1.5rem auto 3rem;
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem 2rem 2rem;
  box-shadow: 0 2px 12px rgb(0 0 0 / 0.1);
}

h1 {
  text-align: center;
  margin-bottom: 1rem;
  color: #004a99;
  font-weight: 700;
}
.intro {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  text-align: center;
  color: #333;
}
form#mentalAgeForm {
  direction: rtl;
}

.question {
  margin-bottom: 1.8rem;
}

.question h2 {
  font-size: 1.125rem;
  margin-bottom: 0.6rem;
  color: #004a99;
  font-weight: 600;
}

.options {
  list-style: none;
  padding: 0;
  margin: 0;
}

.options li {
  margin-bottom: 0.5rem;
}

label {
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 1rem;
  color: #111;
  user-select: none;
}

input[type="radio"] {
  margin-left: 0.75rem;
  accent-color: #004a99;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  cursor: pointer;
  outline-offset: 3px;
}

.buttons-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

button#submitBtn,
button#resetBtn {
  background-color: #004a99;
  border: none;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.75rem 1.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.25s ease-in-out;
  min-width: 140px;
}

button#submitBtn:hover,
button#submitBtn:focus,
button#resetBtn:hover,
button#resetBtn:focus {
  background-color: #00336b;
}

button#submitBtn:disabled {
  background-color: #889bb4;
  cursor: not-allowed;
}

#result {
  margin-top: 2rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  color: #006400;
  min-height: 2em;
}

@media (max-width: 480px) {
  main {
    width: 95%;
    padding: 1rem 1.2rem 1.2rem;
  }

  h1 {
    font-size: 1.4rem;
  }

  .intro {
    font-size: 1rem;
  }

  .question h2 {
    font-size: 1rem;
  }

  label {
    font-size: 0.95rem;
  }

  .buttons-group {
    flex-direction: column;
    gap: 0.6rem;
  }

  button#submitBtn,
  button#resetBtn {
    min-width: 100%;
  }
}