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

body {
  background-color: #050505;
  color: #eee;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}

#game-container {
  position: relative;
  width: 1280px;
  height: 720px;
  background: #0f120e;
  border: 3px solid #2d3827;
  box-shadow: 0 0 50px rgba(180, 0, 0, 0.4), 0 0 100px rgba(0, 0, 0, 0.9);
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
  background: radial-gradient(circle at center, #161c14 0%, #080d07 100%);
  cursor: crosshair;
}

#hud {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
}

.hud-panel {
  background: rgba(10, 15, 10, 0.85);
  border: 1px solid #3d4f33;
  border-radius: 6px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

.hud-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hud-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #8fa77b;
  min-width: 105px;
}

.hud-val {
  font-weight: 900;
  font-size: 15px;
  color: #ffffff;
}

.hud-val.highlight {
  color: #ff3333;
  font-family: 'Courier New', Courier, monospace;
  font-size: 18px;
}

.hud-val.combo {
  color: #ffaa00;
}

.lives-display {
  display: flex;
  gap: 4px;
}

.life-heart {
  font-size: 18px;
  color: #3a1515;
  transition: color 0.2s ease;
}

.life-heart.active {
  color: #ff2222;
  text-shadow: 0 0 8px rgba(255, 34, 34, 0.8);
}

.bar-track {
  width: 140px;
  height: 12px;
  background: #111;
  border: 1px solid #444;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.bar-fill.health {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #b30000, #ff3333);
  transition: width 0.1s ease;
}

.bar-fill.rage {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #cc7700, #ffcc00);
  transition: width 0.1s ease;
}

.bar-text {
  font-size: 11px;
  font-family: monospace;
  color: #bbb;
}

.screen-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.screen-overlay.hidden {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.overlay-card {
  background: #111710;
  border: 2px solid #5a1111;
  border-radius: 12px;
  padding: 30px 40px;
  width: 720px;
  text-align: center;
  box-shadow: 0 0 60px rgba(200, 0, 0, 0.45);
}

.title-glitch {
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #ff2222;
  text-shadow: 2px 2px #440000, -2px -2px #00ff66;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 14px;
  letter-spacing: 4px;
  color: #a0a0a0;
  margin-bottom: 20px;
}

.text-blood {
  color: #ff1111;
  font-size: 44px;
  text-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
}

.sub-msg {
  font-size: 18px;
  color: #ddd;
  margin: 15px 0 25px;
}

.info-box {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #333;
  border-radius: 8px;
  padding: 14px;
  text-align: left;
  font-size: 13px;
  line-height: 1.6;
  color: #ccc;
  margin-bottom: 20px;
}

.info-box ul {
  margin-left: 20px;
  margin-top: 6px;
}

.monkey-select {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.char-card {
  flex: 1;
  background: #182216;
  border: 2px solid #2e442a;
  border-radius: 8px;
  padding: 12px 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.char-card:hover {
  border-color: #ff3333;
  transform: translateY(-2px);
}

.char-card.active {
  border-color: #ff2222;
  background: #271414;
  box-shadow: 0 0 15px rgba(255, 34, 34, 0.4);
}

.char-card h3 {
  font-size: 13px;
  color: #fff;
  margin-bottom: 6px;
}

.char-card p {
  font-size: 11px;
  color: #aaa;
}

.btn-action {
  background: linear-gradient(180deg, #cc1111 0%, #770000 100%);
  border: 1px solid #ff4444;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  padding: 14px 34px;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 2px;
  box-shadow: 0 0 20px rgba(200, 0, 0, 0.6);
  transition: all 0.2s ease;
}

.btn-action:hover {
  background: linear-gradient(180deg, #ee2222 0%, #aa0000 100%);
  transform: scale(1.04);
  box-shadow: 0 0 30px rgba(255, 34, 34, 0.8);
}

.final-stats {
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #444;
  padding: 16px;
  border-radius: 6px;
  margin: 20px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  text-align: left;
  font-size: 15px;
}

.final-stats span {
  color: #ff4444;
  font-weight: bold;
}
