/* Styles spéciaux pour les cœurs - ULTRA VISIBLE */
#hearts {
  color: #ff1744 !important;
  font-size: 1.8em !important;
  font-weight: 900 !important;
  text-shadow: 0 0 5px #fff, 0 0 10px #ff1744, 0 0 15px #ff1744 !important;
  border: 2px solid #ff1744 !important;
  background: rgba(255, 23, 68, 0.1) !important;
  padding: 5px 10px !important;
  border-radius: 8px !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  margin: 0 10px !important;
  min-width: 90px !important;
  text-align: center !important;
  z-index: 9999 !important;
}

/* Styles spécifiques pour le jeu */

/* Animation de tremblement pour les taupes malus */
@keyframes shake-malus {
  0% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(-3px, -3px) rotate(-2deg); }
  20% { transform: translate(3px, -3px) rotate(2deg); }
  30% { transform: translate(-3px, 3px) rotate(-1deg); }
  40% { transform: translate(3px, 3px) rotate(1deg); }
  50% { transform: translate(-3px, -3px) rotate(-2deg); }
  60% { transform: translate(3px, -3px) rotate(1deg); }
  70% { transform: translate(-3px, 3px) rotate(-2deg); }
  80% { transform: translate(-3px, -3px) rotate(2deg); }
  90% { transform: translate(3px, 3px) rotate(-1deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* Styles pour les différents types de taupes */
.mole {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
  z-index: 5;
}

/* Taupe normale */
.mole.normal {
  background-image: url('images/moles/normal/normal1.png');
  animation: bounce 1s infinite alternate;
}

/* Taupe bonus */
.mole.bonus {
  background-image: url('images/moles/bonus/bonus1.png');
  animation: pulse 1s infinite alternate;
  filter: drop-shadow(0 0 5px green);
}

/* Taupe malus */
.mole.malus {
  background-image: url('images/moles/malus/malus1.png');
  animation: shake-malus 0.4s infinite !important;
  transform-origin: center center;
  filter: drop-shadow(0 0 5px red);
}

/* Taupe dorée */
.mole.golden {
  background-image: url('images/moles/golden/golden1.png');
  animation: golden-shine 1.5s infinite alternate;
  filter: drop-shadow(0 0 10px gold);
}

/* Taupe gelée */
.mole.frozen {
  background-image: url('images/moles/frozen/frozen_cube.svg');
  animation: frozen-shake 2s infinite alternate;
  filter: drop-shadow(0 0 8px lightblue);
}

/* Taupe avec avatar personnalisé */
.mole.avatar {
  background-color: white;
  border: 2px solid #4CAF50;
  animation: bounce 1s infinite alternate;
}

/* Animation pour taupe bonus */
@keyframes pulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.15); }
}

/* Animation pour taupe dorée */
@keyframes golden-shine {
  0% { filter: drop-shadow(0 0 5px gold); transform: scale(1); }
  100% { filter: drop-shadow(0 0 15px gold); transform: scale(1.2); }
}

/* Animation pour taupe gelée */
@keyframes frozen-shake {
  0% { transform: rotate(-2deg); }
  50% { transform: rotate(0deg); }
  100% { transform: rotate(2deg); }
}

/* Animation de rebond pour taupes normales et avatars */
@keyframes bounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}

/* Écran de fin de partie */
#game-over-screen {
  background-color: rgba(0, 0, 0, 0.85);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow-y: auto;
  max-height: 100%;
  padding-bottom: 0px; /* Espace pour la bannière AdMob */
}

/* Écran défilable */
.scrollable-screen {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* Pour iOS */
  gap: 15px;
  position: relative;
  overflow-y: auto; /* Permettre le défilement vertical */
  padding-bottom: 0px; /* Espace pour la bannière de pub */
  max-height: 100%; /* Hauteur maximale */
}

/* Fond d'écran pour l'écran game over */
.game-over-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('attached_assets/Gameover.png');
  background-size: cover;
  background-position: center;
  opacity: 0.2;
  z-index: 0;
}

