/* ============================================
   软件库 —— 现代清爽风格（功能对齐 Pc404）
   ============================================ */
:root {
  --bg: #eef1f6;
  --card: #ffffff;
  --text: #1e2230;
  --sub: #8a90a0;
  --brand: #4f6ef7;
  --brand-deep: #3b54e0;
  --brand-soft: #eef1ff;
  --accent: #ff7a45;
  --border: #e8ebf1;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(30,34,48,.04);
  --shadow-md: 0 8px 24px rgba(30,34,48,.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
.container { max-width: 1220px; margin: 0 auto; padding: 0 20px; }

/* ============ 公告条 ============ */
.tip-banner {
  background: linear-gradient(90deg, #4f6ef7, #7b8cff);
  color: #fff;
  text-align: center;
  padding: 9px 16px;
  font-size: 13px;
  position: relative;
}
.tip-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  opacity: .85;
}
.tip-close:hover { opacity: 1; }

/* ============ 顶栏 ============ */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.topbar-brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #4f6ef7, #7b8cff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}
.brand-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .3px;
  color: var(--brand);
  white-space: nowrap;
}
.brand-sep {
  color: var(--sub);
  font-size: 18px;
  margin: 0 2px;
  opacity: .6;
}
.brand-desc { font-size: 13px; color: var(--sub); white-space: nowrap; }

.topbar-nav { display: flex; gap: 6px; }
.nav-btn {
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sub);
  transition: all .2s;
}
.nav-btn:hover { color: var(--brand); background: var(--brand-soft); }
.nav-btn.active { color: #fff; background: var(--brand); }

/* ============ 主卡片 ============ */
.main-card {
  background: var(--card);
  border-radius: var(--radius);
  margin: 22px auto 28px;
  padding: 28px 30px 32px;
  box-shadow: var(--shadow-md);
}

/* ============ 搜索框 ============ */
.search-row { display: flex; justify-content: center; margin-bottom: 26px; }
.search {
  position: relative;
  width: 100%;
  max-width: 620px;
}
.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 19px;
  height: 19px;
  color: #b4bac8;
}
.search-input {
  width: 100%;
  padding: 14px 48px;
  font-size: 15px;
  border: 2px solid transparent;
  border-radius: 14px;
  outline: none;
  background: #f3f5f9;
  transition: all .2s;
}
.search-input:focus {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(79,110,247,.12);
}
.search-clear {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #c0c4cc;
  font-size: 18px;
  display: none;
}
.search-clear:hover { color: var(--text); }

/* ============ 主体布局 ============ */
.body-layout { display: flex; gap: 26px; }

/* 左侧分类 */
.sidebar { width: 168px; flex-shrink: 0; }
.cat-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: sticky;
  top: 88px;
}
.cat-item {
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  color: #5a6070;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}
.cat-item:hover { color: var(--brand); background: var(--brand-soft); }
.cat-item.active {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 600;
}

/* 右侧网格 */
.grid-area { flex: 1; min-width: 0; }
.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 16px;
}
.grid-item {
  background: #fff;
  border-radius: 14px;
  padding: 20px 10px 16px;
  text-align: center;
  cursor: pointer;
  transition: all .22s;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
}
.grid-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  width: 100%;
}
.grid-item:hover {
  box-shadow: 0 10px 26px rgba(30,34,48,.10);
  transform: translateY(-4px);
  border-color: transparent;
}
.grid-icon {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .5px;
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
  overflow: hidden;
}
.grid-icon img,
.software-icon-large img,
.version-icon-horizontal img,
.related-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}
.grid-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

/* ============ 详情页 ============ */
.page-wrapper { padding: 8px 0 32px; }
.breadcrumb { font-size: 13px; color: var(--sub); padding: 14px 0; }
.breadcrumb a { color: var(--brand); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 6px; color: #c0c4cc; }

.software-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 34px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.software-head { display: flex; gap: 26px; align-items: flex-start; }
.software-icon-large {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0,0,0,.14);
  overflow: hidden;
}
.software-title { font-size: 25px; font-weight: 700; margin-bottom: 10px; }
.software-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.software-tags span {
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 500;
}
.software-meta-inline { font-size: 13px; color: var(--sub); display: flex; gap: 18px; flex-wrap: wrap; }

