/* ==========================================================================
   SkillHub 自定义主题层（叠加在 Tabler 之上）
   仅使用现有数据字段，不引入新数据依赖。
   ========================================================================== */

:root {
  /* 基础字号：Tabler 默认 14px，中文界面整体上调到 15px */
  --tblr-body-font-size: 0.9375rem;
  --sh-radius: 14px;
  --sh-radius-sm: 10px;
  --sh-surface: var(--tblr-bg-surface);
  --sh-surface-soft: var(--tblr-bg-surface-secondary);
  --sh-border: var(--tblr-border-color);
  --sh-muted: rgba(var(--tblr-body-color-rgb), 0.62);
  --sh-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --sh-shadow-md: 0 2px 4px rgba(16, 24, 40, 0.06), 0 12px 28px rgba(16, 24, 40, 0.07);
}

/* ---------- 链接：hover 时不出现下划线 ---------- */
/* Tabler 在 a:hover 及部分组件（如 .breadcrumb a:hover）里会加下划线，
   统一用 !important 覆盖，改用颜色/位移作为悬停反馈 */
a,
a:hover,
a:focus,
a:active {
  text-decoration: none !important;
}

/* 键盘聚焦仍保留可见焦点环，兼顾可访问性 */
a:focus-visible {
  outline: 2px solid var(--tblr-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 基础排版：同步放大 Tabler 默认偏小的表单与标题 ---------- */
.btn:not(.btn-sm):not(.btn-lg) {
  --tblr-btn-font-size: 0.9375rem;
}

.form-control:not(.form-control-lg),
.form-select:not(.form-select-lg) {
  font-size: 0.9375rem;
}

.form-label {
  font-size: 0.9375rem;
}

.page-title {
  font-size: 1.5rem;
}

.pagination {
  --tblr-pagination-font-size: 0.9375rem;
}



/* ---------- 导航 ---------- */
.sh-navbar {
  background: var(--sh-surface);
  border-bottom: 1px solid var(--sh-border);
}

.sh-nav-search-wrap {
  width: 100%;
  max-width: 260px;
}

.sh-nav-search .form-control {
  background: var(--sh-surface-soft);
  border-color: var(--sh-border);
}

.sh-nav-search .form-control:focus {
  background: var(--sh-surface);
}

/* 导航当前页高亮 */
.sh-navbar .navbar-nav .nav-link {
  border-radius: var(--sh-radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.sh-navbar .navbar-nav .nav-link:hover {
  background: var(--sh-surface-soft);
}

.sh-navbar .navbar-nav .nav-link.active {
  color: var(--tblr-primary);
  background: rgba(var(--tblr-primary-rgb), 0.1);
}

.theme-dark .sh-navbar .navbar-nav .nav-link.active {
  background: rgba(var(--tblr-primary-rgb), 0.2);
}

/* 主题切换图标：浅色显示月亮，深色显示太阳 */
.sh-theme-icon {
  display: inline-block;
}

.sh-theme-icon--sun {
  display: none;
}

.theme-dark .sh-theme-icon--sun {
  display: inline-block;
}

.theme-dark .sh-theme-icon--moon {
  display: none;
}

/* ---------- Hero（参考 uni-api.cstcloud.cn：斜向渐变 + 棋盘格 + 光斑） ---------- */
.sh-hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 3.75rem;
  text-align: center;
  background: #fff;
  border-bottom: 1px solid var(--sh-border);
}

/* 渐变底 + 两处模糊光斑（对应参考站的 blue / purple blob） */
.sh-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(30rem 30rem at 22% 16%, rgba(96, 165, 250, 0.24) 0%, rgba(96, 165, 250, 0) 70%),
    radial-gradient(30rem 30rem at 78% 34%, rgba(192, 132, 252, 0.2) 0%, rgba(192, 132, 252, 0) 70%),
    linear-gradient(135deg, #f1f4ff 0%, #ffffff 52%, #f2f7ff 100%);
  pointer-events: none;
}

/* 40px 棋盘格纹理（与参考站同一份 SVG，靛蓝 3%） */
.sh-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 0h40v40H0V0zm20 20h20v20H20V20z' fill='%234338ca' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-size: 40px 40px;
  pointer-events: none;
}

.sh-hero-inner {
  position: relative;
  z-index: 1;
}

.sh-hero-title {
  font-size: clamp(2rem, 1.1rem + 2.4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 1.125rem;
  text-wrap: balance;
  color: #1d4ed8;
  background-image: linear-gradient(90deg, #1d4ed8 0%, #4338ca 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sh-hero-sub {
  font-size: clamp(1rem, 0.9rem + 0.35vw, 1.1875rem);
  font-weight: 300;
  line-height: 1.7;
  color: #475569;
  margin-bottom: 2.25rem;
}

/* ---------- 首页搜索框：磨砂胶囊，浮在渐变之上 ---------- */
.sh-hero-search {
  position: relative;
  max-width: 660px;
  margin: 0 auto;
}

.sh-hero-search .input-group {
  padding: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(67, 56, 202, 0.13);
  box-shadow:
    0 1px 2px rgba(49, 46, 129, 0.05),
    0 14px 38px rgba(49, 46, 129, 0.11);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.sh-hero-search .input-group:focus-within {
  background: rgba(255, 255, 255, 0.93);
  border-color: rgba(67, 56, 202, 0.34);
  box-shadow:
    0 1px 2px rgba(49, 46, 129, 0.06),
    0 16px 44px rgba(49, 46, 129, 0.16),
    0 0 0 4px rgba(99, 102, 241, 0.11);
}

.sh-hero-search .form-control {
  height: 3.125rem;
  padding-left: 1.25rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  font-size: 1rem;
  color: #1f2937;
}

.sh-hero-search .form-control::placeholder {
  color: #94a0b4;
}

.sh-hero-search .form-control:focus {
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* Tabler 对 .input-group 的直接子元素用 0,7,0 的 :not() 链重置了左右圆角，
   这里用 !important 收回，仅作用于胶囊搜索框内部。 */
.sh-hero-search .input-group > .btn {
  padding-inline: 1.875rem;
  border-radius: 999px !important;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.24);
}

.sh-hero-search .input-group > .btn:hover {
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.sh-hero-search .input-group > .form-control {
  height: 3.125rem;
  padding-left: 1.25rem;
  border-radius: 999px;
}

.sh-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  margin-top: 1.25rem;
}

.sh-hero-chips-label {
  color: #64748b;
  font-size: 0.875rem;
}

.sh-hero-chips .sh-tag {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(67, 56, 202, 0.14);
  color: #4b5468;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.sh-hero-chips .sh-tag:hover {
  background: #fff;
  color: var(--tblr-primary);
  border-color: rgba(67, 56, 202, 0.4);
}

/* ---------- 区块标题 ---------- */
.sh-section {
  margin-bottom: 3rem;
}

.sh-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sh-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.sh-section-sub {
  color: var(--sh-muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.sh-section-more {
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- 技能卡片 ---------- */
.sh-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.125rem 1.125rem 0.875rem;
  overflow: hidden;
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-radius: var(--sh-radius);
  box-shadow: var(--sh-shadow-sm);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.sh-card::after {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--sh-tone);
  opacity: 0;
  transition: opacity 0.16s ease;
}

.sh-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-shadow-md);
  border-color: var(--sh-tone);
}

.sh-card:hover::after {
  opacity: 1;
}

/* 分类色板：只影响强调色，不改变信息结构 */
.sh-card--violet { --sh-tone-rgb: 124, 92, 255; }
.sh-card--azure { --sh-tone-rgb: 47, 124, 246; }
.sh-card--pink { --sh-tone-rgb: 224, 80, 155; }
.sh-card--indigo { --sh-tone-rgb: 107, 115, 240; }
.sh-card--cyan { --sh-tone-rgb: 15, 157, 184; }
.sh-card--blue { --sh-tone-rgb: 59, 130, 246; }
.sh-card--teal { --sh-tone-rgb: 23, 184, 166; }
.sh-card--green { --sh-tone-rgb: 34, 181, 115; }
.sh-card--orange { --sh-tone-rgb: 240, 136, 58; }
.sh-card--rose { --sh-tone-rgb: 229, 72, 77; }
.sh-card--amber { --sh-tone-rgb: 224, 160, 32; }
.sh-card--slate { --sh-tone-rgb: 139, 152, 171; }

.sh-card {
  --sh-tone: rgb(var(--sh-tone-rgb, 59, 130, 246));
  --sh-tone-soft: rgba(var(--sh-tone-rgb, 59, 130, 246), 0.12);
}

.sh-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.875rem;
}

.sh-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  padding: 0.1875rem 0.5rem 0.1875rem 0.4375rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  background: var(--sh-tone-soft);
  color: var(--sh-tone);
  max-width: 78%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sh-chip-icon {
  flex: 0 0 auto;
  opacity: 0.85;
}

.sh-ver {
  padding: 0.0625rem 0.375rem;
  border-radius: 6px;
  background: var(--sh-surface-soft);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sh-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sh-card-ident {
  display: flex;
  align-items: center;
  gap: 0.6875rem;
  margin-bottom: 0.75rem;
}

.sh-avatar {
  flex: 0 0 2.375rem;
  width: 2.375rem;
  height: 2.375rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1;
  color: var(--sh-tone);
  background: var(--sh-tone-soft);
}

.sh-card-ident-text {
  flex: 1 1 auto;
  min-width: 0;
}

.sh-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0 0 0.125rem;
}

.sh-card-title a {
  display: block;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sh-card-title a:hover {
  color: var(--sh-tone);
}

.sh-card-author {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--sh-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sh-author-icon {
  flex: 0 0 auto;
  opacity: 0.55;
}

.sh-card-desc {
  font-size: 0.875rem;
  color: var(--sh-muted);
  line-height: 1.65;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  min-height: 4.02em;
}

.sh-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.sh-tag {
  display: inline-block;
  padding: 0.0625rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  line-height: 1.6;
  text-decoration: none;
  background: var(--sh-surface-soft);
  color: var(--sh-muted);
  border: 1px solid var(--sh-border);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sh-tag:hover {
  color: var(--tblr-primary);
  border-color: var(--tblr-primary);
}

.sh-card-foot {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--sh-border);
  font-size: 0.8125rem;
  color: var(--sh-muted);
}

.sh-metric {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.sh-metric svg {
  opacity: 0.6;
}

.sh-card-more {
  margin-left: auto;
  font-weight: 600;
  color: var(--tblr-primary);
  text-decoration: none;
  white-space: nowrap;
}

.sh-card-more:hover {
  color: var(--sh-tone);
}

/* ---------- 榜单 ---------- */
.sh-panel {
  background: var(--sh-surface);
  border: 1px solid var(--sh-border);
  border-radius: var(--sh-radius);
  overflow: hidden;
}

/* 热门技能区：左右两张卡片等高 */
.sh-hot-grid > [class*="col-"] {
  display: flex;
}

.sh-hot-grid .sh-panel {
  width: 100%;
}

.sh-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--sh-border);
}

.sh-row:last-child {
  border-bottom: 0;
}

.sh-row:hover {
  background: var(--sh-surface-soft);
}

.sh-row-no {
  flex: 0 0 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--sh-surface-soft);
  color: var(--sh-muted);
}

.sh-row-no--top {
  background: rgba(var(--tblr-primary-rgb), 0.12);
  color: var(--tblr-primary);
}

.sh-row-no--medal {
  background: transparent;
}

.sh-row-main {
  flex: 1 1 auto;
  min-width: 0;
}

.sh-row-title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
}

.sh-row-sub {
  display: block;
  font-size: 0.8125rem;
  color: var(--sh-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sh-row-cat {
  flex: 0 0 auto;
  font-size: 0.75rem;
  color: var(--sh-muted);
  white-space: nowrap;
}

.sh-row-metric {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--sh-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sh-row-metric svg {
  opacity: 0.6;
}

/* ---------- 分类列表 ---------- */
.sh-panel--cat {
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.sh-panel-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.sh-cat-list {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.sh-cat {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.25rem;
  font-size: 0.875rem;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed var(--sh-border);
}

.sh-cat:last-child {
  border-bottom: 0;
}

.sh-cat:hover {
  color: var(--tblr-primary);
}

.sh-cat-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sh-cat-count {
  color: var(--sh-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- 响应式 ---------- */
@media (max-width: 767.98px) {
  .sh-nav-search-wrap {
    max-width: none;
    margin: 0.5rem 0;
  }
}

@media (max-width: 575.98px) {
  .sh-hero {
    padding: 2.5rem 0 2rem;
  }

  .sh-hero-title {
    font-size: 1.5rem;
  }

  .sh-hero-sub {
    font-size: 0.9375rem;
    margin-bottom: 1.625rem;
  }

  .sh-hero-search .input-group {
    padding: 4px;
  }

  .sh-hero-search .input-group > .form-control {
    height: 2.75rem;
    padding-left: 1rem;
    padding-right: 0.5rem;
    font-size: 0.9375rem;
  }

  .sh-hero-search .input-group > .btn {
    padding-inline: 1.25rem;
  }

  .sh-row-cat {
    display: none;
  }

  .sh-section-title {
    font-size: 1.375rem;
  }
}

/* ---------- 深色主题 ---------- */
.theme-dark .sh-hero {
  background: #151b2b;
}

.theme-dark .sh-hero::before {
  background:
    radial-gradient(28rem 28rem at 24% 18%, rgba(96, 165, 250, 0.26) 0%, rgba(96, 165, 250, 0) 68%),
    radial-gradient(28rem 28rem at 76% 32%, rgba(168, 85, 247, 0.24) 0%, rgba(168, 85, 247, 0) 68%),
    linear-gradient(135deg, #1a2038 0%, #151b2b 52%, #172136 100%);
}

.theme-dark .sh-hero::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 0h40v40H0V0zm20 20h20v20H20V20z' fill='%23ffffff' fill-opacity='0.022' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.theme-dark .sh-hero-title {
  background-image: linear-gradient(90deg, #93b4ff 0%, #b39dff 100%);
  color: #93b4ff;
}

.theme-dark .sh-hero-sub,
.theme-dark .sh-hero-chips-label {
  color: rgba(255, 255, 255, 0.62);
}

.theme-dark .sh-hero-search .input-group {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.13);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.35);
}

.theme-dark .sh-hero-search .input-group:focus-within {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(147, 180, 255, 0.45);
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.42),
    0 0 0 4px rgba(124, 140, 255, 0.16);
}

.theme-dark .sh-hero-search .form-control {
  background: transparent;
  color: #e8ecf7;
}

.theme-dark .sh-hero-search .form-control::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.theme-dark .sh-hero-search .form-control:focus {
  background: transparent;
}

.theme-dark .sh-hero-chips .sh-tag {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.75);
}

.theme-dark .sh-card {
  --sh-tone-soft: rgba(var(--sh-tone-rgb, 59, 130, 246), 0.22);
  box-shadow: none;
}

.theme-dark .sh-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   内页通用：页头 / 分段控件 / 图标
   ========================================================================== */
.sh-icon {
  flex: 0 0 auto;
  vertical-align: -0.125em;
}

/* ---------- 排名奖牌（金 / 银 / 铜） ---------- */
.sh-medal .sh-medal-disc {
  fill: #f6c945;
  stroke: #b7791f;
  stroke-width: 1.1;
}

.sh-medal .sh-medal-ribbon {
  fill: #eab308;
  stroke: #b7791f;
  stroke-width: 1.1;
}

.sh-medal .sh-medal-star {
  fill: #fff;
}

.sh-medal--silver .sh-medal-disc {
  fill: #dbe3ec;
  stroke: #8a99ad;
}

.sh-medal--silver .sh-medal-ribbon {
  fill: #cbd5e1;
  stroke: #8a99ad;
}

.sh-medal--bronze .sh-medal-disc {
  fill: #e6a873;
  stroke: #b45309;
}

.sh-medal--bronze .sh-medal-ribbon {
  fill: #d97706;
  stroke: #b45309;
}

.sh-pagehead {
  position: relative;
  overflow: hidden;
  padding: 2.75rem 0 2.25rem;
  border-bottom: 1px solid var(--sh-border);
  background:
    radial-gradient(32rem 20rem at 12% 0%, rgba(96, 165, 250, 0.14) 0%, rgba(96, 165, 250, 0) 70%),
    radial-gradient(32rem 20rem at 88% 10%, rgba(192, 132, 252, 0.13) 0%, rgba(192, 132, 252, 0) 72%),
    linear-gradient(135deg, #f7f9ff 0%, #ffffff 60%, #f6faff 100%);
}

.sh-pagehead::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 0h40v40H0V0zm20 20h20v20H20V20z' fill='%234338ca' fill-opacity='0.025' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-size: 40px 40px;
  pointer-events: none;
}

.sh-pagehead-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.sh-pagehead-title {
  font-size: clamp(1.625rem, 1.2rem + 1.2vw, 2.125rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.375rem;
  color: #1d4ed8;
  background-image: linear-gradient(90deg, #1d4ed8 0%, #4338ca 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sh-pagehead-sub {
  margin: 0;
  color: #5b6478;
  font-size: 0.9375rem;
}

.sh-segmented {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(67, 56, 202, 0.12);
  box-shadow: 0 6px 18px rgba(49, 46, 129, 0.07);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.sh-seg {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.9375rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #5b6478;
  transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.sh-seg:hover {
  color: var(--tblr-primary);
}

.sh-seg.is-active {
  background: var(--tblr-primary);
  color: #fff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.24);
}

/* ==========================================================================
   排行榜：前三名
   ========================================================================== */
.sh-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.75rem 0 2rem;
}

.sh-podium-card {
  position: relative;
  display: flex;
  gap: 0.875rem;
  padding: 1.25rem 1.125rem 1.125rem;
  border-radius: var(--sh-radius);
  border: 1px solid var(--sh-border);
  background: var(--sh-surface);
  box-shadow: var(--sh-shadow-sm);
  color: inherit;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.sh-podium-card:hover {
  transform: translateY(-3px);
  border-color: var(--tblr-primary);
  box-shadow: var(--sh-shadow-md);
}

.sh-podium-card.is-first {
  border-color: rgba(37, 99, 235, 0.35);
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.06) 0%, rgba(37, 99, 235, 0) 55%),
    var(--sh-surface);
}

.sh-podium-medal {
  position: absolute;
  top: 0.75rem;
  right: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.375rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--sh-surface-soft);
  color: var(--sh-muted);
}

.sh-podium-card.is-first .sh-podium-medal {
  background: rgba(37, 99, 235, 0.12);
  color: var(--tblr-primary);
}

.sh-podium-card .sh-podium-medal.is-medal {
  min-width: 0;
  height: auto;
  padding: 0;
  background: transparent;
  filter: drop-shadow(0 2px 2px rgba(16, 24, 40, 0.16));
}

.sh-podium-avatar {
  flex: 0 0 2.75rem;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.875rem;
  font-size: 1.25rem;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.1);
  color: var(--tblr-primary);
}

.sh-podium-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.25rem;
}

.sh-podium-name {
  font-size: 1rem;
  font-weight: 700;
  padding-right: 2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sh-podium-summary {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--sh-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 3em;
}

.sh-podium-foot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.375rem;
}

.sh-podium-metric {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--sh-muted);
  font-variant-numeric: tabular-nums;
}

.sh-podium-metric strong {
  color: var(--tblr-body-color);
  font-size: 0.9375rem;
}

.sh-podium-unit {
  font-size: 0.75rem;
}

.sh-podium-chip {
  margin-left: auto;
  padding: 0.0625rem 0.4375rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  background: var(--sh-surface-soft);
  color: var(--sh-muted);
  border: 1px solid var(--sh-border);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 45%;
}

/* ==========================================================================
   排行榜：榜单卡片
   ========================================================================== */
.sh-board-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.sh-board-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--sh-radius);
  border: 1px solid var(--sh-border);
  background: var(--sh-surface);
  box-shadow: var(--sh-shadow-sm);
  overflow: hidden;
}

.sh-board-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.125rem 0.875rem;
  border-bottom: 1px solid var(--sh-border);
}

.sh-board-title {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.sh-board-sub {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--sh-muted);
}

.sh-board-more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tblr-primary);
  white-space: nowrap;
}

