/*!
 * 资源下载页 —— 「下载清单」设计系统
 * UI build: 20261110-4
 *
 * 设计概念：整页是一张连续的纸，资源是纸上按编号排列的行，而不是一堆浮起的白卡片。
 * 唯一的重色与唯一的浮起元素，都留给下载动作。
 *
 * 创新点：
 *  1. CSS 自动编号（01/02/03）作为清单的视觉节奏，无需改 DOM、老浏览器同样支持；
 *  2. 主下载是「双行宽幅胶囊」：动作 + 平台/大小/版本副信息集中在一个按钮里；
 *  3. 详情页规格从逐行下划线改成双列规格网格；
 *  4. 行 hover 只做底色 + 序号变色，不加阴影、不位移，避免廉价感；
 *  5. 全站零阴影、零渐变、零毛玻璃，只用 1px 细线 + 留白分层。
 *
 * 不依赖 backdrop-filter / aspect-ratio / :has() 等新特性，安卓平板与老 WebView 正常。
 * 本文件独立于任何主题，不引入外部框架。
 */

:root {
    --ap-bg: #f5f7fa;
    --ap-panel: #ffffff;
    --ap-ink: #182130;
    --ap-ink-2: #3b4656;
    --ap-soft: #7d8797;
    --ap-line: #e9edf2;
    --ap-line-strong: #d7dee8;
    --ap-soft-bg: #f6f8fb;
    --ap-accent: #2f6df6;
    --ap-accent-hover: #205fe0;
    --ap-accent-ring: rgba(47, 109, 246, .12);
    --ap-radius: 14px;
}

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

body {
    min-height: 100vh;
    color: var(--ap-ink);
    background: var(--ap-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input { font-family: inherit; }
button { cursor: pointer; }

/* ---------- 顶栏 / 容器 ---------- */
.ap-head { position: sticky; top: 0; z-index: 20; background: rgba(245, 247, 250, .94); border-bottom: 1px solid var(--ap-line); }
.ap-head-in { max-width: 1080px; margin: 0 auto; padding: 13px 24px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ap-brand { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: 15px; letter-spacing: .01em; }
.ap-brand img { width: 26px; height: 26px; border-radius: 8px; object-fit: contain; border: 1px solid var(--ap-line); }
.ap-nav { display: flex; align-items: center; gap: 20px; font-size: 13px; color: var(--ap-soft); }
.ap-nav a { transition: color .16s ease; }
.ap-nav a:hover { color: var(--ap-accent); }

.ap-wrap { max-width: 1080px; margin: 0 auto; padding: 22px 24px 52px; }
.ap-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 20px; font-size: 12.5px; color: var(--ap-soft); }
.ap-crumb i { font-style: normal; opacity: .45; }
.ap-crumb a:hover { color: var(--ap-accent); }
.ap-crumb span { color: var(--ap-ink-2); }

.ap-panel { background: var(--ap-panel); border: 1px solid var(--ap-line); border-radius: var(--ap-radius); }

/* ---------- 页头：标题下的短强调线是唯一的装饰 ---------- */
.ap-hero.ap-panel { padding: 6px 0 24px; margin-bottom: 24px; background: transparent; border: 0; border-bottom: 1px solid var(--ap-line); border-radius: 0; }
.ap-hero.has-cover { background-image: linear-gradient(180deg, rgba(245, 247, 250, .93), rgba(245, 247, 250, .99)), var(--ap-cover); background-size: cover; background-position: center; }
.ap-hero h1, .ap-hero-title h1 { margin: 0 0 7px; font-size: 33px; line-height: 1.3; font-weight: 650; letter-spacing: -.02em; }
.ap-hero h1::after, .ap-hero-title h1::after { content: ""; display: block; width: 34px; height: 3px; margin-top: 13px; border-radius: 2px; background: var(--ap-accent); }
.ap-hero > p { margin: 0; color: var(--ap-soft); font-size: 13.5px; }
.ap-hero-title { display: flex; align-items: center; gap: 15px; }
.ap-hero-title p { margin: 4px 0 0; color: var(--ap-soft); font-size: 13.5px; }
.ap-hero-ico, .ap-hero-title .ap-letter { width: 52px; height: 52px; border-radius: 14px; object-fit: contain; flex: 0 0 auto; }
.ap-hero-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; color: var(--ap-soft); font-size: 12px; }
.ap-hero-meta span { padding: 3px 10px; border: 1px solid var(--ap-line); border-radius: 6px; background: var(--ap-panel); }
.ap-hero-meta .ap-count { color: var(--ap-accent); border-color: var(--ap-accent-ring); background: rgba(47, 109, 246, .05); }

.ap-notice { margin-top: 18px; padding: 11px 14px; border-left: 2px solid var(--ap-line-strong); background: var(--ap-soft-bg); border-radius: 0 8px 8px 0; font-size: 12.5px; color: var(--ap-ink-2); }
.ap-notice p { margin: 0; }
.ap-notice p + p { margin-top: 3px; }

.ap-search { display: flex; align-items: center; gap: 9px; margin-top: 18px; padding: 0 16px; height: 42px; max-width: 440px; background: var(--ap-panel); border: 1px solid var(--ap-line); border-radius: 999px; color: var(--ap-soft); transition: border-color .16s ease, box-shadow .16s ease; }
.ap-search:focus-within { border-color: var(--ap-accent); box-shadow: 0 0 0 3px var(--ap-accent-ring); }
.ap-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ap-ink); font-size: 13.5px; }
.ap-search input::placeholder { color: var(--ap-soft); }

