html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: url('/images/background.jpg') no-repeat center center fixed;
  background-size: cover;
  font-family: Arial, sans-serif;
  color: #fff;
  display: flex;
  flex-direction: column;
  font-size: 24px;
}

.spacer {
  flex: 1;
}

.controls-container {
  position: fixed;              /* 👈 Fix to viewport instead of page */
  bottom: 100px;                /* 👈 ~1.4in for visual spacing */
  left: 53%;
  transform: translateX(-50%);
  text-align: center;
  padding: 30px 20px;
  background: transparent;
  z-index: 10;                  /* 👈 stay on top just in case */
}

.message {
  display: block;
  height: 30px;
  font-size: 28px;
  margin-bottom: 20px;
}

select {
  font-size: 22px;
  padding: 10px;
  margin: 10px;
  width: auto;
  border: 2px solid #ccc; /* make borders visible */
  box-sizing: border-box; /* include padding in width */
  background-color: #fff;
  color: #000;
  border-radius: 4px;
}

input[type="button"] {
  font-size: 22px;
  padding: 10px 25px;
  margin: 10px;
  background-color: black;
  color: white;
  border: 2px solid white;
  cursor: pointer;
}

.accuracy-dropdown {
  font-size: 20px;
  max-width: 100%;
  width: 250px;
}

optgroup {
  font-size: 18px;
}

#resultLabel {
  display: block;
  margin: 20px auto 0 auto;
  text-align: center;
  max-width: 90%;
  color: blue;
  font-size: 2em;         /* consistent */
  line-height: 1.4;
  word-wrap: break-word;
  height: 3.5em;
  overflow: hidden;
  transition: transform 0.2s ease-in-out;
}

.version-label {
  position: fixed;
  bottom: 10px;
  right: 15px;
  font-size: 10px;
  color: white;
  opacity: 0.7;
  z-index: 1000;
  font-family: monospace;
  pointer-events: none; /* so it doesn't block clicks underneath */
}

@media (max-width: 600px) {
  body {
    font-size: 18px;
  }

  .controls-container {
    bottom: 50px;
    width: 100%;
    padding: 20px 10px;
    left: 57%;
    transform: translateX(-50%);
    z-index: 10;
  }

  select,
  .accuracy-dropdown {
    font-size: 12px;
    padding: 6px;
    margin: 6px;
    width: 125px;
  }

  input[type="button"] {
    font-size: 12px;
    padding: 8px 16px;
    margin: 6px;
  }

  #resultLabel {
    display: block;
    margin-top: 0;
    margin-bottom: 30px; /* 👈 move it up by pushing following elements down */
    text-align: center;
    width: 100%;
    color: blue;
    font-size: 1em;         /* consistent */
    line-height: 1.4;
    height: 3.5em;
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
  }
}

@media only screen and (orientation: landscape) and (max-height: 500px) {
  .controls-container {
    bottom: 20px;
    padding: 10px 5px;
    transform: translateX(-50%);
  }

  select,
  .accuracy-dropdown,
  input[type="button"] {
    font-size: 14px;
    padding: 6px 10px;
    margin: 6px;
    width: 150px;
  }

  #resultLabel {
    font-size: 1em;
    height: auto;
    line-height: 1.2;
    max-height: 4em;
  }
}