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

body {
  overflow: hidden;
  background: #1a1a2e;
  font-family: 'JetBrains Mono', monospace;
  cursor: crosshair;
  user-select: none;
}

#scene-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

#scene-container canvas {
  display: block;
}

#crosshair {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 24px;
  font-weight: 300;
  pointer-events: none;
  z-index: 100;
  text-shadow: 0 0 4px rgba(0,0,0,0.8), 0 0 2px rgba(0,0,0,0.5);
  line-height: 1;
}

#coords {
  position: fixed;
  top: 12px; left: 12px;
  color: #e0e0e0;
  font-size: 11px;
  font-weight: 300;
  z-index: 100;
  background: rgba(0,0,0,0.5);
  padding: 6px 10px;
  border-radius: 6px;
  pointer-events: none;
  letter-spacing: 0.5px;
}

#seed-display {
  position: fixed;
  top: 40px; left: 12px;
  color: #999;
  font-size: 10px;
  font-weight: 300;
  z-index: 100;
  background: rgba(0,0,0,0.4);
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
}

#hotbar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 3px;
  z-index: 100;
  background: rgba(0,0,0,0.65);
  padding: 5px;
  border-radius: 8px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
}

.hotbar-slot {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.hotbar-slot.selected {
  border-color: #ffd700;
  background: rgba(255,215,0,0.12);
  box-shadow: 0 0 12px rgba(255,215,0,0.2);
}

.hotbar-slot .block-icon {
  width: 32px;
  height: 32px;
  border-radius: 3px;
}

.hotbar-slot .slot-count {
  position: absolute;
  bottom: 1px;
  right: 3px;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.9);
  pointer-events: none;
}

.hotbar-slot .slot-number {
  position: absolute;
  top: 1px;
  left: 3px;
  color: rgba(255,255,255,0.3);
  font-size: 8px;
  font-weight: 300;
  pointer-events: none;
}

#selected-block-name {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  z-index: 100;
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  opacity: 0.8;
}

#inventory-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

#inventory-overlay.open {
  display: flex;
}

#inventory-panel {
  background: rgba(20,20,30,0.95);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 20px;
  min-width: 420px;
}

#inventory-title {
  color: #ffd700;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
}

#inventory-grid {
  display: grid;
  grid-template-columns: repeat(9, 42px);
  gap: 3px;
  justify-content: center;
  margin-bottom: 12px;
}

#inventory-hotbar-label {
  color: rgba(255,255,255,0.4);
  font-size: 9px;
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

#inventory-hotbar {
  display: grid;
  grid-template-columns: repeat(9, 42px);
  gap: 3px;
  justify-content: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 10px;
}

.inv-slot {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: background 0.1s;
}

.inv-slot:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
}

.inv-slot .block-icon {
  width: 28px;
  height: 28px;
  border-radius: 2px;
}

.inv-slot .slot-count {
  position: absolute;
  bottom: 1px;
  right: 2px;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.9);
}

.inv-slot .tooltip {
  display: none;
  position: absolute;
  bottom: 46px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10,10,20,0.95);
  color: #fff;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.15);
  z-index: 300;
}

.inv-slot:hover .tooltip {
  display: block;
}

#help-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

#help-overlay.hidden {
  display: none;
}

#help-panel {
  background: rgba(15,15,25,0.95);
  border: 1px solid rgba(255,215,0,0.2);
  border-radius: 14px;
  padding: 28px 36px;
  min-width: 320px;
}

#help-title {
  color: #ffd700;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.help-row {
  color: #ccc;
  font-size: 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.help-key {
  background: rgba(255,215,0,0.15);
  color: #ffd700;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  min-width: 90px;
  text-align: center;
  border: 1px solid rgba(255,215,0,0.2);
}

#help-dismiss {
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  text-align: center;
  margin-top: 20px;
  font-style: italic;
}

#mining-progress {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, 20px);
  width: 60px;
  height: 4px;
  background: rgba(0,0,0,0.6);
  border-radius: 2px;
  z-index: 100;
  display: none;
  overflow: hidden;
}

#mining-progress.active {
  display: block;
}

#mining-bar {
  height: 100%;
  width: 0%;
  background: #ffd700;
  border-radius: 2px;
  transition: width 0.05s linear;
}

#remix-link {
  position: fixed;
  bottom: 8px;
  right: 12px;
  color: rgba(255,255,255,0.2);
  font-size: 9px;
  text-decoration: none;
  z-index: 100;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

#remix-link:hover {
  color: rgba(255,255,255,0.5);
}