:root {
  --accent: #0989E2;
  --accent-soft: #e8f4fa;
  --ink: #2b3648;
  --ink-2: #5b6a80;
  --ink-3: #8b98ab;
  --line: #e3e9f3;
  --ok: #2f9e63;
  --ok-soft: #e8f8ef;
  --bad: #e5484d;
  --bad-soft: #ffecec;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.game-card {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  background: transparent;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

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

.app {
  margin: 0 auto;
  padding: 40px 16px 64px;
}

/* ---------- 头部 ---------- */
.app__header {
  text-align: center;
  margin-bottom: 24px;
}

.app__title {
  font-size: 30px;
  letter-spacing: 2px;
}

.app__subtitle {
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.7;
}

/* ---------- 状态条 ---------- */
.status-bar {
  display: flex;
  justify-content: center;
  gap: 26px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(50, 70, 100, 0.08);
  padding: 12px;
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--ink-3);
}

.status-bar strong {
  color: var(--accent);
  font-size: 16px;
  margin-left: 4px;
}

/* ---------- 面板 ---------- */
.panel {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(50, 70, 100, 0.09);
  padding: 34px 30px;
  text-align: center;
}

.panel--game {
  padding: 26px 22px 24px;
}

.panel__title {
  font-size: 22px;
  margin-bottom: 14px;
}

.panel__desc {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.85;
  margin-bottom: 26px;
  text-align: left;
}

.panel__desc strong {
  color: var(--accent);
}

.intro-emoji {
  font-size: 42px;
  margin-bottom: 12px;
}

.is-hidden {
  display: none !important;
}

/* ---------- 按钮 ---------- */
.btn {
  padding: 12px 32px;
  border: none;
  border-radius: 9px;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  background: #e9eef7;
  color: var(--ink);
  transition: filter 0.15s, transform 0.1s;
}

.btn:hover {
  filter: brightness(0.96);
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--sm {
  padding: 9px 18px;
  font-size: 14px;
}

.btn--ghost {
  background: transparent;
  color: var(--ink-3);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* ---------- 游戏区 ---------- */
.game-tip {
  font-size: 15px;
  color: var(--ink-3);
  min-height: 24px;
  margin-bottom: 18px;
}

/* ---------- 棋盘 ---------- */
.board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 424px;
  margin: 0 auto;
  touch-action: manipulation;
}

.cell {
  appearance: none;
  padding: 0;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f5f8fd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: clamp(13px, 3.6vw, 19px);
  font-weight: 700;
  color: transparent;
  cursor: default;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease,
    transform 0.12s ease, box-shadow 0.18s ease;
}

.board.is-input .cell {
  background: #fff;
  cursor: pointer;
}

.board.is-input .cell:not(.cell--picked):hover {
  transform: translateY(-2px);
  border-color: #bfe0ef;
  box-shadow: 0 6px 14px rgba(76, 99, 240, 0.12);
}

.board.is-input .cell:not(.cell--picked):active {
  transform: scale(0.96);
}

/* 随机点亮 */
.cell--flash {
  background: linear-gradient(145deg, #36cfc9, #0989E2);
  border-color: #0989E2;
  transform: scale(1.06);
  box-shadow: 0 10px 22px rgba(76, 99, 240, 0.32);
}

/* 点对 */
.cell--picked {
  background: var(--ok-soft);
  border-color: #93dcb2;
  color: var(--ok);
}

/* 点错 */
.cell--wrong {
  background: var(--bad-soft);
  border-color: #ff9a9c;
  color: var(--bad);
  animation: shake 0.32s ease;
}

/* 正确顺序（未点到的格子） */
.cell--answer {
  background: #fff;
  border-color: #cfd9ee;
  color: var(--ink-3);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ---------- 正确顺序 ---------- */
.answer {
  margin-top: 20px;
  padding: 15px 17px;
  background: #f7f9fe;
  border: 1px dashed #d8e0f5;
  border-radius: 12px;
  text-align: left;
}

.answer__title {
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.answer__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.chip b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
}

/* ---------- 结算 ---------- */
.game-over {
  margin-top: 22px;
}

.result {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.result__item {
  min-width: 118px;
  padding: 16px 14px;
  background: #f6f8fc;
  border-radius: 12px;
}

.result__num {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.result__label {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.result__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.game-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

/* ---------- 底部说明 ---------- */
.intro-footer {
  margin-top: 34px;
  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: 22px 24px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  align-items: center;
}

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

.intro-card__title {
  align-self: end;
  font-size: 16px;
  margin-bottom: 6px;
}

.intro-card__text {
  align-self: start;
  font-size: 13px;
  line-height: 1.9;
  color: var(--ink-2);
}

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

/* ---------- 移动端 ---------- */
@media (max-width: 520px) {
  .app {
    padding: 26px 12px 46px;
  }

  .app__title {
    font-size: 24px;
  }

  .panel {
    padding: 26px 18px;
  }

  .panel--game {
    padding: 22px 14px 20px;
  }

  .board {
    gap: 8px;
  }

  .cell {
    border-radius: 10px;
  }

  .status-bar {
    gap: 16px;
    font-size: 13px;
  }

  .status-bar strong {
    font-size: 15px;
  }

  .result__item {
    min-width: 96px;
    padding: 14px 10px;
  }

  .btn {
    padding: 11px 22px;
    font-size: 15px;
  }
}
