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

body {
  overflow: hidden;
  background: #0a0a0a;
  font-family: 'Consolas', 'Courier New', monospace;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

canvas {
  display: block;
}

canvas.playing {
  cursor: none;
}

/* Kill Feed */
#kill-feed {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
  z-index: 10;
}

.kill-entry {
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.7);
  border-left: 3px solid #ff4444;
  color: #ddd;
  font-size: 13px;
  font-family: 'Consolas', monospace;
  white-space: nowrap;
  animation: killSlide 0.3s ease-out;
  backdrop-filter: blur(4px);
}

.kill-entry .killer {
  color: #4fc3f7;
  font-weight: bold;
}

.kill-entry .victim {
  color: #ef5350;
  font-weight: bold;
}

.kill-entry .weapon-icon {
  color: #ffa726;
  margin: 0 6px;
}

@keyframes killSlide {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Scoreboard */
#scoreboard {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 50;
  backdrop-filter: blur(6px);
}

#scoreboard.hidden {
  display: none;
}

.scoreboard-inner {
  background: rgba(10, 15, 10, 0.95);
  border: 1px solid rgba(0, 255, 100, 0.3);
  padding: 20px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 0 40px rgba(0, 255, 100, 0.1);
  overflow-x: auto;
}

.scoreboard-inner h2 {
  color: #00ff66;
  text-align: center;
  font-size: 22px;
  margin-bottom: 20px;
  letter-spacing: 4px;
  text-shadow: 0 0 10px rgba(0, 255, 100, 0.5);
}

.scoreboard-inner table {
  width: 100%;
  border-collapse: collapse;
}

.scoreboard-inner th {
  color: #888;
  font-size: 12px;
  padding: 8px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 2px;
}

.scoreboard-inner td {
  color: #ccc;
  font-size: 14px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.scoreboard-inner tr.player-row td {
  color: #4fc3f7;
  font-weight: bold;
}

.scoreboard-inner tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* Main Menu Overlay */
.overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
  pointer-events: auto;
}

.overlay.hidden {
  display: none !important;
}

.menu-container {
  background: rgba(10, 15, 10, 0.95);
  border: 1px solid rgba(0, 255, 100, 0.3);
  padding: 30px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 0 20px rgba(0, 255, 100, 0.1);
  text-align: center;
  overflow: hidden;
}

.menu-container h1 {
  color: #00ff66;
  font-size: 28px;
  margin-bottom: 25px;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(0, 255, 100, 0.5);
}

.input-group {
  margin-bottom: 20px;
  text-align: left;
}

.input-group label {
  display: block;
  color: #888;
  font-size: 14px;
  margin-bottom: 5px;
  letter-spacing: 1px;
}

.input-group input {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 12px;
  font-family: inherit;
  font-size: 16px;
  outline: none;
}

.input-group input:focus {
  border-color: rgba(0, 255, 100, 0.5);
  box-shadow: 0 0 15px rgba(0, 255, 100, 0.1) inset;
}

.btn-primary {
  width: 100%;
  background: rgba(0, 255, 100, 0.15);
  border: 2px solid #00ff66;
  color: #00ff66;
  padding: 15px;
  font-size: 18px;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 1px;
  margin-bottom: 30px;
}

.btn-primary:hover {
  background: rgba(0, 255, 100, 0.3);
  box-shadow: 0 0 15px #00ff66;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff !important;
  color: #fff !important;
}

.server-browser {
  text-align: left;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}

.sb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.sb-header h3 {
  color: #ccc;
  font-size: 18px;
  font-weight: normal;
}

.btn-icon {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: #aaa;
  cursor: pointer;
  padding: 5px 10px;
  font-size: 16px;
  transition: 0.2s;
}

.btn-icon:hover {
  border-color: #fff;
  color: #fff;
}

.table-container {
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(0,0,0,0.3);
}

.table-container table {
  width: 100%;
  border-collapse: collapse;
}

.table-container th {
  color: #666;
  font-size: 12px;
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  background: rgba(10, 15, 10, 0.95);
}

.table-container td {
  color: #ccc;
  font-size: 14px;
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-container tr:hover td {
  background: rgba(255,255,255,0.05);
}

.btn-join {
  background: transparent;
  border: 1px solid #4caf50;
  color: #4caf50;
  padding: 5px 12px;
  cursor: pointer;
  font-family: inherit;
  transition: 0.2s;
}

.btn-join:hover {
  background: rgba(76, 175, 80, 0.2);
}

.btn-join:disabled {
  border-color: #555;
  color: #555;
  cursor: not-allowed;
  background: transparent;
}
