:root {
  --bg: #ffffff;
  --card: #ffffff;
  --line: #e5e9f0;
  --text: #1d2129;
  --muted: #86909c;
  --accent: #0989E2;
  --accent-2: #36cfc9;
}

* { box-sizing: border-box; }

.game-card--dark {
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: transparent;
  -webkit-font-smoothing: antialiased;
}

/* 外层容器透明：去掉外壳给 rounded-2xl 加的边框 */
.ot_workspace__inner .game-card {
  border: 0;
  box-shadow: none;
}

/* 与面包屑导航保持一致的宽度 */
.page {
  margin: 0 auto;
  padding: 40px 20px 56px;
}

/* ---------- 顶部标题 ---------- */
.hero { text-align: center; margin-bottom: 28px; }

.hero__kicker {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--muted);
}

.hero__title {
  margin: 0;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: linear-gradient(100deg, #1d2129 10%, var(--accent) 52%, var(--accent-2) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- 数据栏 ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}

.stat__label {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.stat__value {
  font-size: 21px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stat__value small {
  margin-left: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.progress {
  height: 4px;
  margin: 16px 0 18px;
  border-radius: 99px;
  background: #eef0f4;
  overflow: hidden;
}

.progress__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 棋盘 ---------- */
.stage {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.board.is-shake { animation: shake 0.42s ease; }

.cell {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: #e9edf3;
  cursor: pointer;
  transition: background-color 0.26s ease, transform 0.16s ease, box-shadow 0.2s ease,
    opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.cell.is-idle {
  cursor: default;
  opacity: 0.55;
}

.cell.is-new { animation: cellIn 0.3s ease both; }

.cell:not(.is-idle):hover { transform: translateY(-2px); }
.cell:not(.is-idle):active { transform: scale(0.97); }

.cell:disabled { cursor: default; }
.cell:disabled:hover,
.cell:disabled:active { transform: none; }

.cell:focus-visible {
  outline: 2px solid #1d2129;
  outline-offset: 2px;
}

/* 点对：主题色光圈 */
.cell.is-correct {
  transform: scale(0.94);
  box-shadow: 0 0 0 3px rgba(9,137,226, 0.9), 0 0 22px rgba(9,137,226, 0.28);
}

/* 点错：红色叉 */
.cell.is-wrong::after {
  content: "✕";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #fff;
  background: rgba(0, 0, 0, 0.34);
  border-radius: inherit;
}

.cell.is-wrong { box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.9); }

/* 揭示正确答案 */
.cell.is-answer {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

/* 结算时其余格子轻微压暗，视线留在答案上 */
.board.is-revealed .cell:not(.is-answer) { opacity: 0.62; }
.board.is-revealed .cell.is-wrong { opacity: 1; }

.hint {
  margin: 18px 0 0;
  min-height: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- 棋盘下方反馈区（不遮挡格子） ---------- */
.feedback {
  max-width: 520px;
  margin: 16px auto 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  animation: rise 0.24s ease both;
}

.feedback[hidden] { display: none; }

.feedback__kicker {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.feedback__body {
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.feedback__body p { margin: 0; }

.result__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dashed #e5e9f0;
  font-size: 13px;
  color: var(--muted);
}

.result__row:last-child { border-bottom: 0; }

.result__row b {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.result__note {
  margin: 12px 0 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: #e8f7fb;
  color: #4e5969;
  font-size: 12px;
  line-height: 1.6;
}

.btn {
  width: 100%;
  padding: 12px 18px;
  border: 0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.16s ease;
}

.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- 底部说明（与数字顺序记忆训练一致） ---------- */
.intro-footer {
  margin-top: 36px;
}

.intro-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.intro-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(50, 70, 100, 0.08);
  padding: 24px 26px;
  text-align: left;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 18px;
  align-items: center;
}

.intro-card__icon {
  grid-row: 1 / span 2;
  font-size: 30px;
}

.intro-card__title {
  align-self: end;
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
  color: #2c3e50;
}

.intro-card__text {
  align-self: start;
  margin: 0;
  font-size: 13px;
  line-height: 1.9;
  color: #5a6a7e;
}

.intro-card__text strong {
  color: var(--accent);
  font-weight: 600;
}

.intro-card__table {
  align-self: start;
  min-width: 0;
}

.de-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.de-table th,
.de-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.de-table th {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.de-table td:first-child {
  width: 128px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.de-table td:last-child { color: #86909c; }

.de-table tr:last-child td { border-bottom: 0; }

.footer {
  margin-top: 40px;
  text-align: center;
  font-size: 12px;
  color: #5d667c;
}

@keyframes cellIn {
  from { opacity: 0.3; transform: scale(0.95); }
  to   { opacity: 1; transform: none; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

@media (max-width: 480px) {
  .page { padding: 28px 16px 44px; }
  .hero__title { font-size: 32px; }
  .stat { padding: 10px 12px; }
  .stat__value { font-size: 18px; }
  .board { gap: 8px; }
  .cell { border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
