/* 游戏界面颜色修复 */

/* 游戏卡片强制样式 - 所有卡片内文字改为黑色 */
.game-card {
  color: #000 !important; 
  background-color: #fff !important;
  border: 1px solid #ccc !important;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.8) !important;
  font-weight: bold !important;
  font-size: 1.1em !important;
}

/* 强制所有游戏卡片中的文字和元素为黑色 */
.game-card *,
.game-card span,
.game-card div,
.game-card p {
  color: #000 !important;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.8) !important;
}

/* 对蓝色背景的卡片特殊处理 */
.game-card[style*="background-color"] {
  color: #000 !important;
  text-shadow: 0 0 3px rgba(255, 255, 255, 1) !important;
}

.game-card[style*="background-color"] *,
.game-card[style*="background-color"] span,
.game-card[style*="background-color"] div,
.game-card[style*="background-color"] p {
  color: #000 !important;
  text-shadow: 0 0 3px rgba(255, 255, 255, 1) !important;
}

/* 匹配的卡片样式 */
.game-card.matched {
  background-color: rgba(56, 161, 105, 0.2) !important;
  color: #333 !important;
  border-color: #38a169 !important;
}

/* 选中的卡片样式 */
.game-card.selected {
  border-color: #4361ee !important;
  box-shadow: 0 0 8px rgba(67, 97, 238, 0.6) !important;
}

/* 游戏文字颜色 */
.matching-game h2,
.matching-game h3,
.matching-game p,
.game-selection h2,
.game-selection h3,
.game-selection p,
.game-selection li,
.game-instructions,
.game-score,
.game-results,
.game-message,
.game-option-text {
  color: #000 !important;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.8) !important;
  font-weight: bold !important;
}

/* 暗色模式下的文字颜色 */
[data-theme="dark"] .matching-game h2,
[data-theme="dark"] .matching-game h3,
[data-theme="dark"] .matching-game p,
[data-theme="dark"] .game-selection h2,
[data-theme="dark"] .game-selection h3,
[data-theme="dark"] .game-selection p,
[data-theme="dark"] .game-selection li,
[data-theme="dark"] .game-instructions,
[data-theme="dark"] .game-score,
[data-theme="dark"] .game-results,
[data-theme="dark"] .game-message,
[data-theme="dark"] .game-option-text {
  color: #ffffff !important;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.8) !important;
  font-weight: bold !important;
}

/* 不管是什么模式，强制所有游戏卡片内文字为黑色 */
.game-card,
.game-card *,
.game-card span,
.game-card div,
.game-card p,
[data-theme="dark"] .game-card,
[data-theme="dark"] .game-card *,
[data-theme="dark"] .game-card span,
[data-theme="dark"] .game-card div,
[data-theme="dark"] .game-card p {
  color: #000 !important;
  background-color: #fff !important;
  border-color: #555 !important;
  text-shadow: 0 0 3px rgba(255, 255, 255, 1) !important;
  font-weight: bold !important;
  font-size: 1.1em !important;
}

[data-theme="dark"] .game-card.matched {
  background-color: rgba(56, 161, 105, 0.3) !important;
  color: #f0f0f0 !important;
  border-color: #38a169 !important;
}

/* 按钮样式 */
.game-btn {
  background-color: #f5f5f5 !important;
  color: #333 !important;
  border: 1px solid #ddd !important;
}

.game-btn:hover {
  background-color: #e9e9e9 !important;
}

[data-theme="dark"] .game-btn {
  background-color: #444 !important;
  color: #f0f0f0 !important;
  border-color: #555 !important;
}

[data-theme="dark"] .game-btn:hover {
  background-color: #555 !important;
}
