/*Currently it is being used, do we want something so broad though?*/
button {
  font-family: 'IBM Plex Mono', monospace, sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 9px 14px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

button:hover {
  background: var(--accent);
  color: var(--paper);
}

/*These stats are currently only being used in Numberspan, but are part of the SidePanel, so hmmm...*/
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat {
  border: 1px solid rgba(36, 22, 27, 0.12);
  background: var(--paper);
  padding: 10px;
}

.stat-label {
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

/*Also only used in numberspan side panel...*/
.message {
  min-height: 72px;
  border: 1px solid rgba(36, 22, 27, 0.12);
  background: var(--paper);
  padding: 12px;
  font-size: 0.82rem;
  line-height: 1.5;
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.78rem;
  line-height: 1.45;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(36, 22, 27, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.modal-card {
  width: min(520px, 100%);
  background: #ffffff;
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--accent);
  padding: 18px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-header h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.modal-close {
  min-width: 44px;
  padding: 8px 10px;
  font-size: 1rem;
}

.modal-body {
  border-top: 1px solid rgba(36, 22, 27, 0.12);
  padding-top: 14px;
}

.site-shell {
  min-height: 100vh;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px 64px;
  display: flex;
  flex-direction: column;
}

.homepage-disclaimer {
  margin-top: auto;
  padding: 16px;
  font-size: 0.8rem;
  text-align: center;
  border-top: 1px solid #ccc;
}

.site-nav {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  margin: 1rem 0 1rem;
  flex-wrap: wrap;
}

.site-error {
  text-align: center;
  padding: 2rem;
}

/* Side Panel stuff */
.game-layout {
  display: grid;
  grid-template-columns: max-content var(--panel-width, 280px);
  justify-content: center;
  gap: 32px;
  width: 100%;
  align-items: start;
}

.game-layout.panel-hidden {
  grid-template-columns: max-content;
  justify-content: center;
}

.game-layout-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  margin: 0 auto;
}

.game-layout-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 220px;
}

.panel-section-card {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(36, 22, 27, 0.10);
  padding: 16px;
}

.panel-section-card h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  font-weight: 700;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 6px;
  margin-bottom: 12px;
}

.panel-section-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* End of Side Panel stuff? */


/* ── GENERATING OVERLAY ── */
.gen-overlay {
  position: fixed;
  inset: 0;
  /*background: rgba(251, 241, 244, 0.88);*/
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 200;
}

.gen-overlay-inner{
  background: var(--paper);
  border: 2px solid var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  width: 250px;
  gap: 16px;
  z-index: 200;
}

.gen-overlay-inner p {
  font-family: Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
}

.gen-overlay-inner small {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--accent-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


@media (max-width: 760px) {

  .game-layout,
  .game-layout.panel-hidden {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
  }

  .game-layout-main {
    width: 100%;
    max-width: 100%;
  }

  .game-layout-side {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

/* - Things for settings-modal.js - */

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.settings-field select {
  width: 100%;
  border: 2px solid var(--ink);
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  font: 700 0.78rem/1.2 'IBM Plex Mono', monospace, sans-serif;
}

.settings-help {
  border: 1px solid rgba(36, 22, 27, 0.12);
  background: var(--paper);
  padding: 9px 10px;
  color: var(--ink);
  font-size: 0.76rem;
  line-height: 1.45;
}

.settings-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink);
  font-size: 0.76rem;
  line-height: 1.4;
}

.settings-check input {
  flex: 0 0 auto;
  margin-top: 2px;
}

.settings-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-actions button {
  width: 100%;
}