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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: 'Courier New', monospace;
}

#game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#game-canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #000;
}

#ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#ui-overlay > * {
  pointer-events: auto;
}

/* UI Panel base styles */
.ui-panel {
  position: absolute;
  background: rgba(0, 0, 30, 0.92);
  border: 2px solid #c8a84e;
  border-radius: 4px;
  color: #e8e8e8;
  font-family: 'Courier New', monospace;
  padding: 16px;
  z-index: 100;
}

.ui-panel-title {
  font-size: 18px;
  font-weight: bold;
  color: #c8a84e;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
  text-align: center;
}

.ui-panel-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: #c8a84e;
  font-size: 20px;
  cursor: pointer;
  font-family: 'Courier New', monospace;
}

.ui-panel-close:hover {
  color: #fff;
}

/* Buttons */
.game-btn {
  display: block;
  width: 100%;
  padding: 10px 20px;
  margin: 6px 0;
  background: rgba(200, 168, 78, 0.15);
  border: 1px solid #c8a84e;
  border-radius: 3px;
  color: #e8e8e8;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  letter-spacing: 1px;
}

.game-btn:hover {
  background: rgba(200, 168, 78, 0.35);
  color: #fff;
}

.game-btn.is-selected {
  background: rgba(200, 168, 78, 0.48);
  color: #fff;
  outline: 1px solid #f0d98a;
}

.game-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* HUD styles */
#hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  font-size: 12px;
}

#hud-approval {
  position: absolute;
  top: 10px;
  left: 10px;
}

#hud-approval-bar {
  width: 150px;
  height: 14px;
  border: 1px solid #c8a84e;
  background: #300;
  position: relative;
}

#hud-approval-fill {
  height: 100%;
  background: linear-gradient(90deg, #c00, #00c);
  transition: width 0.3s;
}

#hud-approval-text {
  color: #fff;
  text-shadow: 1px 1px 2px #000;
  margin-top: 2px;
}

#hud-minimap {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid #c8a84e;
}

#hud-chapter {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  color: #c8a84e;
  font-size: 16px;
  font-weight: bold;
  text-shadow: 2px 2px 4px #000;
  transition: opacity 1s;
}

#hud-prompt {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  text-shadow: 1px 1px 3px #000;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 12px;
  border-radius: 3px;
}

#hud-objective {
  position: absolute;
  bottom: 10px;
  left: 10px;
  color: #aaa;
  font-size: 11px;
  text-shadow: 1px 1px 2px #000;
}

#hud-interaction {
  position: absolute;
  bottom: 50px;
  left: 10px;
  color: #e8e8e8;
  font-size: 12px;
  text-shadow: 1px 1px 2px #000;
}

/* Screen shake */
.screen-shake {
  animation: shake 0.1s linear;
}

@keyframes shake {
  0%, 100% { transform: translate(0); }
  25% { transform: translate(-3px, 2px); }
  50% { transform: translate(3px, -2px); }
  75% { transform: translate(-2px, -3px); }
}
