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

body {
  background: #0a0a0a;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: 'Courier New', monospace;
  color: #e0e0e0;
  overflow: hidden;
}

#game-container {
  position: relative;
  border: 2px solid #333;
  box-shadow: 0 0 40px rgba(200, 50, 50, 0.2);
}

#gameCanvas {
  display: block;
  background: #1a1a2e;
}

#ui {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 12px;
  pointer-events: none;
  z-index: 5;
}

#inventory {
  background: rgba(0, 0, 0, 0.75);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid #444;
  display: flex;
  align-items: center;
  gap: 8px;
}

#inventory span {
  color: #888;
}

#items {
  display: flex;
  gap: 4px;
  min-width: 60px;
  min-height: 20px;
}

.item-slot {
  background: #222;
  border: 1px solid #555;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  color: #ffd700;
}

#message {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 13px;
  border: 1px solid #ffd700;
  color: #ffd700;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  white-space: nowrap;
}

#message.show {
  opacity: 1;
}

#area-name {
  background: rgba(0, 0, 0, 0.75);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  border: 1px solid #444;
  color: #88ccff;
}

#progress {
  background: rgba(0, 0, 0, 0.75);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid #444;
  color: #aaa;
}

#progress-text {
  color: #ffd700;
}

/* Overlays */
#intro-overlay, #game-over-overlay, #win-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10;
  pointer-events: auto;
}

#intro-box, #game-over-box, #win-box {
  background: #111;
  border: 2px solid #333;
  padding: 40px 50px;
  text-align: center;
  border-radius: 8px;
  max-width: 500px;
  z-index: 20;
  pointer-events: auto;
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -30%);
}

#intro-box h1, #game-over-box h1, #win-box h1 {
  font-size: 32px;
  margin-bottom: 20px;
  letter-spacing: 6px;
  color: #cc3333;
  text-shadow: 0 0 20px rgba(200, 50, 50, 0.5);
}

#intro-box p, #game-over-box p, #win-box p {
  margin-bottom: 15px;
  line-height: 1.5;
  color: #aaa;
}

#intro-controls {
  font-size: 13px;
  color: #666 !important;
  margin-bottom: 25px !important;
}

button {
  background: #c0392b;
  color: #fff;
  border: 2px solid #e74c3c;
  padding: 14px 50px;
  font-size: 18px;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  letter-spacing: 3px;
  transition: all 0.2s;
  font-weight: bold;
  margin-top: 15px;
  display: inline-block;
}

button:hover {
  background: #e74c3c;
  border-color: #ff6b6b;
  color: #fff;
  box-shadow: 0 0 20px rgba(231, 76, 60, 0.5);
}
