/* ============================================================
   软件仓库网站 · 页面样式
   ============================================================ */

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-2);
}
.site-header-inner {
  max-width: 1320px;
  margin: 0 auto;
  height: 100%;
  padding: 0 26px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-3) 100%);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 3px 10px rgba(79, 70, 229, .32);
  flex: none;
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-text b { display: block; font-size: 15px; line-height: 1.25; letter-spacing: -.01em; }
.brand-text span { display: block; font-size: 11px; color: var(--text-3); line-height: 1.3; }

.header-search {
  position: relative;
  flex: 1;
  max-width: 430px;
  margin-left: auto;
}
.header-search svg {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--text-3);
  pointer-events: none;
}
.header-search input {
  width: 100%;
  height: 38px;
  padding: 0 36px 0 35px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.header-search input:focus {
  background: var(--panel);
  border-color: var(--accent-3);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.header-search .clear-btn {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  border: 0; border-radius: 50%;
  background: var(--border);
  color: var(--text-2);
  cursor: pointer;
  display: none;
  place-items: center;
  padding: 0;
  font-size: 13px;
  line-height: 1;
}
.header-search.has-value .clear-btn { display: grid; }

.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }

/* ---------------- 页面容器 ---------------- */
.page {
  max-width: 1480px;
  margin: 0 auto;
  padding: 22px 26px 90px;
}
.layout {
  display: grid;
  grid-template-columns: 214px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.content { min-width: 0; }

/* ---------------- 左侧类型导航（固定在左侧，不随页面滚动） ---------------- */
.cat-nav {
  position: sticky;
  top: calc(var(--header-h) + 22px);
  max-height: calc(100vh - var(--header-h) - 44px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.cat-nav-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  padding: 13px 15px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: .04em;
  border-bottom: 1px solid var(--border-2);
}
.cat-nav-tip { font-size: 10.5px; font-weight: 500; opacity: .7; }
.cat-nav-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: thin;
}
/* 侧栏底部：意见反馈 + 点赞 */
.cat-nav-foot {
  padding: 9px;
  border-top: 1px solid var(--border-2);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
/* 意见反馈按钮：淡紫底 + 深紫字，比"灰字白底"明显，又不抢软件卡片的风头 */
.cat-nav-feedback {
  width: 100%;
  justify-content: center;
  font-weight: 500;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: var(--accent-3);
}
.cat-nav-feedback:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.cat-nav-feedback svg { width: 14px; height: 14px; flex: none; }

/* 点赞：像素小动画 + 心形按钮 + 充能条 + 总赞数框 */
.like-stage {
  display: flex;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--panel-3);
  border: 1px solid var(--border-2);
  overflow: hidden;
  line-height: 0;
}
.like-stage canvas {
  width: 170px;
  height: 96px;
  display: block;
  image-rendering: pixelated;
}
.like-grand {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: var(--radius);
  background: var(--panel-3);
  border: 1px solid var(--border-2);
}
.lg-num { font-size: 17px; font-variant-numeric: tabular-nums; }
.lg-label { font-size: 11.5px; color: var(--text-3); }
.like-box { position: relative; display: flex; flex-direction: column; gap: 5px; }
.cat-nav-like {
  width: 100%;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text-3);
}
.cat-nav-like svg { width: 15px; height: 15px; flex: none; transition: transform .18s ease; }
.cat-nav-like.bump svg { transform: scale(1.4); }
.cat-nav-like.bump-hard svg { transform: scale(1.75) rotate(-10deg); }
.like-num { font-variant-numeric: tabular-nums; }
.like-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--panel-3);
  overflow: hidden;
}
.like-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: currentColor;
  transition: width .28s ease;
}
.like-hint {
  margin: 0;
  min-height: 15px;
  font-size: 11.5px;
  line-height: 1.3;
  color: var(--text-3);
  text-align: center;
}
/* 连击飘字配色：与 js 的 COMBO_STEPS 档位一一对应（3/19/35/51/67/83/100） */
:root {
  --like-c3:  #2F7BD6;
  --like-c19: #0F8A66;
  --like-c35: #5C8F1E;
  --like-c51: #B0730F;
  --like-c67: #CC5326;
  --like-c83: #D93B3A;
  --like-rainbow: linear-gradient(90deg, #E24B4A, #EF9F27, #639922, #378ADD, #7F77DD, #D4537E, #E24B4A);
}
[data-theme="dark"] {
  --like-c3:  #7FB6EE;
  --like-c19: #4FC6A0;
  --like-c35: #9BCB62;
  --like-c51: #EFB55C;
  --like-c67: #F0997B;
  --like-c83: #F09595;
  --like-rainbow: linear-gradient(90deg, #F09595, #FAC775, #C0DD97, #85B7EB, #AFA9EC, #ED93B1, #F09595);
}
.like-fly {
  position: absolute;
  left: 50%;
  top: -6px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  color: var(--text);
  animation: likeFly .9s ease-out forwards;
}
@keyframes likeFly {
  from { opacity: 1; transform: translate(-50%, 0); }
  to { opacity: 0; transform: translate(-50%, -22px); }
}
/* 100 连击：彩色流光飘字（渐变沿文字横向流动 + 柔光） */
.like-fly.rainbow {
  font-size: 15px;
  background-image: var(--like-rainbow);
  background-size: 280% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 5px rgba(212, 83, 126, .5));
  animation: likeFly .9s ease-out forwards, likeRainbow .65s linear infinite;
}
@keyframes likeRainbow {
  from { background-position: 0% 50%; }
  to   { background-position: 280% 50%; }
}
.like-burst {
  position: absolute;
  left: 50%;
  top: 10px;
  width: 12px;
  height: 12px;
  pointer-events: none;
  animation: likeBurst .95s ease-out forwards;
}
.like-burst svg { width: 12px; height: 12px; display: block; }
@keyframes likeBurst {
  from { opacity: 1; transform: translate(-50%, 0) scale(.5); }
  to { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), var(--dy, -30px)) scale(1.05); }
}
.cat-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background .14s, color .14s;
}
.cat-nav-item:hover { background: var(--panel-3); color: var(--text); }
.cat-nav-item.active { background: var(--accent-soft); color: var(--accent); }
.cn-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
  flex: none;
  transition: background .14s, transform .14s;
}
.cat-nav-item.active .cn-dot { background: var(--accent); }
.cn-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cn-count {
  flex: none;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
}
.cat-nav-item.active .cn-count { color: var(--accent); opacity: .82; }

