body {
  margin: 0;
  padding: 0;
  height: 100vh;
  background-color: #0d0d0d;
  font-family: "VT323", monospace;
  display: flex;
  justify-content: center;
  align-items: center;
}

#game-wrapper {
  position: relative;
  width: 600px;
  height: 600px;
  background: #222;
  border: 4px solid #4a4a4a;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
#controls-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-family: "Press Start 2P", cursive;
  z-index: 100;
  color: #fff;
  gap: 30px;
  background-color: rgba(0, 0, 0, 0.9);
}

#controls-title {
  font-size: 32px;
  color: #ffc107;
  text-shadow: 3px 3px 0 #000;
  margin: 0;
}

.controls-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  font-size: 18px;
  line-height: 1.5;
  color: #f0f0f0;
}

.controls-list .key-group {
  color: #ffc107;
  padding: 4px 8px;
  background-color: #333;
  border-radius: 4px;
  margin-right: 10px;
}
.hidden {
  display: none !important;
}

#hud {
  background-color: rgba(0, 0, 0, 0.6);
  padding: 0 10px;
  color: #fff;
  text-shadow: 1px 1px 1px #000;
  border-bottom: 2px solid #222;
  box-sizing: border-box;
  width: 100%;
  height: 30px;
  z-index: 10;
}

.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  height: 100%;
}

.hud-health-section {
  display: flex;
  align-items: center;
  gap: 6px;
}
.health-icon {
  width: 18px;
  height: 18px;
}
#player-health-container {
  width: 120px;
  height: 16px;
  border-radius: 6px;
  background-color: #222;
  border: 1px solid #111;
}
#player-health-bar {
  border-radius: 5px;
}
#player-health-text.hidden {
  display: none;
}

.hud-stats {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 16px;
  font-weight: bold;
}
.hud-stats p {
  margin: 0;
}

#pause-button {
  font-size: 12px;
  padding: 4px 10px;
}

.hud-bottom {
  position: absolute;
  top: 35px;
  left: 0;
  width: 100%;
  z-index: 10;
  text-align: center;
  pointer-events: none;
}
#objective-text {
  display: inline-block;
  padding: 6px 16px;
  background-color: rgba(0, 0, 0, 0.65);
  border-radius: 6px;
  color: #ffc107;
  font-size: 18px;
  font-weight: bold;
}

.pixel-button {
  background-color: #5f5f5f;
  color: white;
  font-family: "Press Start 2P", cursive;
  font-size: 14px;
  text-shadow: 1px 1px 0px #000;
  padding: 12px 24px;
  border: 2px solid #222;
  box-shadow: inset -2px -3px 0px 0px #3c3c3c, inset 2px 3px 0px 0px #a2a2a2;
  cursor: pointer;
  transition: background-color 0.1s;
}

.pixel-button:hover {
  background-color: #6f6f6f;
}

.pixel-button:active {
  position: relative;
  top: 2px;
  left: 2px;
  box-shadow: inset 0px 0px 0px 0px #3c3c3c;
}

.pixel-button--confirm {
  background-color: #28a745;
  box-shadow: inset -2px -3px 0px 0px #1a6e2e, inset 2px 3px 0px 0px #4cd26b;
}
.pixel-button--confirm:hover {
  background-color: #32c052;
}

.pixel-button--danger {
  background-color: #dc3545;
  box-shadow: inset -2px -3px 0px 0px #8b222c, inset 2px 3px 0px 0px #f35866;
}
.pixel-button--danger:hover {
  background-color: #e44d5a;
}

#pause-button {
  font-size: 12px;
  padding: 8px 12px;
}

#start-menu,
#pause-menu,
#message-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-family: "Press Start 2P", cursive;
  z-index: 100;
  color: #fff;
  gap: 20px;
}

#start-menu {
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
    url("../../images/background.png");
  background-size: cover;
  background-position: center;
}
#pause-menu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-family: "Press Start 2P", cursive;
  z-index: 100;
  color: #fff;
  gap: 20px;
}

#message-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background-image: url("../../images/book.png");
  background-size: cover;
  background-position: center;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 100;
  padding: 40px;
  box-sizing: border-box;
}

#message-screen #message-title {
  color: #4a2d1b;
  text-shadow: 1px 1px 0px #d4cbb8;
}

#message-screen #message-subtitle {
  color: #3b2315;
  font-family: "VT323", monospace;
  font-size: 24px;
  line-height: 1.6;
  max-width: 70%;
}

#game-title,
#pause-title,
#message-title {
  font-size: 32px;
  color: #ffc107;
  text-shadow: 3px 3px 0 #000;
  margin: 0;
}
#game-subtitle,
#message-subtitle {
  font-size: 16px;
  color: #f0f0f0;
  max-width: 80%;
  line-height: 1.5;
  margin: 0;
}

#player-health-container {
  position: relative;
  width: 180px;
  height: 22px;
  background-color: #333;
  border: 2px solid #222;
  box-shadow: inset 1px 1px 0px #000, inset -1px -1px 0px #000;
}
#player-health-bar {
  height: 100%;
  background-color: #28a745;
  transition: width 0.3s ease-in-out;
}
#player-health-text {
  position: absolute;
  width: 100%;
  text-align: center;
  color: white;
  font-size: 14px;
  font-weight: bold;
  text-shadow: 1px 1px 1px black;
}

#boss-health-container {
  position: absolute;
  bottom: 20px;
  left: 10%;
  width: 80%;
  height: 25px;
  z-index: 5;
  background-color: #555;
  border: 3px solid #222;
  border-radius: 8px;
}
#boss-health-bar {
  background-color: #e74c3c;
  height: 100%;
}

canvas {
  display: block;
}
