/* Classic wooden Gomoku board styling. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2b2117;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
}

#app {
  background: #5c4328;
  padding: 24px 28px 20px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  max-width: 92vw;
}

h1 {
  margin: 0 0 14px;
  text-align: center;
  color: #f0d9a0;
  font-size: 24px;
  letter-spacing: 2px;
}

h1 .sub {
  font-size: 13px;
  color: #c9a86a;
  vertical-align: middle;
  margin-left: 6px;
}

#controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

#controls label {
  color: #f0d9a0;
  font-size: 14px;
}

#controls select,
#controls button {
  background: #3a2a1a;
  color: #f0d9a0;
  border: 1px solid #8a6a3a;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 14px;
  cursor: pointer;
}

#controls button:hover {
  background: #4a3520;
}

#board-wrap {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

canvas#board {
  display: block;
  border: 5px solid #3a2a1a;
  border-radius: 8px;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  max-width: min(92vw, 100%);
  height: auto;
}

#thinking {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: rgba(20, 14, 8, 0.55);
  color: #ffe9c0;
  font-size: 26px;
  letter-spacing: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 1.2s ease-in-out infinite;
}

#thinking.hidden {
  display: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

#status {
  margin-top: 12px;
  text-align: center;
  color: #f0d9a0;
  font-size: 15px;
  min-height: 22px;
}
