/* ========== Combo 弹窗 ========== */
.combo-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 48px;
  font-weight: 900;
  color: #FF6D00;
  text-shadow: 0 0 20px rgba(255,109,0,0.8), 0 0 60px rgba(255,152,0,0.5);
  z-index: 1000;
  pointer-events: none;
  animation: comboIn 1.5s ease-out forwards;
  white-space: nowrap;
}
.combo-popup.fire { color: #FF1744; text-shadow: 0 0 20px #FF1744, 0 0 60px #FF5252; }

@keyframes comboIn {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  15%  { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  30%  { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -60%) scale(0.8); opacity: 0; }
}

/* ========== 粒子系统 ========== */
.particle {
  position: fixed;
  pointer-events: none;
  z-index: 999;
  animation: particleFly 0.8s ease-out forwards;
}

@keyframes particleFly {
  0%   { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0); }
}

/* ========== 正确脉冲 ========== */
@keyframes correctPulse {
  0%   { box-shadow: 0 0 0 0 rgba(76,175,80,0.7); }
  70%  { box-shadow: 0 0 0 15px rgba(76,175,80,0); }
  100% { box-shadow: 0 0 0 0 rgba(76,175,80,0); }
}

@keyframes wrongShake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-6px); }
  40%     { transform: translateX(6px); }
  60%     { transform: translateX(-4px); }
  80%     { transform: translateX(4px); }
}

.pulse-green { animation: correctPulse 0.6s ease-out; }
.shake-red   { animation: wrongShake 0.4s ease-out; }

/* ========== 升级烟花 ========== */
.firework {
  position: fixed;
  pointer-events: none;
  z-index: 1001;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: fireworkBurst 1.2s ease-out forwards;
}

@keyframes fireworkBurst {
  0%   { opacity: 1; transform: translate(0,0) scale(1); }
  100% { opacity: 0; transform: translate(var(--fx), var(--fy)) scale(0); }
}

.level-up-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeOut 2s ease-out forwards;
}

.level-up-text {
  font-size: 56px;
  font-weight: 900;
  color: #FFD700;
  text-shadow: 0 0 30px rgba(255,215,0,0.8), 0 0 80px rgba(255,215,0,0.4);
  animation: levelUpBounce 0.8s ease-out;
}

@keyframes levelUpBounce {
  0%   { transform: scale(0) rotate(-10deg); opacity: 0; }
  50%  { transform: scale(1.3) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

@keyframes fadeOut {
  0%,50% { opacity: 1; }
  100%   { opacity: 0; }
}

/* ========== 闪光扫过 ========== */
@keyframes shine {
  0%   { left: -100%; }
  100% { left: 200%; }
}

.shine-effect {
  position: relative;
  overflow: hidden;
}
.shine-effect::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shine 0.6s ease-out;
}
