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

body {
  overflow: hidden;
  background: #1a1a2e;
  font-family: 'Press Start 2P', monospace;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
}

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

#scene-container canvas {
  display: block;
}

/* START SCREEN */
#start-screen {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 100;
  background: linear-gradient(180deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.start-content {
  text-align: center;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.game-title {
  font-size: 2.5rem;
  color: #4ade80;
  text-shadow: 4px 4px 0 #166534, 0 0 40px rgba(74,222,128,0.3);
  margin-bottom: 16px;
  letter-spacing: 2px;
  line-height: 1.4;
}

.game-title .emoji {
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
}

.subtitle {
  font-size: 0.75rem;
  color: #a5b4fc;
  margin-bottom: 40px;
  opacity: 0.8;
}

.pixel-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.85rem;
  padding: 16px 32px;
  background: #4ade80;
  color: #0f0c29;
  border: 4px solid #22c55e;
  border-bottom-width: 6px;
  cursor: pointer;
  display: block;
  margin: 12px auto;
  transition: all 0.1s;
  text-transform: uppercase;
}

.pixel-btn:hover {
  background: #86efac;
  transform: translateY(-2px);
}

.pixel-btn:active {
  border-bottom-width: 4px;
  transform: translateY(2px);
}

.pixel-btn-danger {
  background: #f87171;
  border-color: #ef4444;
  color: #1a1a2e;
}

.pixel-btn-danger:hover {
  background: #fca5a5;
}

.tagline {
  font-size: 0.45rem;
  color: #6b7280;
  margin-top: 32px;
  line-height: 1.8;
}

.footer-link {
  margin-top: 40px;
}

.footer-link a {
  font-size: 0.5rem;
  color: #6b7280;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.footer-link a:hover {
  opacity: 1;
  color: #a5b4fc;
}

/* PAUSE MENU */
#pause-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 90;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.pause-content {
  text-align: center;
}

.pause-title {
  font-size: 1.5rem;
  color: #fbbf24;
  margin-bottom: 32px;
  text-shadow: 3px 3px 0 #92400e;
}

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

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

#instructions {
  position: absolute;
  top: 16px; left: 16px;
  background: rgba(0,0,0,0.6);
  padding: 12px 16px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 0.45rem;
  color: #d1d5db;
  line-height: 2;
  transition: opacity 1s ease;
}

#instructions.faded {
  opacity: 0;
  pointer-events: none;
}

#hotbar-container {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

#block-name {
  font-size: 0.55rem;
  color: #fbbf24;
  margin-bottom: 8px;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.8);
}

#hotbar {
  display: flex;
  gap: 4px;
  background: rgba(0,0,0,0.55);
  padding: 6px;
  border-radius: 4px;
  border: 2px solid rgba(255,255,255,0.15);
}

.hotbar-slot {
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(0,0,0,0.3);
}

.hotbar-slot.selected {
  border-color: #fbbf24;
  box-shadow: 0 0 8px rgba(251,191,36,0.5);
  background: rgba(251,191,36,0.1);
}

.hotbar-slot .slot-number {
  position: absolute;
  top: 2px; left: 4px;
  font-size: 0.35rem;
  color: rgba(255,255,255,0.5);
}

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

@media (max-width: 600px) {
  .game-title { font-size: 1.4rem; }
  .hotbar-slot { width: 36px; height: 36px; }
  .slot-block { width: 22px; height: 22px; }
  #instructions { font-size: 0.38rem; }
}