html, body {
  margin: 0;
  padding: 0;
  background: #784a21;
  font-family: 'Copperplate', 'Copperplate Gothic Bold', serif;
  color: #e6d9c3;
  min-height: 100%;
}

#app {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
}

#ui {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: 800px;
  padding: 10px 4px;
  font-size: 18px;
  letter-spacing: 1px;
  text-shadow: 0 0 6px #000;
}

#ui span {
  color: #ffcf7a;
}

#gameArea {
  display: flex;
  gap: 12px;
}

#reloadBarWrap {
  width: 800px;
  height: 10px;
  background: #241b10;
  border: 2px solid #4a3a24;
  border-radius: 6px;
  margin-bottom: 10px;
  overflow: hidden;
}

#reloadBarFill {
  height: 100%;
  width: 100%;
  background: #8affc1;
  transition: width 0.05s linear;
}

#gameCanvas {
  border: 3px solid #3a2b1a;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
  cursor: crosshair;
  background-color: #111;
}

#sidebar {
  width: 130px;
  background: #473623;
  border: 2px solid #8c673d;
  border-radius: 8px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

#sidebar h3 {
  margin: 0 0 4px 0;
  font-size: 15px;
  color: #ffcf7a;
  text-align: center;
}

.char-btn {
  width: 100%;
  background: #43321e;
  border: 2px solid #8e6f44;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #e6d9c3;
  font-family: inherit;
  font-size: 12px;
  transition: 0.15s;
}

.char-btn img {
  width: 100%;
  height: 60px;
  object-fit: contain;
}

.char-btn:hover {
  border-color: #ffcf7a;
}

.char-btn.active {
  border-color: #ffcf7a;
  background: #694e27;
  box-shadow: 0 0 12px rgba(255, 207, 122, 0.4);
}

#gunBar {
  display: flex;
  gap: 14px;
  margin-top: 14px;
  background: #513e29;
  border: 2px solid #745634;
  border-radius: 8px;
  padding: 10px 16px;
}

.gun-btn {
  background: #5a4328;
  border: 2px solid #9b7b4d;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #e6d9c3;
  font-family: inherit;
  font-size: 12px;
  transition: 0.15s;
}

.gun-btn img {
  width: 80px;
  height: 50px;
  object-fit: contain;
}

.gun-btn:hover {
  border-color: #5ec8ff;
}

.gun-btn.active {
  border-color: #5ec8ff;
  background: #16303a;
  box-shadow: 0 0 12px rgba(94, 200, 255, 0.4);
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.75);
  color: #ff6b6b;
  text-align: center;
}

#overlay h1 {
  font-size: 48px;
  margin-bottom: 10px;
}

#overlay button {
  margin-top: 20px;
  padding: 12px 28px;
  font-size: 18px;
  font-family: inherit;
  background: #ffcf7a;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #2a1a0a;
  font-weight: bold;
}

#overlay button:hover {
  background: #ffdf9a;
}

#hint {
  margin-top: 10px;
  font-size: 13px;
  color: #a89272;
}