/* =========================================================
   小涵互联 · 前台页面组件层（ui.css）
   依赖 theme.css 的 --xh-* token，暗色/亮色主题自动适配
   覆盖：下载站 / 客户端 / 会员中心 / 支付 / 链接库 / 工具站 / 开发者社区 / 协议页
   ========================================================= */

/* ---------------- 页面骨架 ---------------- */
.hub { padding-top: 26px; }
.hub > * + * { margin-top: 18px; }

/* ---------------- 页头 Hero ---------------- */
.hub-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px;
    flex-wrap: wrap;
    padding: 28px 30px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius-lg);
    background:
        radial-gradient(560px 220px at 8% -40%, rgba(var(--xh-primary-rgb), .22), transparent 70%),
        radial-gradient(480px 200px at 88% 0%, rgba(var(--xh-primary-2-rgb), .18), transparent 68%),
        var(--xh-panel);
    box-shadow: var(--xh-shadow-sm);
    backdrop-filter: blur(10px);
}
.hub-hero-txt { min-width: 260px; flex: 1 1 420px; }
.hub-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: var(--xh-radius-pill);
    background: var(--xh-primary-soft);
    color: var(--xh-primary);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.hub-hero h1 {
    margin: 12px 0 8px;
    font-size: 26px;
    line-height: 1.25;
    letter-spacing: -.4px;
    color: var(--xh-text);
}
.hub-hero p {
    margin: 0;
    max-width: 62ch;
    color: var(--xh-muted);
    font-size: 13.4px;
    line-height: 1.75;
}
.hub-hero-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hub-hero-act .dl-btn { width: auto; margin-top: 0; }

/* ---------------- 搜索 / 工具条 ---------------- */
.hub-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 5px 5px 16px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius-pill);
    background: var(--xh-input-bg);
    box-shadow: inset 0 1px 0 rgba(var(--xh-w), var(--xh-w), var(--xh-w), .04);
    transition: border-color .18s var(--xh-ease), box-shadow .18s var(--xh-ease);
}
.hub-search:focus-within {
    border-color: rgba(var(--xh-primary-rgb), .55);
    box-shadow: var(--xh-ring);
}
.hub-search input {
    flex: 1 1 auto;
    min-width: 180px;
    padding: 7px 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--xh-text);
    font-size: 13.4px;
    font-family: var(--xh-font);
    outline: 0;
}
.hub-search input::placeholder { color: var(--xh-faint); }
.hub-search button {
    flex: 0 0 auto;
    padding: 8px 18px;
    border: 0;
    border-radius: var(--xh-radius-pill);
    background: var(--xh-primary-grad);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--xh-font);
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(var(--xh-primary-rgb), .3);
    transition: transform .16s var(--xh-ease), box-shadow .16s var(--xh-ease);
}
.hub-search button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(var(--xh-primary-rgb), .38); }

.hub-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius-pill);
    background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .035);
    color: var(--xh-muted);
    font-size: 12.5px;
    font-weight: 500;
    transition: all .16s var(--xh-ease);
}
.chip:hover { color: var(--xh-text); border-color: var(--xh-line-strong); background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .07); }
.chip.on {
    background: var(--xh-primary-grad);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 16px rgba(var(--xh-primary-rgb), .28);
}
.hub-sort {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius-pill);
    background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .04);
}
.hub-sort a {
    padding: 5px 13px;
    border-radius: var(--xh-radius-pill);
    color: var(--xh-muted);
    font-size: 12.5px;
    transition: all .16s var(--xh-ease);
}
.hub-sort a:hover { color: var(--xh-text); }
.hub-sort a.on { background: rgba(var(--xh-primary-rgb), .16); color: var(--xh-primary); font-weight: 600; }

