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

body {
  overflow: hidden;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #1a1a2e;
}

#canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#hud {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  color: #fff;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

#hud-top-right {
  position: absolute;
  top: 16px;
  right: 16px;
  text-align: right;
  font-size: 14px;
  line-height: 1.6;
}

#fps {
  font-family: monospace;
  color: #7ec8e3;
}

#compass {
  font-size: 18px;
  font-weight: bold;
  color: #f4a261;
}

#inventory {
  color: #a8dadc;
}

#hud-bottom-left {
  position: absolute;
  bottom: 16px;
  left: 16px;
}

#controls-hint {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  transition: opacity 1s ease;
}

#controls-hint.fade {
  opacity: 0;
}

#minimap-container {
  position: absolute;
  bottom: 16px;
  right: 16px;
  border: 2px solid #e76f51;
  border-radius: 4px;
  background: rgba(0,0,0,0.5);
}

#minimap {
  display: block;
}

#craft-menu {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(20, 20, 40, 0.95);
  border: 2px solid #e76f51;
  border-radius: 8px;
  padding: 24px;
  pointer-events: auto;
  min-width: 280px;
}

#craft-menu.hidden {
  display: none;
}

#craft-menu h3 {
  color: #f4a261;
  margin-bottom: 16px;
  text-align: center;
  font-size: 20px;
}

#recipes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.recipe {
  background: rgba(255,255,255,0.1);
  padding: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.recipe:hover {
  background: rgba(244, 162, 97, 0.3);
}

.recipe.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.recipe-name {
  color: #fff;
  font-weight: bold;
  margin-bottom: 4px;
}

.recipe-cost {
  font-size: 12px;
  color: #a8dadc;
}

#close-craft {
  width: 100%;
  padding: 10px;
  background: #e76f51;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

#close-craft:hover {
  background: #f4a261;
}

#notification {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

#notification.show {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    background: #0d1b2a;
  }
}
