/* Battle countdown animation styles */
.battle-countdown-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.battle-countdown-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.battle-countdown-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 10000;
}

.battle-countdown-number {
  font-size: 10rem;
  font-weight: bold;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
  animation: pulse 1s infinite alternate;
}

.battle-users-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 500px;
  margin-top: 2rem;
}

.battle-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.battle-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  color: white;
  margin-bottom: 10px;
}

.user1-color {
  background-color: #ff6b6b;
}

.user2-color {
  background-color: #4dabf7;
}

.battle-username {
  font-size: 1.2rem;
  font-weight: bold;
}

.battle-vs {
  font-size: 3rem;
  font-weight: bold;
  margin: 0 20px;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

@keyframes pulse {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(1.1);
    opacity: 0.9;
  }
}

/* Tree animation styles */
.animated-node {
  opacity: 0;
  transform: scaleY(0);
  transform-origin: center top;
}

.animated-node.animate-in {
  animation: branchGrow 0.5s forwards;
}

@keyframes branchGrow {
  from {
    opacity: 0;
    transform: scaleY(0);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* Battle text animation */
.battle-text {
  position: absolute;
  font-size: 8rem;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
  opacity: 0;
  transform: scale(0.5);
}

.battle-text.animate-in {
  animation: battleTextGrow 0.5s forwards;
}

@keyframes battleTextGrow {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Tree animation highlight effects */
.user1-node-highlight text,
.user1-node-highlight {
  animation: flashUser1 0.5s;
}

.user2-node-highlight text,
.user2-node-highlight {
  animation: flashUser2 0.5s;
}

.shared-node-highlight text,
.shared-node-highlight {
  animation: flashShared 0.5s;
}

@keyframes flashUser1 {
  0%, 100% { filter: none; }
  50% { filter: drop-shadow(0 0 10px #ff6b6b); }
}

@keyframes flashUser2 {
  0%, 100% { filter: none; }
  50% { filter: drop-shadow(0 0 10px #4dabf7); }
}

@keyframes flashShared {
  0%, 100% { filter: none; }
  50% { filter: drop-shadow(0 0 10px #cc5de8); }
}