.floating-number {
  position: absolute;
  font-size: 1.2rem;
  color: white;
  font-weight: bold;
  pointer-events: none;
  opacity: 0;
  animation: float-up 1s ease-out forwards;
}

.floating-number.large-value {
  font-size: 1.5rem;
  color: gold;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.floating-number.epic-value {
  font-size: 2rem;
  color: #ff00ff;
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.7);
  animation: float-up-rainbow 1s ease-out forwards;
}

@keyframes float-up {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-50px);
  }
}

@keyframes float-up-rainbow {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-80px) scale(1.5);
  }
}

/* Rainbow boost effects */
.rainbow-active {
  animation: rainbow-background 3s linear infinite;
}

.rainbow-active .kz {
  animation: rainbow-glow 2s alternate infinite;
}

@keyframes rainbow-background {
  0% { background-color: var(--bg-color); }
  20% { background-color: rgba(148, 0, 211, 0.2); }
  40% { background-color: rgba(75, 0, 130, 0.2); }
  60% { background-color: rgba(0, 0, 255, 0.2); }
  80% { background-color: rgba(0, 255, 0, 0.2); }
  100% { background-color: var(--bg-color); }
}

@keyframes rainbow-glow {
  0% { filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.8)); }
  20% { filter: drop-shadow(0 0 10px rgba(255, 165, 0, 0.8)); }
  40% { filter: drop-shadow(0 0 10px rgba(255, 255, 0, 0.8)); }
  60% { filter: drop-shadow(0 0 10px rgba(0, 128, 0, 0.8)); }
  80% { filter: drop-shadow(0 0 10px rgba(0, 0, 255, 0.8)); }
  100% { filter: drop-shadow(0 0 10px rgba(128, 0, 128, 0.8)); }
}

/* Quick Burst Effects */
.quick-burst-active {
  animation: quick-burst-background 0.5s linear infinite;
}

.quick-burst-active .kz {
  animation: quick-burst-pulse 0.5s ease-in-out infinite;
}

@keyframes quick-burst-background {
  0% { background-color: var(--bg-color); }
  50% { background-color: rgba(255, 0, 0, 0.1); }
  100% { background-color: var(--bg-color); }
}

@keyframes quick-burst-pulse {
  0% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.05); filter: brightness(1.5); }
  100% { transform: scale(1); filter: brightness(1); }
}

/* Time Warp Effects */
.time-warp-active {
  animation: time-warp-background 3s linear infinite;
}

.time-warp-active .kz {
  animation: time-warp-distort 2s ease-in-out infinite;
}

@keyframes time-warp-background {
  0% { background-color: var(--bg-color); }
  50% { background-color: rgba(0, 162, 255, 0.2); }
  100% { background-color: var(--bg-color); }
}

@keyframes time-warp-distort {
  0% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.05) rotate(1deg); }
  75% { transform: scale(0.95) rotate(-1deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* Golden Hour Effects */
.golden-hour-active {
  background: radial-gradient(circle, rgba(255, 215, 0, 0.2) 0%, var(--bg-color) 70%);
}

.golden-hour-active .kz {
  filter: drop-shadow(0 0 15px gold) brightness(1.3);
  animation: golden-pulse 2s ease-in-out infinite;
}

@keyframes golden-pulse {
  0% { filter: drop-shadow(0 0 10px gold) brightness(1.3); }
  50% { filter: drop-shadow(0 0 20px gold) brightness(1.5); }
  100% { filter: drop-shadow(0 0 10px gold) brightness(1.3); }
}

/* Click animation */
.click-animation {
  animation: click-pulse 0.3s ease-out;
}

@keyframes click-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* Input error state */
#username-input.error {
  border: 2px solid #e74c3c;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* Powerup level indicator */
.powerup-level {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 6px;
  background-color: var(--primary-color);
  border-radius: 10px;
  font-size: 0.8rem;
}

/* Max level indicator */
.max-level {
  background-color: gold;
  color: #333;
}

/* Temporary powerups styling */
.temporary-powerup {
  border-left: 3px solid var(--accent-color);
}

.active-powerup {
  background: linear-gradient(90deg, rgba(64, 192, 87, 0.2) 0%, transparent 100%);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(64, 192, 87, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(64, 192, 87, 0); }
  100% { box-shadow: 0 0 0 0 rgba(64, 192, 87, 0); }
}

.use-btn {
  background-color: var(--accent-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 5px 10px;
  margin-top: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.use-btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

.use-btn:disabled {
  background-color: #7fcd91;
  cursor: not-allowed;
}

/* Standardized image rendering */
.kz {
  width: 300px;
  height: 300px;
  object-fit: contain;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

/* Winner styling */
.winner {
  background: linear-gradient(90deg, rgba(255,215,0,0.1) 0%, transparent 100%);
}

.winner-badge {
  display: inline-block;
  background-color: gold;
  color: #333;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 8px;
  animation: winner-pulse 2s infinite;
}

@keyframes winner-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.6); }
  70% { box-shadow: 0 0 0 5px rgba(255, 215, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0); }
}

.kz-level, .kz-count {
  display: inline-block;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 8px;
}

.kz-level {
  background-color: var(--accent-color);
  color: white;
}

.kz-count {
  background-color: var(--primary-color);
  color: white;
}

/* Win modal and confetti animation */
.win-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.5s ease;
}

.win-content {
  background-color: var(--bg-color);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 0 30px gold;
  animation: pop-in 0.5s ease-out forwards, glow 3s infinite;
  border: 2px solid gold;
}

.win-content h2 {
  color: gold;
  margin-top: 0;
  font-size: 2rem;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.win-stats {
  margin: 20px 0;
  padding: 15px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.close-win-btn {
  background-color: gold;
  color: #333;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 15px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.close-win-btn:hover {
  background-color: #ffd700;
  transform: scale(1.05);
  box-shadow: 0 0 10px gold;
}

@keyframes pop-in {
  0% { transform: scale(0.5); opacity: 0; }
  80% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes glow {
  0% { box-shadow: 0 0 15px gold; }
  50% { box-shadow: 0 0 30px gold; }
  100% { box-shadow: 0 0 15px gold; }
}

.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confetti-fall 5s linear infinite;
  z-index: 999;
}

@keyframes confetti-fall {
  0% {
    top: -10px;
    transform: rotate(0deg) translateX(0);
    opacity: 1;
  }
  50% {
    transform: rotate(180deg) translateX(100px);
    opacity: 1;
  }
  100% {
    top: 100vh;
    transform: rotate(360deg) translateX(-100px);
    opacity: 0;
  }
}