* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.game-container {
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  padding: 40px;
  border-radius: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
}

h1 {
  color: #333;
  margin-bottom: 20px;
  font-size: 2.5em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.score-board {
  display: flex;
  justify-content: space-around;
  margin-bottom: 30px;
  gap: 20px;
}

.score, .combo {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  padding: 15px 25px;
  border-radius: 15px;
  font-size: 1.1em;
  font-weight: bold;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  flex: 1;
  transition: background 0.3s ease, transform 0.2s ease;
}

.score.frozen {
  background: linear-gradient(135deg, #48dbfb 0%, #0abde3 100%);
}

/* 冷连击样式 */
.combo.cold-combo {
  background: linear-gradient(135deg, #48dbfb 0%, #0abde3 100%);
}

/* 热连击样式 (默认或加强) */
.combo.hot-combo {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
  background: linear-gradient(135deg, #ff758c 0%, #ff7eb3 100%);
}

.score span, .combo span {
  font-size: 1.3em;
  display: block;
  margin-top: 5px;
}

.bean-container {
  margin: 40px 0;
  position: relative;
  height: 250px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.bean {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #f5e6a8 0%, #d4a574 100%);
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: float 3s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.bean.frozen {
  background: linear-gradient(135deg, #d4f1f9 0%, #a8dadc 100%);
  box-shadow: 0 10px 30px rgba(72, 219, 251, 0.4), 
              inset 0 0 30px rgba(255, 255, 255, 0.5);
  animation: shiver 0.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shiver {
  0%, 100% {
    transform: translateX(0) rotate(0deg);
  }
  25% {
    transform: translateX(-2px) rotate(-1deg);
  }
  75% {
    transform: translateX(2px) rotate(1deg);
  }
}

.bean:hover {
  transform: scale(1.05);
}

.bean:active {
  transform: scale(0.95);
}

.bean.shaking {
  animation: shake 0.5s ease-in-out;
}

/* 降温时的点击动画 */
.bean.shivering-click {
  animation: shiver-hard 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(-10px) rotate(-5deg); }
  75% { transform: translateX(10px) rotate(5deg); }
}

@keyframes shiver-hard {
  0%, 100% { transform: translateX(0) scale(1); }
  25% { transform: translateX(-5px) scale(0.95); }
  75% { transform: translateX(5px) scale(0.95); }
}

.bean-face {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.eye {
  width: 24px;
  height: 24px;
  background: #333;
  border-radius: 50%;
  position: absolute;
  top: 75px;
  transition: all 0.3s ease;
}

.bean.frozen .eye {
  background: #0abde3;
  box-shadow: 0 0 10px rgba(72, 219, 251, 0.8);
}

.left-eye {
  left: 50px;
}

.right-eye {
  right: 50px;
}

.mouth {
  width: 50px;
  height: 25px;
  border: 3px solid #333;
  border-top: none;
  border-radius: 0 0 50px 50px;
  position: absolute;
  top: 125px;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s ease;
}

.bean.sweating .mouth {
  border-radius: 50px 50px 0 0;
  border-top: 3px solid #333;
  border-bottom: none;
}

.bean.frozen .mouth {
  border-color: #0abde3;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 3px solid #0abde3;
}

.sweat-drops, .ice-drops {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.sweat {
  position: absolute;
  width: 12px;
  height: 16px;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  opacity: 0;
  animation: drop 1.5s ease-in forwards;
}

.ice {
  position: absolute;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #e0f7ff 0%, #b8e6f5 100%);
  border-radius: 50%;
  opacity: 0;
  animation: rise 2s ease-out forwards;
  box-shadow: 0 0 8px rgba(72, 219, 251, 0.6);
}

.ice::before {
  content: '❄';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  color: #0abde3;
}

@keyframes drop {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(120px) scale(0.5);
  }
}

@keyframes rise {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-120px) scale(0.5) rotate(360deg);
  }
}

.controls {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 20px;
}

.btn {
  padding: 15px 30px;
  font-size: 1.1em;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#heatBtn {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
}

#coolBtn {
  background: linear-gradient(135deg, #48dbfb 0%, #0abde3 100%);
  color: white;
}

#resetBtn {
  background: linear-gradient(135deg, #a8e6cf 0%, #3ddc97 100%);
  color: white;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.tips {
  margin-top: 20px;
  color: #666;
  font-size: 0.9em;
  line-height: 1.8;
}

.tips p {
  margin: 5px 0;
}
