*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #1a1a2e;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: 'Courier New', Courier, monospace;
  color: #e0e0e0;
}

#game-container {
  position: relative;
  display: inline-block;
  border: 2px solid #4a4a8a;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(100, 100, 220, 0.3);
}

#game-canvas {
  display: block;
  background: #0f0f23;
}

#ui-overlay {
  position: absolute;
  top: 12px;
  right: 16px;
  display: flex;
  gap: 24px;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #aaaacc;
  pointer-events: none;
  z-index: 10;
}

#score-display {
  min-width: 60px;
  text-align: right;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  background: rgba(15, 15, 35, 0.85);
  z-index: 20;
}

.screen.hidden {
  display: none;
}

h1 {
  font-size: 48px;
  color: #8888ff;
  letter-spacing: 6px;
  text-transform: uppercase;
}

h2 {
  font-size: 36px;
  color: #ff6666;
  letter-spacing: 4px;
}

.subtitle {
  font-size: 16px;
  color: #8888aa;
}

.hint {
  font-size: 14px;
  color: #6666aa;
  margin-top: 8px;
}

kbd {
  background: #2a2a4a;
  border: 1px solid #5555aa;
  border-radius: 4px;
  padding: 2px 7px;
  font-family: inherit;
  color: #aaaaff;
}

#final-score {
  font-size: 18px;
  color: #aaaacc;
}
