/* 数独格子样式 */
.sudoku-grid {
  background: var(--wechat-gray);
  padding: 2px;
  border-radius: 5px;
}

.sudoku-cell {
  aspect-ratio: 1;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd;
  font-size: 18px;
  cursor: pointer;
  user-select: none;
}

/* 每3x3大格子的右边框 */
.sudoku-cell:nth-child(3n) {
  border-right: 2px solid #999;
}

/* 每3x3大格子的下边框 */
.sudoku-cell:nth-child(n+19):nth-child(-n+27),
.sudoku-cell:nth-child(n+46):nth-child(-n+54),
.sudoku-cell:nth-child(n+73):nth-child(-n+81) {
  border-bottom: 2px solid #999;
}

/* 预填数字样式 */
.sudoku-cell.prefilled {
  background: #f8f8f8;
  color: #333;
  font-weight: bold;
  cursor: default;
}

/* 用户输入数字样式 */
.sudoku-cell.user-filled {
  color: var(--wechat-green);
}

/* 错误数字样式 */
.sudoku-cell.error {
  color: #ff4d4f;
  background: #fff2f0;
}

/* 选中状态 */
.sudoku-cell.selected {
  background: #e6f7ff;
  border-color: #91d5ff;
}

/* 数字键盘样式 */
.number-pad {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.number-pad-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.number-pad button {
  aspect-ratio: 1;
  font-size: 20px;
  border-radius: 10px;
  flex: 1;
  margin: 0 2px;
}