.sh-board-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.sh-board-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.125rem;
  color: inherit;
  border-bottom: 1px solid var(--sh-border);
  transition: background-color 0.14s ease;
}

.sh-board-list li:last-child .sh-board-row {
  border-bottom: 0;
}

.sh-board-row:hover {
  background: var(--sh-surface-soft);
}

.sh-board-rank {
  flex: 0 0 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--sh-surface-soft);
  color: var(--sh-muted);
}

.sh-board-rank.is-top {
  background: rgba(37, 99, 235, 0.12);
  color: var(--tblr-primary);
}

.sh-board-rank.is-medal {
  background: transparent;
}

.sh-board-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
}

.sh-board-name {
  font-size: 0.875rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sh-board-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--sh-muted);
  overflow: hidden;
}

.sh-board-cat,
.sh-board-author {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sh-board-author {
  display: inline-flex;
  align-items: center;
  gap: 0.1875rem;
  opacity: 0.85;
}

.sh-board-value {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: var(--sh-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.sh-board-num {
  font-weight: 700;
  color: var(--tblr-body-color);
}

.sh-board-unit {
  font-size: 0.75rem;
}

.sh-board-time {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.sh-board-empty {
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--sh-muted);
}

.sh-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--sh-radius-sm);
  background: var(--sh-surface-soft);
  border: 1px dashed var(--sh-border);
  font-size: 0.8125rem;
  color: var(--sh-muted);
}

/* ==========================================================================
   排行榜：分类排行
   ========================================================================== */
.sh-cat-rank {
  margin-top: 2.5rem;
}

.sh-cat-rank .sh-board-head {
  padding: 0 0 0.875rem;
  border-bottom: 0;
}

.sh-cat-rank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.875rem;
}