/* ---------- 首字母占位 ---------- */
.ap-letter { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px; background: var(--ap-soft-bg); border: 1px solid var(--ap-line); color: var(--ap-ink-2); font-size: 17px; font-weight: 650; }
.ap-letter-sm { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }

/* ---------- 按钮：只有下载用实心色 ---------- */
.ap-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 999px; padding: 8px 17px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; white-space: nowrap; }
.ap-btn-main { color: #fff; background: var(--ap-accent); }
.ap-btn-main:hover { background: var(--ap-accent-hover); transform: translateY(-1px); }
.ap-btn-ghost { color: var(--ap-ink-2); background: var(--ap-panel); border-color: var(--ap-line); }
.ap-btn-ghost:hover { border-color: var(--ap-line-strong); color: var(--ap-ink); }

/* ---------- 清单容器：一整张纸，行用细线分隔 ---------- */
.ap-cat-grid, .ap-grid { display: block; background: var(--ap-panel); border: 1px solid var(--ap-line); border-radius: var(--ap-radius); overflow: hidden; }
.ap-cat-grid { counter-reset: apcat; }
.ap-grid { counter-reset: aprow; }

/* 首页分类行 */
.ap-cat-card { counter-increment: apcat; display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 0; border-bottom: 1px solid var(--ap-line); border-radius: 0; box-shadow: none; transition: background .16s ease; }
.ap-cat-card:last-child { border-bottom: 0; }
.ap-cat-card:hover { background: var(--ap-soft-bg); }
.ap-cat-card::before { content: counter(apcat, decimal-leading-zero); flex: 0 0 30px; font-size: 14px; font-weight: 650; color: var(--ap-line-strong); font-variant-numeric: tabular-nums; }
.ap-cat-card:hover::before { color: var(--ap-accent); }
.ap-cat-cover { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 11px; overflow: hidden; border: 1px solid var(--ap-line); background: var(--ap-soft-bg); }
.ap-cat-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-cat-body { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.ap-cat-ico, .ap-cat-letter { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; object-fit: contain; }
.ap-cat-body h2 { margin: 0; font-size: 15px; font-weight: 600; }
.ap-cat-body p { margin: 2px 0 0; font-size: 12.5px; color: var(--ap-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-cat-foot { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; font-size: 12px; color: var(--ap-soft); }
.ap-cat-card:hover .ap-cat-foot span:last-child { color: var(--ap-accent); }

/* 分类页产品行 */
.ap-card { counter-increment: aprow; display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin: 0; border: 0; border-bottom: 1px solid var(--ap-line); border-radius: 0; box-shadow: none; transition: background .16s ease; }
.ap-card:last-child { border-bottom: 0; }
.ap-card:hover { background: var(--ap-soft-bg); }
.ap-card::before { content: counter(aprow, decimal-leading-zero); flex: 0 0 28px; font-size: 15px; font-weight: 650; color: var(--ap-line-strong); font-variant-numeric: tabular-nums; }
.ap-card:hover::before { color: var(--ap-accent); }
.ap-card-cover { display: block; flex: 0 0 54px; width: 54px; height: 54px; border-radius: 12px; overflow: hidden; border: 1px solid var(--ap-line); background: var(--ap-soft-bg); }
.ap-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-card-body { flex: 1; min-width: 0; padding: 0; }
.ap-card-head { display: flex; align-items: center; gap: 11px; }
.ap-card.has-cover .ap-card-head > .ap-card-ico,
.ap-card.has-cover .ap-card-head > .ap-card-letter { display: none; }
.ap-card-ico { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; object-fit: contain; border: 1px solid var(--ap-line); background: var(--ap-soft-bg); }
.ap-card-letter { width: 38px; height: 38px; font-size: 15px; border-radius: 10px; }
.ap-card-tt { min-width: 0; }
.ap-card-tt h2 { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 600; }
.ap-card-tt h2 a:hover { color: var(--ap-accent); }
.ap-card-tt p { margin: 2px 0 0; font-size: 12.5px; color: var(--ap-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.ap-tags span { padding: 1px 7px; border-radius: 5px; background: var(--ap-soft-bg); border: 1px solid var(--ap-line); color: var(--ap-soft); font-size: 11px; }
.ap-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; color: var(--ap-soft); font-size: 11.5px; }
.ap-card-foot { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 0; border: 0; }
.ap-card-dl { height: 38px; padding: 0 20px; }
.ap-card-dl span { transition: transform .16s ease; }
.ap-card-dl:hover span { transform: translate(2px, -2px); }
.ap-card-more { font-size: 12px; color: var(--ap-soft); white-space: nowrap; }
.ap-card-more:hover { color: var(--ap-accent); }

/* ---------- 产品详情 ---------- */
.ap-detail { padding: 28px 30px; margin-bottom: 18px; }
.ap-detail-top { display: flex; gap: 32px; align-items: flex-start; }
.ap-detail-media { flex: 0 0 44%; max-width: 44%; }
.ap-main-shot { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--ap-line); background: var(--ap-soft-bg); }
.ap-main-shot img { width: 100%; max-height: 340px; object-fit: contain; display: block; }
.ap-shots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ap-shot { width: 60px; height: 52px; padding: 0; border: 1px solid var(--ap-line); border-radius: 9px; overflow: hidden; background: var(--ap-soft-bg); }
.ap-shot.is-on { border-color: var(--ap-accent); box-shadow: 0 0 0 2px var(--ap-accent-ring); }
.ap-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-detail-info { flex: 1; min-width: 0; }
.ap-detail-head { display: flex; align-items: center; gap: 14px; }
.ap-detail-ico, .ap-detail-head .ap-letter { width: 54px; height: 54px; border-radius: 14px; object-fit: contain; background: var(--ap-soft-bg); border: 1px solid var(--ap-line); }
.ap-detail-head h1 { margin: 0; font-size: 25px; line-height: 1.3; font-weight: 650; letter-spacing: -.015em; }
.ap-detail-head p { margin: 4px 0 0; color: var(--ap-soft); font-size: 13.5px; }

/* 规格网格：两列，标签在上、值在下 */
.ap-info-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--ap-line); }
.ap-info-list div { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 9px 0; border-bottom: 1px solid var(--ap-line); font-size: 13px; }
.ap-info-list span { width: auto; font-size: 11px; color: var(--ap-soft); letter-spacing: .03em; }
.ap-info-list b { font-size: 14px; font-weight: 600; }
.ap-info-list a { color: var(--ap-accent); font-size: 14px; }

/* 主下载：双行宽幅胶囊，整页唯一的主按钮 */
.ap-quick { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--ap-line); }
.ap-quick-btn { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; height: 64px; padding: 0 22px; border-radius: 14px; text-align: left; }
.ap-quick-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ap-quick-txt b { font-size: 15px; font-weight: 650; line-height: 1.35; }
.ap-quick-txt small { font-size: 11.5px; font-weight: 400; opacity: .84; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-quick-arrow { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 15px; transition: transform .18s ease; }
.ap-quick-btn:hover .ap-quick-arrow { transform: translate(2px, -2px); }
.ap-quick-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 14px; margin-top: 11px; font-size: 11.5px; color: var(--ap-soft); }
.ap-quick-meta b { color: var(--ap-ink-2); font-weight: 600; }
.ap-quick-meta a { color: var(--ap-accent); }
.ap-quick-meta a:hover { text-decoration: underline; }

/* ---------- 其它下载地址：默认折叠，次要操作全是小文字 ---------- */
.ap-download { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--ap-line); }
.ap-download h2, .ap-desc h2, .ap-more h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 16px; font-weight: 650; }
.ap-download h2 svg { color: var(--ap-accent); }
.ap-dl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ap-dl-head h2 { margin-bottom: 0; }
.ap-dl-toggle { flex: 0 0 auto; border: 0; background: transparent; padding: 6px 2px; font: inherit; font-size: 12.5px; color: var(--ap-soft); white-space: nowrap; }
.ap-dl-toggle:hover { color: var(--ap-accent); }
.ap-dl-toggle span { display: inline-block; margin-left: 3px; transition: transform .2s ease; }
.ap-dl-toggle[aria-expanded="true"] span { transform: rotate(180deg); }

