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

:root { --footer-height: 40px; } /* matches your .footer height */

/* Make the blue area fill the screen and serve as the positioning context */
.body-box {
  background-color: #0000aa;
  color: #ffffff;
  font-family: 'Courier New', monospace;
  margin: 0;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* Put the black bar above the sticky footer */
.bottom-bar {
  position: fixed;                 /* stick to viewport */
  left: 0;
  right: 0;
  bottom: var(--footer-height);    /* sit right above your footer */
  background-color: black;
  color: #ffffff;
  padding: 0.2rem;
  text-align: center;
  white-space: nowrap;
}

/* (Optional) iOS safe-area support */
@supports (padding: max(0px)) {
  .bottom-bar {
    bottom: calc(var(--footer-height) + env(safe-area-inset-bottom));
  }
}

    .top-bar {
      background-color: #000088;
      color: #ffffff;
      padding: 0.2rem;
      border-bottom: 1px solid #ffffff;
      text-align: center;
      white-space: nowrap;
      position: absolute;
      top: 60px;
    }

.top-bar-container {
  background-color: #000088; /* DOS dark blue */
  /* color: #ffff00; DOS yellow */
  color: white;
  font-family: 'Courier New', monospace;
  font-size: 16px;
/*  border: 2px solid #ffff00; */
  border: 2px solid white;
  box-sizing: border-box;
  width: 100%;
  padding: 2px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: absolute;
  top: 60px; /* stays in place */
  left: 0;
}

.main-message {
  background-color: #00ffff;
  color: #000000;
  display: inline-block;
  padding: 0.4rem 2rem;
  font-weight: bold;
  position: absolute;
  top: calc(60px + 40px + 10px); /* top-bar top + bar height + gap */
  left: 50%;
  transform: translateX(-50%);
}

.menu-box {
  background-color: #000088;
  border: 2px solid #ffffff;
  width: 500px;
  min-height: 300px;
  padding: 0;
  position: absolute;
  top: calc(60px + 40px + 10px + 50px + 10px);
  /* top-bar top + bar height + gap + main-message height + gap */
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 10px 16px #555;
}

.black-box {
  background-color: black;
  color: white;
  border: 2px solid white;
  width: 1000px;
  min-height: 700px;
  padding: 5px;
  position: absolute;
  top: calc(60px + 40px + 10px + 50px + 10px);
  /* top-bar top + bar height + gap + main-message height + gap */
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 5px 6px #555;
}

.white-bg {
  background-color: white;
  color: black;
  border: 2px solid black;
}

@media (max-width: 767.98px) {
  .menu-box {
    width: 90vw; /* shrink to fit mobile screens */
    min-width: unset; /* remove fixed minimum if needed */
  }

  .black-box {
    width: 90vw; /* shrink to fit mobile screens */
    min-width: unset; /* remove fixed minimum if needed */
  }

  .main-message {
    width: 100%;
  }

  .top-bar-container {
    font-size: 12px;
  }
}

    .menu-title {
      background-color: #00aaaa;
      color: #000000;
      padding: 0.2rem 0.5rem;
      font-weight: bold;
      text-align: center;
      border-bottom: 1px solid #ffffff;
    }

    .menu-option {
      padding: 0.3rem 0.5rem;
      cursor: pointer;
    }

    .menu-option:hover, .menu-option.selected {
      background-color: Lightgray;
      color: #000000;
    }