/* ---------------- 通用按钮 / 徽章 / 表格 ---------------- */
.dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    margin-top: 12px;
    padding: 9px 15px;
    border: 1px solid var(--xh-line-strong);
    border-radius: var(--xh-radius-sm);
    background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .045);
    color: var(--xh-text-2);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--xh-font);
    line-height: 1.4;
    cursor: pointer;
    transition: all .16s var(--xh-ease);
}
.dl-btn:hover { border-color: rgba(var(--xh-primary-rgb), .55); background: var(--xh-primary-soft); color: var(--xh-primary); }
.dl-btn.solid {
    border-color: transparent;
    background: var(--xh-primary-grad);
    color: #fff;
    box-shadow: 0 8px 22px rgba(var(--xh-primary-rgb), .28);
}
.dl-btn.solid:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(var(--xh-primary-rgb), .36); color: #fff; }
.dl-btn.ghost { background: transparent; }
.dl-btn.ghost:hover { background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .06); }
.dl-btn.danger { color: var(--xh-danger); border-color: rgba(255, 107, 129, .38); }
.dl-btn.danger:hover { background: rgba(255, 107, 129, .12); border-color: rgba(255, 107, 129, .6); color: var(--xh-danger); }
.dl-btn.lg { padding: 12px 22px; font-size: 14px; }
.dl-btn[disabled], .dl-btn.disabled { opacity: .5; pointer-events: none; }

.dl-hint { color: var(--xh-faint); font-size: 12.4px; line-height: 1.7; }
.dl-warn {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    padding: 11px 14px;
    border: 1px solid rgba(255, 180, 84, .32);
    border-radius: var(--xh-radius-sm);
    background: rgba(255, 180, 84, .1);
    color: var(--xh-warn);
    font-size: 12.6px;
    line-height: 1.7;
}

.tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.tbl thead th {
    padding: 9px 12px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--xh-faint);
    border-bottom: 1px solid var(--xh-line);
    white-space: nowrap;
}
.tbl tbody td {
    padding: 11px 12px;
    color: var(--xh-text-2);
    border-bottom: 1px solid rgba(var(--xh-w), var(--xh-w), var(--xh-w), .05);
    vertical-align: middle;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .03); }
.tbl .num { font-family: var(--xh-mono); font-size: 12.4px; letter-spacing: -.2px; }
.tbl .num.plus { color: var(--xh-ok); }
.tbl .num.minus { color: var(--xh-danger); }

.flash {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 16px;
    border-radius: var(--xh-radius-sm);
    border: 1px solid var(--xh-line);
    border-left-width: 3px;
    background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .04);
    font-size: 13px;
    line-height: 1.6;
    color: var(--xh-text-2);
}
.flash.ok { border-left-color: var(--xh-ok); background: rgba(61, 220, 151, .1); color: var(--xh-ok); }
.flash.bad { border-left-color: var(--xh-danger); background: rgba(255, 107, 129, .1); color: var(--xh-danger); }
.flash.warn { border-left-color: var(--xh-warn); background: rgba(255, 180, 84, .1); color: var(--xh-warn); }

