/* 背景图片样式 */
.背景图片 {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: -1;
  transition: 250ms;
}

.背景图片 > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: opacity(75%);
}

body:has(.说明按钮.展开) .背景图片 {
  filter: brightness(0.25);
}

/* 控制区域样式 */
.控制区域 {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100vw;
  height: 150px;
  padding: 0 50px;
  position: relative;
  z-index: 10;
}

.控制区域 > div {
  width: 75px;
  height: 75px;
  font-size: 1.25rem;
  border-radius: 10px;
  border-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.控制区域 > .重置游戏:hover {
  cursor: url("/Images/Common/鼠标-指向.cur"), pointer;
}

.控制区域 > div img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.重置游戏 {
  position: relative;
}

.重置游戏 > img {
  width: 70%;
  height: 70%;
}

.重置游戏:hover > img {
  animation: 重置旋转 1s infinite linear;
}

@keyframes 重置旋转 {
  from {
    transform: rotateZ(0);
  }
  50% {
    transform: rotateZ(180deg);
  }
  to {
    transform: rotateZ(360deg);
  }
}

.返回导航器 {
  background-color: transparent;
}

.重置游戏,
.返回导航器 {
  filter: drop-shadow(1px 1px 2px #000a);
}

.返回导航器 > a {
  width: 100%;
  height: 100%;
}

.返回导航器 img {
  width: 100%;
  height: 100%;
  transition: 0.5s;
}

.返回导航器:hover img {
  cursor: url("/Images/Common/鼠标-指向.cur"), pointer;
  animation: 返回缩放 0.75s infinite linear;
}

@keyframes 返回缩放 {
  from {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  to {
    transform: scale(1);
  }
}

/* 游戏区域样式 */
.游戏区域 {
  position: relative;
  height: calc(100vh - 210px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

/* 游戏容器样式 */
.游戏容器 {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 30px;
  background: rgba(0, 0, 0, 0.7);
  padding: 30px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 1000px;
  margin: 0 auto;
}

.游戏容器:has(.说明按钮.展开) > .游戏左侧 {
  filter: brightness(0.25);
}

.游戏容器:has(.说明按钮.展开) .游戏信息面板,
.游戏容器:has(.说明按钮.展开) .游戏控制面板 {
  filter: brightness(0.25);
}

/* 游戏左侧样式 */
.游戏左侧 {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: 250ms;
}

/* 游戏右侧样式 */
.游戏右侧 {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 250px;
}

/* 游戏标题样式 */
.游戏标题 {
  margin-bottom: 20px;
}

.游戏标题文字 {
  font-size: 2.5em;
  color: #ffd700;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-weight: bold;
}

/* 游戏信息面板样式 */
.游戏信息面板 {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: 250ms;
}

.当前玩家信息 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.玩家标签 {
  color: #ffffff;
  font-size: 1.1em;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.玩家名称 {
  color: #ffd700;
  font-size: 1.2em;
  font-weight: bold;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

#currentPlayer.黑棋 {
  color: #000;
}

#currentPlayer.白棋 {
  color: #fff;
}

.游戏状态 {
  color: #ffffff;
  font-size: 1.1em;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  text-align: center;
  transition: all 0.3s ease;
}

/* 游戏进行中状态样式 */
.游戏状态.游戏进行中状态 {
  color: #4caf50;
  font-weight: bold;
  animation: 呼吸效果 2s ease-in-out infinite;
  text-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

@keyframes 呼吸效果 {
  0%,
  100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

/* 游戏结果样式 */
.游戏结果 {
  position: fixed; /* 居中覆盖，不撑开页面 */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 18px 24px;
  background: rgba(0, 0, 0, 0.65);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  z-index: 12000;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.结果内容 {
  font-size: 1.35em;
  color: #ffd700;
  font-weight: 700;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* 游戏说明样式 */
.游戏说明 {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  overflow: hidden;
}

/* 说明按钮样式 */
.说明按钮 {
  width: 100%;
  padding: 15px 20px;
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: #ffffff;
  border: none;
  border-radius: 0;
  font-size: 1.1em;
  font-weight: bold;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  cursor: url("/Images/Common/鼠标-指向.cur"), pointer;
  transition: 250ms;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.说明按钮.展开 {
  filter: brightness(0.25);
}

.说明按钮:hover {
  background: linear-gradient(135deg, #45a049, #4caf50);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.说明按钮:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(76, 175, 80, 0.3);
}

.按钮文字 {
  font-size: 1.1em;
}

.按钮图标 {
  font-size: 0.9em;
  transition: transform 0.3s ease;
}

.说明按钮.展开 .按钮图标 {
  transform: rotate(180deg);
}

.说明内容 {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 600px;
  max-height: 70vh;
  padding: 30px;
  background: rgba(50, 50, 50, 0.985);
  border-radius: 15px;
  border: 2px solid #ffd700;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  overflow-y: auto;
  animation: popupShow 0.3s ease-out;
}

@keyframes popupShow {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* 关闭按钮样式 */
.关闭按钮 {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  background: rgba(255, 0, 0, 0.8);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  font-weight: bold;
  cursor: url("/Images/Common/鼠标-指向.cur"), pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

.关闭按钮:hover {
  background: rgba(255, 0, 0, 1);
  transform: scale(1.1);
  box-shadow: 0 2px 10px rgba(255, 0, 0, 0.3);
}

.关闭按钮:active {
  transform: scale(0.95);
}

.说明部分,
.算法说明 {
  color: #ffffff;
  font-size: 0.9em;
  line-height: 1.6;
  margin-bottom: 15px;
}

.说明部分 p,
.算法说明 p {
  margin: 5px 0;
}

.说明内容 strong,
.算法说明 strong {
  color: #ffd700;
  font-weight: bold;
}

.算法说明 a {
  color: #4caf50;
  text-decoration: none;
  transition: color 0.3s ease;
}

.算法说明 a:hover {
  color: #66bb6a;
  text-decoration: underline;
}

.算法限制 {
  color: #ff9800;
  font-style: italic;
  background: rgba(255, 152, 0, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 152, 0, 0.3);
}

/* 棋盘容器样式 */
.棋盘容器 {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#gameBoard {
  display: block;
  background: #8b4513;
  cursor: crosshair;
  width: 550px;
  aspect-ratio: 1;
}

/* 游戏控制面板样式 */
.游戏控制面板 {
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: 250ms;
}

.游戏按钮 {
  padding: 12px 24px;
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: bold;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  cursor: url("/Images/Common/鼠标-指向.cur"), pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
  text-shadow: none;
}

.游戏按钮:hover {
  background: linear-gradient(135deg, #ffed4e, #ffd700);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.游戏按钮:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.游戏按钮:disabled {
  background: #666;
  color: #999;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.模式区 {
  width: fit-content;
  margin: 0 auto 15px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  border-radius: 8px;
  overflow: hidden;
}

.单选标签 {
  position: relative;
  padding: 10px 20px;
  background: #fff1;
  width: 100px;
  height: 40px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
}

.单选标签:has(.单选框:checked) {
  background: #fff5;
}

.单选标签:hover {
  cursor: url("/Images/Common/鼠标-指向.cur"), pointer;
  background: #ffffff2a;
}

.单选标签 > .标签标题 {
  color: silver;
}

.单选标签:has(.单选框:checked) > .标签标题 {
  color: white;
}

.单选标签 > .单选框 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.单选标签 > .单选框:hover {
  cursor: url("/Images/Common/鼠标-指向.cur"), pointer;
}

.辅助效果区 {
  display: flex;
  justify-content: center;
}

.复选标签 {
  padding: 10px 15px;
}

.复选标签:hover {
  background-color: #ffffff1a;
}

.复选框 {
  scale: 1.1;
}

.标签,
.标签标题,
.标签 > input {
  user-select: none;
}

/* 响应式设计 */
@media screen and (max-width: 1000px) {
  .控制区域 {
    height: 70px;
    padding: 0 20px;
  }

  .控制区域 > div {
    width: 65px;
    height: 65px;
    font-size: 1.25em;
  }

  .游戏区域 {
    height: calc(100vh - 140px);
    padding: 0 20px;
  }

  .游戏容器 {
    flex-direction: column;
    padding: 20px;
    max-width: 600px;
  }

  .游戏右侧 {
    min-width: auto;
    width: 100%;
  }

  .游戏标题文字 {
    font-size: 2em;
  }

  #gameBoard {
    width: 500px;
    height: 500px;
  }

  .游戏控制面板 {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .说明按钮 {
    padding: 12px 15px;
    font-size: 1em;
  }

  .说明内容 {
    padding: 15px;
  }

  .说明部分,
  .算法说明 {
    font-size: 0.85em;
  }

  .说明内容 {
    width: 90%;
    max-width: 500px;
    padding: 20px;
  }
}

@media screen and (max-width: 600px) {
  .游戏容器 {
    padding: 15px;
  }

  .游戏标题文字 {
    font-size: 1.8em;
  }

  #gameBoard {
    width: 400px;
    height: 400px;
  }

  .游戏信息面板 {
    max-width: 400px;
    padding: 10px 15px;
  }

  .玩家标签,
  .玩家名称,
  .游戏状态 {
    font-size: 1em;
  }

  .游戏按钮 {
    padding: 10px 20px;
    font-size: 0.9em;
  }

  .游戏控制面板 {
    gap: 10px;
  }
}

@media screen and (max-width: 480px) {
  #gameBoard {
    width: 350px;
    height: 350px;
  }

  .游戏信息面板 {
    max-width: 350px;
  }

  .游戏按钮 {
    padding: 8px 16px;
    font-size: 0.8em;
  }
}

/* 算法升级样式 */
.算法升级 {
  color: #4ecdc4;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(78, 205, 196, 0.3);
  background: rgba(78, 205, 196, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* AI设置区样式 */
.AI设置区 {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: none; /* 默认隐藏 */
}

.AI设置区.显示 {
  display: block; /* AI模式下显示 */
}

.先手设置 {
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.先手设置 .标签 {
  margin-right: 0;
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100px;
  height: 40px;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
}

.先手设置 .标签:hover {
  background: rgba(255, 255, 255, 0.2);
}

.先手设置 .标签.选中 {
  background: rgba(78, 205, 196, 0.3);
  color: #4ecdc4;
}

.难度设置 {
  margin-bottom: 10px;
}

.滑块标签 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.滑块标签 .标签标题 {
  min-width: 60px;
  font-size: 0.9em;
}

/* --- 这里是修改的部分 --- */
.滑块 {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.2); /* 轨道的底色 */
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  /* 新增样式，用于滑块填充效果 */
  background-image: linear-gradient(#4ecdc4, #4ecdc4);
  background-size: var(--slider-progress, 0%) 100%;
  background-repeat: no-repeat;
}
/* --- 修改结束 --- */

.滑块::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #4ecdc4;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.滑块::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #4ecdc4;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.滑块数值 {
  min-width: 20px;
  text-align: center;
  font-weight: bold;
  color: #4ecdc4;
  font-size: 0.9em;
}

/* AI思考提示样式 */
.AI思考提示 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.45); /* 更柔和的半透明深色背景 */
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15); /* 细白边 */
  pointer-events: none;
  backdrop-filter: blur(2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  font-size: 14px; /* 稍小字号 */
  font-weight: 600;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  min-width: 112px;
  text-align: center;
}

.思考动画 {
  color: #4ecdc4; /* 柔和的青绿色圆点 */
  font-size: 1.1em;
  animation: thinking 1.5s infinite;
}

.思考文本 {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95em;
  font-weight: 600;
}

@keyframes thinking {
  0%,
  20% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
  80%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
}

/* 性能说明样式 */
.性能说明 {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.性能说明 p {
  margin: 5px 0;
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.4;
}

.性能说明 strong {
  color: #ff9800;
  font-weight: 600;
}