.ap-dl-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 2px; border-bottom: 1px solid var(--ap-line); }
.ap-dl-extra[hidden] { display: none !important; }
.ap-dl-extra { padding-top: 4px; }
.ap-dl-extra .ap-dl-row:last-child { border-bottom: 0; }
.ap-dl-info { min-width: 0; }
.ap-dl-line { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 9px; }
.ap-dl-title { font-size: 14px; font-weight: 600; color: var(--ap-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-disk { flex: 0 0 auto; padding: 2px 8px; border-radius: 5px; background: var(--ap-panel); border: 1px solid var(--ap-line); color: var(--ap-soft); font-size: 11px; font-weight: 600; white-space: nowrap; }
.ap-disk-lanzou { color: var(--ap-ink-2); }
.ap-dl-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 13px; margin-top: 7px; font-size: 11.5px; color: var(--ap-soft); }
.ap-dl-code, .ap-dl-mini { border: 0; background: transparent; padding: 0; font: inherit; font-size: 11.5px; color: var(--ap-soft); line-height: 1.6; }
.ap-dl-code b { color: var(--ap-ink-2); font-weight: 700; letter-spacing: .04em; }
.ap-dl-code:hover, .ap-dl-mini:hover { color: var(--ap-accent); }
.ap-dl-mini.ap-lz:disabled { opacity: .6; }
.ap-dl-flag { color: #5c9e7e; }
.ap-dl-act { flex: 0 0 auto; }
.ap-dl-extra .ap-btn { height: 34px; padding: 0 14px; font-size: 12.5px; }
.ap-dl-empty { margin: 12px 0 0; font-size: 12.5px; color: var(--ap-soft); }

/* ---------- 介绍 / 相关 / 空状态 / 页脚 ---------- */
.ap-desc { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--ap-line); }
.ap-desc p { margin: 0 0 8px; color: var(--ap-ink-2); font-size: 13.5px; line-height: 1.85; }
.ap-more { padding: 18px 22px; margin-bottom: 18px; }
.ap-more h2 { font-size: 15px; }
.ap-more-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 20px; }
.ap-more-list a { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 8px; font-size: 13px; }
.ap-more-list a:hover { background: var(--ap-soft-bg); color: var(--ap-accent); }
.ap-more-list img { width: 28px; height: 28px; border-radius: 8px; object-fit: contain; border: 1px solid var(--ap-line); background: var(--ap-soft-bg); }
.ap-more-list span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-more-list i { font-style: normal; color: var(--ap-soft); }
.ap-empty { padding: 48px 24px; margin-bottom: 18px; text-align: center; }
.ap-empty-ico { line-height: 1; margin-bottom: 14px; }
.ap-empty-ico svg { width: 42px; height: 42px; color: var(--ap-line-strong); }
.ap-empty h1, .ap-empty h2 { margin: 0 0 8px; font-size: 18px; font-weight: 650; }
.ap-empty p { margin: 0 auto 18px; max-width: 460px; color: var(--ap-soft); font-size: 13.5px; }
.ap-noresult { padding: 34px 20px; }
.ap-foot { text-align: center; color: var(--ap-soft); font-size: 12px; padding: 22px 0 0; }
.ap-foot p { margin: 3px 0; }

