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

body {
  background: #0e0e1a;
  color: #e0e0e0;
  font-family: 'Segoe UI', sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* ---- Auth screen ---- */
#auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  height: 100vh;
  background: radial-gradient(ellipse at center, #1a1a40 0%, #0a0a15 100%);
}

.auth-box {
  background: #12122a;
  border: 1px solid #2a2a5a;
  border-radius: 12px;
  padding: 36px 40px;
  width: 340px;
  box-shadow: 0 0 40px rgba(100,80,255,0.15);
}

.logo {
  text-align: center;
  font-size: 38px;
  font-weight: 900;
  color: #f0c040;
  letter-spacing: 4px;
  text-shadow: 0 0 20px rgba(240,192,64,0.5);
  margin-bottom: 6px;
}

.tagline {
  text-align: center;
  color: #666;
  font-size: 12px;
  margin-bottom: 24px;
}

.tabs {
  display: flex;
  border-bottom: 1px solid #2a2a5a;
  margin-bottom: 20px;
}

.tab {
  flex: 1;
  background: none;
  border: none;
  color: #666;
  padding: 10px;
  cursor: pointer;
  font-size: 14px;
  transition: color 0.2s;
}

.tab.active { color: #f0c040; border-bottom: 2px solid #f0c040; margin-bottom: -1px; }
.tab:hover  { color: #aaa; }

input[type=text], input[type=password] {
  width: 100%;
  background: #0e0e20;
  border: 1px solid #2a2a5a;
  border-radius: 6px;
  color: #e0e0e0;
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.2s;
}
input:focus { border-color: #5555aa; }

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #4040aa, #6060cc);
  border: none;
  border-radius: 6px;
  color: #fff;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 4px;
}
.btn-primary:hover  { opacity: 0.9; }
.btn-primary:active { transform: scale(0.98); }

.error-msg {
  color: #e74c3c;
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
  min-height: 20px;
}

/* ---- Leaderboard preview ---- */
.leaderboard-preview {
  background: #12122a;
  border: 1px solid #2a2a5a;
  border-radius: 12px;
  padding: 24px 28px;
  width: 240px;
}
.leaderboard-preview h3 { color: #f0c040; margin-bottom: 16px; font-size: 14px; text-transform: uppercase; letter-spacing: 2px; }
.lb-row { display:flex; justify-content:space-between; padding:5px 0; border-bottom:1px solid #1a1a35; font-size:13px; }
.lb-rank  { color: #666; width:28px; }
.lb-name  { color: #ccc; flex:1; }
.lb-kills { color: #ff8888; }

/* ---- Game screen ---- */
#game-screen canvas {
  display: block;
  position: absolute;
  top: 0; left: 0;
}

/* ---- Chat overlay ---- */
#chat-overlay {
  position: absolute;
  bottom: 80px;
  right: 16px;
  width: 280px;
  z-index: 200;
  pointer-events: none;
}
#chat-messages {
  background: rgba(0,0,0,0.6);
  border-radius: 6px 6px 0 0;
  padding: 8px;
  max-height: 140px;
  overflow-y: auto;
  font-size: 12px;
  color: #ccc;
  line-height: 1.5;
}
#chat-input-row {
  display: flex;
  pointer-events: all;
}
#chat-input {
  flex: 1;
  background: rgba(10,10,30,0.9);
  border: 1px solid #333;
  border-right: none;
  border-radius: 0 0 0 6px;
  color: #e0e0e0;
  padding: 6px 10px;
  font-size: 12px;
  outline: none;
  margin: 0;
  width: auto;
}
#chat-send {
  background: #333;
  border: 1px solid #333;
  border-radius: 0 0 6px 0;
  color: #f0c040;
  padding: 6px 12px;
  cursor: pointer;
}

/* ---- Controls hint ---- */
#controls-hint {
  position: absolute;
  top: 46px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.35);
  font-size: 11px;
  z-index: 200;
  pointer-events: none;
}
