/* =========================================================
   特色分类 · 联盟入口（左侧分类树顶部置顶，各成一排）
   文件：css/portal-league.css
   版本：v=0904a1  日期：2026-09-04
   说明：配合 js/portal.js 的 Portal.leagueEntries() 使用
        后台可通过全局 LEAGUE_ENTRIES 覆盖 4 个联盟（增删均可）
   ========================================================= */

/* ---- 容器：PC 端纵向堆叠（各成一排） ---- */
.cat-league-stack{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 10px;
}

/* ---- 单个联盟卡片 ---- */
.cat-league{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.cat-league:hover{
  transform: translateX(2px);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(15,23,42,.10);
}

/* 左侧渐变图标块 */
.cat-league .league-ico{
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}

/* 文案：名称 + 描述 */
.cat-league .league-txt{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.cat-league .league-txt b{
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
}
.cat-league .league-txt i{
  font-size: 10.5px;
  font-style: normal;
  color: #94a3b8;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 右上角标签：HOT / NEW / 联盟 */
.cat-league .league-tag{
  position: absolute;
  right: 7px;
  top: 6px;
  padding: 0 5px;
  height: 14px;
  line-height: 14px;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  border-radius: 7px;
}
.cat-league .league-tag.hot{ background: linear-gradient(135deg,#ff2d55,#ff6b35); }
.cat-league .league-tag.new{ background: linear-gradient(135deg,#8b5cf6,#d946ef); }
.cat-league .league-tag.uni{ background: #00a85f; }

/* 选中态（如后续接入选中逻辑可直接用） */
.cat-league.active{
  border-color: var(--primary, #2563eb);
  background: var(--primary-light, #eff6ff);
}

/* =========================================================
   移动端：分类树整体横向滚动，联盟卡片随之横向排列
   （styles.css 中 .portal-cat-tree 在 <=768px 变为 flex-row）
   ========================================================= */
@media (max-width: 768px){
  .cat-league-stack{
    flex-direction: row;
    gap: 8px;
    margin: 0;
    flex: 0 0 auto;
  }
  .cat-league{
    flex: 0 0 auto;
    padding: 6px 12px 6px 8px;
    border-radius: 18px;
  }
  .cat-league:hover{ transform: none; }
  .cat-league .league-ico{
    width: 24px;
    height: 24px;
    border-radius: 7px;
    font-size: 13px;
  }
  .cat-league .league-txt b{ font-size: 12.5px; }
  /* 移动端空间有限：隐藏描述与角标，只留图标 + 名称 */
  .cat-league .league-txt i{ display: none; }
  .cat-league .league-tag{ display: none; }
}
