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

body {
  overflow: hidden;
  background: #000;
  font-family: 'Press Start 2P', monospace;
  cursor: default;
}

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

#scene-container canvas {
  display: block;
}

#title-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #1a1a2e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  cursor: pointer;
}

#title-text {
  font-size: 48px;
  color: #e0e0e0;
  text-shadow: 4px 4px 0 #333, -1px -1px 0 #555;
  letter-spacing: 4px;
  margin-bottom: 40px;
  image-rendering: pixelated;
}

#subtitle-text {
  font-size: 14px;
  color: #aaa;
  animation: pulse 2s ease-in-out infinite;
}

#instructions {
  font-size: 8px;
  color: #666;
  text-align: center;
  line-height: 2;
  margin-top: 40px;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

#hud {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

#crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 24px;
  font-family: monospace;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
  line-height: 1;
  user-select: none;
}

#debug-info {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #ddd;
  font-size: 8px;
  line-height: 2;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.9);
  background: rgba(0,0,0,0.3);
  padding: 6px 10px;
}

#fps-counter {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #aaa;
  font-size: 8px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.9);
  background: rgba(0,0,0,0.3);
  padding: 6px 10px;
}

#hotbar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  background: rgba(0,0,0,0.5);
  padding: 6px;
  border: 2px solid rgba(255,255,255,0.2);
}

.hotbar-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px;
  border: 2px solid transparent;
  min-width: 50px;
}

.hotbar-slot.active {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
}

.hotbar-slot span {
  font-size: 6px;
  color: #ccc;
  margin-top: 4px;
}

.block-preview {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(0,0,0,0.3);
}

.block-preview.grass {
  background: linear-gradient(to bottom, #4a8c2a 40%, #8B6B3D 40%);
}
.block-preview.dirt { background: #8B6B3D; }
.block-preview.stone { background: #888; }
.block-preview.wood { background: #6B4226; }
.block-preview.leaves { background: #2d6b1e; }

#footer {
  position: fixed;
  bottom: 4px;
  right: 10px;
  z-index: 200;
}

#footer a {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: #555;
  text-decoration: none;
}

#footer a:hover {
  color: #888;
}