

/* --------------- */
/* img          */
/* --------------- */
.board-img {
  max-width: 100%;
  margin-bottom: 20px;
}

/* --------------- */
/* overlay         */
/* --------------- */

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  z-index: 1001;
  display: none;
  overflow: hidden;
}

#popup-overlay {
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
}

#move-overlay {
  z-index: 1001;
}

#board-overlay {
  z-index: 1002;
  position: absolute;
  inset: 0;
}

/* --------------- */
/* Button          */
/* --------------- */

/* Menu button */
.menu-btn {
  width: 42px;
  height: 42px;
  padding: 6px;

  border: none;
  border-radius: 6px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: background-color 0.25s ease, transform 0.1s ease;
}

.menu-btn img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.menu-btn:disabled {
  background-color: #999;
  color: #eee;
  cursor: not-allowed;
  opacity: 0.6;
}


/* Play Now button */
.play-now-div {
  width: fit-content;
  margin: 30px auto 0;
}

.play-now-div a {
  text-decoration: none;
  color: #fff;
  font-weight: bold;
}

.play-now-btn {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 20px;
  border-radius: 30px;
  height: 15px;
  width: 150px;
  background-color: #eb6101;
}



/* --------------- */
/* Popup           */
/* --------------- */

/* Message PopUp    */
#message-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 10px;
  background: #fff;
  padding: 20px 24px;
  width: min(70vmin, 300px);
  text-align: center;
  z-index: 1101;
  display: none;
}

#message-text {
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: normal;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

#redirect-message {
  display: none;
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.6;
  white-space: normal;
  word-break: break-word;
}

.message-btn-div {
  margin: 20px auto 0;
  justify-content: center;
  align-self: center;
}

#message-yesno {
  display: none;
}

#message-close {
  display: none;
}

.message-btn {
  text-align: center;
  margin: 0 auto;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  width: 80px;
  height: 32px;

  background: #e0e0e0;
}


/* Select Game PopUp */
#select-game-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 10px;
  background: #fff;
  padding: 20px 24px;
  width: min(70vmin, 300px);
  text-align: center;
  z-index: 1101;
  display: none;
  max-height: 90vh;
}

#select-game-text {
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: normal;
  line-height: 1.6;
  word-break: break-word;
}

.game-list {
  margin: 5px auto;
  width: 80%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#user-game-list {
  max-height: 70vh;
  overflow-y: auto;
  padding: 10px 20px;
  margin: 5px auto;
}

#user-game-list::-webkit-scrollbar {
    width: 16px;
}
 
#user-game-list::-webkit-scrollbar-track {
    background-color: #e4e4e4;
    border-radius: 100px;
}
 
#user-game-list::-webkit-scrollbar-thumb {
    background-color: #d4aa70;
    border-radius: 100px;
}

.user-game-btn {
  width: 100%;
  align-items: center;
  padding: 10px 0;
  gap: 5px;
  background: #fff;
  border: 1px solid #3aabd2;
  cursor: pointer;
  border-radius: 8px;
}

.user-game-btn span {
  line-height: 1;
}

.game-name {
  color: #3aabd2;
  margin-bottom: 5px;
  font-weight: bold;
}

.game-active {
  margin-bottom: 6px;
  color:#eb6101;
}

.game-date {
  gap: 10px;
}

.game-player {
  font-weight: bold;
}

/* Cancel Button */
/* #cancel-button {
  display: none;
  justify-content: center;
  align-self: center;
  text-align: center;
  margin: 20px auto 0;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  width: 80px;
  height: 32px;

  background: #e0e0e0;
} */



/* --------------- */
/* Bot Thinking Spinner */
/* --------------- */
.hidden {
  display: none !important;
}

#engine-spinner {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1200;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #ddd;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.bot-thinking {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  /* アイコンサイズ */
  height: 32px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  /* クリック透過 */
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}



/* スマホ用（画面幅768px以下） */
@media (max-width: 768px) {
  .menu-btn {
    width: 30px;
    height: 30px;
  }
}