/* ============================================================================
   图生万物 · 前端样式（2026-10-21）
   ----------------------------------------------------------------------------
   设计基调（参考视频里的产品）：
     · 主色紫罗兰渐变 #7c3aed → #a855f7，点缀粉 #f472b6
     · 大圆角（16~22px）、柔和多层阴影、浅紫底（#faf8ff）
     · 选中态：紫色描边 + 淡紫底 + 轻微外发光（不用重投影，避免脏）
   🔴 全部规则带 #sub-t2w 作用域（项目铁律：新样式不裸写类名）
   🔴 尺寸链：卡片 padding 18px；网格 gap 10px；比例按钮 6 列自适应
   ========================================================================== */

#sub-t2w { padding-bottom: 24px; }

/* ---------- 顶部 Tab（创作 / 历史） ---------- */
#sub-t2w .t2w-tabs {
  display: flex;
  gap: 6px;
  margin: 4px 0 14px;
  padding: 4px;
  background: #f3f0ff;
  border-radius: 14px;
}
#sub-t2w .t2w-tab {
  flex: 1 1 0;
  height: 38px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #6b7280;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
#sub-t2w .t2w-tab.on {
  background: #fff;
  color: #7c3aed;
  box-shadow: 0 3px 10px rgba(124, 58, 237, .14);
}

/* ---------- 卡片 ---------- */
#sub-t2w .t2w-card {
  background: #fff;
  border: 1px solid #f0ecff;
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(124, 58, 237, .05);
}
#sub-t2w .t2w-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 800;
  color: #2b2440;
  margin-bottom: 12px;
}
#sub-t2w .t2w-label::before {
  content: '';
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, #a855f7, #7c3aed);
}
#sub-t2w .t2w-req {
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #fb7185, #f43f5e);
  padding: 1px 6px;
  border-radius: 6px;
}
#sub-t2w .t2w-hint {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  color: #a8a3b8;
}

/* ---------- 上传区 ---------- */
#sub-t2w .t2w-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 150px;
  border: 1.5px dashed #d8ccff;
  border-radius: 18px;
  background: linear-gradient(180deg, #fdfbff 0%, #f7f3ff 100%);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
#sub-t2w .t2w-drop:active { border-color: #a855f7; background: #f5efff; }
#sub-t2w .t2w-plus {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 300;
  color: #fff;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  box-shadow: 0 6px 18px rgba(124, 58, 237, .32);
  line-height: 1;
}
#sub-t2w .t2w-drop-t { font-size: 14px; font-weight: 700; color: #4b4463; margin-top: 4px; }
#sub-t2w .t2w-drop-s { font-size: 11.5px; color: #a8a3b8; }

#sub-t2w .t2w-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
#sub-t2w .t2w-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: #f3f0ff;
  border: 1px solid #eee8ff;
}
#sub-t2w .t2w-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
#sub-t2w .t2w-thumb-x {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 12, 34, .62);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- 比例 ---------- */
/* 🔴 2026-10-21 老板：比例加到 8 个（+2:3 / +21:9）⇒ 一行放不下，改**横滑**（与参考视频一致） */
#sub-t2w .t2w-ratios {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#sub-t2w .t2w-ratios::-webkit-scrollbar { display: none; }
#sub-t2w .t2w-ratio {
  flex: 0 0 auto;
  min-width: 62px;
  height: 42px;
  border: 1.5px solid #ece6ff;
  border-radius: 12px;
  background: #fff;
  color: #574f6e;
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s ease;
}
#sub-t2w .t2w-ratio.on {
  border-color: #8b5cf6;
  background: #f5efff;
  color: #6d28d9;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .12);
}

/* ---------- 效果分类 ---------- */
#sub-t2w .t2w-cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#sub-t2w .t2w-cats::-webkit-scrollbar { display: none; }
#sub-t2w .t2w-cat {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #f5f2ff;
  color: #6b6285;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
}
#sub-t2w .t2w-cat.on {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, .28);
}

/* ---------- 效果网格 ---------- */
#sub-t2w .t2w-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
#sub-t2w .t2w-eff {
  min-height: 46px;
  padding: 8px 6px;
  border: 1.5px solid #f0ecff;
  border-radius: 13px;
  background: #fff;
  color: #574f6e;
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all .15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
}
#sub-t2w .t2w-eff:active { transform: scale(.97); }
#sub-t2w .t2w-eff.on {
  border-color: #8b5cf6;
  background: #f7f2ff;
  color: #6d28d9;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .12);
}

/* ---------- 生成按钮 ---------- */
#sub-t2w .t2w-go {
  width: 100%;
  height: 52px;
  margin-top: 4px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  font-family: inherit;
  letter-spacing: .5px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(124, 58, 237, .3);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
#sub-t2w .t2w-go:active { transform: scale(.985); box-shadow: 0 4px 14px rgba(124, 58, 237, .28); }
#sub-t2w .t2w-go:disabled {
  background: linear-gradient(135deg, #c9b8f5, #b29ceb);
  box-shadow: none;
  cursor: default;
}
#sub-t2w .t2w-tip {
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.7;
  color: #a8a3b8;
  text-align: center;
}

