/* ==========================================================
 * style.css — 街机相框 + 扫描线（像素风统一外观）
 * ========================================================== */

/* 开源商用字体 JetBrains Mono（SIL OFL 1.1，许可见 fonts/OFL.txt） */
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px 16px;
  background: #05070f;
  color: #cbd5e1;
  font-family: "JetBrains Mono", "Courier New", monospace;
  /* 背景暗角，让画面像一台老式街机 */
  background-image: radial-gradient(ellipse at 50% 0%, #141c33 0%, #05070f 65%);
}

#stage {
  position: relative;
  padding: 10px;
  border-radius: 8px;
  background: #0b0f1c;
  box-shadow:
    0 0 0 2px #1e293b,
    0 0 0 5px #0b0f1c,
    0 0 40px rgba(115, 239, 247, 0.12),
    0 18px 50px rgba(0, 0, 0, 0.6);
}

canvas {
  display: block;
  /* 由 JS 设置整数倍缩放，这里只兜底 */
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border-radius: 3px;
  cursor: crosshair;
  touch-action: none;
}

/* CRT 扫描线：纯装饰，不拦截鼠标 */
.scanlines {
  position: absolute;
  inset: 10px;
  border-radius: 3px;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.16) 0px,
    rgba(0, 0, 0, 0.16) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: multiply;
}

.manual {
  max-width: 640px;
  font-size: 13px;
  line-height: 1.9;
  text-align: center;
  color: #7d8aa0;
}

.manual p { margin: 4px 0; }

.accent { color: #ffcd75; }

.tip {
  font-size: 12px;
  color: #5b677d;
}

@media (max-width: 560px) {
  body { gap: 12px; padding: 12px 10px; }
  .manual { font-size: 12px; }
}

/* SEO：视觉隐藏的 h1（Canvas 页不放显式大标题，但需要文档标题结构） */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
