:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f3f9;
  --text: #1f2733;
  --text-soft: #5b6675;
  --border: #e3e8f0;
  --primary: #3b6cff;
  --primary-dark: #2f57d6;
  --primary-soft: #eaf0ff;
  --shadow: 0 6px 24px rgba(31, 39, 51, 0.06);
  --radius: 14px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Hiragino Sans GB", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶部导航（单行布局） ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 0 rgba(31,39,51,.02), 0 4px 16px rgba(31,39,51,.04);
}
.nav-inner {
  display: flex; align-items: center; gap: 28px;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 19px; font-weight: 700; color: var(--text);
  flex: none;
}
.brand:hover { text-decoration: none; }
.nav-menu {
  display: flex; align-items: center; gap: 6px; flex: none;
}
.nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 14px; font-size: 15px; color: var(--text);
  border-radius: 8px; position: relative; line-height: 1.4;
}
.nav-link:hover { color: var(--primary); text-decoration: none; background: var(--surface-2); }
.nav-link.active { color: var(--primary); font-weight: 600; }
.nav-link.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 3px; border-radius: 2px; background: var(--primary);
}
.nav-link .caret { font-size: 10px; opacity: .6; }

/* 分类下拉 */
.nav-drop { position: relative; }
.drop-panel {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 14px 40px rgba(31,39,51,.12); padding: 8px;
  min-width: 190px; display: none; z-index: 60;
}
.nav-drop:hover .drop-panel, .nav-drop:focus-within .drop-panel { display: block; }
.drop-panel::before {
  content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px;
}
.drop-panel a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; color: var(--text); font-size: 14px;
}
.drop-panel a:hover { background: var(--surface-2); color: var(--primary); text-decoration: none; }
.dp-icon { font-size: 15px; width: 20px; text-align: center; }
.dp-cnt { margin-left: auto; font-size: 12px; color: var(--text-soft); }

