/* 巨响在线 · 素材中台共享样式
 * 各平台教程页（xianyu-guide / pinduoduo-guide …）共同引入
 * 素材区结构样式改这里一处即可全平台生效；页面级样式（hero/教程/下载位等）仍留在各页面
 * 注意：本文件在各页面 <style>（页面级）之后加载，保持与拆分前一致的层叠顺序
 * 主色适配：页面 <style> 里定义下方 8 个 --hub-primary* 变量即可切换品牌色；
 *          不定义则走默认值（闲鱼蓝），闲鱼页无需任何改动
 */

/* ===== 素材生产（现成的 / 自己动手）===== */
.mat-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.mat-tab {
  border: 1.5px solid #dde3ec; background: #fff; border-radius: 10px;
  padding: 12px 6px; text-align: center; font-size: 14.5px; font-weight: 600;
  cursor: pointer; transition: all .15s; font-family: inherit; color: #3d4757;
}
.mat-tab .m-icon { font-size: 17px; margin-right: 3px; vertical-align: -2px; }
.mat-tab.on { border-color: var(--hub-primary, #3164f4); background: var(--hub-primary-soft, #f0f5ff); color: var(--hub-primary, #3164f4); }
.pane-hide { display: none; }
.rec-wrap { position: relative; display: inline-block; margin-left: 5px; vertical-align: 1px; }
.rec-wrap:focus { outline: none; }
.rec-badge {
  font-size: 10px; color: #fff; background: linear-gradient(135deg, #ff9a3c, #ff6a00);
  border-radius: 4px; padding: 1px 5px; font-weight: 700; letter-spacing: 1px;
}
.rec-tip {
  display: none; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(100% + 8px); width: 220px;
  background: rgba(31,39,51,.94); color: #fff; font-size: 12px; font-weight: 400;
  line-height: 1.65; border-radius: 8px; padding: 10px 12px; z-index: 60;
  white-space: normal; text-align: left;
}
.rec-wrap:hover .rec-tip, .rec-wrap:focus .rec-tip, .rec-wrap:focus-within .rec-tip { display: block; }

.panel { background: #fff; border: 1px solid #e8ecf2; border-radius: 12px; padding: 18px 16px; margin-bottom: 14px; }
.m-step { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sno {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: var(--hub-primary, #3164f4); color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.m-step h4 { font-size: 15px; }
.m-step .m-hint { font-size: 12px; color: #98a3b3; margin-left: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid #dde3ec; background: #fff; color: #3d4757;
  border-radius: 10px; padding: 9px 14px; font-size: 14px; cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  transition: all .15s; font-family: inherit;
}
.chip small { font-size: 11px; color: #98a3b3; }
.chip:hover { border-color: var(--hub-primary-border-light, #9db9f8); }
.chip.on { background: var(--hub-primary, #3164f4); border-color: var(--hub-primary, #3164f4); color: #fff; }
.chip.on small { color: var(--hub-primary-chip-text, #ccdaff); }
.chip-miss {
  display: inline-block; margin-left: 5px; padding: 0 5px;
  font-size: 10px; font-weight: 600; line-height: 16px;
  color: #b45309; background: #fef3c7; border-radius: 4px; vertical-align: 1px;
}
.chip.on .chip-miss { color: #fff; background: rgba(255,255,255,.28); }
.type-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.type-tab {
  border: 1.5px solid #dde3ec; background: #fff; border-radius: 10px;
  padding: 12px 8px; text-align: center; cursor: pointer; transition: all .15s;
  font-family: inherit;
}
.type-tab .t-icon { font-size: 22px; }
.type-tab .t-name { font-size: 14px; font-weight: 600; margin-top: 4px; }
.type-tab .t-count { font-size: 11px; color: #98a3b3; margin-top: 2px; }
.type-tab.on { border-color: var(--hub-primary, #3164f4); background: var(--hub-primary-soft, #f0f5ff); }
.type-tab.on .t-name { color: var(--hub-primary, #3164f4); }
.actions { display: flex; gap: 10px; margin-bottom: 14px; }
.btn {
  flex: 1; border-radius: 10px; padding: 11px 0; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .15s; font-family: inherit; border: 1px solid transparent;
}
.btn-shuffle { background: #fff; border-color: var(--hub-primary, #3164f4); color: var(--hub-primary, #3164f4); }
.btn-shuffle:hover { background: var(--hub-primary-soft, #f0f5ff); }
.btn-ai { background: var(--hub-primary-tint, #eef3ff); border-color: var(--hub-primary-border, #c9d9ff); color: var(--hub-primary, #3164f4); }
.btn-ai:hover { background: var(--hub-primary-tint-hover, #e2ebff); }
.btn-ai .ai-badge {
  display: inline-block; font-size: 10px; background: linear-gradient(135deg,#7b5cff,var(--hub-primary,#3164f4));
  color: #fff; border-radius: 4px; padding: 1px 5px; margin-right: 5px; vertical-align: 1px;
}
.btn-ai:disabled { opacity: .6; cursor: not-allowed; }
.copy-card { background: #fff; border: 1px solid #e8ecf2; border-radius: 12px; overflow: hidden; }
.copy-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; }
.copy-head h3 { font-size: 15px; }
.word-badge { font-size: 11px; color: #98a3b3; background: #f3f5f8; border-radius: 4px; padding: 2px 7px; margin-left: auto; white-space: nowrap; }
.copy-body {
  padding: 12px 16px 16px; font-size: 14px; line-height: 1.85; color: #2c3546;
  white-space: pre-wrap; word-break: break-word; max-height: 420px; overflow-y: auto;
}
.copy-btn {
  width: calc(100% - 32px); margin: 0 16px 16px; border: none; border-radius: 10px;
  background: var(--hub-primary, #3164f4); color: #fff; font-size: 15px; font-weight: 600;
  padding: 13px 0; cursor: pointer; transition: background .15s; font-family: inherit;
}
.copy-btn:hover { background: var(--hub-primary-dark, #2551d6); }
.copy-btn.ok { background: #1fa356; }
.hint-line { font-size: 12px; color: #98a3b3; text-align: center; margin-top: 10px; line-height: 1.7; }
.hint-line a, a[data-godiy] { color: var(--hub-primary, #3164f4); text-decoration: none; cursor: pointer; }
.img-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.img-card { background: #fff; border: 1px solid #e8ecf2; border-radius: 10px; overflow: hidden; position: relative; }
.img-card .ph { position: relative; cursor: zoom-in; background: #f3f5f8; }
.img-card img { width: 100%; display: block; aspect-ratio: 3/4; object-fit: cover; }
.ref-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: 10px; color: #8a5a00; background: rgba(255, 214, 102, .92);
  border-radius: 4px; padding: 2px 6px; font-weight: 600;
}
.img-meta { padding: 8px 10px 10px; }
.img-meta .desc { font-size: 12px; color: #3d4757; line-height: 1.4; min-height: 17px; }
.dl-btn {
  margin-top: 8px; width: 100%; border: 1px solid #dde3ec; background: #fff; color: var(--hub-primary, #3164f4);
  border-radius: 7px; padding: 7px 0; font-size: 12px; font-weight: 600; cursor: pointer;
  text-decoration: none; display: block; text-align: center; transition: all .15s; font-family: inherit;
}
.dl-btn:hover { border-color: var(--hub-primary, #3164f4); background: var(--hub-primary-soft, #f0f5ff); }
.video-card { background: #fff; border: 1px solid #e8ecf2; border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.video-card video { width: 100%; display: block; background: #000; max-height: 420px; }
.video-meta { padding: 12px 14px 14px; }
.video-meta .v-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.size-badge { font-size: 11px; color: #98a3b3; background: #f3f5f8; border-radius: 4px; padding: 2px 7px; font-weight: 400; }
.video-meta .v-desc { font-size: 12.5px; color: #7a8699; margin-top: 4px; line-height: 1.5; }
.video-meta .dl-btn { margin-top: 10px; width: auto; padding: 8px 22px; }
.ai-note {
  background: var(--hub-primary-tint, #eef3ff); border: 1px dashed var(--hub-primary-border, #c9d9ff); border-radius: 10px;
  padding: 12px 14px; font-size: 12.5px; color: #5a6c8c; line-height: 1.6; margin-top: 12px;
}
.empty { text-align: center; padding: 56px 20px; }
.empty .e-icon { font-size: 44px; }
.empty h3 { font-size: 16px; margin-top: 12px; }
.empty p { font-size: 13px; color: #98a3b3; margin-top: 6px; line-height: 1.6; }

.method-card { background: #fff; border: 1px solid #e8ecf2; border-radius: 12px; padding: 18px 16px; }
.method-card + .method-card { margin-top: 12px; }
.method-card h4 { font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.method-card h4 .m-no {
  font-size: 11px; color: var(--hub-primary, #3164f4); background: var(--hub-primary-soft, #f0f5ff); border-radius: 5px; padding: 2px 7px; font-weight: 700;
}
.method-card > p { font-size: 13.5px; color: #5a6c7e; line-height: 1.75; margin-top: 8px; }
.prompt-box {
  margin-top: 12px; background: #f6f8fb; border: 1px dashed #c8d3e2; border-radius: 10px;
  padding: 12px 14px; font-size: 13px; color: #3d4757; line-height: 1.7;
}
.prompt-copy {
  margin-top: 10px; width: 100%; border: 1px solid var(--hub-primary, #3164f4); background: #fff; color: var(--hub-primary, #3164f4);
  border-radius: 8px; padding: 9px 0; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .15s; font-family: inherit;
}
.prompt-copy:hover { background: var(--hub-primary-soft, #f0f5ff); }
.prompt-copy.ok { background: #1fa356; border-color: #1fa356; color: #fff; }
.demo-img { margin-top: 12px; border-radius: 10px; max-width: 300px; display: block; border: 1px solid #e8ecf2; }

#toast {
  position: fixed; top: 74px; left: 50%; transform: translateX(-50%) translateY(-8px);
  background: rgba(31,39,51,.92); color: #fff; font-size: 13.5px;
  padding: 11px 18px; border-radius: 10px; z-index: 100;
  opacity: 0; pointer-events: none; transition: all .25s;
  max-width: calc(100vw - 40px); text-align: center; line-height: 1.5;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

#lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.82); z-index: 200;
  display: none; align-items: center; justify-content: center; cursor: zoom-out; padding: 20px;
}
#lightbox.show { display: flex; }
#lightbox img { max-width: 100%; max-height: 92vh; border-radius: 8px; }

.modal {
  position: fixed; inset: 0; background: rgba(31,39,51,.55); z-index: 300;
  display: none; align-items: center; justify-content: center; padding: 24px; cursor: pointer;
}
.modal.show { display: flex; }
.modal-card {
  background: #fff; border-radius: 14px; padding: 26px 22px 20px;
  max-width: 340px; width: 100%; text-align: center; cursor: default;
  animation: pop .18s ease-out;
}
@keyframes pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-card .mc-icon { font-size: 40px; }
.modal-card h4 { font-size: 16.5px; margin-top: 10px; }
.modal-card p { font-size: 13px; color: #5a6c7e; line-height: 1.75; margin-top: 10px; }
.modal-btns { display: flex; gap: 10px; margin-top: 18px; }
.mbtn {
  flex: 1; border-radius: 10px; padding: 11px 0; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .15s; font-family: inherit; border: 1px solid transparent;
}
.mbtn.ghost { background: #f6f8fb; color: #3d4757; border-color: #dde3ec; }
.mbtn.ghost:hover { border-color: #b9c4d4; }
.mbtn.solid { background: var(--hub-primary, #3164f4); color: #fff; }
.mbtn.solid:hover { background: var(--hub-primary-dark, #2551d6); }

@media (min-width: 640px) { .img-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 400px) { .chip { padding: 8px 11px; font-size: 13px; } .type-tabs { gap: 6px; } }