.sh-cat-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.9375rem 1rem;
  border-radius: var(--sh-radius);
  border: 1px solid var(--sh-border);
  background: var(--sh-surface);
  color: inherit;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.sh-cat-card:hover {
  transform: translateY(-2px);
  border-color: var(--tblr-primary);
  box-shadow: var(--sh-shadow-md);
}

.sh-cat-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sh-cat-card-rank {
  flex: 0 0 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  background: var(--sh-surface-soft);
  color: var(--sh-muted);
}

.sh-cat-card-rank.is-top {
  background: rgba(37, 99, 235, 0.12);
  color: var(--tblr-primary);
}

.sh-cat-card-name {
  flex: 1 1 auto;
  font-size: 0.875rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sh-cat-card-count {
  font-size: 0.75rem;
  color: var(--sh-muted);
  white-space: nowrap;
}

.sh-cat-card-bar {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: var(--sh-surface-soft);
  overflow: hidden;
}

.sh-cat-card-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.45) 0%, rgba(67, 56, 202, 0.75) 100%);
}

.sh-cat-card-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--sh-muted);
  font-variant-numeric: tabular-nums;
}

.sh-cat-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.sh-cat-stat-label {
  opacity: 0.75;
}

/* ==========================================================================
   详情页
   ========================================================================== */
