/* 极简响应式样式库 */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text-main: #0f172a;
  --text-sub: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --radius: 8px;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-stack);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* 顶部极简导航 */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo a {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-box {
  flex: 1;
  max-width: 400px;
}

.search-form {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 0.9rem;
  outline: none;
}

.search-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 16px;
  font-size: 0.85rem;
  cursor: pointer;
}

/* 主内容布局（PC 双栏） */
.main-wrapper {
  max-width: 1100px;
  margin: 20px auto;
  padding: 0 16px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
}

/* 分类标签横向栏 */
.category-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.cat-pill {
  display: inline-block;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-sub);
  transition: all 0.15s ease;
}

.cat-pill:hover, .cat-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* 面包屑导航（SEO 核心） */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.breadcrumb a {
  color: var(--text-sub);
}
.breadcrumb a:hover {
  color: var(--primary);
}

/* 软件列表卡片 */
.soft-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.soft-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s;
}

.soft-item:hover {
  border-color: var(--primary);
}

.soft-main {
  flex: 1;
}

.soft-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.soft-title a:hover {
  color: var(--primary);
}

.soft-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.badge {
  background: #eff6ff;
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.soft-desc {
  font-size: 0.85rem;
  color: var(--text-sub);
  line-height: 1.5;
}

.btn-download-sm {
  background: var(--primary);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.btn-download-sm:hover {
  background: var(--primary-hover);
}

/* 分页器 */
.pagination {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.page-btn {
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-sub);
}

.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* 详情页专用样式 */
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.detail-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.detail-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  background: var(--bg);
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 0.88rem;
}

.spec-item strong {
  color: var(--text-sub);
  font-weight: 500;
}

.section-block {
  margin-top: 24px;
}

.section-block h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 3px solid var(--primary);
}

.content-text {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-main);
  white-space: pre-line;
}

.review-box {
  background: #f1f5f9;
  border-left: 4px solid #64748b;
  padding: 12px 16px;
  border-radius: 0 6px 6px 0;
  font-size: 0.9rem;
  color: var(--text-sub);
  font-style: italic;
}

.download-zone {
  margin-top: 30px;
  background: #eff6ff;
  border: 1px dashed var(--primary);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.download-link-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 12px 32px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.download-link-btn:hover {
  background: var(--primary-hover);
}

.extract-code {
  font-size: 0.9rem;
  color: var(--text-sub);
}

.extract-code mark {
  background: #fef08a;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}

/* 侧边栏卡片 */
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.sidebar-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-item a {
  font-size: 0.88rem;
  color: var(--text-sub);
  display: flex;
  justify-content: space-between;
}

.sidebar-item a:hover {
  color: var(--primary);
}

/* 底部声明 */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 20px 16px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--text-sub);
  margin: 0 8px;
}

/* 移动端响应式断点（核心自适应） */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 14px;
  }

  .logo a {
    justify-content: center;
  }

  .search-box {
    display: block;
    max-width: 100%;
    width: 100%;
  }

  .search-form {
    height: 42px;
    background: #fff;
    border: 1px solid #cbd5e1;
  }

  .search-input {
    font-size: 0.95rem;
    padding: 8px 12px;
  }

  .search-btn {
    padding: 0 18px;
    font-size: 0.95rem;
    font-weight: 500;
  }

  .main-wrapper {
    grid-template-columns: 1fr;
    margin: 12px auto;
  }

  .soft-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-download-sm {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    font-size: 0.92rem;
  }

  .specs-grid {
    grid-template-columns: 1fr;
  }

  .download-link-btn {
    width: 100%;
    padding: 14px 0;
  }
}
