* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  overflow: hidden;
  background-color: #87CEEB; /* 天空蓝背景模拟设计稿 */
  font-family: "Microsoft Yahei", sans-serif;
}

/* 游戏容器 - 适配设计稿比例 */
.game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  /* 背景图 */
  background: url('../images/GAME_bg.jpg') no-repeat center center;
  background-size: cover;
}

/* 倒计时弹窗 */
.countdown-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 50px;
  font-weight: bold;
  z-index: 300;
}



/* 左上角盾牌计数 */
.shield-count {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  z-index: 100;
}

.shield-icon {
  width: 40px;
  height: 40px;
  margin-right: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.shield-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.shield-num {
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  text-shadow: 1px 1px 2px #000;
}

/* 剩余盾牌数量提示 */
.shield-remain {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  text-shadow: 1px 1px 2px #000;
  z-index: 100;
}

/* 跑道区域 - 透视容器 */
.road {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  /* 开启透视 */
  perspective: 800px;
  perspective-origin: center bottom;
}

/* 玩家角色 */
.panda {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  z-index: 50;
  transition: left 0.2s ease; /* 移动过渡动画 */
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.panda img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 盾牌元素 - 图片+透视动画 */
.shield-item {
  position: absolute;
  /* 初始位置：屏幕上方偏中间（透视远端），向下偏移100像素 */
  top: calc(10% + 100px);
  width: 30px;
  height: 30px;
  z-index: 40;
  pointer-events: none;
  /* 透视动画：由远及近+变大+沿跑道透视移动 */
  transition: all 4s cubic-bezier(0.3, 0.2, 0.2, 1);
  /* 初始透视效果 */
  transform: translateZ(-200px);
}

.shield-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 移动按钮 */
.btn-group {
  position: absolute;
  bottom: 30px;
  width: 100%;
  display: flex;
  justify-content: space-around;
  z-index: 60;
}

.move-btn {
  width: 80px;
  height: 80px;
  border: none;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  -webkit-appearance: none;
}

.move-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.move-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 答题弹窗 - 支持单选/多选 */
.quiz-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85%;
  max-width: 350px;
  background: #fff;
  border-radius: 10px;
  padding: 25px;
  z-index: 200;
  display: none;
}

.quiz-title {
  font-size: 18px;
  text-align: center;
  margin-bottom: 20px;
  color: #333;
  line-height: 1.4;
}

.quiz-type {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
  text-align: center;
}

.quiz-options {
  margin-bottom: 20px;
}

.quiz-option {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-bottom: 10px;
  cursor: pointer;
}
.quiz-option.selected {
  background: #f0f8ff;
  border-color: #1E90FF;
}
.quiz-option input {
  margin-right: 10px;
}
.quiz-option label {
  flex: 1;
  cursor: pointer;
}

.quiz-btn {
  width: 100%;
  height: 45px;
  background: #ff9900;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}

/* 遮罩层 */
.mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 150;
  display: none;
}

/* 游戏结束提示 */
.game-over-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 300px;
  background: #fff;
  border-radius: 10px;
  padding: 30px 20px;
  text-align: center;
  z-index: 200;
  display: none;
}

.game-over-title {
  font-size: 24px;
  color: #ff9900;
  margin-bottom: 15px;
}

.game-over-text {
  font-size: 16px;
  color: #333;
  margin-bottom: 20px;
  line-height: 1.5;
}

.restart-btn {
  width: 100%;
  height: 40px;
  background: #ff9900;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}