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

body {
  background: #1a1410;
  overflow: hidden;
  font-family: Georgia, 'Times New Roman', serif;
  color: #dcc8a9;
  user-select: none;
  -webkit-user-select: none;
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#game-canvas {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  image-rendering: pixelated;
  cursor: default;
}

/* ===== HUD ===== */
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

#top-bar {
  position: absolute;
  top: 12px;
  left: 220px;
  right: 180px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

#objective-panel {
  background: rgba(26, 20, 14, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(200, 160, 80, 0.35);
  border-radius: 4px;
  padding: 10px 16px;
  font-size: 14px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#conversion-panel {
  background: rgba(26, 20, 14, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(200, 160, 80, 0.35);
  border-radius: 4px;
  padding: 10px 16px;
  font-size: 13px;
  white-space: nowrap;
}

.icon { font-size: 18px; }

/* Alert Banner */
#alert-banner {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(120, 20, 10, 0.92);
  backdrop-filter: blur(6px);
  border: 2px solid #8b2500;
  border-radius: 4px;
  padding: 10px 24px;
  font-weight: bold;
  font-size: 15px;
  letter-spacing: 0.5px;
  animation: alertPulse 1s ease-in-out infinite alternate;
  white-space: nowrap;
}
#alert-banner.hidden { display: none; }

@keyframes alertPulse {
  from { opacity: 0.8; box-shadow: 0 0 10px rgba(139,37,0,0.4); }
  to   { opacity: 1;   box-shadow: 0 0 25px rgba(139,37,0,0.8); }
}

/* Freedom Seeker Stats Panel */
#runner-stats {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(26, 20, 14, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(200, 160, 80, 0.25);
  border-radius: 4px;
  padding: 14px 18px;
  min-width: 210px;
}

#runner-stats h3 {
  font-size: 14px;
  color: #d4a843;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
}

.morale-row {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(200, 160, 80, 0.15);
}

#morale-bar {
  font-family: monospace;
  font-weight: bold;
  letter-spacing: 1px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot.fled       { background: #d4a843; }
.dot.caught     { background: #c44; }
.dot.killed     { background: #8b2500; }
.dot.remaining-dot { background: #8a7a60; }

/* Station Info */
#safehouse-info {
  position: absolute;
  bottom: 50px;
  left: 12px;
  background: rgba(26, 20, 14, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(140, 120, 80, 0.3);
  border-radius: 4px;
  padding: 12px 16px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-size: 14px;
}

/* Minimap */
#clock-container {
  position: absolute;
  bottom: calc(50px + 200px + 8px);
  right: 12px;
  background: rgba(26, 20, 14, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(200, 160, 80, 0.25);
  border-radius: 4px;
  padding: 4px 12px;
  text-align: center;
}

#clock-time {
  font-family: monospace;
  font-size: 16px;
  font-weight: bold;
  color: #e8d8b8;
  letter-spacing: 1px;
}

#minimap-container {
  position: absolute;
  bottom: 50px;
  right: 12px;
  border: 2px solid rgba(200, 160, 80, 0.35);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(26, 20, 14, 0.75);
  backdrop-filter: blur(4px);
}

#minimap-canvas {
  display: block;
  width: 160px;
  height: 200px;
}

/* Hint Bar */
#hint-bar {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(26, 20, 14, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(200, 160, 80, 0.15);
  border-radius: 4px;
  padding: 8px 20px;
  font-size: 12px;
  color: #a89878;
  white-space: nowrap;
}

/* Notifications */
#notifications {
  position: absolute;
  top: 90px;
  right: 12px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(26, 20, 14, 0.94);
  backdrop-filter: blur(10px);
  border-left: 4px solid #8b7355;
  border-radius: 4px;
  padding: 12px 18px;
  font-size: 13px;
  max-width: 320px;
  animation: toastIn 0.3s ease-out, toastOut 0.4s ease-in 4s forwards;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}
.toast.warning { border-left-color: #8b2500; }
.toast.success { border-left-color: #6b8e4e; }
.toast.info    { border-left-color: #7a9ab0; }

@keyframes toastIn  { from { transform: translateX(120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }

/* Responsive — HUD only */
@media (max-width: 700px) {
  #top-bar { left: 12px; right: 12px; flex-direction: column; }
  #runner-stats { top: auto; bottom: 50px; left: 12px; min-width: 150px; padding: 10px 12px; }
  #runner-stats h3 { font-size: 12px; }
  .stat-row { font-size: 11px; }
  #hint-bar { font-size: 10px; padding: 6px 12px; }
}