/* ---------- 结果 ---------- */
#sub-t2w .t2w-result-card {
  background: #fff;
  border: 1px solid #f0ecff;
  border-radius: 20px;
  padding: 14px;
  margin-top: 14px;
  box-shadow: 0 2px 10px rgba(124, 58, 237, .05);
}
#sub-t2w .t2w-res-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
#sub-t2w .t2w-res-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #f7f4ff;
  aspect-ratio: 1;
}
#sub-t2w .t2w-res-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
#sub-t2w .t2w-res-acts {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; gap: 6px; padding: 8px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 100%);
}
#sub-t2w .t2w-res-btn {
  flex: 1 1 0;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: rgba(255,255,255,.92);
  color: #4b4463;
  font-size: 11.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
#sub-t2w .t2w-res-btn.primary { background: linear-gradient(135deg, #a855f7, #7c3aed); color: #fff; }

/* ---------- 进度 ---------- */
#sub-t2w .t2w-progress {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 26px 12px;
}
#sub-t2w .t2w-spin {
  width: 40px; height: 40px;
  border: 3px solid #ede7ff;
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: t2wSpin .9s linear infinite;
}
@keyframes t2wSpin { to { transform: rotate(360deg); } }
#sub-t2w .t2w-prog-t { font-size: 13.5px; font-weight: 700; color: #4b4463; }
#sub-t2w .t2w-prog-s { font-size: 11.5px; color: #a8a3b8; }

/* ---------- 历史 ---------- */
#sub-t2w .t2w-his-item {
  display: flex; gap: 12px; align-items: center;
  padding: 12px; margin-bottom: 10px;
  background: #fff; border: 1px solid #f0ecff; border-radius: 16px;
}
#sub-t2w .t2w-his-thumb {
  width: 62px; height: 62px; border-radius: 12px; object-fit: cover;
  background: #f3f0ff; flex: 0 0 auto;
}
#sub-t2w .t2w-his-body { flex: 1 1 auto; min-width: 0; }
#sub-t2w .t2w-his-t { font-size: 13.5px; font-weight: 700; color: #2b2440; }
#sub-t2w .t2w-his-s { margin-top: 3px; font-size: 11.5px; color: #a8a3b8; }
#sub-t2w .t2w-empty {
  padding: 44px 12px; text-align: center; color: #a8a3b8; font-size: 13px;
}

/* ---------- 窄屏适配 ---------- */
@media (max-width: 359px) {
  #sub-t2w .t2w-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #sub-t2w .t2w-ratio { min-width: 56px; }
}

/* ============================================================================
   图生万物 · 图片板块头牌大卡配色（2026-10-21）
   与子页主色一致（#7c3aed / #a855f7），靠 .boss-entry-t2w 作用域隔离
   ========================================================================== */
.boss-entry.boss-entry-t2w {
  background: linear-gradient(135deg, #faf6ff 0%, #f0e8ff 100%);
  border-color: #e2d4ff;
}
@media (hover: hover) {
  .boss-entry.boss-entry-t2w:hover { box-shadow: 0 10px 26px rgba(124, 58, 237, 0.16); }
}
.boss-entry.boss-entry-t2w .boss-entry-glow {
  background: radial-gradient(circle, rgba(168, 85, 247, 0.20) 0%, rgba(168, 85, 247, 0) 70%);
}
.boss-entry.boss-entry-t2w .boss-entry-ico {
  background: linear-gradient(135deg, #ffffff 0%, #f3ebff 100%);
  border: 1px solid #e2d4ff;
  box-shadow: 0 6px 14px rgba(124, 58, 237, 0.14);
}
.boss-entry.boss-entry-t2w .boss-entry-ico img { width: 40px; height: 40px; display: block; }
.boss-entry.boss-entry-t2w .boss-entry-tag { color: #6d28d9; background: #f3eaff; }
.boss-entry.boss-entry-t2w .boss-entry-flow { color: #6d28d9; }

/* ---------- 生成进度条 + 读秒（2026-10-21 老板：缺动态效果、缺读秒） ---------- */
#sub-t2w .t2w-prog-bar {
  width: 100%;
  max-width: 260px;
  height: 6px;
  margin-top: 4px;
  border-radius: 3px;
  background: #ede7ff;
  overflow: hidden;
}
#sub-t2w .t2w-prog-bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 3px;
  background: linear-gradient(90deg, #a855f7, #7c3aed, #f472b6, #a855f7);
  background-size: 220% 100%;
  animation: t2wFlow 1.5s linear infinite;
  transition: width .6s ease;
}
@keyframes t2wFlow { from { background-position: 0 0; } to { background-position: -220% 0; } }
#sub-t2w .t2w-prog-meta {
  width: 100%;
  max-width: 260px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: #8b83a3;
  font-variant-numeric: tabular-nums;
}
#sub-t2w .t2w-prog-meta #t2wProgPct { color: #7c3aed; }

/* ---------- 补充要求（2026-10-31 新增） ---------- */
#sub-t2w .t2w-extra {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 84px;
  padding: 12px 14px;
  border: 1px solid #f0ecff;
  border-radius: 14px;
  background: #fbfaff;
  color: #2b2440;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
#sub-t2w .t2w-extra::placeholder { color: #b3aec2; }
#sub-t2w .t2w-extra:focus {
  border-color: #a855f7;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, .12);
}
#sub-t2w .t2w-count {
  margin-top: 8px;
  text-align: right;
  font-size: 11.5px;
  font-weight: 600;
  color: #a8a3b8;
}
#sub-t2w .t2w-count b { color: #7c3aed; font-weight: 800; }