/* 详情页两栏布局（用 grid 避免 Tabler row 的负边距在窄屏溢出） */
.sh-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.sh-detail-main,
.sh-detail-aside-col {
  min-width: 0;
}

@media (min-width: 992px) {
  .sh-detail-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
}

.sh-crumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--sh-muted);
}

.sh-crumb a {
  color: var(--sh-muted);
}

.sh-crumb a:hover {
  color: var(--tblr-primary);
}

.sh-crumb-sep {
  opacity: 0.45;
}

.sh-crumb .is-current {
  color: var(--tblr-body-color);
  font-weight: 600;
  max-width: 22rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sh-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 1.5rem 1.375rem;
  border-radius: var(--sh-radius);
  border: 1px solid var(--sh-border);
  background:
    radial-gradient(30rem 14rem at 8% 0%, rgba(96, 165, 250, 0.14) 0%, rgba(96, 165, 250, 0) 72%),
    radial-gradient(30rem 14rem at 92% 0%, rgba(192, 132, 252, 0.12) 0%, rgba(192, 132, 252, 0) 72%),
    var(--sh-surface);
  box-shadow: var(--sh-shadow-sm);
}

.sh-detail-head-main {
  display: flex;
  gap: 1rem;
  min-width: 0;
}

.sh-detail-avatar {
  flex: 0 0 3.5rem;
  width: 3.5rem;
  height: 3.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  font-size: 1.625rem;
  font-weight: 700;
  background: rgba(37, 99, 235, 0.1);
  color: var(--tblr-primary);
}