.cat-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-2);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.cat-nav-btn:hover { background: var(--panel-3); color: var(--text); }
.cat-nav-btn:disabled { opacity: .6; cursor: default; }

/* 版本行 / 服务器行 / 标签中的内联图标统一尺寸（否则会被撑成默认大图） */
.ver-line svg,
.srv-line svg,
.srv-badge svg,
.tag svg { width: 13px; height: 13px; flex: none; }
.ver-line svg, .srv-line svg { vertical-align: -2px; }

/* ---------------- 类型分栏 ---------------- */
.sections { display: flex; flex-direction: column; gap: 12px; }
.cat-section { scroll-margin-top: calc(var(--header-h) + 16px); }
.cat-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border-2);
}
.cat-section-head h2 {
  font-size: 15.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cat-section-head h2::before {
  content: "";
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-3));
}
.cat-section-head .cnt {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
  background: var(--panel-3);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums;
}
.cat-section-head .spacer { flex: 1; }

/* ---------------- 概览条 ----------------
   注意：概览条目前在 index.html 里被「注释预留」掉（暂缓显示），
   样式保留着，取消注释后即可直接生效，勿当死代码删除。 */
.overview {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-xs);
  margin-bottom: 16px;
}
.stat-row { display: flex; gap: 26px; flex-wrap: wrap; }
.stat { text-align: right; min-width: 62px; }
.stat b {
  display: block;
  font-size: 21px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.stat span { font-size: 11.5px; color: var(--text-3); }
.stat.is-alert b { color: var(--warn); }

/* ---------------- 筛选区 ---------------- */
.filter-panel {
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-xs);
  padding: 14px 20px 16px;
  margin-bottom: 18px;
}
.filter-row { display: flex; align-items: flex-start; gap: 14px; padding: 7px 0; }
.filter-row + .filter-row { border-top: 1px dashed var(--border-2); }
.filter-label {
  flex: none;
  width: 56px;
  padding-top: 3px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: .02em;
}
.chip-list { display: flex; flex-wrap: wrap; gap: 7px; flex: 1; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 27px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .14s;
  user-select: none;
  white-space: nowrap;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); background: var(--panel-3); }
