* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background-color: #0c150d;
  /* 像素棋盘格暗纹背景 */
  background-image: conic-gradient(#0e1a10 25%, #0c150d 0 50%, #0e1a10 0 75%, #0c150d 0);
  background-size: 28px 28px;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

canvas {
  /* 关键：低分辨率画布整数放大，保持像素锐利 */
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  background: #1a2718;
  border: 4px solid #513a26;
  outline: 4px solid #17120c;
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.35), 0 0 48px rgba(0, 0, 0, 0.55);
}

.hint {
  max-width: 660px;
  margin: 0;
  padding: 10px 18px;
  color: #a9c7a0;
  font-size: 13px;
  line-height: 2;
  text-align: center;
  background: #142013;
  border: 3px solid #26381f;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
}
.hint b { color: #ffd23e; }

.credit {
  margin: 0;
  color: #5f7a5c;
  font-size: 11px;
  letter-spacing: 2px;
}

/* 复古 CRT 扫描线（很淡） */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.35;
  background: repeating-linear-gradient(0deg,
    rgba(0, 0, 0, 0.14) 0 1px,
    transparent 1px 3px);
}

@media (max-width: 480px) {
  .hint { font-size: 12px; padding: 8px 10px; }
}
