/* Base reset and layout */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}
body {
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
  text-align: center;
  padding: 10px;
  position: relative;
}

/* Hide game/end screens by default */
#gameScreen,
#endScreen {
  display: none;
}

/* Center game content vertically */
#gameScreen {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border:10px solid black;
}

/* Information panel in upper-left */
.info {
  position: absolute;
  left: 20px;
  top: 20px;
  text-align: left;
}

/* Large letter display */
#letterDisplay {
  font-size: 200px;
  font-weight: bold;
  margin: 40px 0 0 0;
  margin-top: 100px;
}

/* Result text */
#resultDisplay {
  font-size: 24px;
  height: 30px;
  margin-bottom: 20px;
}

/* Debug display (optional) */
#debugDisplay {
  margin-top: 40px;
  font-size: 12px;
  overflow-x: auto;
  white-space: nowrap;
}
.debugItem {
  color: lightgray;
  margin: 0 5px;
}
.debugItem.current {
  font-weight: bold;
  color: black;
}

/* Correct / Wrong coloring */
.correct { color: blue; }
.wrong   { color: red; }

/* Form controls */
button,
select {
  font-size: 16px;
  padding: 8px 12px;
}

/* On-screen keyboard at bottom of gameScreen */
#keyboard {
  margin-top: 20px;
  width: 100%;
  background: #f0f0f0;
  padding: 5px 0;
  box-sizing: border-box;
  user-select: none;
}
.key-row {
  display: flex;
  justify-content: center;
  margin: 2px 0;
}
.key {
  flex: 1;
  max-width: 40px;
  margin: 0 2px;
  padding: 10px 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-align: center;
  font-size: 16px;
  cursor: pointer;
}
.key:active {
  background: #ddd;
}

/* Reserve space for keyboard when not in gameScreen */
body:not(#gameScreen) {
  padding-bottom: 120px;
}
#result{
  font-size: 20px;
    font-weight: bold;
}