.pager a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius-sm);
    color: var(--xh-muted);
    font-size: 12.8px;
    transition: all .16s var(--xh-ease);
}
.pager a:hover { color: var(--xh-text); border-color: var(--xh-line-strong); }
.pager a.on { background: var(--xh-primary-grad); border-color: transparent; color: #fff; font-weight: 600; }

/* ---------------- 下载站 ---------------- */
.dl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
    gap: 16px;
}
.dl-card {
    display: flex;
    flex-direction: column;
    padding: 18px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius);
    background: var(--xh-panel);
    box-shadow: var(--xh-shadow-sm);
    transition: transform .2s var(--xh-ease), border-color .2s var(--xh-ease), box-shadow .2s var(--xh-ease);
}
.dl-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--xh-primary-rgb), .42);
    box-shadow: var(--xh-shadow);
}
.dl-card-head { display: flex; gap: 12px; align-items: flex-start; }
.dl-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(140deg, rgba(var(--xh-primary-rgb), .26), rgba(var(--xh-primary-2-rgb), .18));
    border: 1px solid rgba(var(--xh-primary-rgb), .22);
    color: var(--xh-primary);
    font-family: var(--xh-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: -.3px;
}
.dl-meta { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; }
.dl-title {
    display: block;
    color: var(--xh-text);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dl-title:hover { color: var(--xh-primary); }
.dl-sub { color: var(--xh-faint); font-size: 12px; line-height: 1.6; }
.dl-desc {
    margin: 11px 0 0;
    color: var(--xh-muted);
    font-size: 12.8px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.dl-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: var(--xh-radius-pill);
    background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .06);
    color: var(--xh-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.7;
    white-space: nowrap;
}
.dl-tag.vip { background: rgba(255, 180, 84, .14); color: var(--xh-warn); }
.dl-tag.vip a, .dl-tag a { color: inherit; }
.dl-tag.pts { background: rgba(var(--xh-primary-rgb), .14); color: var(--xh-primary); }
.dl-tag.cloud { background: rgba(61, 220, 151, .14); color: var(--xh-ok); }
.dl-card .dl-btn { margin-top: auto; }
.dl-card .dl-tags + .dl-btn { margin-top: 14px; }

/* 下载详情 */
.dl-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 322px;
    gap: 18px;
    align-items: start;
}
.dl-detail-main, .dl-detail-side {
    padding: 22px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius-lg);
    background: var(--xh-panel);
    box-shadow: var(--xh-shadow-sm);
}
.dl-detail-head { display: flex; gap: 14px; align-items: flex-start; }
.dl-detail-head h1 { margin: 0 0 6px; font-size: 21px; line-height: 1.35; color: var(--xh-text); }
.dl-body {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--xh-line);
    color: var(--xh-text-2);
    font-size: 13.6px;
    line-height: 1.85;
    word-break: break-word;
}
.dl-body img { max-width: 100%; border-radius: var(--xh-radius-sm); }
.dl-buy { margin-top: 4px; }
.dl-share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dl-link {
    display: block;
    margin-top: 10px;
    padding: 9px 12px;
    border: 1px dashed var(--xh-line-strong);
    border-radius: var(--xh-radius-sm);
    background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .03);
    color: var(--xh-muted);
    font-family: var(--xh-mono);
    font-size: 11.6px;
    word-break: break-all;
}
.dl-related { margin-top: 8px; }
.dl-related ul { list-style: none; margin: 0; padding: 0; }
.dl-related li + li { border-top: 1px solid rgba(var(--xh-w), var(--xh-w), var(--xh-w), .05); }
.dl-related li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    color: var(--xh-text-2);
    font-size: 12.8px;
}
.dl-related li a:hover { color: var(--xh-primary); }

/* ---------------- 客户端（多端） ---------------- */
.plat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 6px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius-lg);
    background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .035);
}
.plat-tab {
    flex: 1 1 0;
    min-width: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: var(--xh-radius);
    color: var(--xh-muted);
    font-size: 12.6px;
    font-weight: 500;
    text-align: center;
    transition: all .18s var(--xh-ease);
}
.plat-tab:hover { color: var(--xh-text); background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .05); }
.plat-tab.on {
    border-color: rgba(var(--xh-primary-rgb), .45);
    background: var(--xh-primary-soft);
    color: var(--xh-text);
    box-shadow: var(--xh-ring);
}
.plat-ico { font-size: 18px; line-height: 1; }

.plat-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    padding: 26px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius-lg);
    background: var(--xh-panel);
    box-shadow: var(--xh-shadow-sm);
}
.plat-panel-main h2 { margin: 0 0 8px; font-size: 20px; color: var(--xh-text); }
.plat-panel-main h3 { margin: 20px 0 10px; font-size: 14px; color: var(--xh-text); }
.plat-panel-main p { margin: 0 0 8px; color: var(--xh-muted); font-size: 13.2px; line-height: 1.8; }
.plat-panel-main .dl-btn { width: auto; }
.plat-panel-shot img {
    width: 100%;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius);
    background: var(--xh-panel-2);
    box-shadow: var(--xh-shadow-sm);
}
.changelog { margin: 0; padding-left: 18px; color: var(--xh-text-2); font-size: 12.9px; line-height: 1.85; }
.changelog li::marker { color: var(--xh-primary); }
.ota-tip {
    margin-top: 14px;
    padding: 11px 14px;
    border: 1px dashed var(--xh-line-strong);
    border-radius: var(--xh-radius-sm);
    background: rgba(var(--xh-primary-rgb), .06);
    color: var(--xh-muted);
    font-size: 12.5px;
    line-height: 1.7;
}

