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

body {
  background: #0a0a0a;
  overflow: hidden;
  font-family: 'Segoe UI', Arial, sans-serif;
}

#c {
  display: block;
  width: 100vw;
  height: 100vh;
}

#hud {
  position: absolute;
  bottom: 14px;
  left: 14px;
  color: #fff;
  font-size: 12px;
  background: rgba(0,0,0,0.45);
  padding: 6px 12px;
  border-radius: 6px;
  pointer-events: none;
  font-family: 'Courier New', monospace;
}

/* Night counter */
#night-hud {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  background: rgba(0,0,0,0.50);
  padding: 6px 18px;
  border-radius: 8px;
  pointer-events: none;
  letter-spacing: 1px;
  font-family: 'Courier New', monospace;
}

/* Survival bars */
#survival-hud {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0,0,0,0.50);
  padding: 8px 12px;
  border-radius: 8px;
  pointer-events: none;
  min-width: 160px;
}

.stat-row {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  gap: 8px;
}

.stat-row:last-child { margin-bottom: 0; }

.stat-label {
  color: #ccc;
  font-size: 10px;
  width: 38px;
  font-family: 'Courier New', monospace;
  text-align: right;
}

.bar-bg {
  flex: 1;
  height: 10px;
  background: rgba(255,255,255,0.12);
  border-radius: 5px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.3s ease, background 0.5s ease;
}

/* Inventory */
#inventory-hud {
  position: absolute;
  bottom: 14px;
  right: 14px;
  color: #fff;
  font-size: 12px;
  background: rgba(0,0,0,0.45);
  padding: 6px 12px;
  border-radius: 6px;
  pointer-events: none;
  font-family: 'Courier New', monospace;
  display: none;
  gap: 14px;
}

/* Weather indicator */
#weather-hud {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  color: #aaccff;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  background: rgba(0,0,0,0.40);
  padding: 3px 12px;
  border-radius: 5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

/* Collect prompt */
#collect-prompt {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
  background: rgba(0,0,0,0.60);
  padding: 6px 16px;
  border-radius: 6px;
  pointer-events: none;
  font-family: 'Courier New', monospace;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Weapon HUD */
#weapon-hud {
  position: absolute;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
  font-family: 'Courier New', monospace;
  background: rgba(0,0,0,0.50);
  padding: 5px 16px;
  border-radius: 6px;
  pointer-events: none;
  letter-spacing: 1px;
}

/* Loot popup */
#loot-msg {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translateX(-50%);
  color: #ffe066;
  font-size: 15px;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  background: rgba(30,20,0,0.75);
  padding: 8px 22px;
  border-radius: 7px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  text-align: center;
  border: 1px solid rgba(255,200,50,0.3);
}

/* Sick warning */
#sick-msg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ff3322;
  font-size: 18px;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  background: rgba(80,0,0,0.55);
  padding: 8px 20px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  text-align: center;
}

/* Game over */
#game-over {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.go-box {
  background: rgba(10,10,20,0.95);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 40px 56px;
  text-align: center;
  color: #fff;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.go-box h2 {
  font-size: 32px;
  margin-bottom: 12px;
  color: #ff6644;
}

.go-box p {
  font-size: 16px;
  color: #aaa;
  margin-bottom: 24px;
}

.go-box button {
  background: #2a6e3a;
  color: #fff;
  border: none;
  padding: 10px 28px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.go-box button:hover { background: #3a9050; }

/* Crosshair */
#crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255,255,255,0.85);
  font-size: 22px;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 0 4px rgba(0,0,0,0.8);
  user-select: none;
}

/* Hotbar */
#hotbar {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  pointer-events: none;
}

.hslot {
  width: 58px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  padding: 4px 4px 3px;
  text-align: center;
  font-family: 'Courier New', monospace;
  transition: border-color 0.15s, background 0.15s;
}

.hslot.active {
  border-color: rgba(255,220,60,0.8);
  background: rgba(60,50,0,0.65);
}

.hkey {
  color: #aaa;
  font-size: 9px;
}

.hname {
  color: #fff;
  font-size: 10px;
  margin-top: 1px;
}

/* Cult warning */
#cult-warn {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  color: #ff4400;
  font-size: 16px;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  background: rgba(60,0,0,0.70);
  padding: 7px 22px;
  border-radius: 7px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  text-align: center;
  border: 1px solid rgba(255,80,0,0.4);
}

/* Monster warning */
#monster-warn {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  color: #00ff88;
  font-size: 15px;
  font-weight: bold;
  font-family: 'Courier New', monospace;
  background: rgba(0,30,10,0.75);
  padding: 7px 20px;
  border-radius: 7px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  text-align: center;
}

/* Vignette overlay for darkness / monster fear */
#vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 38%, rgba(0,0,0,0.0) 60%);
  transition: opacity 0.4s ease;
  opacity: 0;
}

/* Death cause line */
#go-cause {
  font-size: 13px;
  color: #ff8866;
  margin-bottom: 6px;
}

/* Crafting menu */
#craft-menu {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(20,15,10,0.95);
  border: 2px solid rgba(180,120,60,0.6);
  border-radius: 8px;
  padding: 20px;
  color: #fff;
  font-family: 'Courier New', monospace;
  max-width: 400px;
  z-index: 5;
}

#craft-menu h2 {
  text-align: center;
  margin-bottom: 15px;
  color: #ffcc88;
  font-size: 18px;
}

.craft-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  margin-bottom: 8px;
  background: rgba(60,40,20,0.5);
  border-left: 3px solid rgba(180,120,60,0.5);
  font-size: 12px;
}

.craft-name {
  color: #ffdd99;
  flex: 1;
  font-weight: bold;
}

.craft-cost {
  color: #88ccff;
  min-width: 100px;
  text-align: center;
}

.craft-dmg {
  color: #ff8888;
  min-width: 60px;
  text-align: right;
}
