/* ==========================================================================
 * software.css
 * 用途：软件下载页（software.html）专用样式。原为页面内联 <style>，此处抽离为
 *       独立文件。包含全局重置与变量、布局骨架、侧边栏目录、主区顶栏与内容、
 *       分类与区块标题、卡片网格与卡片（含图标图片、徽标、元信息）、
 *       移动端抽屉/遮罩、响应式媒体查询、页脚、自定义光标。
 * 引用页面：software.html
 * 说明：本文件由页面内联样式规范化拆行并补充注释，样式内容保持零改动；
 *       因文件位置由站点根目录移至 css/ 目录，光标资源的 url() 已由
 *       url(images/...) 改写为 url(../images/...)。
 * ========================================================================== */

/* ---------- 全局重置与变量 ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

:root {
  --blue: #0077ff;
  --blue-2: #1a86ff;
  --blue-deep: #005fd0;
  --bg: #ffffff;
  --border: #eceef1;
  --text: #1f2937;
  --text-2: #4b5563;
  --text-3: #9aa0aa;
  --font: Inter, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif
}

html {
  scroll-behavior: smooth
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px
}

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

/* ---------- 布局骨架（左侧目录 + 右侧主区） ---------- */
.layout {
  display: flex;
  min-height: 100vh;
  max-width: 1224px;
  margin: 0 auto
}

.sidebar {
  width: 224px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 22px 14px;
  z-index: 90
}

.side-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--blue);
  padding: 4px 12px 14px
}

.side-title .lines {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  color: var(--blue)
}

.side-title .lines i {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 1px
}

.side-menu {
  list-style: none
}

.side-menu li {
  margin-bottom: 4px
}

.side-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: #4a4f58;
  transition: all .15s;
  line-height: 1.4
}

.side-menu a .ico {
  width: 18px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0
}

.side-menu a:hover {
  color: var(--blue);
  background: #f0f6ff
}

.side-menu a.active {
  background: #eef5ff;
  color: var(--blue);
  font-weight: 600
}

.side-menu a.active:hover {
  color: #fff;
  background: var(--blue)
}

/* ---------- 主区（顶栏 + 内容） ---------- */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column
}

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  height: 54px
}

.topbar a {
  padding: 6px 14px;
  font-size: 14px;
  color: var(--text-2);
  border-radius: 6px;
  transition: all .15s
}

.topbar a:hover {
  color: var(--blue);
  background: #f0f6ff
}

.topbar a.active {
  color: var(--blue);
  font-weight: 600
}

.content {
  flex: 1;
  padding: 30px 32px 56px;
  max-width: 100%;
  width: 100%
}

.page-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 800;
  color: var(--blue-deep);
  margin-bottom: 20px
}

.page-title .tico {
  font-size: 22px;
  line-height: 1
}

.page-desc {
  color: var(--text-2);
  font-size: .9rem;
  margin-bottom: 28px
}

/* ---------- 分类与区块标题 ---------- */
.cat {
  margin-bottom: 32px
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  color: #2b2f36;
  margin-bottom: 16px;
  padding-left: 10px;
  border-left: 4px solid var(--blue)
}

.section-title .count {
  font-size: .8rem;
  color: var(--text-3);
  font-weight: 400
}

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

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, border-color .2s
}

.card:hover {
  border-color: #bcd7f8;
  box-shadow: 0 2px 10px rgba(0, 119, 255, .06)
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px
}

.card-head .ic {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
  overflow: hidden
}

.card-head .ic img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  padding: 4px
}

.card-head .name {
  font-size: 16px;
  font-weight: 700;
  color: #2b2f36;
  flex: 1;
  line-height: 1.3
}

/* ---------- 徽标 ---------- */
.badge {
  font-size: .7rem;
  font-weight: 600;
  padding: 1px 9px;
  border-radius: 999px;
  white-space: nowrap
}

.badge.free {
  color: #15803d;
  background: #e8f8ee;
  border: 1px solid #bfe6ce
}

.badge.paid {
  color: #b91c1c;
  background: #fdecec;
  border: 1px solid #f3c1c1
}

.badge.ad {
  color: #8b5a00;
  background: #fff7e0;
  border: 1px solid #ffd591
}

/* ---------- 卡片内容（描述、特性、列表、元信息） ---------- */
.card-desc {
  color: var(--text-2);
  font-size: .84rem;
  margin-bottom: 14px
}

.card-feat {
  font-size: .82rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px
}

.card ul {
  list-style: disc;
  padding-left: 18px;
  margin-bottom: 16px;
  color: #5a606a;
  font-size: .82rem;
  flex-grow: 1
}

.card ul li {
  margin-bottom: 3px
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--text-3);
  font-size: .78rem;
  margin-bottom: 14px;
  flex-grow: 1
}

.card-meta b {
  font-weight: 600;
  color: var(--text-2)
}

/* ---------- 卡片按钮 ---------- */
.card-btn {
  background: var(--blue);
  color: #fff;
  padding: 8px 0;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 500;
  text-align: center;
  transition: background .2s;
  display: block
}

.card-btn:hover {
  background: var(--blue-2)
}

/* ---------- 移动端抽屉按钮与遮罩 ---------- */
.top-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-2);
  cursor: url(../images/cursor-hand.png) 13 6, pointer;
  flex-shrink: 0;
  margin-right: auto
}

.top-toggle:hover {
  color: var(--blue);
  border-color: var(--blue)
}

.moverlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .42);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s;
  z-index: 200
}

body.drawer-open {
  overflow: hidden
}

/* ---------- 响应式媒体查询 ---------- */
@media (min-width: 861px) and (max-width: 1080px) {
  .content {
    padding: 26px 24px 52px
  }
}

@media (max-width: 480px) {
  .content {
    padding: 16px 12px 40px
  }

  .grid {
    gap: 14px
  }
}

/* ---------- 抽屉遮罩激活状态 ---------- */
body.drawer-open .moverlay {
  opacity: 1;
  visibility: visible
}

@media (max-width: 860px) {
  .layout {
    padding-left: 0
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(80vw, 260px);
    height: 100vh;
    border-radius: 0;
    border-right: 1px solid var(--border);
    box-shadow: 0 0 30px rgba(0, 0, 0, .2);
    transform: translateX(-110%);
    transition: transform .28s ease;
    z-index: 300
  }

  body.drawer-open .sidebar {
    transform: translateX(0)
  }

  .topbar-inner {
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0 12px
  }

  .top-toggle {
    display: inline-flex
  }

  .content {
    padding: 20px 16px 44px
  }

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

/* ---------- 页脚 ---------- */
.site-foot {
  border-top: 1px solid var(--border);
  padding: 20px 16px 36px;
  text-align: center;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.8;
  background: #fff
}

.site-foot a {
  color: var(--blue);
  text-decoration: none
}

.site-foot a:hover {
  text-decoration: underline
}

/* ---------- 顶栏 Logo ---------- */
.tb-logo {
  margin-right: auto;
  display: flex;
  align-items: center;
  flex-shrink: 0
}

.tb-logo img {
  display: block;
  height: 26px;
  width: auto;
  border-radius: 4px
}

/* ---------- 自定义光标（Circle Flat2 · Purple Light） ---------- */
html, body {
  cursor: url(../images/cursor-arrow.png) 8 1, auto
}

a, button, input, select, textarea, label {
  cursor: url(../images/cursor-hand.png) 13 6, pointer
}