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

body {
  overflow: hidden;
  background: #000;
  font-family: 'Segoe UI', monospace;
}

canvas {
  display: block;
  position: absolute;
  top: 0; left: 0;
}

#hud {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
  display: none;
}

#hp-bar {
  width: 300px;
  height: 20px;
  background: #333;
  border: 2px solid #666;
  border-radius: 4px;
  overflow: hidden;
  margin: 0 auto;
}

#hp-fill {
  width: 100%;
  height: 100%;
  background: #4f4;
  transition: width 0.1s;
}

#info {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 6px;
  color: #fff;
  font-size: 14px;
  text-shadow: 0 0 4px #000;
}

#title-screen {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  color: #fff;
  text-align: center;
}

#title-screen h1 {
  font-size: 64px;
  margin-bottom: 10px;
  text-shadow: 0 0 20px #f44, 0 0 40px #f00;
  color: #fff;
}

.subtitle {
  font-size: 18px;
  color: #aaa;
  margin-bottom: 30px;
}

#spectate-hint {
  margin-bottom: 20px;
}

#spectate-hint p {
  margin-bottom: 12px;
  font-size: 16px;
  color: #ddd;
}

#join-btn {
  padding: 14px 40px;
  font-size: 22px;
  background: #e44;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 2px;
  font-weight: bold;
  transition: background 0.2s, transform 0.1s;
}

#join-btn:hover {
  background: #f55;
  transform: scale(1.05);
}

#name-input {
  display: block;
  margin: 12px auto 0;
  padding: 10px 16px;
  font-size: 16px;
  border-radius: 4px;
  border: 2px solid #666;
  background: #111;
  color: #fff;
  text-align: center;
  outline: none;
  width: 200px;
}

#name-input:focus {
  border-color: #e44;
}

.death-msg {
  font-size: 36px;
  font-weight: bold;
  color: #f44;
  text-shadow: 0 0 10px #f00;
  margin-bottom: 8px;
  transition: opacity 0.3s;
}

.death-msg.hidden {
  display: none;
}

.tip {
  margin-top: 16px;
  color: #888;
  font-size: 13px;
}


