/* ============================================
   三图教育 · 软件下载中心
   Apple 官网风格 · 高级排版
   2026-08-12 v2：间距优化 / 说明置顶 / 类目压缩 / 版本详情页 / 导航下拉
   ============================================ */

:root {
  --bg: #ffffff;
  --bg-gray: #f5f5f7;
  --bg-dark: #000000;
  --text: #1d1d1f;
  --text-sub: #86868b;
  --link: #0071e3;
  --link-hover: #0077ed;
  --orange: #ff6b00;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow-card: 0 8px 28px rgba(0,0,0,.08);
  --shadow-card-hover: 0 16px 48px rgba(0,0,0,.14);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text",
    "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;               /* v2: 1.55 → 1.75，文字透气 */
  -webkit-font-smoothing: antialiased;
  letter-spacing: .015em;          /* v2: 字间距微增 */
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ============ 毛玻璃导航（下拉菜单） ============ */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.topbar-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; justify-content: space-between; align-items: center;
}

.logo { display: flex; align-items: center; gap: 10px; }

.logo-mark {
  width: 30px; height: 30px;
  background: var(--text);
  color: #fff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  letter-spacing: 0;
}

.logo-text { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.logo-img { height: 30px; width: auto; display: block; border-radius: 8px; }
.footer-logo-img { height: 30px; width: auto; display: block; border-radius: 8px; }


/* 下拉菜单 */
.dropdown { position: relative; }

.dropbtn {
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,.05);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 980px;
  padding: 8px 18px;
  font-size: 14px; font-weight: 500;
  font-family: inherit; color: var(--text);
  cursor: pointer;
  transition: background .2s, box-shadow .2s;
}
.dropbtn:hover { background: rgba(0,0,0,.08); }
.dropbtn .caret { font-size: 10px; color: var(--text-sub); transition: transform .2s; }
.dropdown.open .caret { transform: rotate(180deg); }

.dropdown-content {
  display: none;
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 220px;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 18px;
  box-shadow: var(--shadow-card-hover);
  padding: 8px;
  z-index: 200;
  animation: dropIn .18s ease;
}
.dropdown.open .dropdown-content { display: block; }

.dropdown-content a {
  display: block;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  transition: background .15s, color .15s;
}
.dropdown-content a:hover { background: rgba(0,0,0,.06); color: var(--link); }
.dropdown-content .dd-title {
  padding: 6px 14px 4px;
  font-size: 11px; font-weight: 600;
  color: var(--text-sub);
  letter-spacing: .06em;
}
.dropdown-content .dd-sep { height: 1px; background: rgba(0,0,0,.06); margin: 6px 10px; }

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ Hero ============ */
.hero {
  text-align: center;
  padding: 96px 24px 64px;         /* v2: 略收，给说明区让位 */
}

.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
}

.gradient-text {
  background: linear-gradient(120deg, #1d1d1f 0%, #ff6b00 60%, #0071e3 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  margin-top: 22px;
  font-size: clamp(16px, 2vw, 21px);
  color: var(--text-sub);
  max-width: 640px;
  margin-left: auto; margin-right: auto;
  line-height: 1.75;
}

.hero-btn {
  display: inline-block;
  margin-top: 36px;
  background: var(--link); color: #fff;
  font-size: 16px; font-weight: 500;
  padding: 12px 32px; border-radius: 980px;
  transition: background .2s, transform .2s;
}
.hero-btn:hover { background: var(--link-hover); transform: translateY(-1px); }

/* ============ 分区标题 ============ */
.section-title {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
  text-align: center;
}

.section-sub {
  margin-top: 10px;
  font-size: 17px; color: var(--text-sub);
  line-height: 1.7;
  text-align: center;
}

/* ============ 使用说明（v2：置顶，紧跟 Hero） ============ */
.usage-section {
  background: var(--bg-gray);
  padding: 52px 24px 56px;
}

.usage-steps {
  max-width: 1000px; margin: 36px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.step {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 30px 28px;
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }

.step-num {
  width: 46px; height: 46px;
  margin: 0 auto 18px;
  background: var(--text); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
}

.step h3 { font-size: 19px; font-weight: 600; letter-spacing: .01em; }
.step p { margin-top: 10px; font-size: 14.5px; color: var(--text-sub); line-height: 1.75; }

/* ============ 类目卡片（v2：压扁紧凑） ============ */
.categories { max-width: 1200px; margin: 0 auto; padding: 40px 24px 70px; }

.cat-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));  /* v2: 320→230 */
  gap: 18px;                                                      /* v2: 24→18 */
}