/* 历史版本 */
.hist { margin-top: 6px; }
.hist-table { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.hist-table th {
    padding: 8px 10px;
    text-align: left;
    color: var(--xh-faint);
    font-size: 11.4px;
    font-weight: 600;
    border-bottom: 1px solid var(--xh-line);
}
.hist-table td {
    padding: 9px 10px;
    color: var(--xh-text-2);
    border-bottom: 1px solid rgba(var(--xh-w), var(--xh-w), var(--xh-w), .05);
}
.hist-table a { color: var(--xh-primary); font-size: 12.4px; }

/* ---------------- 会员中心 ---------------- */
.mc-grid {
    display: grid;
    grid-template-columns: 244px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
.mc-side {
    position: sticky;
    top: 84px;
    padding: 20px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius-lg);
    background: var(--xh-panel);
    box-shadow: var(--xh-shadow-sm);
}
.mc-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: var(--xh-primary-grad);
    color: #fff;
    font-size: 21px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(var(--xh-primary-rgb), .32);
}
.mc-side > b, .mc-side > strong { display: block; text-align: center; color: var(--xh-text); font-size: 14.5px; }
.mc-side > .dl-sub { display: block; text-align: center; margin-top: 3px; }
.mc-nav { display: flex; flex-direction: column; gap: 3px; margin-top: 16px; }
.mc-nav a {
    padding: 9px 12px;
    border-radius: var(--xh-radius-sm);
    color: var(--xh-muted);
    font-size: 13px;
    transition: all .15s var(--xh-ease);
}
.mc-nav a:hover { background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .06); color: var(--xh-text); }
.mc-nav a.active {
    background: var(--xh-primary-soft);
    color: var(--xh-primary);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(var(--xh-primary-rgb), .22);
}
.mc-stat {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}
.mc-stat > div {
    padding: 14px 16px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius);
    background: var(--xh-panel);
    box-shadow: var(--xh-shadow-sm);
}
.mc-stat b { display: block; color: var(--xh-text); font-size: 17px; line-height: 1.4; }
.mc-stat span { display: block; margin-top: 2px; color: var(--xh-faint); font-size: 11.8px; }
.mc-panel {
    padding: 20px 22px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius-lg);
    background: var(--xh-panel);
    box-shadow: var(--xh-shadow-sm);
}
.mc-panel + .mc-panel { margin-top: 16px; }
.mc-panel h2 {
    margin: 0 0 14px;
    padding-left: 10px;
    border-left: 3px solid var(--xh-primary);
    color: var(--xh-text);
    font-size: 14.5px;
    line-height: 1.4;
}
.mc-panel h2 + .dl-sub { margin-top: -6px; }
.mc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px dashed rgba(var(--xh-w), var(--xh-w), var(--xh-w), .07);
    font-size: 13px;
    color: var(--xh-text-2);
}
.mc-row:last-child { border-bottom: 0; }
.mc-row > span:first-child { color: var(--xh-muted); }
.bar {
    height: 8px;
    margin-top: 10px;
    border-radius: var(--xh-radius-pill);
    background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .08);
    overflow: hidden;
}
.bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--xh-primary-grad);
    box-shadow: 0 0 12px rgba(var(--xh-primary-rgb), .45);
    transition: width .4s var(--xh-ease);
}

