/* 软件宝库 - 站点样式 */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f5f7fa;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #f59e0b;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6; font-size: 14px;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* 顶部 */
.topbar { background: #1e293b; color: #cbd5e1; font-size: 12px; padding: 6px 0; }
.topbar .wrap { display: flex; justify-content: space-between; }
.header { background: var(--primary); color: #fff; padding: 14px 0; }
.header .wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.logo { font-size: 22px; font-weight: 700; letter-spacing: 1px; }
.logo small { display: block; font-size: 11px; font-weight: 400; opacity: .8; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { padding: 6px 12px; border-radius: 6px; color: #dbeafe; }
.nav a:hover, .nav a.active { background: rgba(255,255,255,.18); color: #fff; }
.searchbar { display: flex; width: 280px; }
.searchbar input { flex: 1; padding: 8px 12px; border: 0; border-radius: 6px 0 0 6px; font-size: 13px; outline: none; }
.searchbar button { padding: 8px 14px; border: 0; background: #1e40af; color: #fff; border-radius: 0 6px 6px 0; cursor: pointer; font-size: 13px; }
.searchbar button:hover { background: #1e3a8a; }

/* 版块 */
.section { margin: 24px 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title h2 { font-size: 18px; border-left: 4px solid var(--primary); padding-left: 10px; }
.section-title a { color: var(--muted); font-size: 13px; }

/* 分类格子 */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow); text-align: center; }
.cat-card:hover { border-color: var(--primary); transform: translateY(-2px); transition: .15s; }
.cat-icon { width: 40px; height: 40px; margin: 0 auto 8px; border-radius: 10px; background: #dbeafe;
  color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; }
.cat-card h3 { font-size: 14px; margin-bottom: 4px; }
.cat-card p { font-size: 12px; color: var(--muted); }

/* 软件列表 */
.soft-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.soft-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow); display: flex; gap: 12px; }
.soft-card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(37,99,235,.12); }
.soft-logo { width: 46px; height: 46px; flex: none; border-radius: 10px; background: linear-gradient(135deg,#dbeafe,#bfdbfe);
  color: var(--primary-dark); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; }
.soft-meta { min-width: 0; flex: 1; }
.soft-meta h3 { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.soft-meta .desc { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; margin: 4px 0; height: 34px; }
.soft-meta .info { font-size: 11px; color: #9ca3af; }
.badge { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: #dcfce7; color: #166534; }

/* 榜单 */
.rank-list { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 16px; box-shadow: var(--shadow); }
.rank-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.rank-item:last-child { border: 0; }
.rank-num { width: 22px; height: 22px; border-radius: 5px; background: #f1f5f9; color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.rank-item:nth-child(-n+3) .rank-num { background: #fef3c7; color: #b45309; }
.rank-name { flex: 1; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-size { font-size: 11px; color: var(--muted); }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* 文章列表 */
.article-list { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 16px; }
.article-item { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.article-item:last-child { border: 0; }
.article-item h4 { font-size: 13px; font-weight: 500; }
.article-item p { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 广告位 */
.ad-slot { border: 1px dashed #cbd5e1; background: #f8fafc; border-radius: 8px; text-align: center;
  padding: 14px; color: #94a3b8; font-size: 12px; margin: 16px 0; }
.ad-slot.live { border: 0; background: none; padding: 0; }

/* 详情页 */
.crumb { font-size: 12px; color: var(--muted); margin: 16px 0; }
.detail-head { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; gap: 18px; box-shadow: var(--shadow); }
.detail-logo { width: 80px; height: 80px; flex: none; border-radius: 16px; background: linear-gradient(135deg,#dbeafe,#bfdbfe);
  color: var(--primary-dark); display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 700; }
.detail-info h1 { font-size: 22px; margin-bottom: 6px; }
.detail-info .sub { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.tags span { display: inline-block; font-size: 11px; background: #f1f5f9; color: #475569;
  padding: 2px 8px; border-radius: 12px; margin-right: 6px; }
.btn-download { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px;
  background: var(--primary); color: #fff; padding: 10px 28px; border-radius: 8px; font-size: 15px; font-weight: 500; }
.btn-download:hover { background: var(--primary-dark); color: #fff; }
.download-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.detail-body { display: grid; grid-template-columns: 1fr 300px; gap: 16px; margin-top: 16px; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.panel h2 { font-size: 16px; margin-bottom: 12px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.panel p { color: #374151; margin-bottom: 10px; }
.panel ul { padding-left: 20px; color: #374151; }
.panel li { margin: 4px 0; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.spec-table td { padding: 8px 6px; border-bottom: 1px solid var(--border); }
.spec-table td:first-child { color: var(--muted); width: 80px; }
.cps-card { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 12px; margin-top: 12px; font-size: 13px; }
.cps-card a { color: #b45309; font-weight: 500; }

/* 搜索页 */
.search-results { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 16px; }
.search-result { padding: 12px 0; border-bottom: 1px dashed var(--border); }
.search-result:last-child { border: 0; }
.search-result h3 { font-size: 15px; }
.search-result p { font-size: 12px; color: var(--muted); margin: 4px 0; }

/* 页脚 */
.footer { background: #1e293b; color: #94a3b8; padding: 28px 0; margin-top: 40px; font-size: 12px; }
.footer a { color: #cbd5e1; }
.footer .links { margin-bottom: 12px; }
.footer .links a { margin-right: 16px; }

@media (max-width: 900px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .soft-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-body, .cols-2 { grid-template-columns: 1fr; }
  .searchbar { width: 100%; }
}
@media (max-width: 560px) {
  .cat-grid, .soft-grid { grid-template-columns: 1fr; }
}
