/* 火包炮 HBP · 扩展游戏厅样式 */
.arcade-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.art-glyph span {
  color: color-mix(in srgb, var(--arcade-color) 72%, #6b5b52);
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 10px 24px color-mix(in srgb, var(--arcade-color) 22%, transparent);
}
@media (max-width: 640px) {
  .arcade-filter { align-items: flex-start; flex-direction: column; }
  .art-glyph span { font-size: 34px; }
}
.xgame-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 272px;
  gap: 14px;
  align-items: start;
}
.xgame-main { padding: 20px; min-width: 0; }
.xgame-side { display: grid; gap: 12px; }
.xgame-stat .xstat-list { display: grid; gap: 1px; }
.xstat-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f0eb;
  color: #736c76;
  font-size: 13px;
}
.xstat-list div:last-child { border-bottom: 0; padding-bottom: 0; }
.xstat-list strong { color: #3d3742; font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.xgame-tip p { margin: 0; color: #736c76; font-size: 12.5px; line-height: 1.8; }
.xgame-status {
  margin-top: 15px;
  padding: 9px 13px;
  border-radius: 9px;
  color: #817a85;
  background: #faf7f5;
  font-size: 13px;
  text-align: center;
}
.xgame-status.win { color: #1f8b6b; background: #eaf8f2; }
.xgame-end {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  margin-top: 15px;
  padding: 13px;
  border: 1px solid #f2ded9;
  border-radius: 10px;
  background: #fff5f2;
  text-align: center;
}
.xgame-end.win { border-color: #d9f0e6; background: #f0faf6; }
.xgame-end strong { color: #c25058; font-size: 16px; }
.xgame-end.win strong { color: #228d70; }
.xgame-end span { color: #7d7781; font-size: 12.5px; }
.xgame-seg { padding: 3px; }
.xgame-pad { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 14px; }
.xgame-pad > div { display: flex; gap: 6px; }
.xgame-key {
  width: 44px;
  height: 36px;
  border: 1px solid #ebe4df;
  border-radius: 8px;
  color: #6f6873;
  background: #fff;
  font-size: 17px;
}
.xgame-key:hover { color: var(--accent); border-color: #ffd3d8; background: #fff6f7; }
.xgame-key:active { transform: translateY(1px); }

/* 井字棋 */
.ttt-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 330px; margin: 4px auto; }
.ttt-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #eee7e1;
  border-radius: 14px;
  color: #5f5864;
  background: #fdfbf9;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  transition: .15s;
}
.ttt-cell:hover:not(:disabled) { border-color: #ffd0d6; background: #fff6f7; }
.ttt-cell.x { color: var(--accent); background: #fff5f6; border-color: #ffdbe0; }
.ttt-cell.o { color: #4b8fd6; background: #f2f8ff; border-color: #d9eafb; }
.ttt-cell:disabled { cursor: default; opacity: 1; }

/* 2048 */
.g2048-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 400px;
  margin: 0 auto;
  padding: 10px;
  border-radius: 15px;
  background: #f2ece7;
}
.g2048-tile {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: #7c7269;
  background: #eee7e1;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.5px;
}
.g2048-tile.v2 { color: #6d635c; background: #f7f1eb; }
.g2048-tile.v4 { color: #6d635c; background: #f2e6da; }
.g2048-tile.v8 { color: #fff; background: #ffb27a; }
.g2048-tile.v16 { color: #fff; background: #ff9c6b; }
.g2048-tile.v32 { color: #fff; background: #ff855f; }
.g2048-tile.v64 { color: #fff; background: #ff6f63; }
.g2048-tile.v128 { color: #fff; background: #ff5f7a; font-size: 24px; }
.g2048-tile.v256 { color: #fff; background: #f24f78; font-size: 24px; }
.g2048-tile.v512 { color: #fff; background: #e04ac0; font-size: 24px; }
.g2048-tile.v1024 { color: #fff; background: #8b5cd6; font-size: 20px; }
.g2048-tile.v2048 { color: #fff; background: #5b6ee1; font-size: 20px; box-shadow: 0 0 24px rgba(91, 110, 225, .35); }
.g2048-tile.v4096, .g2048-tile.v8192 { color: #fff; background: #2f9e6f; font-size: 20px; }

/* 扫雷 */
.ms-board {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 4px;
  max-width: 400px;
  margin: 0 auto;
  padding: 7px;
  border-radius: 13px;
  background: #f4efe9;
}
.ms-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e6ded6;
  border-radius: 5px;
  color: #6f6770;
  background: linear-gradient(150deg, #ffffff, #f3ede7);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}
.ms-cell:hover { border-color: #ffd0d6; }
.ms-cell.blank { background: #faf6f2; border-color: #f0e9e2; }
.ms-cell.mine { background: #ffe9e6; border-color: #ffc9c2; font-size: 17px; }
.ms-cell.flag { background: #fff4e6; border-color: #ffe0bd; }
.ms-cell.n1 { color: #3d7fd6; }
.ms-cell.n2 { color: #2f9e6f; }
.ms-cell.n3 { color: #d4605f; }
.ms-cell.n4 { color: #8b5cd6; }
.ms-cell.n5 { color: #b8622f; }
.ms-cell.n6 { color: #2f8f9e; }
.ms-cell.n7 { color: #6f6285; }
.ms-cell.n8 { color: #8b8179; }

/* 记忆翻牌 */
.mem-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; max-width: 400px; margin: 0 auto; }
.mem-card {
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ebe4de;
  border-radius: 11px;
  background: linear-gradient(150deg, #fff7f2, #ffe8e3);
  font-size: 28px;
  transition: transform .18s, background .18s, border-color .18s;
}
.mem-card::after { content: ""; width: 18px; height: 18px; border: 2px solid #f0c3bd; border-radius: 50%; }
.mem-card.open { background: #fff; border-color: #ffd6dc; transform: translateY(-2px); }
.mem-card.open::after { display: none; }
.mem-card.done { background: #f0faf6; border-color: #cdeee1; }
.mem-card.open:not(.done)::after, .mem-card.done::after { display: none; }

/* 数字华容道 */
.slide-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 360px;
  margin: 0 auto;
  padding: 9px;
  border-radius: 14px;
  background: #f2ece7;
}
.slide-tile {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: #5e5762;
  background: linear-gradient(150deg, #ffffff, #f6efe9);
  box-shadow: 0 2px 5px rgba(120, 90, 70, .06);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
}
.slide-tile:hover { color: var(--accent); background: #fff6f7; }
.slide-tile.blank { background: transparent; box-shadow: none; }

/* Canvas 游戏 */
.xgame-canvas-wrap { display: flex; justify-content: center; }
.game-canvas {
  width: 100%;
  border-radius: 14px;
  background: #101a15;
  touch-action: none;
  cursor: crosshair;
}

/* 打地鼠 */
.whack-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 380px; margin: 0 auto; }
.whack-hole {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #eae2dc;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 120%, #f6ece4, #fffaf6 65%);
  font-size: 38px;
  transition: transform .12s, background .12s;
}
.whack-hole:hover { border-color: #ffd3d8; }
.whack-hole.up { background: radial-gradient(circle at 50% 30%, #fff3d5, #ffe6b8); border-color: #ffd08a; transform: scale(1.04); }

/* 石头剪刀布 */
.rps-stage { margin-bottom: 16px; }
.rps-last {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px;
  border-radius: 13px;
  background: #faf7f4;
  color: #6f6873;
  font-size: 14px;
}
.rps-last .vs { color: #c9c1c9; font-family: var(--font-mono); font-size: 12.5px; }
.rps-last strong { flex-basis: 100%; text-align: center; font-size: 15px; }
.rps-last strong.you { color: #228d70; }
.rps-last strong.ai { color: #cc5057; }
.rps-last strong.tie { color: #a4973f; }
.rps-choices { display: flex; gap: 10px; justify-content: center; }
.rps-choice {
  flex: 1;
  max-width: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 15px 8px;
  border: 1px solid #eee7e1;
  border-radius: 13px;
  background: #fff;
  transition: .15s;
}
.rps-choice span { font-size: 30px; line-height: 1; }
.rps-choice small { color: #6a636d; font-size: 12.5px; }
.rps-choice:hover:not(:disabled) { border-color: #ffd0d6; background: #fff6f7; transform: translateY(-2px); }
.rps-choice:disabled { opacity: .5; cursor: default; }

/* 猜数字 */
.guess-stage { max-width: 460px; margin: 0 auto; }
.guess-range { display: flex; align-items: center; gap: 10px; color: #6a636d; font-family: var(--font-mono); font-size: 12.5px; }
.guess-track { position: relative; flex: 1; height: 6px; border-radius: 4px; background: #f0e9e3; overflow: hidden; }
.guess-track i { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: linear-gradient(90deg, #ff9d87, var(--accent)); }
.guess-form { display: flex; gap: 7px; margin: 14px 0; }
.guess-form input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border: 1px solid #ebe4df;
  border-radius: 9px;
  outline: 0;
  background: #fbf8f6;
  color: #443e48;
  font-size: 14px;
}
.guess-form input:focus { border-color: #ffc2c8; background: #fff; box-shadow: 0 0 0 3px rgba(255, 95, 109, .06); }
.guess-history { display: flex; flex-wrap: wrap; gap: 5px; min-height: 24px; }
.guess-chip { padding: 3px 8px; border-radius: 5px; font-family: var(--font-mono); font-size: 11.5px; }
.guess-chip.high { color: #b8622f; background: #fff2e8; }
.guess-chip.low { color: #3d7fd6; background: #eef6ff; }
.guess-chip.hit { color: #228d70; background: #eaf8f2; }

@media (max-width: 980px) {
  .xgame-layout { grid-template-columns: 1fr; }
  .xgame-side { grid-template-columns: 1fr 1fr; }
  .xgame-side > .side-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .xgame-main { padding: 13px; }
  .xgame-side { grid-template-columns: 1fr; }
  .xgame-side > .side-card:last-child { grid-column: auto; }
  .ttt-cell { font-size: 34px; }
  .g2048-tile { font-size: 22px; }
  .g2048-tile.v128, .g2048-tile.v256, .g2048-tile.v512 { font-size: 19px; }
  .ms-board { gap: 3px; padding: 5px; }
  .ms-cell { font-size: 13.5px; }
  .mem-card { font-size: 23px; }
  .slide-tile { font-size: 18px; }
  .whack-hole { font-size: 30px; }
  .rps-choice span { font-size: 26px; }
  .rps-choice { padding: 12px 5px; }
}