.chip .cnt {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  opacity: .62;
}
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, .28);
}
.chip.active .cnt { opacity: .82; }

.chip-more {
  border-style: dashed;
  color: var(--accent);
  background: transparent;
}
.chip-more:hover { background: var(--accent-soft); border-color: var(--accent-3); color: var(--accent); }

/* ---------------- 工具条 ---------------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.toolbar-result { font-size: 13px; color: var(--text-2); }
.toolbar-result b { color: var(--text); font-variant-numeric: tabular-nums; }
.toolbar-spacer { flex: 1; }
.toolbar .select { width: auto; height: 34px; padding: 0 32px 0 12px; font-size: 12.5px; font-weight: 600; }

.view-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--panel);
}
.view-toggle button {
  width: 34px; height: 32px;
  border: 0;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: background .14s, color .14s;
}
.view-toggle button:hover { background: var(--panel-3); color: var(--text-2); }
.view-toggle button.active { background: var(--accent-soft); color: var(--accent); }
.view-toggle svg { width: 15px; height: 15px; }

/* ---------------- 卡片网格 ---------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: transform .16s cubic-bezier(.2,.8,.3,1), box-shadow .16s, border-color .16s;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  opacity: 0;
  transition: opacity .16s;
}
.card:hover::after { opacity: 1; }
.card.has-update::after { opacity: 1; background: linear-gradient(90deg, var(--warn), #fbbf24); }

.card-top { display: flex; align-items: flex-start; gap: 12px; }

.card-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  flex: none;
  object-fit: contain;
  background: var(--panel-3);
  border: 1px solid var(--border-2);
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 800;
  color: var(--accent);
  overflow: hidden;
}
.card-icon img { width: 100%; height: 100%; object-fit: contain; }

.card-heading { flex: 1; min-width: 0; }
.card-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
}
.card-title h3 {
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-title .star { color: var(--warn); flex: none; display: flex; }
.card-title .star svg { width: 13px; height: 13px; }
.card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* 标题行：名字在左，软件类型贴右上角（把整行让给下面的平台） */
.card-topline { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.card-topline .card-title { flex: 1; min-width: 0; margin-bottom: 0; }
.card-topline > .tag { flex: none; }

/* ---------------- 标签胶囊（#关键词）：卡片 & 详情弹窗共用 ----------------
   统一青色底，字号比正文小一号但比原来大，目的是「扫一眼就知道这软件干嘛的」 */
.card-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.kw-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2px;
  white-space: nowrap;
}
.kw-tag.kw-tag-more { padding: 0 8px; background: var(--panel-3); color: var(--text-3); }

/* ---------------- 平台图标（卡片上只放图标不写名字，悬停可看平台名） ---------------- */
.card-plats { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.plat-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px; height: 25px;
  border-radius: 7px;
  background: var(--panel-3);
  border: 1px solid var(--border);
  transition: background .14s, border-color .14s, transform .14s;
}
.plat-ico .p-icon { width: 16px; height: 16px; flex: none; display: block; }
.plat-ico:hover { background: var(--panel); border-color: var(--border-strong); transform: translateY(-1px); }

/* ---------------- 平台标签（筛选栏 / 详情弹窗：图标 + 名字） ---------------- */
.plat-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.plat-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 21px;
  padding: 0 8px 0 6px;
  border-radius: var(--radius-pill);
  background: var(--panel-3);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.plat-tag .p-icon { width: 12px; height: 12px; flex: none; display: block; }
