* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: #f4f6f9; color: #1f2937; min-height: 100vh; display: flex; justify-content: center; }
.container { width: 100%; max-width: 560px; padding: 20px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.brand { font-size: 20px; font-weight: 700; }
a.brand { color: inherit; text-decoration: none; }
.lang-btn { background: #fff; border: 1px solid #d1d5db; border-radius: 6px; padding: 4px 10px; margin-left: 6px; cursor: pointer; font-size: 13px; }
.lang-btn.active { background: #2563eb; color: #fff; border-color: #2563eb; }
.view { background: #fff; border-radius: 12px; padding: 28px 24px; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.view h1 { font-size: 22px; margin-bottom: 8px; }
.hint { color: #6b7280; font-size: 14px; margin-bottom: 16px; }
.hidden { display: none !important; }
.code-row { display: flex; gap: 10px; margin-top: 12px; }
input[type=text], input[type=password] { flex: 1; padding: 12px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px; width: 100%; }
.btn { padding: 12px 22px; border: none; border-radius: 8px; font-size: 15px; cursor: pointer; background: #e5e7eb; }
.btn.primary { background: #2563eb; color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.drop-area { border: 2px dashed #cbd5e1; border-radius: 10px; padding: 28px; text-align: center; color: #64748b; cursor: pointer; margin: 14px 0; }
.drop-area.dragover { border-color: #2563eb; background: #eff6ff; }
.skin-preview { display: block; max-width: 100%; max-height: 220px; margin: 0 auto 10px; border-radius: 8px; }
#dropText { font-size: 13px; }
.file-name { color: #2563eb; font-size: 14px; margin-bottom: 10px; }
.bodytype-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
/* 固定标签宽度：让「体型」「模型像素处理」两行的按钮左端对齐 */
.bodytype-label { font-size: 14px; color: #6b7280; min-width: 150px; }
.bodytype-btn { background: #fff; border: 1px solid #d1d5db; border-radius: 8px; padding: 8px 12px; font-size: 14px; cursor: pointer; color: #1f2937; }
.bodytype-btn.active { background: #2563eb; color: #fff; border-color: #2563eb; }
/* 像素处理：勾选样式（方框 + 选中打勾） */
.check-opt { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; padding: 6px 0; margin-right: 16px; font-size: 14px; cursor: pointer; color: #1f2937; }
.check-opt::before { content: ''; box-sizing: border-box; width: 16px; height: 16px; border: 1.5px solid #9ca3af; border-radius: 4px; text-align: center; line-height: 13px; font-size: 12px; color: #fff; flex: 0 0 auto; }
.check-opt.active::before { content: '✓'; background: #2563eb; border-color: #2563eb; }
/* 键帽材质：生物 + 方块合并为一个可搜索下拉（搜索框在下拉面板内部）；无公仔键帽模型时整行置灰 */
.keycap-combo { position: relative; flex: 1 1 320px; min-width: 0; }
.keycap-combo-btn { width: 100%; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #1f2937; font-size: 14px; text-align: left; cursor: pointer; }
.keycap-combo-btn:disabled { cursor: not-allowed; background: #f3f4f6; }
.keycap-combo-caret { color: #9ca3af; font-size: 12px; }
.keycap-combo-panel { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid #d1d5db; border-radius: 8px; box-shadow: 0 8px 24px rgba(15, 23, 42, .14); padding: 8px; }
.keycap-tex-search { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; color: #1f2937; background: #fff; }
.keycap-tex-search::placeholder { color: #9ca3af; }
.keycap-combo-list { max-height: 280px; overflow-y: auto; margin-top: 6px; }
.keycap-combo-group { padding: 8px 8px 4px; font-size: 12px; color: #6b7280; border-top: 1px solid #f1f5f9; }
.keycap-combo-group:first-child { border-top: none; }
.keycap-combo-item { padding: 8px; border-radius: 6px; font-size: 14px; color: #1f2937; cursor: pointer; }
.keycap-combo-item:hover, .keycap-combo-item.active { background: #eff6ff; color: #2563eb; }
.keycap-combo-empty { padding: 12px 8px; font-size: 13px; color: #9ca3af; }
.bodytype-row.disabled { opacity: .45; }
#uploadBtn { width: 100%; margin-top: 14px; }
#viewResultBtn { width: 100%; margin-top: 10px; }
.error { color: #dc2626; font-size: 14px; margin-top: 10px; }

/* 输入码下方说明窗口 */
.code-info-box {
  margin-top: 22px;
  padding: 16px 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.code-info-line {
  font-size: 14px;
  color: #475569;
  line-height: 1.8;
  margin: 0;
}
.code-info-line + .code-info-line { margin-top: 2px; }
.code-highlight {
  display: inline-block;
  font-weight: 700;
  color: #2563eb;
  background: #dbeafe;
  padding: 1px 8px;
  border-radius: 5px;
  cursor: pointer;
  user-select: all;
  letter-spacing: .5px;
  transition: background .2s;
}
.code-highlight:hover { background: #bfdbfe; }
.code-highlight.copied { background: #bbf7d0; color: #15803d; }
.support-link {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.support-link:hover { color: #1d4ed8; }
.support-link.no-link {
  color: #94a3b8;
  text-decoration: none;
  cursor: default;
}
.product-name { font-size: 16px; font-weight: 600; color: #2563eb; margin-bottom: 6px; }
.progress { height: 10px; background: #e5e7eb; border-radius: 5px; overflow: hidden; margin: 14px 0 8px; }
.progress-bar { height: 100%; background: #2563eb; width: 0%; transition: width .5s ease; }
.stage { font-size: 14px; color: #6b7280; min-height: 20px; }
.files h3 { font-size: 16px; margin: 18px 0 10px; }
.file-list { list-style: none; }
.file-list li { margin-bottom: 8px; }
.file-list a { display: block; background: #eff6ff; color: #2563eb; border-radius: 8px; padding: 12px 14px; text-decoration: none; font-size: 14px; word-break: break-all; }
.file-list a:hover { background: #dbeafe; }
.file-batch { margin-bottom: 14px; }
.file-batch:last-child { margin-bottom: 0; }
.batch-title { font-size: 13px; color: #4b5563; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.batch-title::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2563eb; }
/* 批次头部：该次生成所用皮肤缩略图 + 批次文字 */
.batch-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.batch-skin { height: 56px; width: auto; border-radius: 6px; border: 1px solid #e5e7eb; background: #f9fafb; flex: 0 0 auto; }
.retry { margin-top: 16px; text-align: center; }
.cooldown-hint { font-size: 13px; color: #9ca3af; margin-top: 8px; }
.footer { text-align: center; color: #9ca3af; font-size: 13px; margin-top: 24px; }
.footer-dot { margin: 0 6px; }
.footer-link { color: #2563eb; text-decoration: none; }
.footer-link:hover { text-decoration: underline; }

/* 顶部置顶滚动公告（单条；按文本宽度重复多份，每次位移一份宽度 → 任意屏幕宽度都无缝） */
.notice-bar { position: fixed; top: 0; left: 0; right: 0; height: 36px; background: #111827; color: #fff; overflow: hidden; z-index: 60; display: flex; align-items: center; }
.notice-track { display: inline-flex; white-space: nowrap; will-change: transform; animation-name: notice-scroll; animation-timing-function: linear; animation-iteration-count: infinite; }
.notice-item { padding-right: 48px; font-size: 13px; letter-spacing: .2px; }
@keyframes notice-scroll { from { transform: translateX(0); } to { transform: translateX(var(--shift, -50%)); } }
body.has-notice .container { padding-top: 56px; }

/* 客户站「更新日志」页 */
.link-btn { background: none; border: none; color: #2563eb; font-size: 14px; cursor: pointer; padding: 0 0 10px; }
.report-list { display: flex; flex-direction: column; gap: 10px; }
.report-item { display: block; padding: 14px; border: 1px solid #e5e7eb; border-radius: 10px; text-decoration: none; color: inherit; }
.report-item:hover { border-color: #93c5fd; background: #f8faff; }
.report-item-title { font-size: 15px; font-weight: 600; color: #1f2937; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.report-ver { font-size: 12px; color: #2563eb; background: #eff6ff; border-radius: 6px; padding: 1px 8px; }
.report-date { font-size: 12px; color: #9ca3af; margin-top: 4px; }
.report-excerpt { font-size: 13px; color: #6b7280; margin-top: 6px; line-height: 1.6; }
.report-content { font-size: 14px; line-height: 1.8; color: #1f2937; word-break: break-word; }
.report-content h1, .report-content h2, .report-content h3, .report-content h4 { margin: 16px 0 8px; }
.report-content p { margin: 8px 0; }
.report-content ul, .report-content ol { padding-left: 22px; margin: 8px 0; }
.report-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 10px 0; }
.report-content a { color: #2563eb; }
.report-content blockquote { border-left: 3px solid #d1d5db; padding-left: 10px; color: #4b5563; margin: 8px 0; }
.report-content pre { background: #f3f4f6; padding: 10px; border-radius: 8px; overflow: auto; }
.report-content code { background: #f3f4f6; padding: 1px 4px; border-radius: 4px; }

/* 广告位（仅显示在「上传 / 生成」界面下方，按顺序纵向排列、每条一个方框）
   类名刻意避开 ad-* ：部分浏览器/广告拦截扩展会把 .ad-* 元素直接隐藏 */
.extra-link { display: block; text-decoration: none; color: inherit; }
.extra-link + .extra-link { margin-top: 12px; }
.extra-hint { font-size: 12px; color: #9ca3af; margin-top: 10px; text-align: center; }
/* 广告位与上方「上传」窗口之间留出间距，避免两个白卡视觉粘连 */
#view-extras { margin-top: 16px; }
.extra-card { display: flex; gap: 12px; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px; background: #fff; }
.extra-img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; flex: 0 0 auto; background: #f3f4f6; }
.extra-body { min-width: 0; }
.extra-title { font-weight: 600; font-size: 15px; }
.extra-intro { font-size: 13px; color: #6b7280; margin: 4px 0; }
.extra-contact { font-size: 13px; color: #2563eb; word-break: break-all; }

/* 上传页拆成多个白卡框（上传皮肤 / 可导出模型种类 / 模型图集） */
.card-box { border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; padding: 16px; margin-bottom: 16px; }
.view > .card-box:last-child { margin-bottom: 0; }

/* 可导出模型种类图例 */
.legend h3 { font-size: 14px; margin: 0 0 8px; color: #374151; }
.legend-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.legend-card { flex: 1 1 96px; min-width: 96px; max-width: 140px; border: 1px solid #e5e7eb; border-radius: 10px; padding: 8px; background: #fff; text-align: center; }
.legend-img { width: 100%; height: 72px; object-fit: contain; border-radius: 6px; background: #f9fafb; display: block; }
.legend-title { font-size: 12px; color: #4b5563; margin-top: 6px; line-height: 1.3; }
/* 未包含的种类：置灰 */
.legend-card.legend-disabled { filter: grayscale(1); opacity: .45; }
/* 该码属于全彩下的任何模型：高亮「全彩模型」 */
.legend-card.legend-featured { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.15); }

/* 模型图集 */
.gallery h3 { font-size: 14px; margin: 0 0 8px; color: #374151; }
.gallery-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.gallery-card { flex: 1 1 110px; min-width: 110px; max-width: 160px; border: 1px solid #e5e7eb; border-radius: 10px; padding: 8px; background: #fff; text-align: center; }
.gallery-img { width: 100%; height: 90px; object-fit: contain; border-radius: 6px; background: #f9fafb; display: block; }
.gallery-label { font-size: 12px; color: #4b5563; margin-top: 6px; }
.gallery-card.gallery-disabled { filter: grayscale(1); opacity: .45; }
