* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #08080e; font-family: 'Segoe UI', system-ui, sans-serif; color: #e0e0e0; }
canvas { display: block; width: 100%; height: 100%; position: fixed; top: 0; left: 0; z-index: 0; }

#backBtn {
  position: fixed; top: 14px; left: 14px; z-index: 100;
  color: #aaa; text-decoration: none; font-size: 14px; font-weight: 600;
  background: rgba(0,0,0,0.5); padding: 6px 14px; border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
#backBtn:hover { background: rgba(255,255,255,0.1); color: #fff; }

#overlay, #lobbyOverlay, #deathOverlay, #winOverlay {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(8,8,14,0.92); backdrop-filter: blur(8px);
  text-align: center; padding: 20px;
}
.hidden { display: none !important; }
.visible { display: flex !important; }

h1 { font-size: 56px; font-weight: 900; letter-spacing: 8px; margin-bottom: 6px;
  background: linear-gradient(135deg, #44ff88, #22ccaa); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text; }
h2 { font-size: 28px; font-weight: 800; letter-spacing: 4px; color: #44ff88; margin-bottom: 20px; }

.tagline { color: rgba(255,255,255,0.4); font-size: 14px; margin-bottom: 20px; }

.controls { display: flex; flex-direction: column; gap: 6px; font-size: 13px;
  color: rgba(255,255,255,0.5); margin-bottom: 28px; }
.controls b { color: #44ff88; }

#menuButtons { display: flex; gap: 12px; }
#menuButtons button, #soloBtn, #multiBtn, #startMpBtn, #createRoomBtn, #joinRoomBtn, #lobbyBackBtn,
#restartBtn, #winRetryBtn {
  padding: 12px 32px; border: none; border-radius: 8px; font-size: 15px; font-weight: 700;
  letter-spacing: 2px; cursor: pointer; transition: transform 0.15s, opacity 0.2s;
  background: linear-gradient(135deg, #44ff88, #22ccaa); color: #050510;
}
#menuButtons button:hover, #soloBtn:hover, #multiBtn:hover, #createRoomBtn:hover,
#joinRoomBtn:hover, #startMpBtn:hover, #lobbyBackBtn:hover, #restartBtn:hover, #winRetryBtn:hover {
  transform: scale(1.05); opacity: 0.9;
}

#lobbyBackBtn { background: rgba(255,255,255,0.1); color: #aaa; margin-top: 16px; }

#roomInput {
  width: 140px; padding: 10px 16px; border: 2px solid rgba(68,255,136,0.3);
  border-radius: 8px; background: rgba(255,255,255,0.06); color: #fff;
  font-size: 18px; font-weight: 700; text-align: center; letter-spacing: 4px;
  text-transform: uppercase; outline: none;
}
#roomInput:focus { border-color: #44ff88; }

.or-sep { color: rgba(255,255,255,0.3); font-size: 13px; margin: 8px 0; }

#lobbyStatus p { color: rgba(255,255,255,0.6); font-size: 14px; margin: 4px 0; }
#roomCode { color: #44ff88; font-weight: 700; letter-spacing: 3px; font-size: 20px; }
#playerList { margin: 8px 0; }
#lobbyWait { color: rgba(255,255,255,0.3); font-size: 12px; margin-top: 8px; }

#hud {
  position: fixed; top: 14px; right: 14px; z-index: 40;
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
}
#scoreDisplay {
  font-size: 24px; font-weight: 800; color: #44ff88;
  text-shadow: 0 0 12px rgba(68,255,136,0.4);
}
#killCount { font-size: 13px; color: rgba(255,255,255,0.5); font-weight: 600; }

#deathTitle, #winTitle {
  font-size: 48px; font-weight: 900; letter-spacing: 6px; margin-bottom: 8px;
}
#deathTitle { color: #ff4466; }
#winTitle { color: #44ff88; }
#deathScore, #winScore { font-size: 20px; color: rgba(255,255,255,0.7); margin: 4px 0; }
#deathKills, #winKills { font-size: 14px; color: rgba(255,255,255,0.4); margin-bottom: 20px; }

.menu-link {
  display: inline-block; margin-top: 12px;
  color: #aaa; text-decoration: none; font-size: 13px; font-weight: 600;
  transition: color 0.2s;
}
.menu-link:hover { color: #fff; }