.chip .p-icon { width: 13px; height: 13px; flex: none; display: block; }
.chip.active .p-icon { filter: brightness(0) invert(1); opacity: .9; }
/* 详情弹窗空间充足，字号回到与正文协调的大小 */
.detail-head .plat-tag,
.kv .plat-tag { font-size: 12px; }
/* 暗色主题：纯黑图形（苹果 / 企鹅 / 手机）换成浅色，肚皮、刘海等白色部分反过来压深 */
[data-theme="dark"] .plat-tag [fill="#1d1d1f"],
[data-theme="dark"] .plat-tag [stroke="#1d1d1f"],
[data-theme="dark"] .chip [fill="#1d1d1f"],
[data-theme="dark"] .chip [stroke="#1d1d1f"] { fill: #eef0f7; stroke: #eef0f7; }
[data-theme="dark"] .plat-tag [fill="#ffffff"],
[data-theme="dark"] .chip [fill="#ffffff"] { fill: #10131d; }

.card-desc {
  font-size: 12.7px;
  color: var(--text-2);
  line-height: 1.62;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 41px;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 11px;
  border-top: 1px solid var(--border-2);
  margin-top: auto;
}
.card-foot .link-btns { display: flex; gap: 6px; margin-left: auto; }

.mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .14s;
  white-space: nowrap;
}
.mini-btn:hover { background: var(--panel-3); color: var(--text); border-color: var(--border-strong); text-decoration: none; }
.mini-btn svg { width: 13px; height: 13px; }
.mini-btn.srv { color: var(--ok); border-color: var(--ok); }
.mini-btn.srv:hover { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.mini-btn.warn { color: var(--warn); border-color: var(--warn); }
.mini-btn.warn:hover { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.mini-btn:disabled { opacity: .55; cursor: default; }
.mini-btn .spin-s { width: 11px; height: 11px; border-width: 1.6px; }

/* ================= 网盘下载按钮 =================
   放在卡片上：不同运营商的直连速度差别很大，
   多摆几个来源，下载的人自己挑快的那个走。 */
.card-disks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.disk-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px 0 9px;
  border-radius: 8px;
  border: 1px solid var(--disk-c, var(--border-strong));
  background: var(--panel-2);
  color: var(--disk-c, var(--text-2));
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: all .14s;
  /* 用 button 元素是为了「先弹密码框再跳转」，把浏览器默认样式清掉 */
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
}
.disk-btn:hover {
  text-decoration: none;
  background: var(--disk-c, var(--accent));
  border-color: var(--disk-c, var(--accent));
  color: #fff;
  transform: translateY(-1px);
}
.disk-btn .disk-ico { display: inline-flex; flex: none; }
.disk-btn .disk-ico svg { width: 16px; height: 16px; display: block; }
.disk-btn:hover .disk-ico svg { stroke: #fff; }
/* 悬停时图标里用 fill 画的那几笔（阿里云盘的星星等）也要跟着变白 */
.disk-btn:hover .disk-ico svg [fill]:not([fill="none"]) { fill: #fff; }
/* 要密码的网盘按钮：右边挂一把小锁，提示点开不是直接下载 */
.disk-btn .disk-lock {
  display: inline-flex;
  flex: none;
  margin-left: 1px;
  opacity: .75;
}
.disk-btn .disk-lock svg { width: 12px; height: 12px; display: block; }
.disk-btn:hover .disk-lock { opacity: 1; }
.disk-btn:hover .disk-lock svg { stroke: #fff; }
.srv-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  background: var(--ok-soft);
  color: var(--ok);
  white-space: nowrap;
}
.srv-badge.warn { background: var(--warn-soft); color: var(--warn); }
.srv-badge.miss { background: var(--panel-3); color: var(--text-3); }
.srv-badge.busy { background: var(--info-soft); color: var(--info); }

.ver-line {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-3);
  flex-wrap: wrap;
}
.ver-line .mono { font-weight: 600; color: var(--text-2); }
.ver-arrow { color: var(--text-3); }
.ver-new { color: var(--warn); font-weight: 700; }
.ver-line .ver-key { color: var(--text-3); font-size: 11.5px; }

/* 服务器状态条（卡片内） */
.srv-line {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--text-3);
  padding-top: 1px;
}
.srv-line .mono { font-weight: 600; color: var(--text-2); }

/* ---------------- 列表视图 ---------------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.list .card {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
}
.list .card::after { inset: 0 auto 0 0; width: 3px; height: auto; }
.list .card-icon { width: 38px; height: 38px; border-radius: 10px; font-size: 14px; }
/* 头部整块固定宽度 —— 这是列表整齐的关键：
   宽度随内容变的话，「软件类型」和「简介」的起点每行都不一样、看起来就乱。
   固定后类型标签全贴在同一条竖线上，简介也从同一位置开始。 */
.list .card-top { flex: 0 0 296px; align-items: center; min-width: 0; }
.list .card-desc { min-height: 0; -webkit-line-clamp: 1; flex: 1 1 auto; max-width: none; }
.list .card-title { margin-bottom: 2px; }
.list .card-tags { margin-bottom: 4px; gap: 4px; }
.list .card-plats { gap: 5px; }
.list .plat-ico { width: 20px; height: 20px; border-radius: 6px; }
.list .plat-ico .p-icon { width: 13px; height: 13px; }
.list .ver-line { flex: none; }
.list .card-foot { border: 0; padding: 0; margin: 0; flex: none; }

/* ---------------- 详情弹窗 ---------------- */
.detail-head { display: flex; gap: 16px; align-items: flex-start; }
.detail-icon {
  width: 66px; height: 66px;
  border-radius: 16px;
  flex: none;
  background: var(--panel-3);
  border: 1px solid var(--border-2);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
}
.detail-icon img { width: 100%; height: 100%; object-fit: contain; }
.detail-head-info { flex: 1; min-width: 0; }
.detail-head-info h2 { font-size: 20px; margin-bottom: 6px; }

.detail-section { margin-top: 22px; }
.detail-section h4 {
  font-size: 12.5px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 9px;
  font-weight: 700;
}
.detail-desc {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-2);
  white-space: pre-wrap;
}

.kv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kv {
  padding: 11px 13px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--border-2);
}
.kv > span { display: block; font-size: 11px; color: var(--text-3); margin-bottom: 3px; }
.kv b { font-size: 13px; font-weight: 700; word-break: break-all; }

