#tool-body * {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* 关键：确保边框计算在尺寸内 */
}

#tool-body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#tool-body .game-container {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  background: white;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#tool-body .score-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  background: #eee;
  padding: 10px;
  border-radius: 8px;
}

#tool-body .score-board {
  text-align: center;
  font-size: 14px;
}

#tool-body .score-num {
  font-size: 24px;
  font-weight: bold;
  margin-top: 5px;
}

#tool-body .info-area {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#tool-body .result {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 5px;
}

#tool-body #restart-btn {
  background-color: #4CAF50;
  border: none;
  color: white;
  padding: 8px 16px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

#tool-body #restart-btn:hover {
  background-color: #45a049;
}

#tool-body .tile-container {
  position: relative;
  border: solid 4px #376747;
  background-color: #376747;
  margin: 0 auto;
}

#tool-body .tile-background {
  background-color: #42b964;
  position: absolute;
  border: solid 1px #376747;
  cursor: pointer;
}

#tool-body .dot {
  border-radius: 50%;
  position: absolute;
  background-color: #175727;
  transform: translate(-50%, -50%);
  pointer-events: none; 
  z-index: 1;
}

#tool-body .black-piece,
#tool-body .white-piece {
  width: 80%;
  height: 80%;
  margin: 10%;
  border-radius: 100%;
  box-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

#tool-body .white-piece {
  background-color: white;
}

#tool-body .black-piece {
  background-color: black;
}

#tool-body #toast-msg {
  visibility: hidden;
  min-width: 200px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 12px;
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.3s, bottom 0.3s;
}

#tool-body #toast-msg.show {
  visibility: visible;
  opacity: 1;
  bottom: 50px;
}
.theme-dark-mode #tool-body .score-container{
  background: #333;
}

.theme-dark-mode #tool-body .game-container {
  background: #222;
}