.software-desc { margin-top: 22px; color: #3a4150; font-size: 15px; }
.desc-brief { overflow: hidden; }
.desc-full { display: none; }
.toggle-desc-btn {
  background: none;
  border: none;
  color: var(--brand);
  font-size: 14px;
  cursor: pointer;
  margin-top: 12px;
  padding: 0;
  font-weight: 500;
}
.toggle-desc-btn:hover { text-decoration: underline; }

.card-section { margin-top: 30px; }
.card-section-title {
  font-size: 17px;
  font-weight: 700;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding-left: 14px;
}
.card-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 14px;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, #4f6ef7, #7b8cff);
}
.version-list { display: flex; flex-direction: column; gap: 12px; }
.version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: all .22s;
  background: linear-gradient(135deg, #fbfcff, #ffffff);
}
.version-row:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(79,110,247,.1);
  transform: translateX(3px);
}
.version-info-col { display: flex; align-items: center; gap: 12px; min-width: 0; }
.version-icon-horizontal {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,.14);
  overflow: hidden;
}
.version-details { display: flex; flex-direction: column; }
.version-softname { font-size: 15px; font-weight: 600; }
.version-badge {
  font-size: 12px;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 500;
  white-space: nowrap;
}
.version-btns-col { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .22s;
  border: 1px solid transparent;
  color: #fff;
  letter-spacing: .2px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(30,34,48,.08);
}
.download-btn .btn-icon { font-size: 15px; line-height: 1; }
.download-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(30,34,48,.16); }
.download-btn:active { transform: translateY(0); }
/* 渐变高光扫过效果 */
.download-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.35), transparent);
  transition: left .5s;
}
.download-btn:hover::after { left: 120%; }