#game-over-screen h2 {
  font-size: 2.5rem;
  color: #f44336;
  text-shadow: 0 0 10px rgba(244, 67, 54, 0.5);
  margin: 10px 0;
  animation: pulse 1.5s infinite alternate;
  z-index: 1;
}

@keyframes pulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

.game-over-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
  padding: 10px;
  z-index: 1;
}

.avatar-container {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid gold;
  box-shadow: 0 0 15px rgba(255, 235, 59, 0.7);
  margin: 0 auto 10px auto;
  position: relative;
  background-color: #4e342e;
}

.player-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

.player-name {
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 0px;
  opacity: 0.9;
  text-align: center;
  width: 100%;
}

.final-score {
  font-size: 3.5rem;
  font-weight: bold;
  color: #ffeb3b;
  text-shadow: 0 0 15px rgba(255, 235, 59, 0.7);
  margin-bottom: 0px;
  animation: scoreReveal 1s ease-out;
}

@keyframes scoreReveal {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.funny-message {
  font-size: 1.2rem;
  color: #ff9800;
  max-width: 90%;
  margin: 0 auto 15px;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px dashed #ff9800;
  border-radius: 10px;
  animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 90%;
  max-width: 320px;
  z-index: 1;
}

.reward-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-bottom: 0px;
}

.reward-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  font-size: 0.9rem;
  background-color: #795548;
  color: white;
  border-radius: 20px;
  border: 1px solid #ffeb3b;
  animation: glow 1.5s infinite alternate;
  position: relative;
  overflow: hidden;
}

.reward-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes glow {
  0% { box-shadow: 0 0 5px #ffeb3b; }
  100% { box-shadow: 0 0 15px #ffeb3b; }
}

.ad-icon {
  font-size: 1.2rem;
  margin-right: 10px;
}

.ad-text {
  font-weight: bold;
}

#replay-button {
  background-color: #4CAF50;
  font-size: 1.2rem;
  padding: 15px;
  border-radius: 30px;
  transition: all 0.3s ease;
  animation: buttonPop 0.5s ease-out 0.5s both;
}

#replay-button:hover {
  background-color: #3d8b40;
  transform: scale(1.05);
}

.share-container {
  position: relative;
  width: 100%;
  margin: 5px 0;
  background: none;
  border: none;
  box-shadow: none;
}

#share-score-button, #home-button {
  font-size: 1rem;
  padding: 12px;
  animation: buttonPop 0.5s ease-out 0.7s both;
  width: 100%;
}

.share-options {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.share-option {
  padding: 10px;
  text-align: left;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  border-bottom: 0px solid rgba(255, 255, 255, 0.1);
}

.share-option:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.hidden {
  display: none;
}

#home-button {
  animation-delay: 0.9s;
}

.removed-space-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: rgba(0, 0, 0, 0.5);
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  z-index: 10;
}

@keyframes buttonPop {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Animations pour les taupes */
.mole {
  transition: transform 0.2s ease-out;
}

.mole:active {
  transform: scale(0.9);
}

/* Style pour l'effet au clic sur les taupes */
.tap-effect {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.3);
  opacity: 0.7;
  z-index: 100;
  animation: tapFadeOut 0.5s forwards;
}

/* Style pour les effets d'arme et animations */
.weapon-effect, .weapon-animation, .effect-animation {
  position: absolute;
  pointer-events: none;
  width: 60px;
  height: 60px;
  background-size: contain;
  background-repeat: no-repeat;
  z-index: 999;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
}

.weapon-animation {
  z-index: 9999;
  transform-origin: center;
  transform: scale(1.2);
  filter: drop-shadow(0 0 8px rgba(255, 255, 0, 0.6));
}

.effect-animation {
  z-index: 9998;
}

/* Styles pour l'impact et splat effects */
.impact-effect, .splat-effect {
  pointer-events: none;
  z-index: 9997;
}

/* Style pour le nom des armes */
.weapon-name {
  pointer-events: none;
  z-index: 10000;
  text-align: center;
  font-family: 'Impact', sans-serif;
  color: white;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9);
  filter: drop-shadow(0 0 2px #ffd700);
}

