/* 全局样式 */
* {
  box-sizing: border-box;
  font-family: 'Arial', sans-serif;
}

body {
  margin: 0;
  padding: 20px;
  background-color: #f5f5f5;
  color: #333;
}

h1, h2, h3, h4 {
  color: #554400;
}

/* 游戏配置界面 */
#game-config {
  max-width: 500px;
  margin: 50px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

#game-config form {
  margin-top: 20px;
}

#game-config select {
  font-size: 16px;
  padding: 5px 10px;
  margin-right: 10px;
}

#game-config button {
  font-size: 16px;
  padding: 5px 15px;
  background-color: #997700;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#game-config button:hover {
  background-color: #886600;
}

/* 游戏主界面 */
#game-ui {
  max-width: 1200px;
  margin: 0 auto;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

#phase-info {
  font-size: 18px;
  color: #886600;
}

.game-container {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.board-container {
  flex: 3;
}

#gameCanvas {
  border: 1px solid #ccc;
  background-color: #fff;
}

.player-info-container {
  flex: 1;
  background-color: #fff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.action-buttons button {
  padding: 8px 12px;
  background-color: #886600;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.action-buttons button:hover {
  background-color: #775500;
}

/* 卡牌区域 */
.deck-area {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  justify-content: center;
}

.deck {
  width: 120px;
  height: 180px;
  background-color: #997700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 对话框样式 */
.dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  z-index: 100;
  min-width: 300px;
  text-align: center;
}

.dialog h3 {
  margin-top: 0;
}

.dialog-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.dialog-buttons button {
  padding: 8px 15px;
  background-color: #886600;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.dialog-buttons button:last-child {
  background-color: #aaa;
}

/* 游戏结果显示 */
#game-results {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.9);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
  text-align: center;
  z-index: 200;
}

#game-results h2 {
  color: #886600;
  margin-top: 0;
}

/* 添加到main.css的末尾 */

/* 阶段高亮和行动点高亮 */
.highlight-phase {
  font-weight: bold;
  color: #997700;
  background: #fffbeb;
  padding: 2px 5px;
  border-radius: 4px;
}

.highlight-ap {
  font-weight: bold;
  color: #1a73e8;
}

/* 按钮禁用样式增强 */
button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.disabled-no-ap {
  border: 1px solid #ff6b6b !important;
  background-color: #ffecec !important;
  color: #d32f2f !important;
}

.disabled-wrong-phase {
  border: 1px solid #aaa !important;
  background-color: #f0f0f0 !important;
  color: #777 !important;
}

/* 悬停提示样式增强 */
button[title] {
  position: relative;
}

button[title]:hover::after {
  content: attr(title);
  position: absolute;
  left: 50%;
  bottom: 120%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10;
}