/* ===== Gamification UI - Refined Professional Design ===== */
.level-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: 12px;
  padding: 6px 14px;

  /* Clean, sophisticated background */
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  /* Subtle border */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;

  cursor: pointer;
  transition: all 0.2s ease;
}

.level-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

#levelText {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 4px;
}

.xp-bar-container {
  width: 60px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.xp-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.4s ease;
}

/* Level Up Animation - Subtle */
@keyframes levelUpPulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.15);
  }

  100% {
    opacity: 1;
  }
}

.level-up-anim {
  animation: levelUpPulse 0.6s ease;
}

/* XP Potion Active - Subtle purple accent */
.level-badge.potion-active {
  border-color: rgba(174, 0, 255, 0.4);
  box-shadow: 0 0 8px rgba(174, 0, 255, 0.15);
}