.cat-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-gray);
  aspect-ratio: 16 / 10;          /* v2: 4/3 → 16/10 更扁 */
  display: flex; align-items: flex-end;
  transition: transform .35s ease, box-shadow .35s ease;
}

.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); }

.cat-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.cat-card:hover img { transform: scale(1.05); }

.cat-card .overlay {
  position: relative; z-index: 2;
  width: 100%;
  padding: 18px 20px 16px;         /* v2: 26px 24px → 收 */
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.78) 62%);
  color: #fff;
}

.cat-card .cat-name { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.cat-card .cat-desc { margin-top: 3px; font-size: 13px; opacity: .88; line-height: 1.55; }
.cat-card .cat-count {
  margin-top: 8px; display: inline-block;
  font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(8px);
  padding: 4px 12px; border-radius: 980px;
}

/* ============ 页脚 ============ */
.footer {
  background: var(--bg-gray);
  border-top: 1px solid rgba(0,0,0,.08);
  padding: 40px 24px 48px;
}

.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}

.footer-brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }

.footer-note { font-size: 13px; color: var(--text-sub); line-height: 1.7; }
.footer-note a { color: var(--text-sub); text-decoration: none; }
.footer-note a:hover { text-decoration: underline; }

/* ============ 类目详情页 ============ */
.cat-hero {
  text-align: center;
  padding: 72px 24px 36px;
}

.cat-hero h1 { font-size: clamp(34px, 4.5vw, 52px); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.cat-hero p { margin-top: 12px; font-size: 17px; color: var(--text-sub); }

.app-grid {
  max-width: 1200px; margin: 0 auto;
  padding: 24px 24px 90px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.app-card {
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  padding: 30px 28px;
  display: flex; flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}

.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }

.app-icon {
  width: 68px; height: 68px;
  border-radius: 16px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  overflow: hidden;
}
.app-icon img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }

.app-name { font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.app-desc { margin-top: 6px; font-size: 13.5px; color: var(--text-sub); line-height: 1.7; }

.app-versions { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.app-ver {
  background: #fff;
  border-radius: 12px;
  padding: 12px 16px;              /* v2: 10px 14px → 加大 */
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  flex-wrap: wrap;                 /* v2: 窄屏自动换行 */
}

.app-ver .ver-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-ver .ver-name { font-size: 15px; font-weight: 600; white-space: nowrap; }
.app-ver .ver-tag {
  font-size: 11.5px; color: var(--text-sub);
  background: var(--bg-gray);
  padding: 3px 10px; border-radius: 980px;
  white-space: nowrap;
  line-height: 1.6;
}

.app-ver .ver-actions { display: flex; gap: 8px; flex-shrink: 0; }

.dl-btn {
  background: var(--link); color: #fff;
  font-size: 12.5px; font-weight: 600;
  padding: 7px 16px; border-radius: 980px;
  transition: background .2s;
  border: none; cursor: pointer;
  font-family: inherit;
}
.dl-btn:hover { background: var(--link-hover); }

.tut-btn {                           /* v2: 新增「教程」按钮 */
  background: #fff; color: var(--text);
  border: 1px solid rgba(0,0,0,.14);
  font-size: 12.5px; font-weight: 500;
  padding: 7px 14px; border-radius: 980px;
  cursor: pointer; font-family: inherit;
  transition: background .2s, border-color .2s, color .2s;
}
.tut-btn:hover { background: #f0f0f2; border-color: var(--link); color: var(--link); }

.copy-btn {
  background: #fff; color: var(--text);
  border: 1px solid rgba(0,0,0,.12);
  font-size: 12.5px; font-weight: 500;
  padding: 7px 12px; border-radius: 980px;
  cursor: pointer; font-family: inherit;
  transition: background .2s;
}
.copy-btn:hover { background: #f0f0f2; }

/* ============ 版本详情页（v2 新增） ============ */
.vpage {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 90px;
}

.breadcrumb {
  font-size: 13px; color: var(--text-sub);
  margin-bottom: 24px;
  line-height: 1.8;
}
.breadcrumb a { color: var(--link); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 8px; color: #c7c7cc; }

.vp-head {
  display: flex; align-items: center; gap: 20px;
  margin-bottom: 28px;
}
.vp-icon {
  width: 76px; height: 76px; flex-shrink: 0;
  border-radius: 18px;
  background: var(--bg-gray);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.vp-icon img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.vp-title { font-size: clamp(24px, 3.5vw, 32px); font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.vp-meta { margin-top: 6px; font-size: 14.5px; color: var(--text-sub); line-height: 1.7; }

.vp-dl {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 26px;
}
.vp-dl .dl-main {
  background: var(--link); color: #fff;
  font-size: 15px; font-weight: 600;
  padding: 12px 28px; border-radius: 980px;
  display: inline-block;
  transition: background .2s;
}
.vp-dl .dl-main:hover { background: var(--link-hover); }
.vp-dl .dl-note { font-size: 13px; color: var(--text-sub); line-height: 1.7; }

.vp-card {
  background: var(--bg-gray);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  margin-bottom: 20px;
}
.vp-card h2 {
  font-size: 19px; font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -.01em;
  display: flex; align-items: center; gap: 8px;
}

.steps { padding-left: 24px; }
.steps li { margin-bottom: 12px; font-size: 15px; line-height: 1.8; }
.steps li::marker { font-weight: 700; color: var(--link); }

.vp-note { font-size: 13.5px; color: var(--text-sub); line-height: 1.8; }
.vp-note li { margin-bottom: 8px; list-style: none; padding-left: 20px; position: relative; }
.vp-note li::before { content: "⚠️"; position: absolute; left: 0; font-size: 12px; }

.vp-others { display: flex; flex-wrap: wrap; gap: 10px; }
.vp-others a {
  font-size: 13px; font-weight: 500;
  background: #fff;
  border: 1px solid rgba(0,0,0,.1);
  padding: 8px 16px; border-radius: 980px;
  transition: background .2s, color .2s, border-color .2s;
}
.vp-others a:hover { border-color: var(--link); color: var(--link); }
.vp-others a.cur { background: var(--text); color: #fff; border-color: var(--text); }

/* ============ 搜索 ============ */
.search-wrap {
  max-width: 560px;
  margin: 36px auto 0;
  position: relative;
  z-index: 60;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0,0,0,.055);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 980px;
  padding: 14px 22px;
  transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.search-box svg { color: var(--text-sub); flex-shrink: 0; }

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  letter-spacing: .015em;
}
.search-box input::placeholder { color: var(--text-sub); }

.search-box:focus-within {
  background: #fff;
  border-color: rgba(0,0,0,.1);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
}

/* 下拉结果面板 */
.search-drop {
  position: absolute;
  top: calc(100% + 10px);
  left: 0; right: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: var(--shadow-card-hover);
  overflow: hidden;
  display: none;
  max-height: 400px;
  overflow-y: auto;
}
.search-drop.show { display: block; animation: dropIn .18s ease; }

.search-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background .15s ease;
}
.search-item:hover { background: rgba(0,0,0,.05); }
.search-item + .search-item { border-top: 1px solid rgba(0,0,0,.05); }

.search-item .si-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  background: var(--bg-gray);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.search-item .si-icon img { width: 100%; height: 100%; object-fit: contain; padding: 7px; }

.search-item .si-body { flex: 1; min-width: 0; }
.search-item .si-name { font-size: 15px; font-weight: 600; }
.search-item .si-cat {
  font-size: 12px; color: var(--text-sub);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-item .si-count {
  flex-shrink: 0;
  font-size: 12px; font-weight: 600;
  color: var(--text-sub);
  background: var(--bg-gray);
  padding: 4px 12px; border-radius: 980px;
}

.search-empty {
  padding: 28px 20px;
  text-align: center;
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.8;
}

/* 类目页搜索框略小 */
.cat-search { margin-top: 28px; }

/* ============ 搜索结果高亮（类目页） ============ */
.app-card.hl {
  box-shadow: 0 0 0 2px var(--link), var(--shadow-card-hover);
  transform: translateY(-4px);
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .hero { padding: 64px 16px 48px; }
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .topbar-inner { padding: 12px 16px; }
  .usage-steps { grid-template-columns: 1fr; }
  .app-grid { grid-template-columns: 1fr; }
  .cat-card .overlay { padding: 14px 14px 12px; }
  .cat-card .cat-name { font-size: 16px; }
  .cat-card .cat-desc { font-size: 11.5px; }
  .cat-card .cat-count { font-size: 10px; padding: 3px 10px; }
  .app-ver { padding: 12px 14px; }
  .vp-head { flex-direction: column; text-align: center; }
  .vp-dl { justify-content: center; text-align: center; }
}

/* ============ v3 改版：渐变分类卡 + 软件三按钮 ============ */
.cat-card {
  background: linear-gradient(160deg, var(--c1, #4d7cfe) 0%, #17202a 170%);
  min-height: 158px;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff !important; text-decoration: none;
  padding: 20px;
}
.cat-card img { display: none; }
.cat-card .overlay { position: static; background: none; padding: 0; }
.cat-card .cat-emoji { font-size: 34px; line-height: 1; margin-bottom: 10px; }
.cat-card .cat-name { font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.cat-card .cat-desc { margin-top: 4px; font-size: 12.5px; opacity: .85; line-height: 1.5; }
.cat-card .cat-count {
  margin-top: 10px; display: inline-block;
  font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,.18); border-radius: 20px;
  padding: 4px 12px;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card-hover); }

/* 类目页：软件卡片 v3 */
.app-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .2s, box-shadow .2s;
}
.app-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.app-head { display: flex; align-items: center; gap: 12px; }
.app-icon { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; flex-shrink: 0;
  background: rgba(127,127,127,.08); display: flex; align-items: center; justify-content: center; }
.app-icon img { width: 100%; height: 100%; object-fit: contain; }
.app-head-body { min-width: 0; }
.app-name { font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
.app-desc { margin-top: 3px; font-size: 12.5px; color: var(--text-sub); line-height: 1.55; }
.ver-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ver-chip {
  font-size: 11.5px; padding: 3px 10px; border-radius: 20px;
  background: rgba(127,127,127,.1); color: var(--text-sub); border: 1px solid var(--border);
}
.app-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.link-btn {
  flex: 1; min-width: 96px; padding: 9px 6px; border-radius: 10px;
  font-size: 13px; font-weight: 600; text-align: center; cursor: pointer;
  border: 1px solid; text-decoration: none; display: inline-block;
  transition: filter .15s, transform .1s; font-family: inherit; line-height: 1.4;
}
.link-btn:hover { filter: brightness(.92); }
.link-btn:active { transform: scale(.97); }
.link-btn.baidu { background: rgba(59,118,246,.08); color: #2f6df6; border-color: rgba(59,118,246,.35); }
.link-btn.pan123 { background: rgba(255,122,47,.08); color: #f27a1f; border-color: rgba(255,122,47,.35); }
.link-btn.tutorial { background: rgba(10,160,110,.08); color: #0a9a6c; border-color: rgba(10,160,110,.35); }

/* Toast */
#stToast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(10px);
  background: rgba(20,30,40,.92); color: #fff; padding: 10px 20px; border-radius: 22px;
  font-size: 13px; z-index: 10001; opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s; max-width: 86vw; text-align: center;
}
#stToast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 教程页 */
.tut-steps { display: flex; flex-direction: column; gap: 18px; }
.tut-step { display: flex; gap: 14px; }
.tut-step-num {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--link); color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.tut-step-body { flex: 1; }
.tut-step-body p { margin: 4px 0 0; font-size: 14px; line-height: 1.7; }
.tut-step-body img { max-width: 100%; border-radius: 10px; margin-top: 10px; border: 1px solid var(--border); }

@media (max-width: 640px) {
  .link-btn { min-width: 100%; }
  .cat-card { min-height: 130px; padding: 16px; }
}
