/* High Score Celebration */
/* Particle animation for celebrations */
@keyframes particleFloat {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) scale(0) rotate(360deg);
  }
}

.high-score-celebration {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2000;
  text-align: center;
  pointer-events: none;
}

.high-score-celebration .title {
  font-size: 64px;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 0 30px rgba(255, 215, 0, 1), 0 0 60px rgba(255, 165, 0, 0.8), 0 0 90px rgba(255, 165, 0, 0.6);
  animation: highScoreTitle 2s ease-in-out infinite;
}

.high-score-celebration .subtitle {
  font-size: 28px;
  color: #ffa500;
  animation: highScoreSubtitle 2s ease-in-out infinite alternate;
  text-shadow: 0 0 10px rgba(255, 165, 0, 0.8);
}

@keyframes highScoreTitle {
  0%, 100% { transform: scale(1) rotate(-2deg); }
  50% { transform: scale(1.1) rotate(2deg); }
}

@keyframes highScoreSubtitle {
  from { opacity: 0.6; transform: translateY(0); }
  to { opacity: 1; transform: translateY(-10px); }
}

.score-addition.extra {
  font-size: 24px;
  color: #ffd700;
  animation: goldenScoreUp 1000ms ease-out forwards;
}

@keyframes goldenScoreUp {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  50% { opacity: 1; transform: translateY(-30px) scale(1.5); text-shadow: 0 0 20px rgba(255, 215, 0, 1); }
  100% { opacity: 0; transform: translateY(-50px) scale(1.8); text-shadow: 0 0 40px rgba(255, 215, 0, 1); }
}

/* Keep Playing Button - Make it more exciting */
.keep-playing-button {
  background: linear-gradient(145deg, #ffd700, #ffa500);
  border: 2px solid #1a1a1a;
  box-shadow: 0 0 20px rgba(255, 165, 0, 0.5);
  transition: all 300ms ease;
  color: #fff;
  text-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.keep-playing-button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 40px rgba(255, 165, 0, 0.8);
}

/* Retry Button - Make it exciting */
.retry-button {
  background: linear-gradient(145deg, #dc2626, #b91c1c);
  border: 2px solid #fff;
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
  transition: all 300ms ease;
  color: #fff;
  text-shadow: 0 0 3px rgba(0,0,0,0.2);
}

.retry-button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 40px rgba(220, 38, 38, 0.8);
}

/* New Game Button - disabled (moved to main.css) */

/* Bitcoin Celebration Styles */
.bitcoin-celebration {
  background: linear-gradient(145deg, rgba(26, 26, 26, 0.98), rgba(18, 18, 18, 0.98));
  border: 4px solid #f7931a;
  box-shadow: 0 0 100px rgba(247, 147, 26, 0.8), inset 0 0 50px rgba(247, 147, 26, 0.3);
}

.bitcoin-logo {
  font-size: 80px;
  font-weight: 900;
  color: #f7931a;
  text-shadow: 0 0 30px rgba(247, 147, 26, 1), 0 0 60px rgba(247, 147, 26, 0.8);
  animation: bitcoinPulse 1.5s ease-in-out infinite;
  margin-bottom: 10px;
}

@keyframes bitcoinPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); text-shadow: 0 0 40px rgba(247, 147, 26, 1.5), 0 0 80px rgba(247, 147, 26, 1); }
}

.bitcoin-celebration .congratulations-title {
  color: #f7931a;
  text-shadow: 0 0 20px rgba(247, 147, 26, 0.8);
}

.bitcoin-celebration .congratulations-subtitle {
  color: #fbbf24;
}

.bitcoin-celebration .congratulations-message {
  color: #9ca3af;
}

.bitcoin-btn {
  background: linear-gradient(145deg, #f7931a, #fbbf24);
  color: #1a1a1a;
  border-color: #fbbf24;
  box-shadow: 0 0 30px rgba(247, 147, 26, 0.8);
}

.bitcoin-btn:hover {
  box-shadow: 0 0 50px rgba(247, 147, 26, 1);
}

/* Crypto confetti */
.crypto-confetti {
  position: fixed;
  z-index: 4000;
  animation: cryptoFall 4s ease-out forwards;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(247, 147, 26, 0.8);
}

@keyframes cryptoFall {
  0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Enhanced tile glow for crypto */
.tile-2048 {
  animation: cryptoFloat 3s ease-in-out infinite;
}

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

/* Milestone Celebration Styles */
.milestone-celebration {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2000;
  text-align: center;
  pointer-events: none;
  animation: milestonePop 2.5s ease-out forwards;
}

@keyframes milestonePop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  80% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
}

.milestone-content {
  background: linear-gradient(145deg, rgba(138, 43, 226, 0.95), rgba(75, 0, 130, 0.95));
  border: 3px solid #da70d6;
  border-radius: 20px;
  padding: 30px 50px;
  box-shadow: 0 0 50px rgba(138, 43, 226, 0.8), inset 0 0 30px rgba(218, 112, 214, 0.3);
}

.milestone-title {
  font-size: 48px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(218, 112, 214, 1);
  margin-bottom: 10px;
  animation: milestoneTitleGlow 1s ease-in-out infinite alternate;
}

@keyframes milestoneTitleGlow {
  from { text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(218, 112, 214, 1); }
  to { text-shadow: 0 0 30px rgba(255, 255, 255, 1), 0 0 60px rgba(218, 112, 214, 1), 0 0 80px rgba(138, 43, 226, 0.8); }
}

.milestone-value {
  font-size: 36px;
  font-weight: 700;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* Congratulations Overlay Styles */
.congratulations-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.5s ease-out;
}

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

.congratulations-content {
  background: linear-gradient(145deg, rgba(255, 215, 0, 0.95), rgba(255, 165, 0, 0.95));
  border: 4px solid #fff;
  border-radius: 30px;
  padding: 50px 70px;
  text-align: center;
  box-shadow: 0 0 100px rgba(255, 215, 0, 0.8), inset 0 0 50px rgba(255, 255, 255, 0.3);
  animation: congratulationsPulse 2s ease-in-out infinite;
}

@keyframes congratulationsPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 100px rgba(255, 215, 0, 0.8), inset 0 0 50px rgba(255, 255, 255, 0.3); }
  50% { transform: scale(1.02); box-shadow: 0 0 150px rgba(255, 215, 0, 1), inset 0 0 70px rgba(255, 255, 255, 0.5); }
}

.congratulations-title {
  font-size: 56px;
  font-weight: 900;
  color: #1a1a1a;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
  margin-bottom: 15px;
}

.congratulations-subtitle {
  font-size: 32px;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
}

.congratulations-message {
  font-size: 20px;
  color: #444;
  margin-bottom: 30px;
}

.congratulations-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.congratulations-button {
  background: linear-gradient(145deg, #8a2be2, #4b0082);
  color: #fff;
  padding: 15px 40px;
  border-radius: 50px;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 0 30px rgba(138, 43, 226, 0.8);
  transition: all 300ms ease;
}

.congratulations-button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 50px rgba(138, 43, 226, 1);
}