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

html, body {
  height: 100%;
  background: #05050a;
  color: #efe9dc;
  font-family: "Courier New", "PingFang SC", "Microsoft YaHei", monospace;
  overflow: hidden;
}

#game-wrap {
  position: relative;
  width: 960px;
  height: 576px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

canvas#game {
  display: block;
  width: 960px;
  height: 576px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #05050a;
  cursor: crosshair;
  touch-action: none;
}

button {
  font-family: inherit;
}
.btn-row {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-row button {
  background: #f0c64a;
  color: #17141c;
  border: none;
  font: bold 14px "Courier New", monospace;
  letter-spacing: 1px;
  padding: 10px 18px;
  cursor: pointer;
}
.btn-row button:hover { background: #ffd968; }
.btn-row button.btn-ghost {
  background: transparent;
  color: #c8c2b4;
  border: 1px solid #5c5668;
}
.btn-row button.btn-ghost:hover { border-color: #f0c64a; color: #f0c64a; }
#start-btn {
  margin-top: 18px;
  background: #f0c64a;
  color: #17141c;
  border: none;
  font: bold 16px "Courier New", monospace;
  letter-spacing: 3px;
  padding: 12px 34px;
  cursor: pointer;
}
#start-btn:hover { background: #ffd968; }
#install-btn {
  margin-top: 20px;
  background: #f0c64a;
  color: #17141c;
  border: none;
  font: bold 14px "Courier New", monospace;
  letter-spacing: 2px;
  padding: 10px 26px;
  cursor: pointer;
}
#install-btn:hover { background: #ffd968; }
#ios-hint { margin-top: 12px; font-size: 12px; color: #9a94a8; }

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 3, 8, 0.72);
  z-index: 10;
}

.overlay.hidden { display: none; }

.panel {
  background: #0d0c14;
  border: 3px solid #3a3542;
  box-shadow: 0 0 0 3px #17141c, 0 12px 40px rgba(0,0,0,.8);
  padding: 34px 44px;
  text-align: center;
  min-width: 460px;
}

.panel.small { min-width: 420px; padding: 26px 34px; }

.panel h1 {
  font-size: 44px;
  letter-spacing: 6px;
  color: #f0c64a;
  text-shadow: 0 3px 0 #8a6a1a, 0 0 18px rgba(240,198,74,.35);
}

.panel h2 { font-size: 28px; letter-spacing: 4px; color: #e06a7a; margin-bottom: 14px; }

.subtitle {
  margin-top: 4px;
  font-size: 15px;
  letter-spacing: 8px;
  color: #9a94a8;
}

.desc { margin-top: 14px; font-size: 14px; color: #c8c2b4; }

.controls {
  margin-top: 20px;
  font-size: 13px;
  line-height: 2.1;
  color: #a8a2b8;
  text-align: left;
  display: inline-block;
}

.controls b { color: #efe9dc; }

.start-hint {
  margin-top: 22px;
  font-size: 15px;
  color: #f0c64a;
  animation: blink 1.1s steps(2) infinite;
}

.stats { margin-top: 12px; font-size: 14px; line-height: 1.9; color: #c8c2b4; }
.high { margin-top: 8px; font-size: 14px; color: #f0c64a; }

@keyframes blink { 50% { opacity: 0.25; } }
