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

html, body {
  width: 100%;
  height: 100%;
  background: #0C0D14;
  font-family: 'Courier New', monospace;
  color: #fff;
  overflow: hidden;
}

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

/* HUD */
#hud {
  position: absolute;
  top: 12px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 32px;
  pointer-events: none;
  z-index: 5;
}

.hud-item {
  font-size: 13px;
  letter-spacing: 2px;
  color: #888;
  text-transform: uppercase;
}

.hud-item span {
  color: #fff;
  font-weight: 700;
}

/* Overlay */
#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(12, 13, 20, 0.88);
  z-index: 10;
  transition: opacity 0.3s ease;
}

#overlay.hidden {
  display: none;
}

#overlay-box {
  text-align: center;
  padding: 40px 48px;
  background: #161822;
  border: 2px solid #2a2d3a;
  border-radius: 12px;
}

#overlay-box h1 {
  font-size: 32px;
  margin-bottom: 14px;
  font-weight: 700;
  letter-spacing: 3px;
}

#screen-start h1 {
  color: #00ff88;
}

#screen-end h1 {
  color: #ff4466;
}

#overlay-box p {
  font-size: 16px;
  margin-bottom: 8px;
  color: #ccc;
}

.sub {
  font-size: 13px !important;
  color: #999 !important;
}

#overlay-box span {
  color: #ffcc00;
  font-weight: 700;
}

.action-hint {
  font-size: 14px !important;
  color: #777 !important;
  margin-top: 12px !important;
  animation: pulse 2s infinite;
}

.hidden {
  display: none !important;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
