html, body {
  height: 100%;
  margin: 0;
  background: #1a1a1a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#map {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1e1e1e;
}

/* Crisp pixels: this is a 1-block-per-pixel map, not a photo. */
.leaflet-tile {
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

#hud {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1000;
  background: rgba(20, 20, 20, 0.8);
  color: #eee;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#hud-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 2px;
}

#hud-coords {
  font-family: "Consolas", "Menlo", monospace;
  font-size: 11px;
  opacity: 0.65;
  margin-top: 2px;
}

#world-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.world-list-item {
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.world-list-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.world-list-item-active {
  background: rgba(77, 163, 255, 0.25);
  font-weight: 600;
}

.world-list-item-active:hover {
  background: rgba(77, 163, 255, 0.35);
}

#player-list-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1000;
  width: 190px;
  max-height: 80vh;
  overflow-y: auto;
  background: rgba(20, 20, 20, 0.85);
  color: #eee;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

#player-list-title {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
  margin-bottom: 6px;
  padding: 0 4px;
}

.player-list-empty {
  padding: 4px;
  font-size: 12px;
  opacity: 0.6;
}

.player-list-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 5px;
  cursor: pointer;
}

.player-list-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.player-list-row-following {
  background: rgba(77, 163, 255, 0.2);
}

.player-list-row-following:hover {
  background: rgba(77, 163, 255, 0.3);
}

.player-list-row img {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
  border-radius: 2px;
}

.player-list-name {
  flex: 1;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-list-world {
  font-size: 10px;
  opacity: 0.55;
}

/* The whole marker (head + name) is one element so it moves as a single
   unit - keeps the label from visually detaching from the head mid-glide. */
.leaflet-marker-pane .leaflet-marker-icon {
  transition: transform 0.9s linear;
}

.tmap-player-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.tmap-player-head {
  width: 16px;
  height: 16px;
  image-rendering: pixelated;
  border-radius: 3px;
  border: 2px solid #fff;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}

.tmap-player-label {
  margin-top: 2px;
  padding: 1px 5px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
}

.tmap-spawn-marker {
  font-size: 20px;
  line-height: 1;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.8));
  pointer-events: none;
}

.tmap-poi-marker {
  font-size: 18px;
  line-height: 1;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.8));
}
