:root {
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.5;
  font-weight: 400;
  color-scheme: dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #000;
}

body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#game-ui {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* Let clicks pass through to canvas */
  z-index: 10;
}

#instructions {
  position: absolute;
  top: 20px;
  left: 20px;
  background: #000;
  padding: 15px;
  border: 4px solid #0ff;
  border-radius: 0;
  color: #0ff;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  box-shadow: 0 0 10px #0ff;
}

#instructions h2 {
  margin: 0 0 10px 0;
  font-size: 1.2rem;
  color: #f0f;
  text-shadow: 0 0 5px #f0f;
}

#tutorial-message {
  position: absolute;
  top: 200px;
  /* Moved down to avoid overlap */
  left: 20px;
  background: #000;
  padding: 10px;
  border: 4px solid #ff0;
  color: #ff0;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  text-shadow: 0 0 5px #ff0;
  font-size: 1.1rem;
  box-shadow: 0 0 10px #ff0;
}

#hud {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: flex;
  gap: 20px;
  font-size: 1.5rem;
  font-weight: bold;
}

.hud-item {
  background: #000;
  padding: 10px 20px;
  border: 4px solid #fff;
  border-radius: 0;
  box-shadow: 0 0 5px #fff;
  color: #fff;
  font-family: 'Courier New', monospace;
}

#reticle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: width 0.1s, height 0.1s, background 0.1s;
}

#freeze-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  backdrop-filter: grayscale(100%) contrast(1.2);
  background: rgba(0, 0, 0, 0.1);
}

.freeze-active {
  opacity: 1 !important;
}

.teleport-valid {
  background: #0f0 !important;
  width: 20px !important;
  height: 20px !important;
}

.teleport-invalid {
  background: #f00 !important;
  width: 10px !important;
  height: 10px !important;
}