.link-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.link-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  transition: all .15s;
}
.link-card:hover {
  text-decoration: none;
  border-color: var(--accent-3);
  background: var(--accent-soft);
  transform: translateY(-1px);
}
.link-card .lc-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--panel-3);
  display: grid;
  place-items: center;
  flex: none;
  color: var(--text-2);
}
.link-card:hover .lc-icon { background: var(--panel); color: var(--accent); }
.link-card .lc-icon svg { width: 18px; height: 18px; }
/* 网盘类链接：图标用网盘自己的颜色，一眼能认出是哪个网盘 */
.link-card.is-disk .lc-icon { background: var(--panel-3); }
.link-card.is-disk:hover { border-color: var(--disk-hover, var(--accent-3)); }
.link-card .lc-text { min-width: 0; flex: 1; }
.link-card .lc-text b { display: block; font-size: 13px; }
.link-card .lc-text span {
  display: block;
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-card .lc-arrow { color: var(--text-3); flex: none; }
.link-card .lc-arrow svg { width: 15px; height: 15px; }
/* 详情弹窗里的网盘条目也是按钮（要密码时先弹窗），清掉浏览器默认样式 */
button.link-card {
  font-family: inherit;
  font-size: inherit;
  text-align: left;
  width: 100%;
  cursor: pointer;
}
/* 网盘图标用各自的品牌色（和卡片上的按钮一致） */
.link-card.is-disk .lc-icon { color: var(--disk-c, var(--text-2)); }
/* 条目里顺手显示密码，不用点开也知道是多少 */
.link-card .lc-pw {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  font-size: 11.5px !important;
  font-weight: 650;
  color: var(--ok) !important;
  white-space: nowrap;
}
.link-card .lc-pw svg { width: 11px; height: 11px; flex: none; }

/* ---------------- 网盘访问密码弹窗 ---------------- */
.pw-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-2);
  padding: 14px 16px;
}
.pw-box-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.pw-box-label { font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.pw-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pw-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent);
  background: var(--panel);
  border: 1px dashed var(--accent-3);
  border-radius: 8px;
  padding: 7px 16px;
  cursor: pointer;
  user-select: all;
  word-break: break-all;
}
.pw-code::selection { background: var(--accent); color: #fff; }

/* ---------------- 意见反馈弹窗 ---------------- */
.fb-lead { font-size: 13px; line-height: 1.8; color: var(--text-2); }
.fb-form-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px 16px;
  font-size: 14px;
}
.fb-or { margin-top: 14px; font-size: 12px; color: var(--text-3); text-align: center; }

/* 下载前的平台提示（服务器上只放 Windows x64 版） */
.dl-tip-rows { display: grid; gap: 8px; margin-top: 14px; }
.dl-tip-row {
  padding: 11px 13px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--border-2);
}
.dl-tip-row b { display: block; font-size: 12.5px; margin-bottom: 2px; }
.dl-tip-row span { font-size: 12.5px; color: var(--text-2); line-height: 1.65; }