/* ---------------- 支付 / 套餐 ---------------- */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
    gap: 14px;
}
.plan-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius);
    background: var(--xh-panel);
    box-shadow: var(--xh-shadow-sm);
    transition: transform .18s var(--xh-ease), border-color .18s var(--xh-ease);
}
.plan-card:hover { transform: translateY(-2px); border-color: rgba(var(--xh-primary-rgb), .42); }
.plan-card.compact { padding: 16px; }
.plan-name { color: var(--xh-text); font-size: 14px; font-weight: 600; }
.plan-price {
    color: var(--xh-primary);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.6px;
    line-height: 1.2;
}
.plan-price span { color: var(--xh-faint); font-size: 12px; font-weight: 500; margin-left: 3px; }
.plan-card .dl-sub { line-height: 1.7; }
.pay-way { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pay-way .dl-btn { width: auto; flex: 1 1 auto; margin-top: 0; }

.pay-panel {
    max-width: 680px;
    margin: 0 auto;
    padding: 28px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius-lg);
    background: var(--xh-panel);
    box-shadow: var(--xh-shadow);
}
.pay-head { text-align: center; padding-bottom: 16px; border-bottom: 1px solid var(--xh-line); }
.pay-head h1, .pay-head h2 { margin: 0 0 6px; font-size: 18px; color: var(--xh-text); }
.pay-amount {
    margin: 10px 0 0;
    color: var(--xh-primary);
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -1px;
}
.pay-gateway {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 18px;
}
.pay-qr {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: var(--xh-radius);
    background: #fff;
    box-shadow: var(--xh-shadow-sm);
}
.pay-qr img { display: block; width: 100%; max-width: 220px; height: auto; border-radius: 8px; }
.pay-note {
    margin: 16px 0 0;
    padding: 12px 14px;
    border-radius: var(--xh-radius-sm);
    background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .04);
    color: var(--xh-muted);
    font-size: 12.6px;
    line-height: 1.75;
}
.pay-claim { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 16px; }
.pay-claim input[type="text"] { flex: 1 1 200px; }
.pay-claim .dl-btn { width: auto; margin-top: 0; }
.pay-done {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(61, 220, 151, .32);
    border-radius: var(--xh-radius-sm);
    background: rgba(61, 220, 151, .1);
    color: var(--xh-ok);
    font-size: 13px;
    line-height: 1.7;
}

/* ---------------- 链接库 / 工具站卡片 ---------------- */
.grid-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
    gap: 14px;
}
.link-card {
    display: flex;
    flex-direction: column;
    padding: 16px 18px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius);
    background: var(--xh-panel);
    box-shadow: var(--xh-shadow-sm);
    transition: transform .18s var(--xh-ease), border-color .18s var(--xh-ease), box-shadow .18s var(--xh-ease);
}
.link-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--xh-primary-rgb), .42);
    box-shadow: var(--xh-shadow);
}
.lc-head { display: flex; gap: 11px; align-items: center; }
.lc-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: linear-gradient(140deg, rgba(var(--xh-primary-rgb), .24), rgba(var(--xh-primary-2-rgb), .16));
    border: 1px solid rgba(var(--xh-primary-rgb), .2);
    color: var(--xh-primary);
    font-size: 15px;
    font-weight: 700;
}
.lc-title-wrap { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lc-title { color: var(--xh-text); font-size: 14px; font-weight: 600; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-host { color: var(--xh-faint); font-size: 11.6px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-desc {
    margin: 10px 0 0;
    color: var(--xh-muted);
    font-size: 12.7px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lc-go {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: auto;
    padding-top: 12px;
    color: var(--xh-primary);
    font-size: 12.5px;
    font-weight: 600;
}
.link-card:hover .lc-go { gap: 8px; }

/* ---------------- 开发者社区 ---------------- */
.cm-section { margin-top: 26px; }
.cm-section h2 {
    margin: 0 0 14px;
    padding-left: 10px;
    border-left: 3px solid var(--xh-primary);
    color: var(--xh-text);
    font-size: 16px;
    line-height: 1.4;
}
.cm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(262px, 1fr));
    gap: 14px;
}
.cm-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 17px 18px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius);
    background: var(--xh-panel);
    box-shadow: var(--xh-shadow-sm);
    transition: transform .18s var(--xh-ease), border-color .18s var(--xh-ease), box-shadow .18s var(--xh-ease);
}
.cm-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--xh-primary-rgb), .42);
    box-shadow: var(--xh-shadow);
}
.cm-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cm-card-top b { color: var(--xh-text); font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-card p {
    margin: 0;
    color: var(--xh-muted);
    font-size: 12.7px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cm-logs { list-style: none; margin: 0; padding: 0; }
.cm-logs li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 11px 4px;
    border-bottom: 1px solid rgba(var(--xh-w), var(--xh-w), var(--xh-w), .06);
    font-size: 12.9px;
}
.cm-logs li:last-child { border-bottom: 0; }
.cm-logs li > a { color: var(--xh-text); font-weight: 600; }
.cm-logs li > a:hover { color: var(--xh-primary); }
.cm-logs li > em { color: var(--xh-muted); font-style: normal; flex: 1 1 auto; min-width: 0; }
.cm-log-type {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: var(--xh-radius-pill);
    background: var(--xh-primary-soft);
    color: var(--xh-primary);
    font-size: 10.8px;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}

/* 项目仓库 */
.repo-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--xh-line);
}
.repo-head h1 { margin: 0 0 8px; font-size: 22px; line-height: 1.35; color: var(--xh-text); }
.repo-head p { margin: 0 0 3px; }
.repo-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius-pill);
    background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .04);
}
.repo-tabs a {
    padding: 6px 15px;
    border-radius: var(--xh-radius-pill);
    color: var(--xh-muted);
    font-size: 12.6px;
    transition: all .16s var(--xh-ease);
}
.repo-tabs a:hover { color: var(--xh-text); }
.repo-tabs a.on { background: rgba(var(--xh-primary-rgb), .16); color: var(--xh-primary); font-weight: 600; }

