/* 论坛「板块」全屏胶囊弹窗 —— 深蓝渐变底 + 白色描边胶囊 + 居中换行 */

/* ---------- 遮罩层 ---------- */
.BoardPills-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, #1e3ec2 0%, #2b55e0 55%, #3f6cf2 100%);
  overflow: hidden;
  font-family: inherit;
  animation: BoardPills-fade 0.18s ease-out;
}

@keyframes BoardPills-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---------- 内容容器 ---------- */
.BoardPills-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 1180px;
  padding: 6vh 24px 5vh;
  box-sizing: border-box;
}

/* ---------- 标题 ---------- */
.BoardPills-title {
  margin: 0;
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.3;
  text-align: center;
}

/* ---------- 右上角「返回」（绝对定位，不占内容流，窄屏不挤行） ---------- */
.BoardPills-back {
  position: absolute;
  top: 6vh;
  right: 24px;
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
}

.BoardPills-back:hover,
.BoardPills-back:focus {
  background: #fff;
  color: #2b50d8;
  outline: none;
}

/* ---------- 胶囊列表 ---------- */
.BoardPills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: flex-start;
  justify-content: center;
  width: 100%;
  max-width: 1100px;
  max-height: 58vh;
  margin-top: 26px;
  padding: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.BoardPills-list::-webkit-scrollbar {
  width: 8px;
}

.BoardPills-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}

.BoardPills-list::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- 胶囊按钮 ---------- */
.BoardPills-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out, transform 0.12s ease-out;
}

.BoardPills-pill:hover,
.BoardPills-pill:focus {
  background: #fff;
  border-color: #fff;
  color: #2b50d8;
  outline: none;
  /* 悬浮时字体放大 25%（用 transform 等比放大，避免整列回流抖动） */
  transform: scale(1.25);
  z-index: 2;
}

/* 当前所在板块 */
.BoardPills-pill.is-active {
  background: #fff;
  border-color: #fff;
  color: #2b50d8;
  font-weight: 600;
}

/* ---------- 顶部控制行：全部讨论 + 查找框（吸附在列表顶部） ---------- */
.BoardPills-topRow {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 6px;
  padding: 2px 0 12px;
  /* 与遮罩同色，遮住下方滚动经过的胶囊 */
  background: linear-gradient(155deg, #1e3ec2 0%, #2b55e0 55%, #3f6cf2 100%);
}

.BoardPills-search {
  display: inline-flex;
  align-items: center;
}

.BoardPills-searchInput {
  width: 260px;
  max-width: 60vw;
  padding: 9px 20px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.4;
  outline: none;
  box-sizing: border-box;
  transition: background-color 0.15s ease-out, border-color 0.15s ease-out;
}

.BoardPills-searchInput::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.BoardPills-searchInput:focus {
  background: rgba(255, 255, 255, 0.22);
  border-color: #fff;
}

/* ---------- 无匹配提示 ---------- */
.BoardPills-noResult {
  width: 100%;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  text-align: center;
}

/* ---------- 底部操作区 ---------- */
.BoardPills-footer {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
}

.BoardPills-all {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  padding-bottom: 2px;
  cursor: pointer;
}

.BoardPills-all:hover,
.BoardPills-all:focus {
  color: #fff;
  outline: none;
}

.BoardPills-done {
  padding: 11px 40px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color 0.15s ease-out, color 0.15s ease-out;
}

.BoardPills-done:hover,
.BoardPills-done:focus {
  background: #fff;
  color: #2b50d8;
  outline: none;
}

/* ---------- 移动端适配 ---------- */
@media (max-width: 767.98px) {
  .BoardPills-inner {
    padding: 4vh 14px 3vh;
  }

  .BoardPills-title {
    font-size: 22px;
  }

  .BoardPills-back {
    top: 4vh;
    right: 14px;
    padding: 7px 14px;
    font-size: 13px;
  }

  .BoardPills-list {
    gap: 8px;
    margin-top: 18px;
    max-height: 56vh;
  }

  .BoardPills-pill {
    padding: 7px 15px;
    font-size: 13px;
  }

  .BoardPills-searchInput {
    width: 200px;
    max-width: 70vw;
    padding: 7px 15px;
    font-size: 13px;
  }

  .BoardPills-done {
    padding: 9px 30px;
    font-size: 14px;
  }

  .BoardPills-footer {
    gap: 12px;
    margin-top: 18px;
  }
}