.sh-detail-head-text {
  min-width: 0;
}

.sh-detail-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.sh-detail-badges .sh-chip {
  max-width: none;
}

.sh-detail-title {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 0.5rem;
  word-break: break-word;
}

.sh-detail-tagline {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--sh-muted);
  max-width: 46rem;
}

.sh-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  font-size: 0.8125rem;
  color: var(--sh-muted);
}

.sh-detail-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.sh-detail-head-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.sh-detail-head-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  white-space: nowrap;
}

.sh-btn-download {
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
}

.sh-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--sh-radius-sm);
  border: 1px solid rgba(220, 38, 38, 0.25);
  background: rgba(220, 38, 38, 0.07);
  color: #b91c1c;
  font-size: 0.875rem;
}

.sh-alert-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  opacity: 0.7;
}

.sh-alert-close:hover {
  opacity: 1;
  background: rgba(220, 38, 38, 0.12);
}

/* 详情页卡片 */
.sh-detail-card {
  border-radius: var(--sh-radius);
  border: 1px solid var(--sh-border);
  background: var(--sh-surface);
  box-shadow: var(--sh-shadow-sm);
  overflow: hidden;
}

.sh-detail-card .card-body {
  padding: 1.125rem 1.25rem;
}

.sh-detail-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--sh-border);
}