.update-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--border-2);
  flex-wrap: wrap;
}
.update-box.state-outdated { background: var(--warn-soft); border-color: var(--warn); }
.update-box.state-latest   { background: var(--ok-soft);   border-color: var(--ok); }
.update-box.state-missing  { background: var(--info-soft); border-color: var(--info); }
.update-box.state-offline  { background: var(--danger-soft); border-color: var(--danger); }
.update-box .ub-actions { display: flex; gap: 7px; flex-wrap: wrap; }

/* 一键更新进度 */
.progress-line {
  width: 100%;
  height: 4px;
  margin-top: 8px;
  border-radius: 2px;
  background: var(--panel-3);
  overflow: hidden;
}
.progress-line > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  transition: width .35s ease;
}
.update-box .ub-icon { flex: none; display: grid; place-items: center; }
.update-box .ub-icon svg { width: 22px; height: 22px; }
.update-box .ub-body { flex: 1; min-width: 180px; }
.update-box .ub-body b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.update-box .ub-body span { font-size: 12px; color: var(--text-2); }
.update-box .ub-body .changelog {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-3);
  max-height: 68px;
  overflow: hidden;
  white-space: pre-wrap;
  line-height: 1.55;
}

/* ---------------- 设置弹窗 ---------------- */
/* ---------------- 结果表格（服务器面板） ---------------- */
.result-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.result-table th,
.result-table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-2);
  vertical-align: middle;
}
.result-table th {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.result-table tr:last-child td { border-bottom: 0; }
.result-table td.name { font-weight: 700; }
.result-table .mono { font-family: var(--font-mono); font-size: 12.5px; }

/* ---------------- 设置弹窗 ---------------- */
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; }
.settings-row + .settings-row { border-top: 1px solid var(--border-2); }
.settings-row .sr-text b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.settings-row .sr-text span { font-size: 12px; color: var(--text-3); }

/* ---------------- 页脚 ----------------
   注意：页脚目前在 index.html 里被「注释预留」掉（暂缓显示），
   样式保留着，取消注释后即可直接生效，勿当死代码删除。 */
.site-footer {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 26px 34px;
  color: var(--text-3);
  font-size: 12px;
  text-align: center;
}
.site-footer a { color: var(--text-2); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1060px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  /* 窄屏下改为顶部横向类型条，同样固定不随页面滚动 */
  .cat-nav {
    position: sticky;
    top: var(--header-h);
    z-index: 40;
    max-height: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 6px 16px rgba(20, 26, 48, .07);
  }
  .cat-nav-head { display: none; }
  .cat-nav-tip { display: none; }
  .cat-nav-list {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px;
    gap: 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .cat-nav-list::-webkit-scrollbar { display: none; }
  .cat-nav-item {
    width: auto;
    flex: none;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    white-space: nowrap;
  }
  .cat-nav-item.active { border-color: var(--accent); }
  /* 窄屏下类型条下方：反馈 + 点赞并排靠右 */
  .cat-nav-foot {
    padding: 0 8px 8px;
    border-top: 0;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
  }
  .cat-nav-feedback, .cat-nav-like { width: auto; }
  .like-stage { display: none; }
  .like-box { flex-direction: row; align-items: center; gap: 7px; }
  .like-bar { width: 52px; }
  .like-hint { display: none; }
  .like-grand { padding: 4px 9px; }
  .lg-label { display: none; }
  .cn-dot { display: none; }
  /* 列表视图：头部收窄一点，给简介让出空间 */
  .list .card-top { flex-basis: 232px; }
}

@media (max-width: 880px) {
  .site-header-inner { padding: 0 16px; gap: 10px; }
  .brand-text span { display: none; }
  .header-search { max-width: none; }
  .header-actions .btn-label { display: none; }
  .header-actions .btn { width: 36px; padding: 0; }
  .page { padding: 16px 16px 70px; }
  .overview { padding: 15px 16px; gap: 16px; }
  .stat { text-align: left; }
  .filter-label { width: 100%; padding-top: 0; margin-bottom: 7px; }
  .filter-row { flex-direction: column; gap: 7px; }
  .grid { grid-template-columns: 1fr; }
  .list .card { flex-wrap: wrap; }
  .list .card-top { flex: 1 1 100%; }
  .list .card-desc { flex: 1 1 100%; max-width: none; -webkit-line-clamp: 2; }
  .list .card-foot { width: 100%; }
  .site-footer { padding: 0 16px 26px; }
}
