.TreeMap-cat-list {
  padding: 0;
  list-style: none;
  margin: 0;
  height: 100%;
  width: 100%;
  position: relative;
}

.TreeMap-cat-list > li {
  position: absolute;
  transition: left 1.5s ease-out, top 1.5s ease-out, width 1.5s ease-out, height 1.5s ease-out;
}

.TreeMap-cat-list > li > p {
  padding: 4px;
  font-weight: bold;
  display: none;
}

.TreeMap-article-list {
  padding: 0;
  list-style: none;
  height: 100%;
  position: relative;
  margin: 0;
}

.TreeMap-article-list > li {
  position: absolute;
  overflow: hidden;
  /* Smooth transitions for position, size, and opacity */
  transition: left 1.5s ease-out, top 1.5s ease-out, width 1.5s ease-out, height 1.5s ease-out, opacity 0.8s ease-in-out;
}

/* Fade-in animation for new articles */
@keyframes articleFadeIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
    box-shadow: 0 0 20px 10px rgba(255, 255, 0, 0.6);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 15px 5px rgba(255, 255, 0, 0.4);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  }
}

.TreeMap-article-list > li.article-new {
  animation: articleFadeIn 1.2s ease-out forwards;
  z-index: 100;
}

/* Subtle pulse animation during refresh for existing articles */
@keyframes articleRefreshPulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  30% {
    opacity: 0.6;
    transform: scale(0.98);
  }
  60% {
    opacity: 0.8;
    transform: scale(0.99);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.TreeMap-article-list > li.article-refreshing {
  animation: articleRefreshPulse 0.8s ease-in-out;
}
