/* ==========================================================================
   PC-Software 站点统一样式表
   替换原先每个页面重复内联的 CSS，修复移动端横向溢出
   ========================================================================== */

:root {
  --brand: #1E5AFE;
  --brand-light: #6ea5fe;
  --brand-dim: #e8f0fe;
  --bg: #f8fafd;
  --surface: #ffffff;
  --ink: #1e2a3e;
  --ink-soft: #56637a;
  --ink-mute: #8a94a6;
  --line: #e6ecf5;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px -12px rgba(30, 90, 254, .18);
  --shadow-lg: 0 20px 48px -24px rgba(16, 32, 64, .28);
  --wrap: 1400px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', Roboto, 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  font-size: 15px;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; border: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 .8em; }
p:last-child { margin-bottom: 0; }

:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }

/* ---------- 顶部渐变区 ---------- */
.gradient-top {
  background: linear-gradient(180deg, var(--brand) 0%, #2f6bfe 58%, #87b0ff 82%, var(--bg) 100%);
  padding-bottom: 28px;
}

/* ---------- 导航 ---------- */
.navbar { border-bottom: 1px solid rgba(255, 255, 255, .28); }
.nav-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo-area { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-area:hover { text-decoration: none; }
.logo-icon {
  width: 46px; height: 46px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: #fff; border-radius: 14px;
  color: var(--brand); font-size: 22px;
  box-shadow: 0 8px 16px -8px rgba(0, 0, 0, .25);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-text .site-name { color: #fff; font-weight: 800; font-size: 1.28rem; letter-spacing: -.3px; }
.logo-text span:last-child { color: rgba(255, 255, 255, .82); font-size: .72rem; font-weight: 500; }

.nav-search { flex: 1 1 260px; max-width: 420px; }
.search-small {
  display: flex; align-items: center; gap: 4px;
  background: #fff; border-radius: 999px; padding: 4px;
  box-shadow: 0 4px 14px -8px rgba(16, 32, 64, .4);
}
.search-small input {
  flex: 1 1 auto; min-width: 0;
  border: 0; background: transparent; outline: none;
  padding: 8px 14px; font-size: .88rem; color: var(--ink);
}
.search-small button {
  flex: 0 0 auto; border: 0; cursor: pointer;
  background: var(--brand); color: #fff;
  padding: 8px 18px; border-radius: 999px;
  font-size: .84rem; font-weight: 600; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.search-small button:hover { background: #1a4ee0; }

.nav-links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.nav-links > a { color: #fff; font-weight: 600; font-size: .9rem; opacity: .94; text-decoration: none; }
.nav-links > a:hover { opacity: 1; text-decoration: none; }
.nav-links .btn-outline,
.nav-links .btn-primary {
  border: 0; cursor: pointer; font: inherit; font-size: .84rem; font-weight: 600;
  padding: 8px 16px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-links .btn-outline { background: rgba(255, 255, 255, .18); color: #fff; border: 1px solid rgba(255, 255, 255, .45); }
.nav-links .btn-primary { background: #fff; color: var(--brand); }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  font-size: .83rem; color: rgba(255, 255, 255, .88);
  padding: 14px 0 0;
}
.breadcrumb a { color: #fff; opacity: .9; }
.breadcrumb a:hover { opacity: 1; }

/* ---------- 软件头部 ---------- */
.software-intro {
  display: flex; align-items: flex-start; gap: 22px;
  padding: 18px 0 6px;
  flex-wrap: wrap;
}
.soft-icon {
  flex: 0 0 auto;
  width: 92px; height: 92px;
  display: grid; place-items: center;
  background: #fff; border-radius: 22px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.soft-icon img { width: 68px; height: 68px; object-fit: contain; }

.soft-info { flex: 1 1 300px; min-width: 0; }
.title-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.soft-name h1 { color: #fff; font-size: 1.85rem; font-weight: 800; letter-spacing: -.5px; text-shadow: 0 1px 4px rgba(8, 28, 78, .22); }
.soft-rating { display: flex; align-items: center; gap: 8px; }
.soft-rating .stars { color: #ffc233; font-size: 1rem; letter-spacing: 1px; }
.soft-rating > span:last-child { color: #fff; font-weight: 600; font-size: .88rem; text-shadow: 0 1px 3px rgba(8, 28, 78, .2); }

.soft-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 12px;
}
.soft-meta > span {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(16, 42, 110, .26);
  border: 1px solid rgba(255, 255, 255, .34);
  color: #fff; font-size: .8rem; font-weight: 500;
  padding: 4px 12px; border-radius: 999px;
  white-space: nowrap;
}

.download-area { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn-download {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; color: var(--brand);
  font-weight: 700; font-size: .92rem;
  padding: 11px 24px; border-radius: 999px;
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .45);
  text-decoration: none;
  transition: transform .18s, box-shadow .18s;
}
.btn-download:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 16px 28px -14px rgba(0, 0, 0, .5); }
.btn-download.secondary {
  background: #fff; color: var(--brand);
  border: 1px solid rgba(30, 90, 254, .22);
  box-shadow: none;
}

/* 无官方直链时的诚实提示（替代失效按钮） */
.dl-pending {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .92);
  color: #5a6a85;
  font-size: .84rem; font-weight: 600;
  padding: 11px 20px; border-radius: 999px;
  border: 1px dashed rgba(30, 90, 254, .45);
}
.dl-pending i { color: var(--brand); }

/* ---------- 主体 ---------- */
.content-wrapper { padding: 26px 0 48px; }
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}
.main-content,
.sidebar { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.section-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  min-width: 0;
  overflow-wrap: anywhere;
}
.section-card > h3 {
  font-size: 1.06rem; font-weight: 700; color: var(--ink);
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px;
}
.section-card > h3::before {
  content: ''; width: 4px; height: 16px; border-radius: 2px;
  background: var(--brand); flex: 0 0 auto;
}

.intro-text { color: var(--ink-soft); font-size: .93rem; line-height: 1.85; }
.intro-text + .intro-text { margin-top: 10px; }

/* ---------- 功能列表 ---------- */
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.feature-list li {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: .88rem; color: var(--ink-soft);
  min-width: 0;
}
.feature-list li i { color: var(--brand); margin-top: 3px; flex: 0 0 auto; }

/* ---------- 系统要求 ---------- */
.sys-req-item {
  display: flex; gap: 12px; flex-wrap: wrap;
  padding: 9px 0; border-bottom: 1px dashed var(--line);
  font-size: .88rem;
}
.sys-req-item:last-child { border-bottom: 0; }
.sys-req-label { flex: 0 0 96px; color: var(--ink-mute); font-weight: 600; }
.sys-req-item > span:last-child { color: var(--ink-soft); flex: 1 1 200px; min-width: 0; }

/* ---------- 评论 ---------- */
.review-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review-item:last-child { border-bottom: 0; padding-bottom: 0; }
.review-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.review-avatar {
  width: 38px; height: 38px; flex: 0 0 auto;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-dim); color: var(--brand); font-size: 17px;
}
.review-name { font-weight: 600; font-size: .88rem; }
.review-date { color: var(--ink-mute); font-size: .76rem; }
.review-stars { margin-left: auto; color: #ffc233; font-size: .82rem; letter-spacing: 1px; }
.review-text { color: var(--ink-soft); font-size: .88rem; line-height: 1.75; }

/* ---------- 截图 ---------- */
.shot-viewer { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: #eef2f8; }
.shot-track { display: flex; transition: transform .38s cubic-bezier(.4, 0, .2, 1); will-change: transform; }
.shot-slide { flex: 0 0 100%; min-width: 0; }
.shot-slide img {
  display: block; width: 100%; height: 200px;
  object-fit: cover; object-position: top center;
  background: #eef2f8;
}
.shot-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: rgba(16, 32, 64, .55); color: #fff;
  display: grid; place-items: center; font-size: .8rem;
  transition: background .18s;
}
.shot-btn:hover { background: rgba(16, 32, 64, .8); }
.shot-btn.prev { left: 8px; }
.shot-btn.next { right: 8px; }
.shot-dots { display: flex; justify-content: center; gap: 6px; padding-top: 10px; }
.shot-dots button {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%;
  background: #cfd8e6; cursor: pointer; transition: all .2s;
}
.shot-dots button.active { background: var(--brand); width: 18px; border-radius: 4px; }
.shot-caption { color: var(--ink-mute); font-size: .74rem; text-align: center; padding-top: 8px; margin: 0; }

/* 无真实截图时的降级展示（不是假截图） */
.shot-fallback {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
}
.shot-fallback div {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: .8rem; color: var(--ink-soft); min-width: 0;
}
.shot-fallback div i { color: var(--brand); flex: 0 0 auto; }

/* ---------- 相关推荐 ---------- */
.rec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rec-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 8px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  min-width: 0;
}
.rec-item:hover {
  text-decoration: none; transform: translateY(-3px);
  border-color: #cfe0ff; box-shadow: var(--shadow); background: #fff;
}
.rec-icon {
  width: 44px; height: 44px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 12px; overflow: hidden;
  background: #fff; border: 1px solid var(--line);
}
.rec-icon img { width: 32px; height: 32px; object-fit: contain; }
.rec-icon i { font-size: 20px; color: var(--brand); }
.rec-name {
  font-size: .76rem; font-weight: 500; text-align: center;
  line-height: 1.35; color: var(--ink-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 100%;
}

/* ---------- 页脚 ---------- */
footer {
  background: #101a2c; color: #b9c4d6;
  padding: 40px 0 22px; margin-top: 8px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.footer-col { min-width: 0; }
.footer-col h4 { color: #fff; font-size: .96rem; margin-bottom: 12px; }
.footer-col p { color: #93a1b8; font-size: .84rem; line-height: 1.8; margin: 0; }
.footer-col a {
  display: block; color: #b9c4d6; font-size: .84rem;
  padding: 4px 0; text-decoration: none; transition: color .16s;
}
.footer-col a:hover { color: #fff; }
.copyright {
  padding-top: 18px; text-align: center;
  color: #7d8ba3; font-size: .78rem;
}
.copyright p { margin: 0; }

/* ---------- 文章页 ---------- */
.article { max-width: 880px; margin: 0 auto; }
.article-body h2 { font-size: 1.22rem; margin: 26px 0 12px; color: var(--ink); }
.article-body h3 { font-size: 1.04rem; margin: 20px 0 10px; color: var(--ink); }
.article-body p { color: var(--ink-soft); font-size: .93rem; line-height: 1.9; }
.article-body ul, .article-body ol { margin: 0 0 1em; padding-left: 1.3em; list-style: revert; }
.article-body li { color: var(--ink-soft); font-size: .93rem; line-height: 1.9; margin-bottom: .35em; }
.article-body code {
  background: var(--brand-dim); color: #1746c4;
  padding: 2px 6px; border-radius: 5px;
  font-size: .86em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}
.step-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px;
}
.step-num {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-size: .76rem; font-weight: 700;
}
.step-card p { margin: 0; font-size: .9rem; }
.tip-box, .warn-box {
  border-radius: var(--radius-sm); padding: 12px 16px; margin: 14px 0;
  font-size: .89rem; line-height: 1.8;
}
.tip-box { background: #eaf3ff; border-left: 4px solid var(--brand); color: #1a3f8f; }
.warn-box { background: #fff5e8; border-left: 4px solid #f5a524; color: #8a5a10; }
.tip-box p, .warn-box p { margin: 0; color: inherit; font-size: inherit; }

/* ---------- 通用卡片列表 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.software-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
  min-width: 0; transition: transform .18s, box-shadow .18s;
}
.software-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-img-link { text-decoration: none; }
.card-icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  border-radius: 14px; background: var(--bg);
  color: var(--brand); font-size: 24px; overflow: hidden;
}
.card-icon img { width: 40px; height: 40px; object-fit: contain; }

/* ==========================================================================
   响应式
   ========================================================================== */

/* 大平板 / 小笔记本 */
@media (max-width: 1100px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .sidebar { order: 2; }
  .rec-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shot-slide img { height: 260px; }
}

/* 平板 */
@media (max-width: 860px) {
  .wrap { padding: 0 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-col:first-child { grid-column: 1 / -1; }
  .rec-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .soft-name h1 { font-size: 1.6rem; }
}

/* 手机 */
@media (max-width: 640px) {
  body { font-size: 14px; }
  .wrap { padding: 0 14px; }
  .nav-flex { padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .nav-links { gap: 14px; width: 100%; }
  .nav-links > a { font-size: .82rem; }
  .nav-search { order: 3; width: 100%; max-width: none; flex-basis: 100%; }
  .search-small button span { display: none; }

  .gradient-top { padding-bottom: 18px; }
  .software-intro { gap: 14px; padding-top: 12px; }
  .soft-icon { width: 68px; height: 68px; border-radius: 16px; }
  .soft-icon img { width: 50px; height: 50px; }
  .soft-name h1 { font-size: 1.32rem; }
  .soft-meta { gap: 6px; margin-top: 8px; }
  .soft-meta > span { font-size: .72rem; padding: 3px 9px; }
  .download-area { gap: 8px; margin-top: 12px; }
  .btn-download { font-size: .84rem; padding: 10px 18px; flex: 1 1 auto; justify-content: center; }

  .content-wrapper { padding: 16px 0 32px; }
  .section-card { padding: 16px 16px; border-radius: 14px; }
  .section-card > h3 { font-size: .98rem; }
  .feature-list { grid-template-columns: minmax(0, 1fr); }
  .sys-req-label { flex-basis: 78px; font-size: .82rem; }
  .rec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .rec-item { padding: 10px 6px; }
  .rec-icon { width: 38px; height: 38px; }
  .rec-icon img { width: 28px; height: 28px; }
  .rec-name { font-size: .7rem; }
  .shot-slide img { height: 190px; }
  .shot-fallback { grid-template-columns: minmax(0, 1fr); }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; padding-bottom: 18px; }
  footer { padding: 28px 0 18px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
}

/* 超小屏 */
@media (max-width: 380px) {
  .rec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .soft-name h1 { font-size: 1.18rem; }
}

@media print {
  .navbar, .footer-grid, .shot-btn, .shot-dots, .rec-grid { display: none !important; }
  body { background: #fff; }
  .section-card { box-shadow: none; border: 1px solid #ddd; }
}
