html, body {
  height: 100%;
  margin: 0;
  background: #111;
  color: #e6e6e6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

.root {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 24px 16px;
}

.game-container {
  width: min(960px, 100%);
  margin: 0 auto;
  background: #0f0f0f;
  border: 1px solid #232323;
  border-radius: 10px;
  padding: 16px 14px 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}

.stage-wrap {
  position: relative;
}

canvas {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #000;
  box-shadow: 0 6px 24px rgba(0,0,0,0.6);
  border: 2px solid #2b67ff;
  border-radius: 8px;
  margin: 0 auto;
}

.hud {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  pointer-events: none;
  text-shadow: 0 1px 2px #000;
}

/* 突出分数与生命显示 */
.hud > div {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 8px;
}

.panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: #f0f0f0;
  text-align: center;
  pointer-events: none;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 4px 0;
}

.btn {
  border: 1px solid #2a2a2a;
  background: #1a1a1a;
  color: #f0f0f0;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.05s ease;
  outline: none;
}

.btn:hover {
  background: #252525;
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: #2e8bff;
  border-color: #2e8bff;
  color: #081421;
}

.btn.primary:hover {
  background: #297df0;
  border-color: #297df0;
}

.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(46, 139, 255, 0.35);
}

.spacer { flex: 1; }

.legend {
  opacity: 0.7;
  font-size: 12px;
}

.instructions {
  margin-top: 16px;
  background: #151515;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 12px 14px;
}

.ins-title {
  margin: 0 0 6px 0;
  font-size: 16px;
}

.ins-list {
  margin: 8px 0 0 18px;
  opacity: 0.9;
}

.ins-list li {
  line-height: 1.7;
}


