/* === Section 0: Reset === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "comic sans ms", "trebuchet ms", sans-serif;
  background: pink;
  color: black;
  max-width: 700px;
  margin: 0 auto;
  padding: 30px 20px;
  min-height: 100vh;
}

header {
  text-align: center;
  margin-bottom: 40px;
}

#kid-picture {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: block;
  margin: 0 auto 16px;
}

h1 {
  font-family: "playfair display", georgia, serif;
  color: purple;
  font-size: 36px;
  margin-bottom: 10px;
}

#kid-name {
  color: cyan;
}

.subtitle {
  font-size: 18px;
  color: red;
}

main {
  background: white;
  padding: 30px;
  border-radius: 24px;
}

label {
  display: block;
  font-size: 20px;
  font-weight: bold;
  color: purple;
  margin-bottom: 10px;
}

#animal-input {
  width: 100%;
  padding: 14px 18px;
  border: 3px solid pink;
  border-radius: 16px;
  box-sizing: border-box;
}

#find-fact-btn {
  display: block;
  margin: 20px auto;
  padding: 16px 36px;
  font-size: 20px;
  font-weight: bold;
  color: pink;
  background: yellow;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}

#fact-display {
  margin-top: 24px;
  padding: 24px;
  background: purple;
  border: 3px dashed pink;
  border-radius: 16px;
  font-size: 20px;
  line-height: 1.5;
  color: pink;
  min-height: 80px;
  text-align: center;
}

footer {
  text-align: center;
  margin-top: 30px;
  font-size: 14px;
  color: red;
}

/* === Section 7: Mobile screens === */
@media (max-width: 600px) {
  body {
    padding: 20px 16px;
  }

  h1 {
    font-size: 28px;
  }

  header p {
    font-size: 16px;
  }

  main {
    padding: 20px;
    border-radius: 20px;
  }

  label {
    font-size: 18px;
  }

  #animal-input {
    font-size: 16px; /* 16px avoids iOS Safari auto-zoom on focus */
    padding: 12px 16px;
  }
}