.sh-detail-card-head--tabs {
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

.sh-detail-card-title {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.sh-detail-card-head .nav-tabs {
  border-bottom: 0;
}

.sh-detail-card-body {
  padding: 1.125rem 1.25rem;
}

.sh-detail-desc {
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--tblr-body-color);
}

.sh-detail-block {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--sh-border);
}

.sh-detail-block-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sh-muted);
  margin-bottom: 0.5rem;
}

.sh-detail-block-text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--sh-muted);
}

.sh-detail-more {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--sh-border);
  font-size: 0.875rem;
}

.sh-detail-more > summary {
  cursor: pointer;
  color: var(--tblr-primary);
  font-weight: 600;
  list-style: none;
}

.sh-detail-more > summary::-webkit-details-marker {
  display: none;
}

.sh-detail-more > summary::before {
  content: '+';
  display: inline-block;
  width: 1rem;
}

.sh-detail-more[open] > summary::before {
  content: '−';
}

.sh-detail-more .sh-detail-block-text {
  margin-top: 0.625rem;
}

/* 安装步骤 */
.sh-install-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.625rem;
}

.sh-install-hint {
  margin: 0;
  font-size: 0.875rem;
  color: var(--sh-muted);
}

.sh-code {
  padding: 0.75rem 0.875rem;
  border-radius: var(--sh-radius-sm);
  border: 1px solid var(--sh-border);
  background: var(--sh-surface-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--tblr-body-color);
  white-space: pre-line;
  word-break: break-word;
}