/* 品牌配色 */
.download-btn.brand-quark {
  background: linear-gradient(135deg, #2f7bff, #4d9bff);
  box-shadow: 0 4px 14px rgba(47,123,255,.32);
}
.download-btn.brand-quark:hover { box-shadow: 0 8px 22px rgba(47,123,255,.42); }
.download-btn.brand-baidu {
  background: linear-gradient(135deg, #2f6bff, #3f7dff);
  box-shadow: 0 4px 14px rgba(47,107,255,.3);
}
.download-btn.brand-baidu:hover { box-shadow: 0 8px 22px rgba(47,107,255,.4); }
.download-btn.brand-xunlei {
  background: linear-gradient(135deg, #1e80ff, #3d9bff);
  box-shadow: 0 4px 14px rgba(30,128,255,.3);
}
.download-btn.brand-xunlei:hover { box-shadow: 0 8px 22px rgba(30,128,255,.4); }
.download-btn.brand-lanzou {
  background: linear-gradient(135deg, #00a1e0, #00b9f1);
  box-shadow: 0 4px 14px rgba(0,161,224,.3);
}
.download-btn.brand-lanzou:hover { box-shadow: 0 8px 22px rgba(0,161,224,.4); }
.download-btn.brand-ali {
  background: linear-gradient(135deg, #ff6a00, #ff8a2a);
  box-shadow: 0 4px 14px rgba(255,106,0,.3);
}
.download-btn.brand-ali:hover { box-shadow: 0 8px 22px rgba(255,106,0,.4); }
.download-btn.brand-189 {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 4px 14px rgba(22,163,74,.3);
}
.download-btn.brand-189:hover { box-shadow: 0 8px 22px rgba(22,163,74,.4); }
.download-btn.brand-ct {
  background: linear-gradient(135deg, #7c3aed, #8b5cf6);
  box-shadow: 0 4px 14px rgba(124,58,237,.3);
}
.download-btn.brand-ct:hover { box-shadow: 0 8px 22px rgba(124,58,237,.4); }
.download-btn.brand-tutorial {
  background: linear-gradient(135deg, #64748b, #94a3b8);
  box-shadow: 0 4px 14px rgba(100,116,139,.3);
}
.download-btn.brand-tutorial:hover { box-shadow: 0 8px 22px rgba(100,116,139,.4); }
.download-btn.brand-official {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  box-shadow: 0 4px 14px rgba(245,158,11,.3);
}
.download-btn.brand-official:hover { box-shadow: 0 8px 22px rgba(245,158,11,.4); }
.download-btn.brand-default {
  background: linear-gradient(135deg, #4f6ef7, #6d83ff);
  box-shadow: 0 4px 14px rgba(79,110,247,.3);
}
.download-btn.brand-default:hover { box-shadow: 0 8px 22px rgba(79,110,247,.4); }

/* 兼容旧颜色类（若有旧数据残留） */
.download-btn.xunlei { background: linear-gradient(135deg, #1e80ff, #3d9bff); color: #fff; }
.download-btn.kuake { background: #fff; color: var(--text); border-color: var(--border); }
.download-btn.tutorial { background: #fff; color: var(--text); border-color: var(--border); }
.download-btn.blue { background: linear-gradient(135deg, #16a34a, #22c55e); color: #fff; }
.download-btn.purple { background: linear-gradient(135deg, #7c3aed, #8b5cf6); color: #fff; }

/* ============ 详情页两栏布局 ============ */
.detail-layout { display: flex; gap: 22px; align-items: flex-start; }
.detail-main { flex: 1; min-width: 0; }
.detail-side { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 88px; }

/* 分享按钮 */
.share-btn {
  margin-left: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f6ef7, #6d83ff);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}
.share-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(79,110,247,.3); }

/* 分享弹窗 */
.share-link-box { display: flex; gap: 8px; }
.share-link-box input {
  flex: 1;
  border: 1px solid #e0e4ee;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: #4a5060;
  background: #f7f8fb;
  outline: none;
}

/* 侧边栏卡片 */
.side-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.side-card-title { font-size: 15px; font-weight: 700; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }

/* 收藏卡片 */
.collect-card { text-align: center; background: linear-gradient(135deg, #eef1ff, #fff); }
.collect-icon { font-size: 34px; margin-bottom: 6px; }
.collect-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.collect-desc { font-size: 13px; color: var(--sub); margin-bottom: 14px; line-height: 1.5; }
.collect-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 20px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff7a45, #ff9a45);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.collect-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255,122,69,.35); }

/* 常见问题 */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { padding: 10px 12px; background: #f7f8fb; border-radius: 9px; cursor: pointer; transition: all .18s; }
.faq-item:hover { background: #eef1ff; }
.faq-q { font-size: 13px; color: #4a5060; line-height: 1.5; }

/* 相关软件 */
.related-list { display: flex; flex-direction: column; gap: 8px; }
.related-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 9px;
  transition: all .18s;
}
.related-item:hover { background: var(--brand-soft); }
.related-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.related-name { font-size: 13px; color: var(--text); line-height: 1.4; }

/* 响应式：详情页侧栏下沉 */
@media (max-width: 900px) {
  .detail-layout { flex-direction: column; }
  .detail-side { width: 100%; position: static; }
}


/* ============ 悬浮按钮 ============ */
.float-btn {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f6ef7, #7b8cff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(79,110,247,.4);
  z-index: 200;
  transition: transform .2s;
}
.float-btn:hover { transform: scale(1.1); }

/* ============ 空状态 ============ */
.empty { text-align: center; padding: 70px 0; color: var(--sub); }
.empty .emoji { font-size: 52px; margin-bottom: 14px; }

/* ============ 页脚 ============ */
.footer {
  padding: 26px 0 36px;
  text-align: center;
  color: var(--sub);
  font-size: 13px;
}
.footer a { color: var(--brand); }
.footer .powered { margin-bottom: 6px; color: #a0a6b4; }

/* ============ 响应式 ============ */
@media (max-width: 720px) {
  .body-layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .cat-list { flex-direction: row; flex-wrap: wrap; position: static; }
  .software-head { flex-direction: column; align-items: center; text-align: center; }
  .software-tags, .software-meta-inline { justify-content: center; }
  .version-row { flex-direction: column; gap: 12px; align-items: flex-start; }
  .brand-desc { display: none; }
}

/* ============ 前台内嵌编辑模式 ============ */
/* 卡片编辑按钮 */
.grid-item { position: relative; }
.edit-tag {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(79,110,247,.92);
  color: #fff;
  font-size: 13px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  line-height: 1;
}
.edit-tag:hover { background: #3b54e0; }
body.edit-mode .edit-tag { display: flex; }

/* 卡片删除按钮 */
.del-tag {
  position: absolute;
  top: 6px;
  right: 32px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(220,38,38,.92);
  color: #fff;
  font-size: 13px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  line-height: 1;
}
.del-tag:hover { background: #b91c1c; }
body.edit-mode .del-tag { display: flex; }

/* 顶栏编辑开关 */
.edit-toggle {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #e0e4ee;
  border-radius: 9px;
  background: #fff;
  color: #4a5060;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.edit-toggle:hover { border-color: #4f6ef7; color: #4f6ef7; }
.edit-toggle.active {
  background: linear-gradient(135deg,#4f6ef7,#6d83ff);
  border-color: transparent;
  color: #fff;
}

/* 编辑弹窗（复用 admin 表单样式） */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(20,24,40,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 70px rgba(30,34,48,.3);
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #eef0f5;
  font-size: 17px;
  font-weight: 700;
  color: #1e2230;
}
.modal-close { background: none; border: none; font-size: 26px; cursor: pointer; color: #8a90a0; line-height: 1; }
.modal-close:hover { color: #1e2230; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid #eef0f5; }

.form-row { margin-bottom: 15px; }
.form-row > label { display: block; font-size: 13px; font-weight: 600; color: #4a5060; margin-bottom: 6px; }
.form-row input[type="text"], .form-row input[type="number"], .form-row input[type="date"],
.form-row input[type="password"], .form-row select, .form-row textarea {
  width: 100%;
  border: 1px solid #e0e4ee;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  transition: border .15s, box-shadow .15s;
  background: #fff;
  font-family: inherit;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: #4f6ef7;
  box-shadow: 0 0 0 3px rgba(79,110,247,.12);
}
.form-row textarea { resize: vertical; line-height: 1.6; }
.form-row-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-tip { font-size: 12px; color: #b0b6c4; margin-top: 4px; }

.btn-primary {
  height: 42px;
  padding: 0 20px;
  border: none;
  border-radius: 11px;
  background: linear-gradient(135deg,#4f6ef7,#6d83ff);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(79,110,247,.3); }
.btn-ghost {
  height: 42px;
  padding: 0 18px;
  border: 1px solid #e0e4ee;
  border-radius: 11px;
  background: #fff;
  color: #4a5060;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-ghost:hover { border-color: #4f6ef7; color: #4f6ef7; }
.btn-danger {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #fecaca;
  border-radius: 9px;
  background: #fff;
  color: #dc2626;
  font-size: 13px;
  cursor: pointer;
}
.btn-danger:hover { background: #fef2f2; }

/* 图标编辑 */
.icon-edit-row { display: flex; gap: 16px; align-items: flex-start; }
.icon-preview {
  width: 72px; height: 72px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 22px; flex-shrink: 0; overflow: hidden;
}
.icon-preview img { width: 100%; height: 100%; object-fit: cover; }
.icon-edit-fields { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.icon-upload-row { display: flex; align-items: center; gap: 10px; }
.upload-url { font-size: 12px; color: #8a90a0; }

/* 版本编辑器 */
.versions-editor { display: flex; flex-direction: column; gap: 8px; }
.version-edit-row { display: flex; align-items: center; gap: 8px; }
.version-edit-row input {
  flex: 1; border: 1px solid #e0e4ee; border-radius: 9px; padding: 8px 10px; font-size: 13px; outline: none;
}
.version-edit-row input:focus { border-color: #4f6ef7; }

/* 版本块（每个版本独立 + 按钮可增删） */
.version-block {
  border: 1px solid #e0e4ee;
  border-radius: 11px;
  padding: 12px;
  background: #fafbfe;
}
.version-block-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.version-v-input {
  flex: 1;
  border: 1px solid #e0e4ee;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
  font-weight: 600;
}
.version-v-input:focus { border-color: #4f6ef7; }
.version-btns-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.version-btn-pair {
  display: flex;
  align-items: center;
  gap: 6px;
}
.version-btn-pair input {
  flex: 1;
  border: 1px solid #e0e4ee;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 13px;
  outline: none;
}
.version-btn-pair input:focus { border-color: #4f6ef7; }
.version-btn-pair input[data-f="text"] { flex: 0 0 38%; }
.version-btn-pair input[data-f="url"] { flex: 1; }
.version-btn-pair select { font-family: inherit; }
.qr-fields { margin-top: -2px; }
.qr-fields input { background: #fffdf5; }

/* 二维码下载弹窗 */
.qr-img-wrap {
  display: inline-block;
  padding: 12px;
  border: 1px solid #e8ebf1;
  border-radius: 12px;
  background: #fff;
}
.qr-benefit {
  display: inline-block;
  margin-top: 14px;
  padding: 8px 18px;
  background: #fff7e6;
  color: #d97706;
  font-size: 13px;
  border-radius: 20px;
  font-weight: 500;
}

/* 新增软件按钮 */
.add-soft-btn { margin-bottom: 14px; }

/* 登录解锁弹窗 */
.login-msg { font-size: 13px; color: #e74c3c; margin-top: 10px; min-height: 18px; }

/* ============ 分类管理（编辑模式） ============ */
.cat-item { position: relative; }
.cat-drag-handle {
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #aab0c0;
  cursor: grab;
  user-select: none;
  line-height: 1;
}
body.edit-mode .cat-drag-handle { display: flex; }
.cat-drag-handle:hover { color: #4f6ef7; }
body.edit-mode .cat-item[draggable='true'] { padding-left: 24px; cursor: grab; }
.cat-item.cat-dragging { opacity: .45; }
.cat-item.cat-drag-over {
  border-top: 2px solid #4f6ef7;
  padding-top: 8px;
}
.cat-edit-tools {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  gap: 4px;
}
body.edit-mode .cat-edit-tools { display: flex; }
.cat-mini-btn {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 5px;
  background: #eef1ff;
  color: #4f6ef7;
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-mini-btn:hover { background: #4f6ef7; color: #fff; }
.cat-mini-del { background: #fef2f2; color: #dc2626; }
.cat-mini-del:hover { background: #dc2626; color: #fff; }

.cat-add-btn {
  margin-top: 10px;
  padding: 10px 16px;
  border: 1px dashed #c5ccf0;
  border-radius: 10px;
  color: #4f6ef7;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  transition: all .18s;
}
.cat-add-btn:hover { background: #eef1ff; border-color: #4f6ef7; }

/* ============ 站点设置弹窗 ============ */
.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #eef0f5;
}
.setting-title { font-size: 14px; font-weight: 600; color: #1e2230; }
.setting-desc { font-size: 12px; color: #8a90a0; margin-top: 2px; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d3d8e2;
  border-radius: 26px;
  transition: .2s;
}
.slider:before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}
.switch input:checked + .slider { background: #4f6ef7; }
.switch input:checked + .slider:before { transform: translateX(20px); }