@keyframes tapFadeOut {
  0% { transform: scale(0.5); opacity: 0.7; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* Style pour le message de points et effets de texte */
.points-text, .effect-text {
  position: absolute;
  color: white;
  font-weight: bold;
  font-size: 18px;
  z-index: 100;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  animation: pointsFadeUp 1s forwards;
  pointer-events: none;
}

.points-text.positive {
  color: #4CAF50;
}

.points-text.negative {
  color: #f44336;
}

.points-text.super {
  color: gold;
  font-size: 24px;
}

@keyframes pointsFadeUp {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-50px); opacity: 0; }
}

/* Animation de tremblement pour l'écran */
.screen-shake {
  animation: screen-shake 0.3s cubic-bezier(.36,.07,.19,.97) both;
  transform: translate3d(0, 0, 0);
}

/* Animation de tremblement intense (pour la taupe gelée) */
.screen-shake-intense {
  animation: screen-shake-intense 0.5s cubic-bezier(.36,.07,.19,.97) both;
  transform: translate3d(0, 0, 0);
}

/* Animation de rebond pour les taupes bonus et dorées */
@keyframes bounce {
  0% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
  100% { transform: translateY(0) rotate(-3deg); }
}

/* Animation de vibration pour les taupes malus et gelées */
@keyframes vibrate {
  0% { transform: rotate(-2deg); }
  25% { transform: rotate(0deg); }
  50% { transform: rotate(2deg); }
  75% { transform: rotate(0deg); }
  100% { transform: rotate(-2deg); }
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Animation de rotation pour les taupes */
@keyframes rotate {
  0% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
  100% { transform: rotate(-5deg); }
}

/* Animation pour les messages de vitesse */
@keyframes speedText {
  0% { transform: scale(0.7); opacity: 0; }
  20% { transform: scale(1.2); opacity: 1; }
  80% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}

/* Style pour les messages de dynamisme */
.dynamic-message {
  animation: speedText 1.2s ease-out forwards;
  color: #ffeb3b;
  text-shadow: 0 0 10px rgba(255, 235, 59, 0.7);
  font-weight: bold;
}

@keyframes screen-shake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

@keyframes screen-shake-intense {
  10%, 90% { transform: translate3d(-5px, -3px, 0); }
  20%, 80% { transform: translate3d(8px, 3px, 0); }
  30%, 50%, 70% { transform: translate3d(-10px, -2px, 0); }
  40%, 60% { transform: translate3d(10px, 4px, 0); }
}

/* Animation de flash pour le changement d'arme */
@keyframes flash {
  0% { color: white; text-shadow: none; }
  50% { color: yellow; text-shadow: 0 0 10px yellow; }
  100% { color: white; text-shadow: none; }
}

/* Styles des boutons de publicité */
.reward-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-bottom: 0px;
  /* Important: s'assurer que le conteneur est bien visible */
  position: relative;
  z-index: 999;
}

.reward-button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #9b59b6, #e74c3c);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 15px;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  margin: 5px auto;
  width: 92%;
  max-width: 330px;
  animation: pulse-ad-button 2s infinite;
  /* Important: s'assurer que le bouton est bien visible */
  opacity: 1 !important;
  visibility: visible !important;
  position: relative;
  z-index: 1000;
}

.reward-button:hover, .reward-button:active {
  background: linear-gradient(135deg, #8e44ad, #c0392b);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
}

.ad-icon {
  font-size: 26px;
  margin-right: 12px;
  animation: swing 1.5s infinite;
}

/* Animation de pulsation pour les boutons de pub */
@keyframes pulse-ad-button {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Animation de balancement pour les icônes */
@keyframes swing {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(10deg); }
  50% { transform: rotate(0deg); }
  75% { transform: rotate(-10deg); }
  100% { transform: rotate(0deg); }
}

/* Assurer la visibilité des boutons de pub peu importe le contexte */
#add-points-ad-button, #continue-ad-button,
#bonus-points-button, #continue-with-ad-button,
#bonus-time-ad-button {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 1000 !important;
}

/* Texte d'explication pour les publicités */
.ad-explanation {
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 0 auto 15px auto;
  width: 90%;
  max-width: 350px;
  font-size: 14px;
  color: #f1c40f;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}