.sh-install-steps {
  margin: 0;
  padding-left: 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--sh-muted);
}

/* 侧栏 */
.sh-detail-side {
  position: sticky;
  top: 1rem;
}

.sh-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 1rem 1.25rem 1.125rem;
}

.sh-stat {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.625rem 0.5rem;
  border-radius: var(--sh-radius-sm);
  background: var(--sh-surface-soft);
  text-align: center;
}

.sh-stat-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.1875rem;
  font-size: 0.75rem;
  color: var(--sh-muted);
}

.sh-stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sh-stat-value--sm {
  font-size: 0.9375rem;
}

.sh-meta-list {
  margin: 0;
  padding: 0.875rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.sh-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.sh-meta-row dt {
  flex: 0 0 auto;
  font-weight: 400;
  color: var(--sh-muted);
  font-size: 0.8125rem;
}

.sh-meta-row dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
  word-break: break-word;
}

.sh-tags--flush {
  margin-bottom: 0;
  padding: 0.875rem 1.25rem 1.125rem;
}

.sh-side-note {
  display: flex;
  gap: 0.375rem;
  margin: 1rem 0 0;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--sh-muted);
}

/* ==========================================================================
   内页响应式
   ========================================================================== */
@media (max-width: 991.98px) {
  .sh-board-grid {
    grid-template-columns: 1fr;
  }

  .sh-cat-rank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sh-detail-side {
    position: static;
  }

  .sh-detail-head {
    flex-direction: column;
    align-items: stretch;
  }

  .sh-detail-head-actions {
    flex-direction: row;
  }

  .sh-detail-head-actions .btn {
    flex: 1 1 0;
  }
}