.repo-body {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    margin-top: 18px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius-lg);
    background: var(--xh-panel);
    box-shadow: var(--xh-shadow-sm);
    overflow: hidden;
}
.repo-tree { border-right: 1px solid var(--xh-line); background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .022); min-width: 0; }
.repo-tree-head {
    padding: 12px 15px;
    border-bottom: 1px solid var(--xh-line);
    color: var(--xh-faint);
    font-size: 11.4px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.repo-tree ul { list-style: none; margin: 0; padding: 6px; }
.repo-tree li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-radius: var(--xh-radius-sm);
    color: var(--xh-text-2);
    font-size: 12.6px;
    word-break: break-all;
    transition: all .14s var(--xh-ease);
}
.repo-tree li a:hover { background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .06); color: var(--xh-text); }
.repo-tree li.on a { background: var(--xh-primary-soft); color: var(--xh-primary); font-weight: 600; }
.ft {
    flex: 0 0 auto;
    min-width: 36px;
    padding: 1px 5px;
    border-radius: 5px;
    background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .08);
    color: var(--xh-faint);
    font-family: var(--xh-mono);
    font-size: 9.6px;
    font-weight: 700;
    text-align: center;
    letter-spacing: -.2px;
}
.repo-main { min-width: 0; }
.repo-editor { display: flex; flex-direction: column; }
.repo-editor-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--xh-line);
    background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .028);
    flex-wrap: wrap;
}
.repo-editor-bar input { flex: 1 1 170px; min-width: 0; }
.repo-editor-bar .dl-btn { width: auto; margin-top: 0; flex: 0 0 auto; }
.repo-editor textarea {
    width: 100%;
    min-height: 430px;
    padding: 14px 16px;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--xh-input-bg) !important;
    color: var(--xh-text);
    font-family: var(--xh-mono);
    font-size: 12.6px;
    line-height: 1.75;
    tab-size: 4;
    resize: vertical;
    outline: 0;
}
.repo-ops {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid var(--xh-line);
    background: rgba(var(--xh-w), var(--xh-w), var(--xh-w), .022);
}
.repo-op { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.repo-op input[type="text"] { width: 170px; }
.repo-op input[type="file"] {
    padding: 6px 8px;
    font-size: 12px;
    color: var(--xh-muted);
    cursor: pointer;
}
.repo-op .dl-btn { width: auto; margin-top: 0; }
.repo-code {
    margin: 0;
    padding: 16px 18px;
    min-height: 430px;
    max-height: 620px;
    overflow: auto;
    background: var(--xh-input-bg);
    color: var(--xh-text-2);
    font-family: var(--xh-mono);
    font-size: 12.6px;
    line-height: 1.75;
    white-space: pre;
    tab-size: 4;
}
.repo-logs, .repo-settings {
    margin-top: 18px;
    padding: 22px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius-lg);
    background: var(--xh-panel);
    box-shadow: var(--xh-shadow-sm);
}
.repo-logs .cm-logs li { padding: 12px 2px; }
.repo-settings form { display: grid; gap: 14px; max-width: 620px; }
.repo-settings label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--xh-muted);
    font-size: 12.6px;
    font-weight: 500;
}
.repo-settings .dl-btn { width: auto; margin-top: 4px; justify-self: start; }
.repo-quota {
    margin-top: 20px;
    padding: 16px 18px;
    border: 1px dashed var(--xh-line-strong);
    border-radius: var(--xh-radius);
    background: rgba(var(--xh-primary-rgb), .05);
}
.repo-quota h3 { margin: 0 0 8px; color: var(--xh-text); font-size: 13.5px; }
.repo-quota p { margin: 0 0 5px; color: var(--xh-muted); font-size: 12.7px; line-height: 1.75; }
.repo-quota a { color: var(--xh-primary); font-weight: 600; }

