/* 小游戏 · 选游戏页
 *
 * 设计约束（沿用项目约定）：
 *   - 无框架、无构建、无外部字体/CDN，改完即生效
 *   - 移动优先：点按区 ≥ 44px，一屏放下两张卡
 *   - 和两个游戏页面同一套「掌机」配色：深底 + 霓虹描边 + 硬阴影（不用图片）
 */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #0b1020;
  --panel: #131a30;
  --panel-2: #0f1526;
  --line: #2c3a63;
  --ink: #e6ecff;
  --ink-dim: #8ea0cf;
  --snake: #4ade80;
  --tetris: #67e8f9;
  --shadow: #05080f;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  /* 像素网格底纹：纯 CSS，不引图片 */
  background-image:
    linear-gradient(rgba(103, 232, 249, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 249, .045) 1px, transparent 1px);
  background-size: 22px 22px;
}

.arcade {
  max-width: 460px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- 头部 ---------- */

.arcade__head { text-align: center; }

.arcade__logo {
  margin: 0;
  font-size: 40px;
  line-height: 1;
}

.arcade__title {
  margin: 8px 0 4px;
  font-size: 24px;
  letter-spacing: 4px;
}

.arcade__sub {
  margin: 0;
  font-size: 11px;
  color: var(--ink-dim);
}

/* ---------- 游戏卡片 ---------- */

.games {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.game__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 14px;
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: 3px 3px 0 var(--shadow);
  color: inherit;
  text-decoration: none;
}

.game__link:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--shadow);
}

.game__link:focus-visible {
  outline: 3px solid var(--tetris);
  outline-offset: 2px;
}

.game__emoji {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-size: 34px;
  line-height: 1;
}

/* 俄罗斯方块那个方块组图标 */
.piece-icon {
  display: block;
  width: 38px;
  height: 38px;
}

/* 坦克大战那辆小坦克（同一套尺寸，只是另一个图形） */
.tank-icon {
  display: block;
  width: 38px;
  height: 38px;
}

/* 愤怒的小鸟：红鸟头像（emoji 里没有一只“生气的红鸟”，所以用内联 SVG） */
.angry-icon {
  display: block;
  width: 38px;
  height: 38px;
}

.game__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.game__title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
}

.game__desc {
  font-size: 11px;
  line-height: 1.6;
  color: var(--ink-dim);
}

.game__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.tag {
  padding: 2px 6px;
  font-size: 10px;
  color: var(--ink);
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.game__play {
  flex: 0 0 auto;
  font-size: 18px;
  color: var(--snake);
}

/* 每张卡的强调色：贪吃蛇绿 / 方块青 / 愤怒小鸟的金黄 */
.games .game:nth-child(2) .game__play { color: var(--tetris); }
.games .game:nth-child(6) .game__play { color: #f4b81e; }

/* ---------- 页脚 ---------- */

.arcade__foot {
  margin-top: 4px;
  text-align: center;
  font-size: 11px;
  line-height: 1.9;
  color: var(--ink-dim);
}

.arcade__foot p { margin: 4px 0; }

.back {
  color: var(--tetris);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}

/* ---------- 大屏 ---------- */

@media (min-width: 600px) {
  .arcade { max-width: 560px; }
  .arcade__title { font-size: 28px; }
  .game__emoji { font-size: 40px; width: 44px; height: 44px; }
  .piece-icon { width: 44px; height: 44px; }
  .tank-icon { width: 44px; height: 44px; }
  .angry-icon { width: 44px; height: 44px; }
}

/* 备案信息（京ICP备…号-1）：页面底部居中、链接给足点击热区、窄屏不溢出 */
.beian-foot {
  margin: 22px auto 6px;
  padding-top: 14px;
  max-width: 560px;
  border-top: 1px solid rgba(255,255,255,.14);
  text-align: center;
}
.beian-foot__line { margin: 0; font-size: .76rem; line-height: 1.7; }
.beian-foot__line a {
  display: inline-block;
  padding: 4px 2px;
  color: rgba(255,255,255,.62);
  text-decoration: none;
  word-break: break-word;
}
.beian-foot__line a:hover { color: #ffd166; text-decoration: underline; }
