@charset "UTF-8";
/* 全局設定 */
* {
  box-sizing: border-box;
  font-family: "Comic Sans MS", "微軟正黑體", sans-serif;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none; /* 防止連點時選取文字 */
}

body {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #333;
}

/* 模擬手機遊戲畫面 & 野外背景 */
.game-container {
  width: 100%;
  max-width: 400px;
  height: 80vh;
  min-height: 600px;
  background: linear-gradient(to bottom, #87CEEB 0%, #87CEEB 50%, #7CFC00 50%, #32CD32 100%);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

/* === 1. 頂部生命值 === */
.scoreboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.8);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.hp-box {
  text-align: center;
}

.player-name {
  font-size: 0.9rem;
  font-weight: bold;
  color: #555;
}

.hearts {
  font-size: 1.5rem;
  letter-spacing: 2px;
}

.vs-badge {
  background: #ff4757;
  color: white;
  padding: 5px 10px;
  border-radius: 50px;
  font-weight: bold;
  font-style: italic;
}

/* === 2. 對手區域 === */
.battle-arena {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.character {
  font-size: 6rem;
  filter: drop-shadow(0 10px 5px rgba(0, 0, 0, 0.3));
  display: flex;
  justify-content: center;
  align-items: center;
}
.character img {
  width: 40%;
  transition: transform 0.3s;
}

/* 對手受傷震動動畫 */
@keyframes shake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-15px) rotate(-10deg);
  }
  50% {
    transform: translateX(15px) rotate(10deg);
  }
  75% {
    transform: translateX(-15px) rotate(-10deg);
  }
  100% {
    transform: translateX(0);
  }
}
.shake {
  animation: shake 0.4s ease-in-out;
}

/* 對手出拳對話框 */
.bubble {
  background: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 1.5rem;
  font-weight: bold;
  position: absolute;
  top: 10%;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: 0.3s opacity, 0.3s transform;
  z-index: 1;
}

.bubble::after { /* 對話框小尾巴 */
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 10px 10px 0;
  border-style: solid;
  border-color: white transparent transparent transparent;
}

.bubble.hidden {
  opacity: 0;
  transform: translateY(20px) scale(0.8);
}

/* === 3. 玩家手牌 (卡牌特效核心) === */
.player-hand {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 20px 10px;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
}

.card {
  background: white;
  border: 4px solid #a587ff;
  border-radius: 15px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 8px 0 #770dd4, 0 15px 10px rgba(0, 0, 0, 0.2); /* 遊戲實體感陰影 */
  /* 目標：斜放在玩家這一側 */
  transform: rotate(-10deg) translateY(10px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* 果凍回彈特效 */
}

/* 目標：移到選擇時向上的位移效果 */
.card:hover {
  transform: rotate(-10deg) translateY(-10px);
}

/* 目標：選擇後放大並擺正 */
.card.selected {
  transform: rotate(0deg) scale(1.2) translateY(-20px);
  border-color: #ff4040;
  box-shadow: 0 8px 0 #ae1919, 0 20px 20px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

/* 其他未被選中的牌變暗 */
.player-hand.has-selection .card:not(.selected) {
  filter: brightness(0.6);
  transform: rotate(-10deg) translateY(20px);
}

.card-emoji {
  font-size: 3rem;
  margin-bottom: 5px;
}

.card-text {
  font-weight: bold;
  color: #333;
}

/* === 4. 結算畫面 (浮在最上面) === */
.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: 0.5s;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.overlay-box {
  background: white;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  transform: scale(0.5);
  transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.overlay.active .overlay-box {
  transform: scale(1);
}

.overlay-box h1 {
  margin: 0 0 10px 0;
  font-size: 3rem;
  color: #ff4757;
}

.btn-restart {
  background: #ffa502;
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 5px 0 #eccc68;
  margin-top: 20px;
  transition: 0.2s;
}

.btn-restart:active {
  transform: translateY(5px);
  box-shadow: 0 0 0;
}/*# sourceMappingURL=Rock-Paper-Scissors.css.map */