/* 搜索框 */
.search-box {
  display: flex; align-items: center; gap: 8px;
  flex: 1; max-width: 380px; margin-left: auto;
  background: #f2f4f8; border: 1px solid transparent; border-radius: 999px;
  padding: 0 16px; height: 40px; transition: all .15s ease;
}
.search-box:focus-within { background: #fff; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft); }
.search-ico { width: 17px; height: 17px; color: var(--text-soft); flex: none; }
.search-box input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 14px; color: var(--text); min-width: 0;
}
.search-box input::placeholder { color: #9aa4b2; }

/* 右侧蓝色按钮 */
.btn-client {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  height: 40px; padding: 0 20px; border-radius: 999px;
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 600;
  transition: all .15s ease;
}
.btn-client:hover { background: var(--primary-dark); color: #fff; text-decoration: none;
  box-shadow: 0 6px 18px rgba(59,108,255,.35); }
.btn-ico { width: 16px; height: 16px; }

/* ---------- 赞赏 ---------- */
.reward-btn { color: var(--text); }
.reward-btn .reward-ico { width: 15px; height: 15px; color: #ff5f7e; }
.reward-btn:hover { color: #ff5f7e; background: #fff0f3; }
.reward-btn:hover .reward-ico { color: #ff5f7e; }

.reward-mask {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(20, 26, 38, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: rewardFade .18s ease;
}
.reward-mask[hidden] { display: none; }
@keyframes rewardFade { from { opacity: 0; } to { opacity: 1; } }
.reward-modal {
  position: relative;
  background: #fff; border-radius: 18px;
  padding: 28px 30px 24px; max-width: 340px; width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
  animation: rewardPop .2s ease;
}
@keyframes rewardPop { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.reward-modal h3 { margin: 0 0 14px; font-size: 18px; }
.reward-modal .reward-qr { width: 240px; height: 240px; object-fit: cover; border-radius: 12px; display: block; margin: 0 auto; }
.reward-modal .reward-text { margin: 14px 0 0; font-size: 14px; color: var(--text-soft); line-height: 1.7; }
.reward-close {
  position: absolute; top: 10px; right: 14px;
  border: none; background: none; cursor: pointer;
  font-size: 26px; line-height: 1; color: #9aa4b2; padding: 4px;
}
.reward-close:hover { color: var(--text); }

/* 文章频道 */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.article-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.article-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(31,39,51,.09); }
.article-card .article-cover { display: block; height: 150px; overflow: hidden; background: var(--surface-2); }
.article-card .article-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-card .article-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.article-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-soft); }
.article-card h3 { margin: 0; font-size: 17px; line-height: 1.45; }
.article-card h3 a { color: var(--text); text-decoration: none; }
.article-card h3 a:hover { color: var(--primary); }
.article-card .summary {
  margin: 0; color: var(--text-soft); font-size: 13.5px; line-height: 1.7; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card .read-more { font-size: 13.5px; color: var(--primary); text-decoration: none; font-weight: 600; }
.article-card .read-more:hover { text-decoration: underline; }
.article-detail { max-width: 860px; }
.article-head { margin-bottom: 20px; }
.article-head h1 { margin: 0 0 12px; font-size: 26px; line-height: 1.4; }
.article-head .article-meta { font-size: 13.5px; }

@media (max-width: 860px) {
  .nav-inner { gap: 14px; height: auto; flex-wrap: wrap; padding: 10px 20px; }
  .search-box { order: 3; max-width: none; width: 100%; flex-basis: 100%; }
  .btn-client { margin-left: auto; }
}

/* ---------- 分类 ---------- */
.cats { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 8px; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--border); color: var(--text-soft); font-size: 14px;
  transition: all .15s ease;
}
.cat-pill:hover { text-decoration: none; border-color: var(--primary); color: var(--primary); }
.cat-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.cat-pill .cnt { font-size: 12px; opacity: .7; }

/* ---------- 工具条 ---------- */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin: 22px 0 14px; gap: 12px; flex-wrap: wrap;
}
.toolbar .count { color: var(--text-soft); font-size: 14px; }
.sort-select {
  padding: 8px 12px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 14px;
}

/* ---------- 软件列表 ---------- */
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(31,39,51,.1); }
.card .thumb {
  width: 56px; height: 56px; border-radius: 13px; background: var(--primary-soft);
  color: var(--primary); display: grid; place-items: center; font-size: 26px; font-weight: 700;
  margin-bottom: 12px; object-fit: cover;
}
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--primary); text-decoration: none; }
.card .meta { color: var(--text-soft); font-size: 13px; margin-bottom: 8px; }
.card .summary { color: var(--text-soft); font-size: 14px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.tag { font-size: 12px; background: var(--surface-2); color: var(--text-soft);
  padding: 3px 9px; border-radius: 6px; display: inline-block; }
/* 下载权限标识：所需等级 / 密码 */
.tag.tag-level { background: #fdf3e2; color: #b07a1f; border: 1px solid #f2ddb4; border-radius: 999px; }
.tag.tag-lock { background: #fdeef0; color: #c0392b; border: 1px solid #f6cfd4; border-radius: 999px; }
.tag.tag-paid { background: #e9f9f0; color: #1d9e57; border: 1px solid #bfe8d2; border-radius: 999px; }
.tag.tag-free { background: #e9f9f0; color: #1d9e57; border: 1px solid #bfe8d2; border-radius: 999px; }
.card .actions { margin-top: 14px; display: flex; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 10px; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all .15s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-ghost:hover { background: #e7ecf5; text-decoration: none; }

.empty { text-align: center; padding: 60px 20px; color: var(--text-soft); }

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 8px; justify-content: center; margin: 30px 0; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 38px; height: 38px; padding: 0 12px; display: inline-grid; place-items: center;
  border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-soft);
  font-size: 14px;
}
.pager a:hover { text-decoration: none; border-color: var(--primary); color: var(--primary); }
.pager .cur { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- 详情页 ---------- */
.detail-wrap { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; margin-top: 26px; }
.detail-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.detail-head .thumb { width: 84px; height: 84px; font-size: 36px; border-radius: 18px; flex: none; }
.detail-head .info h1 { margin: 0 0 6px; font-size: 26px; }
.detail-head .info .sub { color: var(--text-soft); margin-bottom: 12px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 18px 0;
  padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.detail-meta .item { font-size: 14px; }
.detail-meta .item b { color: var(--text-soft); font-weight: 500; margin-right: 6px; }

/* ---------- 详情页视频 ---------- */
.detail-video { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 480px;
  background: #14181f; border-radius: 12px; overflow: hidden; margin: 14px 0 4px; }
.detail-video video,.detail-video iframe { position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; display: block; }
.detail-body { font-size: 15px; color: var(--text); }
.detail-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 10px 0; }
.detail-body p { margin: 0 0 12px; }
.detail-body h1 { margin: 24px 0 10px; font-size: 21px; font-weight: 700; }
.detail-body h2 { margin: 22px 0 10px; font-size: 18px; font-weight: 700; }
.detail-body h3 { margin: 20px 0 10px; font-size: 16px; font-weight: 700; }
.detail-body h4,.detail-body h5,.detail-body h6 { margin: 18px 0 8px; font-size: 15px; font-weight: 700; }
.detail-body ul,.detail-body ol { margin: 0 0 14px; padding-left: 24px; }
.detail-body li { margin: 4px 0; }
.detail-body li > ul,.detail-body li > ol { margin: 4px 0; }
.detail-body blockquote { margin: 14px 0; padding: 10px 16px; color: var(--text-soft);
  background: var(--surface-2); border-left: 3px solid var(--primary); border-radius: 0 8px 8px 0; }
.detail-body blockquote p:last-child { margin-bottom: 0; }
.detail-body code { background: var(--surface-2); padding: 2px 6px; border-radius: 5px;
  font-size: 13px; font-family: Consolas, Monaco, "Courier New", monospace; }
.detail-body pre { background: #22283a; color: #e6e9f2; padding: 14px 16px; border-radius: 10px;
  overflow-x: auto; margin: 14px 0; }
.detail-body pre code { background: none; color: inherit; padding: 0; font-size: 13px; }
.detail-body hr { border: none; border-top: 1px solid var(--border); margin: 22px 0; }
.detail-body a { color: var(--primary); }
.detail-body table { border-collapse: collapse; width: 100%; margin: 14px 0; }
.detail-body th,.detail-body td { border: 1px solid var(--border); padding: 8px 12px; }
.detail-body th { background: var(--surface-2); }
.back-link { display: inline-block; margin: 22px 0 4px; color: var(--text-soft); font-size: 14px; }

/* 详情页顶部：返回列表 + 分类胶囊条 */
.detail-topbar { display: flex; align-items: center; gap: 14px; }
.detail-topbar .back-link { margin: 20px 0; flex-shrink: 0; }
.cats-detail { flex: 1; min-width: 0; margin: 0; flex-wrap: nowrap; overflow-x: auto; padding: 4px 0; }
.cats-detail::-webkit-scrollbar { height: 4px; }
.cats-detail::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.cats-detail .cat-pill { white-space: nowrap; flex-shrink: 0; }

/* ---------- 页脚 ---------- */
.site-footer { text-align: center; color: var(--text-soft); font-size: 13px;
  padding: 34px 20px 40px; }
.site-footer a { color: var(--text-soft); }

.admin-entry { display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  color: var(--text-soft); border: 1px solid var(--border); padding: 6px 12px; border-radius: 8px; }
.admin-entry:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

/* ---------- 前台用户区（导航右侧） ---------- */
.nav-user { position: relative; flex: none; }
/* 隐形桥：盖住按钮与下拉面板之间的 10px 空隙，防止移动鼠标时 hover 断开 */
.nav-user::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
.nav-user-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff; border: none; cursor: pointer;
  padding: 8px 14px; border-radius: 999px; font-size: 14px; line-height: 1.4;
  text-decoration: none;
}
.nav-avatar {
  width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.25);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex: none;
}
.nav-uname { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user .caret { font-size: 10px; opacity: .8; }
.nav-lvl {
  font-size: 11px; padding: 2px 7px; border-radius: 999px; font-weight: 600; flex: none;
  background: var(--surface-2); color: var(--text-soft);
}
.nav-lvl.lv-1 { background: #f7e6cd; color: #a2652a; }
.nav-lvl.lv-2 { background: #e4e9f2; color: #6d7b90; }
.nav-lvl.lv-3 { background: #fdeeda; color: #b07a1f; }
.nav-lvl.lv-4 { background: #e8e3ff; color: #5b3fd4; }
.user-panel {
  display: none; position: absolute; right: 0; top: calc(100% + 10px); z-index: 120;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); min-width: 210px; padding: 6px; text-align: left;
}
.nav-user:hover .user-panel, .nav-user:focus-within .user-panel { display: block; }
.up-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border-radius: 8px; font-size: 13.5px; color: var(--text);
}
.up-mail { color: var(--text-soft); font-size: 12.5px; border-bottom: 1px solid var(--border);
  border-radius: 0; margin-bottom: 4px; word-break: break-all; }
.up-k { color: var(--text-soft); }
.up-link { color: #d64550; cursor: pointer; margin-top: 2px; }
.up-link:hover { background: #fdf1f2; text-decoration: none; }

/* ---------- 登录 / 注册 / 下载验证页 ---------- */
.auth-page { background: var(--bg); }
.auth-wrap { max-width: 460px; margin: 46px auto 70px; padding: 0 20px; }
.auth-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px 30px 26px;
}
.auth-card h1 { margin: 0 0 4px; font-size: 22px; }
.auth-sub { margin: 0 0 18px; color: var(--text-soft); font-size: 13.5px; }
.auth-card .field { margin-bottom: 14px; }
.auth-card .field label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 6px; }
.auth-card .field input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 14px; background: #fff; color: var(--text); outline: none;
}
.auth-card .field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.auth-card .alert { margin-bottom: 14px; }
/* 邮箱验证码行：输入框 + 获取按钮 */
.auth-card .code-row { display: flex; gap: 8px; }
.auth-card .code-row input { flex: 1; }
.auth-card .code-row .btn { white-space: nowrap; flex-shrink: 0; padding: 8px 14px; font-size: 13px; }
.auth-card .hint-inline { font-size: 12.5px; color: var(--text-soft); margin-top: 6px; }
.btn-block { width: 100%; justify-content: center; text-align: center; margin-top: 4px; }
.auth-foot { margin: 16px 0 0; text-align: center; font-size: 13.5px; color: var(--text-soft); }
.auth-foot.clearfix::after { content: ""; display: table; clear: both; }
.auth-foot .auth-link-left { float: left; }
.auth-foot .auth-link-right { float: right; }

/* ---------- 滑动拼图验证码 ---------- */
.slider-captcha { user-select: none; }
.sc-canvas {
  display: block; width: 100%; max-width: 320px; border-radius: 10px;
  border: 1px solid var(--border); background: #eceff5;
}
.sc-track {
  position: relative; width: 100%; max-width: 320px; height: 38px; margin-top: 8px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
}
.sc-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: var(--primary-soft); border-radius: 999px; }
.sc-knob {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px;
  background: #fff; border: 1px solid var(--border); border-radius: 50%;
  box-shadow: 0 2px 8px rgba(31,39,51,.14); cursor: grab;
  display: flex; align-items: center; justify-content: center; color: var(--primary);
  touch-action: none;
}
.sc-knob:active { cursor: grabbing; }
.sc-hint { margin-top: 8px; font-size: 12.5px; color: var(--text-soft); text-align: center; }
.sc-tip { margin-top: 6px; font-size: 12.5px; min-height: 18px; }
.slider-captcha.is-pass .sc-tip { color: #1d9e57; }
.slider-captcha.is-fail .sc-tip { color: #d64550; }
.slider-captcha.is-pass .sc-track { border-color: #7ed6a2; }
.slider-captcha.is-fail .sc-canvas { opacity: .82; }

/* ---------- 详情页下载权限提示 ---------- */
.dl-gate-tip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px;
  color: #b07a1f; background: #fdf3e2; border: 1px solid #f2ddb4;
  padding: 6px 10px; border-radius: 999px;
}

/* ---------- 简易提示条（登录/注册页复用） ---------- */
.alert { padding: 10px 14px; border-radius: 9px; font-size: 13.5px; }
.alert-error { background: #fdeef0; color: #c0392b; border: 1px solid #f5c6cb; }
.alert-ok { background: #e9f9f0; color: #1d9e57; border: 1px solid #bfe8d2; }


/* ---------- 个人中心 ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.profile-name { font-size: 17px; font-weight: 600; color: var(--text); }
.profile-table { width: 100%; border-collapse: collapse; margin-bottom: 4px; }
.profile-table th, .profile-table td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--border); font-size: 14px; }
.profile-table th { color: var(--text-soft); font-weight: 500; width: 96px; }
.profile-table td { color: var(--text); }
.profile-table tr.row-editable { cursor: pointer; transition: background .15s; }
.profile-table tr.row-editable:hover th { color: var(--primary); }
.profile-table tr.row-editable td { position: relative; }
.profile-table tr.row-editable td::after {
  content: '✏️ 修改';
  font-size: 12px;
  color: var(--primary);
  margin-left: 12px;
  opacity: 0;
  transition: opacity .15s;
  white-space: nowrap;
}
.profile-table tr.row-editable:hover { background: rgba(59, 108, 255, 0.045); }
.profile-table tr.row-editable:hover td::after { opacity: 1; }
.profile-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* 个人中心：分区与编辑 */
.btn-sm { padding: 6px 13px; font-size: 13px; }
.profile-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-head h2 { font-size: 16px; font-weight: 600; margin: 0; color: var(--text); }

/* 个人中心表单：与登录页输入框风格一致 */
.profile-content .field { margin-bottom: 14px; }
.profile-content .field label { display: block; font-size: 13px; color: var(--text-soft); margin-bottom: 6px; }
.profile-content .field input {
  width: 100%; max-width: 420px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 9px;
  font-size: 14px; background: #fff; color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.profile-content .field input::placeholder { color: #b3b9c9; }
.profile-content .field input:hover { border-color: #c9cfdd; }
.profile-content .field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* 个人中心：左侧列表菜单 + 右侧内容布局 */
.auth-profile-wrap { max-width: 880px; }
.profile-shell {
  display: flex; gap: 22px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px;
}
.profile-menu { width: 200px; flex-shrink: 0; border-right: 1px solid var(--border); padding-right: 16px; }
.pm-user { display: flex; align-items: center; gap: 10px; padding: 4px 10px 16px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.pm-user-name { font-weight: 600; font-size: 14px; color: var(--text); }
.pm-item {
  display: flex; align-items: center; gap: 8px; padding: 11px 12px;
  border-radius: 9px; color: var(--text-soft); text-decoration: none;
  font-size: 14.5px; margin-bottom: 4px;
}
.pm-item:hover { background: var(--surface-2); color: var(--text); }
.pm-item.active { background: var(--primary); color: #fff; }
.pm-icon { font-size: 16px; line-height: 1; }
.pm-count { margin-left: auto; font-size: 12px; padding: 1px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-soft); }
.pm-item.active .pm-count { background: rgba(255,255,255,.25); color: #fff; }
.profile-content { flex: 1; min-width: 0; }
.profile-content h1 { margin: 0 0 4px; font-size: 22px; }
.profile-content .auth-sub { margin: 0 0 18px; color: var(--text-soft); font-size: 13.5px; }

/* 订单记录列表 */
.order-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.order-item { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--surface); }
.oi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.oi-title { font-size: 15px; font-weight: 600; color: var(--text); }
.oi-status { font-size: 12.5px; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.oi-status.paid { background: #e9f9f0; color: #1d9e57; border: 1px solid #bfe8d2; }
.oi-status.pending { background: #fff4e5; color: #c2571f; border: 1px solid #f3d8b0; }
.oi-status.expired { background: #f0f1f5; color: #8a8f99; border: 1px solid #dde0e6; }
.oi-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; font-size: 12.5px; color: var(--text-soft); }
.oi-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.oi-price { font-size: 17px; font-weight: 700; color: var(--primary); }
.empty-box { margin-top: 18px; padding: 40px; text-align: center; color: var(--text-soft); background: var(--surface); border: 1px dashed var(--border); border-radius: 12px; }
@media (max-width: 680px) {
  .profile-shell { flex-direction: column; }
  .profile-menu { width: 100%; border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 12px; display: flex; gap: 8px; }
  .pm-user { display: none; }
  .pm-item { margin-bottom: 0; flex: 1; justify-content: center; }
  .pm-count { margin-left: 6px; }
}

/* ---------- 赞助升级 ---------- */
.tier-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 16px 0; }
.tier-card { border: 1px solid var(--border); border-radius: 14px; padding: 18px 16px; text-align: center; background: var(--surface); }
.tier-card.lv-1 { border-color: #e7c9a0; }
.tier-card.lv-2 { border-color: #c3ccdc; }
.tier-card.lv-3 { border-color: #e7c98a; }
.tier-card.lv-4 { border-color: #c8bdf0; }
.tier-card.owned { background: var(--surface-2); opacity: .85; }
.tier-name { font-size: 15px; font-weight: 600; color: var(--text); }
.tier-price { font-size: 22px; font-weight: 700; color: var(--primary); margin: 6px 0 12px; }
.tier-days { font-size: 13px; font-weight: 400; color: var(--text-soft); margin-left: 2px; }
.tier-tag { font-size: 13px; color: var(--text-soft); }
.pay-qr { text-align: center; padding: 10px 0 4px; }
.pay-qr .qr-box {
  position: relative; width: 240px; height: 240px;
  margin: 0 auto; border-radius: 12px;
  border: 1px solid var(--border); background: #fff; overflow: hidden;
}
.pay-qr .qr-box img {
  position: relative; z-index: 1;
  width: 240px; height: 240px; display: block;
  border: none; border-radius: 12px;
  opacity: 0; transition: opacity .25s ease;
}
.pay-qr .qr-box img.loaded { opacity: 1; }
.pay-qr .qr-loading {
  position: absolute; inset: 0; z-index: 2; display: flex;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; color: var(--text-soft); font-size: 13px; background: #fff;
}
.pay-qr .qr-loading.hidden { display: none; }
.pay-qr .qr-loading.is-clickable { cursor: pointer; }
.pay-qr .qr-spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid #e6e8ee; border-top-color: #07c160;
  animation: qrSpin .8s linear infinite;
}
.pay-qr .qr-loading.is-clickable .qr-spinner { display: none; }
@keyframes qrSpin { to { transform: rotate(360deg); } }
.pay-simulate { margin-top: 6px; }

/* Markdown 任务列表 */
.detail-body li.task-item { list-style: none; margin-left: -20px; }
.detail-body li.task-item input[type=checkbox] { margin-right: 6px; vertical-align: -1px; }

/* 一次性下载价格标签 */
.tag-buy { background: #f3efff; color: #7a4fd6; border: 1px solid #e2d8fb; }

/* ============ 查询订单页 ============ */
.od-main { max-width: 860px; padding: 26px 16px 60px; }
.od-head h1 { font-size: 20px; margin: 0 0 14px; }
.od-note { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; color: var(--text-soft); font-size: 13.5px; margin-bottom: 16px; }
.od-panel { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 6px 20px 20px; }
.od-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.od-tab { padding: 13px 2px 11px; font-size: 14.5px; color: var(--text-soft); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.od-tab:hover { color: var(--text); }
.od-tab.active { color: var(--primary, #3b6ef6); border-bottom-color: var(--primary, #3b6ef6); font-weight: 600; }
.od-form { margin-top: 4px; }
.od-label { display: block; font-size: 13.5px; color: var(--text); margin-bottom: 8px; }
.od-form input[type=text], .od-form input[type=email] { width: 100%; padding: 10px 13px; border: 1px solid var(--border); border-radius: 9px; font-size: 14px; margin-bottom: 14px; }
.od-form input:focus { outline: none; border-color: var(--primary, #3b6ef6); }
.od-btns { display: flex; gap: 10px; }
.od-btns[hidden] { display: none; }
.od-result { margin-top: 18px; }
.od-list { display: flex; flex-direction: column; gap: 10px; }
.od-list-head { font-size: 13.5px; color: var(--text-soft); margin: 14px 0 10px; }
.od-item { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.od-item-link { cursor: pointer; transition: border-color .15s; }
.od-item-link:hover { border-color: var(--primary, #3b6ef6); }
.od-item-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.od-item-name { font-size: 14px; font-weight: 500; }
.od-item-meta { font-size: 12.5px; color: var(--text-soft); margin-top: 6px; }
.od-item-meta a { color: var(--primary, #3b6ef6); }
.od-item-del { font-size: 12.5px; color: var(--text-soft); }
.od-item-del:hover { color: #c0392b; }
.od-cache-tip { font-size: 13px; color: var(--text-soft); margin: 6px 0 12px; }
.od-cache-empty { font-size: 13.5px; color: var(--text-soft); padding: 8px 0; }
.od-me-tip { margin-top: 14px; font-size: 13px; color: var(--text-soft); }
.od-me-tip a { color: var(--primary, #3b6ef6); }

/* ===== 下载验证弹窗（详情页内嵌，替代独立门禁页） ===== */
.reward-modal.dlgate {
  max-width: 400px;
  text-align: left;
}
.reward-modal.dlgate h3 { margin-bottom: 6px; }
.dlgate-sub { margin: 0 0 12px; font-size: 14px; color: var(--text-soft); text-align: left; }
.dlgate-note { margin: 0 0 12px; font-size: 13px; color: var(--text-soft); line-height: 1.7; text-align: left; }
.reward-modal.dlgate .field label { font-size: 13px; }
.reward-modal.dlgate .field input { margin-bottom: 12px; }
.dlgate-pwd-row { display: flex; gap: 8px; }
.dlgate-pwd-row input {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 14px; background: #fff; color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.dlgate-pwd-row input::placeholder { color: var(--text-soft); }
.dlgate-pwd-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.dlgate-pwd-row .btn { white-space: nowrap; flex-shrink: 0; }
a.dl-gate-tip {
  padding: 9px 16px; border-radius: 10px; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: all .15s ease; cursor: pointer;
}
a.dl-gate-tip:hover { background: #fae8c8; border-color: #e5c88f; text-decoration: none; }

/* ===== 登录页：合作账号登录 ===== */
.oauth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 14px; color: var(--text-soft); font-size: 13px;
}
.oauth-divider::before, .oauth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.oauth-btns { display: flex; gap: 10px; }
.oauth-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; border-radius: 10px; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: all .15s ease; border: 1px solid transparent;
}
.oauth-btn:hover { text-decoration: none; filter: brightness(1.06); }
.oauth-wx  { background: #2aae67; color: #fff; }
.oauth-wx:hover  { color: #fff; }
.oauth-qq  { background: #12b7f5; color: #fff; }
.oauth-qq:hover  { color: #fff; }
