/* BibleSim web UI — mobile-first, monospace, dark. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #0b0b0b;
  color: #e6e6e6;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Courier New", monospace;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  height: 100vh;
}

#output {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: auto;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom)) 10px;
  white-space: pre;
  /* Clamp font size so an 80-char line fits on ~375px phones without wrapping */
  font-size: clamp(8.5px, 2.15vw, 14px);
  line-height: 1.18;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

#loader {
  padding: 20px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

#loader .hint {
  margin-top: 6px;
  font-size: 12px;
  color: #666;
}

.spinner {
  width: 24px;
  height: 24px;
  margin: 0 auto 12px;
  border: 3px solid #333;
  border-top-color: #e6e6e6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

#controls {
  flex: 0 0 auto;
  border-top: 1px solid #222;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom)) 10px;
  background: #0b0b0b;
}

#prompt-label {
  font-size: 13px;
  color: #999;
  margin-bottom: 6px;
  padding: 0 2px;
}

#buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Buttons: min 44px tap target per platform guidelines. */
button.action {
  flex: 1 1 auto;
  min-height: 44px;
  min-width: 40px;
  padding: 8px 12px;
  background: #1a1a1a;
  color: #e6e6e6;
  border: 1px solid #333;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(255,255,255,0.1);
  touch-action: manipulation;
}
button.action:hover { background: #232323; }
button.action:active { background: #2c2c2c; transform: scale(0.98); }
button.action .num {
  display: inline-block;
  min-width: 22px;
  color: #888;
  margin-right: 6px;
}

/* Single big continue button for pause. */
button.continue {
  flex: 1 1 100%;
  justify-content: center;
  text-align: center;
  min-height: 48px;
  font-size: 15px;
}

/* Wider viewports: give the terminal a card feel */
@media (min-width: 900px) {
  body { padding: 20px; background: #050505; }
  #app {
    height: calc(100vh - 40px);
    max-width: 960px;
    margin: 0 auto;
    border: 1px solid #222;
    border-radius: 10px;
    overflow: hidden;
    background: #0b0b0b;
  }
  #output { font-size: 13px; }
  button.action { max-width: 280px; }
}
