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

body {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #262626 radial-gradient(circle at 50% 0%, #3a3a3a, #1a1a1a);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 12px;
  color: #eee;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

h1 {
  font-size: 28px;
  letter-spacing: 10px;
  color: #f5d78a;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.mode-switch {
  display: flex;
  background: #3a3a3a;
  border-radius: 8px;
  padding: 3px;
}

.btn {
  border: 1px solid #555;
  background: #444;
  color: #eee;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s;
}

.btn:hover {
  background: #555;
}

.mode-switch .btn {
  border: none;
  background: transparent;
  border-radius: 6px;
}

.mode-switch .btn.active {
  background: #c9a24b;
  color: #222;
  font-weight: 600;
}

.status {
  min-height: 34px;
  padding: 6px 18px;
  border-radius: 20px;
  background: #3a3a3a;
  border: 1px solid #555;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.status.win {
  background: #c9a24b;
  color: #222;
  border-color: #c9a24b;
  font-weight: 700;
}

.status .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot.red {
  background: #d8453c;
  box-shadow: 0 0 6px #d8453c;
}

.dot.black {
  background: #2f2f2f;
  border: 1px solid #aaa;
  box-shadow: 0 0 6px #999;
}

.board-wrap {
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
  line-height: 0;
}

canvas#board {
  display: block;
  max-width: 94vw;
  height: auto;
  border-radius: 10px;
}

.hint {
  font-size: 13px;
  color: #999;
}
