* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0b0e14;
  color: #d8dee9;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

#game { display: block; width: 100vw; height: 100vh; }

#hud {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 28px;
  font-size: 22px;
  text-shadow: 0 0 8px #000;
  pointer-events: none;
}
#hud[hidden] { display: none; }
#hud-mult { color: #f5c542; }
#hud-mult.hot { color: #ff6b4a; }

.panel {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(11, 14, 20, 0.82);
  text-align: center;
  padding: 20px;
}
.panel[hidden] { display: none; }

h1 { letter-spacing: 0.3em; font-size: 34px; margin: 0 0 6px; color: #7aa2f7; }
.panel p { margin: 2px 0; }
.big { font-size: 20px; }
.big strong { color: #f5c542; font-size: 26px; }
.dim { color: #6b7385; }
.go { margin-top: 14px; color: #9ece6a; }

kbd {
  background: #1a1f2c;
  border: 1px solid #3b4252;
  border-radius: 4px;
  padding: 1px 7px;
  font-family: inherit;
}

.board-wrap { margin-top: 22px; width: 330px; }
.tabs { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; }
.tabs button {
  background: #1a1f2c;
  border: 1px solid #3b4252;
  color: #d8dee9;
  font: inherit;
  padding: 4px 14px;
  border-radius: 4px;
  cursor: pointer;
}
.tabs button.active { border-color: #7aa2f7; color: #7aa2f7; }

#board {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rank;
  text-align: left;
  min-height: 180px;
}
#board li {
  display: flex;
  padding: 2px 8px;
  counter-increment: rank;
}
#board li::before { content: counter(rank) "."; color: #6b7385; margin-right: 10px; min-width: 24px; }
#board li span:first-of-type { flex: 1; }
#board li.dim::before { content: ""; }
#board li.me { color: #f5c542; }
#board li span:last-child { color: #9ece6a; }

#submit-form { display: flex; gap: 8px; margin-top: 10px; }
#handle {
  background: #1a1f2c;
  border: 1px solid #3b4252;
  color: #d8dee9;
  font: inherit;
  padding: 4px 10px;
  border-radius: 4px;
  width: 180px;
}
#handle:focus { outline: none; border-color: #7aa2f7; }
#submit-status { min-height: 1.2em; color: #9ece6a; }
#submit-status.err { color: #ff6b4a; }
