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

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

#map-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  cursor: grab;
}

#map-canvas.grabbing {
  cursor: grabbing;
}

/* Coordinate display */
#coords-display {
  position: fixed;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.75);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-family: 'Consolas', 'Monaco', monospace;
  pointer-events: none;
  z-index: 10;
  color: #ccc;
}

#coords-display span {
  color: #7ecfff;
}

/* Z-level controls */
#z-controls {
  position: fixed;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 10;
}

.z-label {
  font-size: 11px;
  color: #888;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.z-btn {
  width: 36px;
  height: 26px;
  border: 1px solid #444;
  background: rgba(0, 0, 0, 0.7);
  color: #aaa;
  font-size: 11px;
  font-family: 'Consolas', monospace;
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.15s, color 0.15s;
}

.z-btn:hover {
  background: rgba(60, 60, 100, 0.8);
  color: #fff;
}

.z-btn.active {
  background: rgba(40, 80, 160, 0.9);
  color: #fff;
  border-color: #5588cc;
}

.z-btn.ground {
  border-color: #6a6;
}

.z-btn.active.ground {
  background: rgba(40, 120, 60, 0.9);
  border-color: #6c6;
}

/* Inspector panel */
#inspector {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 100vh;
  background: rgba(10, 10, 30, 0.95);
  border-left: 1px solid #333;
  overflow-y: auto;
  z-index: 20;
  transition: transform 0.2s ease;
}

#inspector.hidden {
  transform: translateX(100%);
}

#inspector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #333;
  position: sticky;
  top: 0;
  background: rgba(10, 10, 30, 0.98);
}

#inspector-title {
  font-size: 14px;
  font-weight: 600;
}

#inspector-close {
  background: none;
  border: none;
  color: #888;
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

#inspector-close:hover {
  color: #fff;
}

#inspector-coords {
  padding: 8px 16px;
  font-size: 12px;
  font-family: 'Consolas', monospace;
  color: #7ecfff;
  border-bottom: 1px solid #222;
}

#inspector-items {
  padding: 8px;
}

.item-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-bottom: 1px solid #222;
  align-items: flex-start;
}

.item-card img {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  background: #222;
  border-radius: 4px;
  flex-shrink: 0;
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-size: 13px;
  font-weight: 600;
  color: #e0e0e0;
  margin-bottom: 4px;
}

.item-id {
  font-size: 11px;
  color: #888;
  font-family: 'Consolas', monospace;
}

.item-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.item-flag {
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(60, 60, 100, 0.5);
  border-radius: 3px;
  color: #aac;
}

/* Loading indicator */
#loading-indicator {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 12px;
  color: #7ecfff;
  z-index: 10;
}

#loading-indicator.hidden {
  display: none;
}

/* Scrollbar styling for inspector */
#inspector::-webkit-scrollbar {
  width: 6px;
}

#inspector::-webkit-scrollbar-track {
  background: transparent;
}

#inspector::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}
