body {
    font-family: "Microsoft JhengHei", "Microsoft YaHei", "微软雅黑", "PingFang SC", Arial, sans-serif; 
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #9cd4a0; 
}

.game-container {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.message {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f0f8ff;
    border-radius: 5px;
}
.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.options-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
}
button,
.half-btn,
.start-btn {
    padding: 10px 24px;
    background: #76c99b; /* 改为 #76c99b */
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
    outline: none;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-all;
}
button:hover,
.half-btn:hover,
.start-btn:hover {
    background: #43b981; /* 悬停状态颜色 */
}
button:active,
.half-btn:active,
.start-btn:active {
    background: #43b981; /* 按下状态颜色 */
}
.achievements {
    margin-top: 20px;
    padding: 10px;
    background-color: #fffacd;
    border-radius: 5px;
    max-height: 180px;
    overflow-y: auto;
}
#achievements-list p {
    margin: 0 0 6px 0;
    font-size: 15px;
}
#about {
    font-family: 'Times New Roman', Times, serif;
    font-size: 12px;
    color: #333;
}
.main-btns {
    width: 100%;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
}
#options {
    width: 100%;
}
.start-btn {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    display: block;
    margin: 20px 0 0 0;
    box-sizing: border-box;
    font-size: 15px;
    padding: 10px 20px;
    white-space: normal; /* 允许换行 */
}
.half-btn {
    flex: 1 1 auto; /* 自适应宽度 */
    min-width: 0; /* 允许收缩 */
    max-width: 100%; /* 不超过容器宽度 */
    padding: 10px 20px;
    font-size: 15px;
    box-sizing: border-box;
    white-space: normal; /* 允许换行 */
    overflow-wrap: break-word;
    word-break: break-all;
}
.main-title {
    display: flex;
    align-items: center;
    gap: 16px;
}
.subtitle {
    font-size: 18px;
    color: #71B988;
    font-weight: normal;
}
.copyright {
    margin: 30px 0 0 0;
    font-size: 13px;
    color: #888;
    text-align: center;
}
.credit-link {
    color: #1976d2;
    text-decoration: none;
}
.credit-link:hover {
    text-decoration: underline;
}

/* 新增：关键帧动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleUp {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.05);
  }
}

/* 应用动画效果 */
/* 页面容器淡入 */
.game-container {
  animation: fadeIn 0.7s ease-out;
}

/* 消息和选项淡入 */
.message,
.options,
.options-row {
  animation: fadeIn 0.5s ease-out;
}

/* 主页图片滑入 */
#cover-img {
  animation: slideIn 1s ease-out;
}

/* 按钮初始淡入效果 */
button,
.half-btn,
.start-btn {
  animation: fadeIn 0.5s ease-out;
  transform: scale(1);
  transition: transform 0.2s ease-out, background 0.2s;
}

/* 按钮悬停时放大 */
button:hover,
.half-btn:hover,
.start-btn:hover {
  background: #43b981; /* 悬停状态颜色 */
  transform: scale(1.05);
}

/* 按钮按下状态 */
button:active,
.half-btn:active,
.start-btn:active {
  background: #43b981; /* 按下状态颜色 */
  transform: scale(0.98);
}

/* 响应式优化：针对屏幕宽度小于600px的手机设备 */
@media (max-width: 600px) {
  /* 调整整体边距、内边距 */
  body {
    padding: 10px;
  }
  
  /* 缩小容器内边距和边距 */
  .game-container {
    padding: 15px;
    margin: 0 5px;
  }

  /* 主标题：调整布局为垂直排列 */
  .main-title {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  /* 调整按钮样式，适应小屏幕 */
  .start-btn,
  .half-btn {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    font-size: 14px;
    padding: 8px 16px;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-all;
  }

  /* 底部按钮调整为垂直方向排列 */
  .options-row {
    flex-direction: column;
    gap: 8px;
  }
}

/* 针对宽屏 (min-width: 601px) 优化按钮布局 */
@media (min-width: 601px) {
  .options-row {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 20px;
  }
  /* 保持 .half-btn 宽度不变 */
  .half-btn {
    flex: 1 1 auto;
    max-width: 220px;
  }
  /* 修改开始按钮，让宽度和容器左右对齐 */
  .start-btn {
    width: 100%;       /* 使用 100% 宽度，和容器一样宽 */
    min-width: 0;
    max-width: none;   /* 取消固定最大宽度 */
    margin: 20px 0 0 0;
  }
}