:root {
  --bg-color: #1e1e24;
  --board-bg: #e4a861;
  --board-line: #5c3a1e;
  --text: #f0f0f0;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 480px;
}

header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.back-link {
  color: #94a3b8;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

h1 {
  font-size: 1.4rem;
  color: #fff;
}

.turn-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
}

.turn-badge.black-turn {
  background-color: #000;
  color: #fff;
  border: 1px solid #555;
}

.turn-badge.white-turn {
  background-color: #fff;
  color: #000;
  border: 1px solid #ccc;
}

.controls {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.select-btn, .ctrl-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #4b5563;
  background-color: #2e3039;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.ctrl-btn:hover {
  background-color: #3b3e4a;
}

.board-container {
  width: 100%;
  max-width: 450px;
  aspect-ratio: 1 / 1;
  background-color: var(--board-bg);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

canvas {
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.status-msg {
  font-size: 1rem;
  font-weight: 700;
  color: #fbbf24;
}