/* ---------- 暗色：同样保持低饱和 ---------- */
@media (prefers-color-scheme: dark) {
    :root {
        --ap-bg: #121419;
        --ap-panel: #1a1d24;
        --ap-ink: #e9ecf1;
        --ap-ink-2: #c3cad6;
        --ap-soft: #8e97a6;
        --ap-line: #2a2e37;
        --ap-line-strong: #3a404b;
        --ap-soft-bg: #22262e;
        --ap-accent: #5a8cff;
        --ap-accent-hover: #729fff;
        --ap-accent-ring: rgba(90, 140, 255, .16);
    }
    .ap-head { background: rgba(18, 20, 25, .94); }
    .ap-hero.has-cover { background-image: linear-gradient(180deg, rgba(18, 20, 25, .94), rgba(18, 20, 25, .98)), var(--ap-cover); }
    .ap-dl-flag { color: #7fd6a8; }
    .ap-dl-code b { color: var(--ap-ink); }
}

/* ---------- 响应式：平板 / 手机 ---------- */
@media (max-width: 900px) {
    .ap-detail-top { flex-direction: column; gap: 20px; }
    .ap-detail-media { flex: 0 0 auto; max-width: 100%; width: 100%; }
    .ap-detail-info { width: 100%; }
}
@media (max-width: 600px) {
    .ap-wrap { padding: 16px 14px 36px; }
    .ap-head-in { padding: 10px 14px; }
    .ap-brand { font-size: 14px; }
    .ap-nav { gap: 12px; font-size: 12px; }
    .ap-hero h1, .ap-hero-title h1 { font-size: 26px; }
    .ap-hero-ico, .ap-hero-title .ap-letter { width: 42px; height: 42px; border-radius: 11px; }
    .ap-hero-meta { gap: 6px; }
    .ap-cat-card { flex-wrap: wrap; gap: 10px; padding: 14px; }
    .ap-cat-card::before { flex: 0 0 22px; font-size: 13px; }
    .ap-cat-cover { width: 42px; height: 42px; flex: 0 0 42px; }
    .ap-cat-body { flex: 1 1 calc(100% - 90px); }
    .ap-cat-foot { width: 100%; padding-left: 34px; }
    .ap-card { flex-wrap: wrap; gap: 10px 12px; padding: 14px; }
    .ap-card::before { flex: 0 0 22px; font-size: 13px; }
    .ap-card-cover { width: 44px; height: 44px; flex: 0 0 44px; }
    .ap-card-body { flex: 1 1 calc(100% - 90px); }
    .ap-card-foot { width: 100%; padding-left: 34px; }
    .ap-card-dl { flex: 1; }
    .ap-info-list { grid-template-columns: 1fr; }
    .ap-detail { padding: 18px 16px; }
    .ap-quick-btn { height: 60px; padding: 0 18px; }
    .ap-dl-row { flex-direction: column; align-items: stretch; gap: 12px; }
    .ap-dl-act .ap-btn { width: 100%; }
    .ap-dl-head { align-items: flex-start; }
    .ap-more-list { grid-template-columns: 1fr; }
}