@media (max-width: 767.98px) {
  .sh-podium {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .sh-pagehead {
    padding: 1.75rem 0 1.5rem;
  }

  .sh-pagehead-row {
    gap: 1rem;
  }

  .sh-cat-rank-grid {
    grid-template-columns: 1fr;
  }

  .sh-podium-card {
    padding: 1rem;
  }

  .sh-detail-head {
    padding: 1.125rem 1rem;
  }

  .sh-detail-head-main {
    gap: 0.75rem;
  }

  .sh-detail-avatar {
    flex: 0 0 2.75rem;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    font-size: 1.375rem;
  }

  .sh-detail-head-actions {
    flex-direction: column;
  }

  .sh-board-value .sh-board-unit {
    display: none;
  }
}

/* ==========================================================================
   内页深色主题
   ========================================================================== */
.theme-dark .sh-pagehead {
  background:
    radial-gradient(32rem 20rem at 12% 0%, rgba(96, 165, 250, 0.18) 0%, rgba(96, 165, 250, 0) 70%),
    radial-gradient(32rem 20rem at 88% 10%, rgba(168, 85, 247, 0.16) 0%, rgba(168, 85, 247, 0) 72%),
    linear-gradient(135deg, #171e30 0%, #151b2b 60%, #172136 100%);
}

.theme-dark .sh-pagehead::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 0h40v40H0V0zm20 20h20v20H20V20z' fill='%23ffffff' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.theme-dark .sh-pagehead-title {
  background-image: linear-gradient(90deg, #93b4ff 0%, #b39dff 100%);
  color: #93b4ff;
}

.theme-dark .sh-pagehead-sub,
.theme-dark .sh-seg {
  color: rgba(255, 255, 255, 0.62);
}

.theme-dark .sh-segmented {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.theme-dark .sh-seg.is-active {
  background: var(--tblr-primary);
  color: #fff;
}

.theme-dark .sh-detail-head {
  background:
    radial-gradient(30rem 14rem at 8% 0%, rgba(96, 165, 250, 0.16) 0%, rgba(96, 165, 250, 0) 72%),
    radial-gradient(30rem 14rem at 92% 0%, rgba(168, 85, 247, 0.14) 0%, rgba(168, 85, 247, 0) 72%),
    var(--sh-surface);
}

.theme-dark .sh-podium-avatar,
.theme-dark .sh-detail-avatar {
  background: rgba(37, 99, 235, 0.22);
}

.theme-dark .sh-alert {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}
