/* 分类气泡 — 首页文件夹区 + 全屏分类菜单 + 预览页共用 */

.pill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 14px;
}

.pill-col {
  flex: 0 0 auto;
}

.pill-link {
  --pill-bg: rgba(255, 255, 255, 0.95);
  --pill-color: #0f1419;
  --item-rot: 0deg;
  --hover-bg: #6366f1;
  --hover-color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.65rem 1.35rem;
  border: none;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--pill-color);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transform: rotate(var(--item-rot));
  transition:
    background 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
  white-space: nowrap;
}

.pill-link:hover {
  background: var(--hover-bg);
  color: var(--hover-color);
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.pill-link.is-active {
  background: var(--hover-bg);
  color: var(--hover-color);
  transform: rotate(0deg);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.15),
    0 0 0 2px rgba(56, 189, 248, 0.45);
}

.pill-label {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.pill-count {
  font-size: 0.88em;
  opacity: 0.78;
  font-weight: 400;
}

/* 首页 — 下滑文件夹分类区（文字始终可见） */
.category-folder-section {
  margin: 8px auto 44px;
  max-width: 920px;
  padding: 0 8px;
  scroll-margin-top: 88px;
}

.category-folder-heading {
  margin: 0 0 18px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #64748b;
}

.category-folder-list .pill-link {
  min-height: 48px;
  font-size: 0.88rem;
  padding: 0.55rem 1.15rem;
}

.category-folder-list .pill-label,
.category-folder-list .pill-count {
  opacity: 1;
}

/* 全屏分类气泡菜单 */
.bubble-menu-items {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  z-index: 110;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.bubble-menu-categories .pill-list {
  width: min(920px, 92vw);
  max-height: min(78vh, 680px);
  overflow-y: auto;
  padding: 24px 16px;
  gap: 14px 16px;
}

.bubble-menu-categories .pill-col {
  flex: 0 0 calc(33.333% - 12px);
}

.bubble-menu-categories .pill-link {
  width: 100%;
  min-height: 72px;
  font-size: clamp(0.88rem, 2vw, 1.05rem);
  padding: 0.75rem 1rem;
}

@media (max-width: 768px) {
  .bubble-menu-categories .pill-col {
    flex: 0 0 calc(50% - 10px);
  }

  .category-folder-list {
    gap: 10px;
  }

  .category-folder-list .pill-link {
    font-size: 0.82rem;
    padding: 0.5rem 0.95rem;
  }
}

@media (max-width: 480px) {
  .bubble-menu-categories .pill-col {
    flex: 0 0 100%;
  }
}