/* ---------------- 通用表单控件（限定在 .hub 内） ---------------- */
.hub input[type="text"],
.hub input[type="email"],
.hub input[type="password"],
.hub input[type="search"],
.hub input[type="number"],
.hub input[type="url"],
.hub select,
.hub textarea {
    padding: 9px 12px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius-sm);
    background: var(--xh-input-bg);
    color: var(--xh-text);
    font-family: var(--xh-font);
    font-size: 13px;
    line-height: 1.5;
    outline: 0;
    transition: border-color .16s var(--xh-ease), box-shadow .16s var(--xh-ease);
}
.hub input:focus, .hub select:focus, .hub textarea:focus {
    border-color: rgba(var(--xh-primary-rgb), .55);
    box-shadow: var(--xh-ring);
}
.hub input::placeholder, .hub textarea::placeholder { color: var(--xh-faint); }
.hub select { cursor: pointer; }
.hub .hub-search input,
.hub .hub-search input:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 7px 0;
}

/* ---------------- 表单栅格 ---------------- */
.form-grid { display: grid; gap: 12px; max-width: 680px; }
.form-grid .dl-btn { width: auto; margin-top: 0; justify-self: start; }
.fld-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(218px, 1fr)); gap: 12px; }
.fld { display: grid; gap: 6px; color: var(--xh-muted); font-size: 12.6px; font-weight: 500; }
.fld > input, .fld > select, .fld > textarea { width: 100%; }
.fld-check { display: flex; align-items: center; gap: 8px; color: var(--xh-muted); font-size: 12.8px; }
.fld-check input { width: auto; accent-color: var(--xh-primary); }
.row-acts { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.row-acts .dl-btn { width: auto; margin-top: 0; padding: 5px 11px; font-size: 12px; }
.panel-split { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--xh-line); }
.panel-split h2 { border-left: 0; padding-left: 0; margin-bottom: 10px; }

/* ---------------- 协议页 ---------------- */
.agreement-body {
    padding: 28px 30px;
    border: 1px solid var(--xh-line);
    border-radius: var(--xh-radius-lg);
    background: var(--xh-panel);
    box-shadow: var(--xh-shadow-sm);
}
.agreement-body h2 { margin: 24px 0 10px; color: var(--xh-text); font-size: 16px; }
.agreement-body h2:first-child { margin-top: 0; }
.agreement-body h3 { margin: 18px 0 8px; color: var(--xh-text); font-size: 14px; }
.agreement-body p { margin: 0 0 10px; }
.agreement-body ul, .agreement-body ol { margin: 0 0 12px; padding-left: 22px; }
.agreement-body li { margin-bottom: 6px; }
.agreement-body a { color: var(--xh-primary); }

/* 分页分隔符（页脚辅助） */
.p-foot-sep { color: var(--xh-faint); opacity: .5; margin: 0 6px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
    .dl-detail, .plat-panel, .mc-grid, .repo-body { grid-template-columns: minmax(0, 1fr); }
    .mc-side { position: static; }
    .repo-tree { border-right: 0; border-bottom: 1px solid var(--xh-line); }
    .repo-tree ul { max-height: 220px; overflow: auto; }
    .plat-panel-shot { order: -1; max-width: 420px; }
}
@media (max-width: 720px) {
    .hub { padding-top: 18px; }
    .hub-hero { padding: 22px 20px; gap: 16px; }
    .hub-hero h1 { font-size: 22px; }
    .hub-search { width: 100%; }
    .hub-search input { min-width: 0; }
    .dl-grid, .grid-links, .cm-grid, .plan-grid { grid-template-columns: minmax(0, 1fr); }
    .plat-tab { min-width: 76px; padding: 9px 8px; }
    .mc-panel, .agreement-body, .pay-panel { padding: 18px; }
    .mc-stat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tbl { font-size: 12.4px; }
    .tbl thead th, .tbl tbody td { padding: 8px 8px; }
    .repo-editor textarea, .repo-code { min-height: 300px; }
}
