.game-container {
  display: flex;
  /* justify-content: center; */
  /* background: #1a1a1a; */
  padding: 20px;
  flex-direction: column;
  max-width: 450px;
  width: 100%;
  min-height: calc(100vh - 80px);
  overflow: hidden;
}

.game-panel {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  margin-bottom: 10px;
}

.info-panel {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 20px;
  padding: 8px 10px;
  background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(240,244,249,0.9));
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(46,93,154,0.1);
  border: 1px solid rgba(255,255,255,0.4);
  backdrop-filter: blur(5px);
  margin-right: 10px;
}

.info-panel > div {
  align-items: center;
  background: linear-gradient(135deg, rgba(46,93,154,0.08), rgba(255,255,255,0.12));
  border-radius: 6px;
}

.info-panel i {
  font-size: 18px;
  margin-right: 1px;
  color: #2E5D9A;
}

.info-panel span {
  font-family: 'Arial Rounded MT Bold', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(46,93,154,0.1);
  transition: transform 0.2s ease;
  width: 2em;
  display: inline-block;
}

.info-panel .value {
  width: 4em;
  text-align: right;
}

.btn-icon {
  margin: 10px;
}

.value-updated {
  animation: scaleEffect 0.3s ease-in-out;
}

.info-item {
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(46,93,154,0.1);
}

.info-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(46,93,154,0.2);
}

.control-panel {
  display: flex;
  gap: 5px;
  position: relative;
}

.menu-container {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #2E5D9A;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 100;
  min-width: 80px;
}

.dropdown-menu.show {
  opacity: 1;
  transform: translateY(5px);
  pointer-events: auto;
}

.dropdown-menu button {
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  background: transparent;
  border-radius: 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dropdown-menu button:hover {
  background: rgba(255,255,255,0.1);
}


/* 游戏结束弹窗样式 */
.game-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
  animation: fadeIn 0.3s;
}
.game-overlay.show {
  display: flex;
}
.game-overlay.visible {
  opacity: 1;
}
#gameCanvas {
  border: 2px solid #444;
  background: #000;
  touch-action: none; /* 防止移动端默认滚动行为 */
}

body {
  margin: 0;
  overflow: hidden;
  color: white;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px 20px 0;
  display: flex;
  justify-content: center;
  background: #F0F8FF;
  min-height: 100vh;
  box-sizing: border-box;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: #2a2a2a;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

#restartButton {
  background: #00a8ff;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 0.2s;
}

#restartButton:hover {
  background: #0093d6;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.enemy {
  position: absolute;
  width: 30px;
  height: 30px;
  background: #ff4444;
  border-radius: 50%;
}

.bullet {
  position: absolute;
  width: 5px;
  height: 15px;
  background: #44ff44;
}

.game-cheat-panel {
  position: relative;
  background: rgba(0,0,0,0.7);
  padding: 1rem;
  border-radius: 8px;
  min-width: 200px;
}

.control-group {
  margin: 10px 0;
  color: #fff;
}

.control-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.control-group input[type="range"] {
  width: 120px;
}


/* 新增卡牌样式 */
.card-container {
  display: flex;
  gap: 20px;
  padding: 20px;
  flex-direction: column;
}

.card {
  background: #444;
  padding: 2rem;
  border-radius: 8px;
  cursor: pointer;
  min-width: 120px;
  text-align: center;
  transition: all 0.3s;
  animation: cardAppear 0.5s ease-out;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  color: black;
}

.card:hover {
  transform: translateY(-5px);
  /* background: #555; */
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  /* padding: 8px 12px; */
  background: rgba(255,255,255,0.2);
  border-radius: 6px;
  backdrop-filter: blur(5px);
}

.label {
  font-size: 14px;
  background-image: linear-gradient(45deg, #2c3e50 30%, #3498db 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.value {
  font-weight: 700;
  font-size: 14px;
  background-image: linear-gradient(45deg, #2E5D9A 30%, #4CAF50 70%);
  background-clip: text;
  color: transparent;
  width: 33px;
}

button {
  padding: 5px 8px;
  /* margin: 0 1px; */
  background: #2E5D9A;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.version {
  font-size: 12px;
  color: #bebebe;
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .info-item:hover {
      transform: none;
  }

  .info-panel {
      padding: 8px 1px;
      /* gap: 15px; */
  }

  .info-panel i {
      font-size: 18px;
      margin-right: 1px;
  }

  .info-panel .value {
      font-size: 10px;
      width: 33px;
  }

  .info-panel span {
      font-size: 10px;
  }

  button {
      padding: 5px 5px;
      /* margin: 0 1px; */
      background: #2E5D9A;
      color: white;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 8px;
  }

  .btn-icon {
      margin: 8px;
  }
  .card-container {
    flex-direction: column;
    align-items: center;
  }
  .card {
    min-width: 80%;
    margin: 10px 0;
  }
  .game-cheat-panel {
    display: none; /* 隐藏控制面板在小屏幕上 */;
  }
}

.card-common {
  background: radial-gradient( rgb(255, 255, 255), rgb(147, 147, 147));
}
.card-rare {
  background: radial-gradient( rgb(125, 170, 240), rgb(11, 79, 166));
}
.card-epic {
  background: radial-gradient( rgb(219, 125, 255), rgb(95, 31, 159));
}
.card-legendary {
  background: radial-gradient(rgb(255, 191, 159), rgb(170, 72, 0));
}

#startScreen button {
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 900;
}

#pauseScreen {
  flex-direction: column;
}

#pauseScreen button {
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 900;
}

#playerChoiceContainer {
  display: flex;
  justify-content: center;
  align-items: center;
}

.playerChoice {
  background: #444;
  border-radius: 8px;
  cursor: pointer;
  min-width: 6em;
  min-height: 8em;
  text-align: center;
  transition: all 0.3s;
  animation: cardAppear 0.5s ease-out;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  color: white;
  margin: 0.2em;
}

.playerChoice:hover {
  transform: translateY(-5px);
  /* background: #555; */
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.playerChoice.selected {
  background: #777;
}

.playerChoice .playerStatusContainer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  padding: 0.2em;
}


.playerChoice .playerName {
  font-size: 1.2rem;
  font-weight: 900;
}

.playerChoice .playerStatus {
  font-size: 0.8rem;
  font-weight: 200;
}