.ugc-video-body{
  height:100vh;
  overflow:hidden;
}
.ugc-video-page{
  height:100vh;
  overflow:hidden;
  grid-template-rows:42px 58px minmax(0,1fr);
}
.ugc-main{
  min-width:0;
  width:100%;
  margin:0 auto;
  padding:6px 0 0;
  height:100%;
  min-height:0;
  overflow:hidden;
}
.ugc-workspace{
  display:grid;
  height:100%;
  min-height:0;
  align-items:stretch;
}
.ugc-left,
.ugc-right{
  min-width:0;
  min-height:0;
  overflow:hidden;
}
.ugc-left{
  display:flex;
  flex-direction:column;
}
.ugc-left-scroll{
  flex:1;
  min-height:0;
  overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,.16) transparent;
}
.ugc-left-scroll::-webkit-scrollbar{
  width:6px;
}
.ugc-left-scroll::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.16);
  border-radius:999px;
}
.ugc-left-footer{
  backdrop-filter:blur(16px);
}
.ugc-form-section:first-child{
  border-top:0;
}
.ugc-form-title{
  display:flex;
  justify-content:space-between;
  gap:10px;
}
.ugc-form-name{
  margin:0;
  color:#f4f5f6;
  line-height:1;
  letter-spacing:-.025em;
}
.ugc-form-title span{
  color:#7f858e;
  font-size:10.5px;
  line-height:1.2;
  text-align:right;
}

/* Custom select: model + parameters */
.ugc-select{
  position:relative;
  min-width:0;
}
.ugc-select-trigger{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  color:#eef0f2;
  cursor:pointer;
  transition:background .16s ease,transform .16s ease;
}
.ugc-select-copy{
  min-width:0;
  flex:1 1 auto;
  display:grid;
  gap:3px;
  text-align:left;
}
.ugc-select-label{
  min-width:0;
  color:#f5f6f8;
  font-size:12.5px;
  font-weight:720;
  letter-spacing:-.02em;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.ugc-select-desc{
  color:#838a93;
  font-size:10.5px;
  line-height:1.3;
}
.ugc-select-caret{
  width:18px;
  height:18px;
  display:grid;
  place-items:center;
  flex:none;
  color:#8f969e;
  font-size:13px;
  transition:transform .18s ease,color .18s ease;
}
.ugc-select-trigger.is-open .ugc-select-caret{
  color:#dfe2e6;
  transform:rotate(180deg);
}
.ugc-model-select .ugc-select-label{
  color:#fff;
  font-size:13px;
  font-weight:760;
}
.ugc-model-select .ugc-select-caret{
  display:none;
}
.ugc-select-menu{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 7px);
  z-index:35;
  padding:6px;
  max-height:min(320px,48vh);
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,.18) transparent;
  backdrop-filter:blur(22px) saturate(1.25);
  -webkit-backdrop-filter:blur(22px) saturate(1.25);
  animation:ugc-menu-in .16s ease;
}
.ugc-select-menu::-webkit-scrollbar{
  width:6px;
}
.ugc-select-menu::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.18);
  border-radius:999px;
}
.ugc-select-option{
  width:100%;
  height:48px;
  min-height:48px;
  padding:0 10px;
  display:flex;
  align-items:center;
  gap:9px;
  overflow:hidden;
  text-align:left;
  color:#d6dae0;
  background:transparent;
  border:0;
  cursor:pointer;
  transition:background .14s ease,color .14s ease;
}
.ugc-select-option:hover{
  color:#fff;
  background:rgba(255,255,255,.07);
}
.ugc-select-option.is-active{
  color:#fff;
}
.ugc-option-main{
  min-width:0;
  flex:1 1 auto;
  display:grid;
  gap:3px;
}
.ugc-option-title{
  min-width:0;
  color:inherit;
  font-size:12px;
  font-weight:700;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.ugc-option-desc{
  min-width:0;
  color:#858c95;
  font-size:10px;
  line-height:1.3;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.ugc-option-credit{
  flex:none;
  align-self:center;
  display:inline-flex;
  align-items:center;
  padding:2px 8px;
  border:1px solid rgba(255,45,104,.3);
  border-radius:999px;
  background:linear-gradient(180deg,rgba(255,45,104,.22),rgba(255,45,104,.09));
  color:#ff8ab2;
  font-size:10px;
  font-weight:700;
  line-height:1.5;
  letter-spacing:.01em;
  white-space:nowrap;
}
.ugc-option-check{
  width:15px;
  height:15px;
  border-radius:50%;
  display:grid;
  place-items:center;
  flex:none;
  border:1px solid rgba(255,255,255,.24);
}
.ugc-select-option.is-active .ugc-option-check{
  background:#ff2d68;
  border-color:#ff8ab2;
}
.ugc-option-check svg{
  width:9px;
  height:9px;
  color:#121316;
}
.ugc-option-brand{
  --brand-logo:none;
  position:relative;
  width:26px;
  height:26px;
  flex:none;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.14);
  border-radius:6px;
  background:linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,.04));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.12);
  color:#edf0f5;
  font-size:11px;
  font-weight:700;
  line-height:1;
}
.ugc-option-brand::after{
  content:"";
  position:absolute;
  inset:8%;
  pointer-events:none;
  background:var(--brand-logo) center / contain no-repeat;
  filter:none;
}
.ugc-option-brand--seedance{--brand-logo:url("../image/model_icons/seedance.png")}
.ugc-option-brand--seedream{--brand-logo:url("../image/model_icons/seedream.png")}
.ugc-option-brand--wan{--brand-logo:url("../image/model_icons/wan.png")}
.ugc-option-brand--kling{--brand-logo:url("../image/model_icons/kling.png")}
.ugc-option-brand--openai{--brand-logo:url("../image/model_icons/open-ai.png")}
/* OpenAI 官方标是纯黑，深色底上直接放会看不见：这里单独反色成白色 */
.ugc-option-brand--openai::after{filter:invert(1) brightness(1.05)}
.ugc-option-brand--google{--brand-logo:url("../image/model_icons/gemini.png")}
.ugc-option-brand--nano-banana{--brand-logo:url("../image/model_icons/Banana.png")}
.ugc-option-brand--default{
  color:#edf0f5;
}
/* 顶部「当前模型」触发按钮里的图标 */
.ugc-model-icon{
  display:inline-flex;
  align-items:center;
  flex:none;
  margin-right:2px;
}
.ugc-model-icon .ugc-option-brand{
  width:26px;
  height:26px;
  border-radius:8px;
}
.ugc-model-icon:empty{display:none}

/* Upload + preview in one card */
.ugc-media-card{
  padding:0;
  border-radius:0;
  background:transparent;
  border:0;
}
.ugc-video-preview{
  position:relative;
  margin-top:9px;
  border-radius:10px;
  overflow:hidden;
  background:#101215;
  min-height:96px;
  display:grid;
  place-items:center;
}
.ugc-video-preview:empty{
  display:none;
}
.ugc-video-preview video{
  width:100%;
  aspect-ratio:16 / 9;
  /* 16:9 / 9:16 的参考视频都要完整展示，外框尺寸保持不变 */
  object-fit:contain;
  /* 留边沿用预览框默认底色，不要额外压深成黑色 */
  background:transparent;
  display:block;
}
.ugc-video-preview span{
  color:#6f757d;
  font-size:10.5px;
}
.ugc-video-preview.has-video{
  margin-top:0;
  min-height:112px;
}
.ugc-video-preview.has-video video{
  aspect-ratio:16 / 9;
}
.ugc-video-preview .ugc-image-remove{
  position:absolute;
  top:5px;
  right:5px;
}
.ugc-upload-zone{
  width:100%;
  display:grid;
  justify-items:center;
  align-content:center;
  gap:6px;
  color:#a7adb5;
  cursor:pointer;
  transition:border-color .16s ease,background .16s ease,color .16s ease;
}
.ugc-upload-zone:hover,
.ugc-upload-zone.is-dragging{
  color:#e7e9ec;
}
.ugc-upload-zone.is-uploading{
  pointer-events:none;
  opacity:.62;
}
.ugc-upload-zone.has-images{
  width:100%;
  min-height:0;
  aspect-ratio:1 / 1;
  padding:10px;
  border-radius:10px;
  gap:4px;
}
.ugc-upload-zone.has-images .ugc-upload-icon{
  width:18px;
  height:18px;
  border-radius:8px;
}
.ugc-upload-zone.has-images .ugc-upload-icon svg{
  width:10px;
  height:10px;
}
.ugc-upload-zone.has-images .ugc-upload-main{
  font-size:8px;
}
.ugc-upload-zone.has-images .ugc-upload-hint{
  display:none;
}
.ugc-upload-icon{
  display:grid;
  place-items:center;
}
.ugc-upload-icon svg{
  width:18px;
  height:18px;
}
.ugc-upload-main{
  color:#f1f2f4;
  font-weight:700;
}
.ugc-upload-hint{
  font-size:10.5px;
  line-height:1.35;
}
.ugc-upload-status{
  min-height:0;
  margin-top:7px;
  color:#9ea4ad;
  font-size:10.5px;
  line-height:1.4;
  text-align:center;
}
.ugc-upload-status.is-error{
  color:#ff9d93;
}
.ugc-upload-status:empty{
  display:none;
}
/* ugc_video：状态文案挂在“参考图片”标题行右侧，行高与标题行等高。
   出现/消失都不会挤压下面的上传区与缩略图，点击“AI提示语润色”时只有按钮自身变化。 */
.ugc-form-title .ugc-upload-status{
  margin:0;
  min-width:0;
  max-width:64%;
  line-height:13px;
  text-align:right;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ugc-image-list{
  display:grid;
  margin-top:9px;
}
.ugc-image-list:empty{
  display:none;
}
.ugc-image-item{
  position:relative;
  aspect-ratio:1 / 1;
  overflow:hidden;
  background:#141619;
}
.ugc-image-item img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
/* 参考素材卡片里的参考视频：和图片同一行展示，缩略图定格 + 「视频」角标 */
.ugc-image-item video{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  background:#000;
}
.ugc-image-item.is-video{
  cursor:pointer;
}
.ugc-image-item.is-person{
  cursor:zoom-in;
  border-color:rgba(255,117,157,.42);
}
.ugc-image-item.is-person img{
  object-position:top;
}
.ugc-image-badge{
  position:absolute;
  z-index:2;
  left:5px;
  bottom:5px;
  padding:1px 5px;
  border-radius:5px;
  background:rgba(12,13,15,.7);
  color:#e9ecef;
  font-size:9px;
  font-weight:700;
  letter-spacing:.02em;
  backdrop-filter:blur(6px);
  pointer-events:none;
}
.ugc-image-remove{
  position:absolute;
  z-index:3;
  top:5px;
  right:5px;
  width:18px;
  height:18px;
  margin:0;
  padding:0;
  border-radius:8px;
  display:grid;
  place-items:center;
  color:#fff;
  background:rgba(12,13,15,.76);
  border:0;
  cursor:pointer;
  backdrop-filter:blur(8px);
  opacity:0;
  transition:background .16s ease,opacity .16s ease;
}
.ugc-image-item:hover .ugc-image-remove,
.ugc-video-preview:hover .ugc-image-remove{
  opacity:1;
}
.ugc-image-remove:hover{
  background:rgba(255,113,100,.72);
}
.ugc-image-remove svg{
  width:10px;
  height:10px;
  display:block;
}

/* Prompt with polish button inside */
.ugc-prompt-box{
  position:relative;
  border:1px solid rgba(255,255,255,.12);
  overflow:hidden;
}
/* 复刻方式：两枚并排选项卡，选中项用品牌黄描边，右侧说明文字随选择变化 */
.ugc-mode-switch{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}
.ugc-mode-option{
  display:flex;
  flex-direction:column;
  gap:3px;
  padding:9px 11px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:9px;
  background:rgba(255,255,255,.03);
  color:rgba(255,255,255,.55);
  font:inherit;
  text-align:left;
  cursor:pointer;
  transition:border-color .16s ease,background .16s ease,color .16s ease;
}
.ugc-mode-option:hover{
  background:rgba(255,255,255,.07);
  color:#fff;
}
.ugc-mode-option.is-active{
  /* 选中只加边框，不改底色，避免整块卡片被点亮 */
  border-color:rgba(255,45,104,.6);
  color:#fff;
}
.ugc-mode-name{
  font-size:12.5px;
  font-weight:700;
  letter-spacing:.01em;
}
.ugc-mode-desc{
  font-size:10.5px;
  line-height:1.45;
  opacity:.85;
}
.ugc-prompt-box textarea{
  width:100%;
  resize:none;
  border:0;
  outline:0;
  color:#f4f5f6;
  background:transparent;
  font:inherit;
  font-size:12.5px;
  line-height:1.65;
}
.ugc-prompt-box textarea::placeholder{
  color:#60666e;
}
.ugc-prompt-foot{
  position:absolute;
  right:11px;
  bottom:7px;
  color:#6f757d;
  font-size:10px;
}
.ugc-cost-inline{
  display:inline-flex;
  align-items:baseline;
  gap:3px;
  transform:translateY(1px);
  font-size:9.5px;
  font-weight:650;
  white-space:nowrap;
}
.ugc-cost-inline strong{
  font-size:10.5px;
  font-weight:800;
}

.ugc-param-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.ugc-field{
  display:grid;
  min-width:0;
}
.ugc-field > span{
  color:#8f959d;
  font-size:10.5px;
  font-weight:650;
}
.ugc-field .ugc-select-trigger{
  padding:8px 10px;
}
.ugc-field .ugc-select-label{
  font-size:11.5px;
}
.ugc-field .ugc-select-menu{
  top:auto;
  bottom:calc(100% + 7px);
  animation:ugc-menu-up .16s ease;
}

.ugc-submit{
  position:relative;
  width:100%;
  padding:0 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-size:13px;
  font-weight:790;
  cursor:pointer;
  transition:transform .18s ease,box-shadow .18s ease,opacity .18s ease;
}
.ugc-submit-label{
  line-height:1;
  font-size:14px;
  letter-spacing:.02em;
}
.ugc-submit:hover{
  transform:translateY(-1px);
}
.ugc-submit:disabled{
  cursor:not-allowed;
  opacity:.58;
  transform:none;
}
.ugc-submit-loading{
  position:absolute;
  right:13px;
  top:50%;
  transform:translateY(-50%);
  width:15px;
  height:15px;
  border:2px solid rgba(255,255,255,.28);
  border-radius:50%;
  display:none;
  animation:ugc-spin .8s linear infinite;
}
.ugc-submit.is-loading .ugc-submit-loading{
  display:block;
}
.ugc-submit.is-loading .ugc-submit-label{
  opacity:.72;
}

/* Right tabs + history/cases */
.ugc-right{
  display:flex;
  flex-direction:column;
}
.ugc-tabs-row{
  display:flex;
  align-items:center;
  gap:12px;
}
.ugc-page-hero{
  position:relative;
  flex:none;
  display:grid;
  align-items:center;
  margin-top:14px;
  margin-bottom:12px;
  overflow:hidden;
}
.ugc-page-hero::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
}
.ugc-page-hero-media{
  position:relative;
  z-index:1;
  aspect-ratio:16 / 9;
  overflow:hidden;
  background:#000;
}
.ugc-page-hero-media video{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  filter:saturate(1.08) contrast(1.04);
}
.ugc-tabs{
  display:inline-flex;
  align-self:flex-start;
}
.ugc-tab{
  border:0;
  font-size:12px;
  font-weight:680;
  cursor:pointer;
  transition:background .16s ease,color .16s ease;
}
.ugc-tab:hover{
  color:#e6e8eb;
}
.ugc-tab-panel{
  flex:1;
  min-height:0;
  overflow-y:auto;
  padding-right:4px;
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,.16) transparent;
}
.ugc-tab-panel::-webkit-scrollbar{
  width:6px;
}
.ugc-tab-panel::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.16);
  border-radius:999px;
}
.ugc-history-range{
  display:inline-flex;
  align-items:center;
  gap:2px;
  padding:3px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:999px;
  background:
    linear-gradient(180deg,rgba(255,255,255,.085),rgba(255,255,255,.03)),
    rgba(255,255,255,.02);
  box-shadow:0 2px 10px rgba(0,0,0,.18),inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}
.ugc-history-range[hidden]{
  display:none;
}
.ugc-range-btn{
  height:24px;
  padding:0 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:transparent;
  color:#9ba1a9;
  border:0;
  font-size:10.5px;
  font-weight:680;
  line-height:1;
  letter-spacing:.01em;
  white-space:nowrap;
  cursor:pointer;
  transition:background .18s ease,color .18s ease,box-shadow .18s ease;
}
.ugc-range-btn:hover{
  color:#e9eaec;
  background:rgba(255,255,255,.1);
}
.ugc-history-list{
  display:grid;
}
.ugc-history-skeleton{
  width:100%;
  min-width:0;
  height:126px;
  border-radius:14px;
}
.ugc-history-card.is-running{
  grid-template-columns:auto minmax(0,1fr);
}
.ugc-history-card.is-running .ugc-history-media{
  width:auto;
  min-height:0;
  aspect-ratio:var(--history-media-aspect, 9 / 16);
  display:grid;
  place-items:center;
  overflow:hidden;
  background:transparent !important;
}
.ugc-history-card.is-running .ugc-history-empty-media{
  width:100%;
  height:100%;
  min-height:0;
  place-content:center;
}
.ugc-history-card.is-running .ugc-history-media,
.ugc-history-card.is-running .ugc-history-empty-media{
  background-image:none !important;
  animation:none !important;
}
.ugc-history-card.is-running .ugc-history-media::before{
  display:none;
}
.ugc-history-card{
  min-width:0;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:12px;
}
.ugc-history-media{
  position:relative;
  width:auto;
  aspect-ratio:var(--history-media-aspect, 9 / 16);
  min-height:0;
  overflow:hidden;
  display:grid;
  place-items:center;
}
.ugc-history-skeleton{
  background:linear-gradient(100deg,rgba(255,255,255,.06) 20%,rgba(255,255,255,.14) 40%,rgba(255,255,255,.06) 60%) !important;
  background-size:220% 100% !important;
  animation:ugc-shimmer 1.25s linear infinite !important;
}
.ugc-history-media video{
  width:100%;
  height:100%;
  max-height:none;
  display:block;
  object-fit:contain;
  background:transparent;
}
.ugc-video-play{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:34px;
  height:34px;
  border-radius:50%;
  display:grid;
  place-items:center;
  color:#fff;
  background:rgba(10,11,14,.58);
  border:1px solid rgba(255,255,255,.24);
  backdrop-filter:blur(8px);
  cursor:pointer;
  transition:background .16s ease,transform .16s ease;
}
.ugc-video-play:hover{
  background:rgba(255,255,255,.18);
  transform:translate(-50%,-50%) scale(1.06);
}
.ugc-video-play svg{
  width:15px;
  height:15px;
  margin-left:2px;
}
.ugc-history-empty-media{
  color:#6f757d;
  display:grid;
  justify-items:center;
  gap:7px;
  font-size:10.5px;
  text-align:center;
}
.ugc-history-empty-media svg{
  width:24px;
  height:24px;
}
.ugc-history-body{
  min-width:0;
  display:grid;
  align-content:space-between;
  gap:10px;
}
.ugc-history-meta{
  min-width:0;
  display:grid;
  gap:6px;
}
.ugc-history-title{
  min-width:0;
  color:#f2f3f5;
  font-size:13px;
  font-weight:720;
  line-height:1.35;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
/* 标题默认最多两行；内容超过两行时由脚本挂上 is-expandable，点一下展开、再点收起看全文。 */
.ugc-history-title.is-expandable{
  cursor:pointer;
}
.ugc-history-title.is-expandable:hover{
  color:#fff;
}
.ugc-history-title.is-expanded{
  display:block;
  overflow:visible;
  -webkit-line-clamp:none;
}
/* 超长标题的展开标识：贴在标题行右侧的小胶囊，与标题首行同一行，不额外占一行 */
.ugc-history-title-row{
  display:flex;
  align-items:flex-start;
  gap:8px;
  min-width:0;
}
.ugc-history-title-row > .ugc-history-title{
  flex:1 1 auto;
  min-width:0;
}
.ugc-history-title-toggle{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:3px;
  width:max-content;
  margin-top:-1px;
  padding:2px 8px;
  border:0;
  border-radius:999px;
  background:rgba(255,255,255,.07);
  color:#c3c8d0;
  font:inherit;
  font-size:11px;
  font-weight:620;
  line-height:1.5;
  white-space:nowrap;
  cursor:pointer;
  transition:background .16s ease,color .16s ease;
}
.ugc-history-title-toggle:hover{
  background:rgba(255,255,255,.14);
  color:#fff;
}
.ugc-history-title-toggle svg{
  width:10px;
  height:10px;
  transition:transform .18s ease;
}
.ugc-history-title-toggle.is-expanded svg{
  transform:rotate(180deg);
}
.ugc-history-thumbs{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:2px;
}
.ugc-history-thumb{
  width:34px;
  height:34px;
  padding:0;
  border-radius:7px;
  overflow:hidden;
  background:#101215;
  border:0;
  cursor:zoom-in;
}
.ugc-history-thumb img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
.ugc-history-thumb-more{
  width:34px;
  height:34px;
  border-radius:7px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#aeb3ba;
  background:rgba(255,255,255,.05);
  font-size:10px;
  font-weight:720;
}
.ugc-history-tags{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
}
.ugc-history-tag{
  height:20px;
  padding:0 7px;
  display:inline-flex;
  align-items:center;
  color:#a8adb5;
  background:rgba(255,255,255,.055);
  border:1px solid rgba(255,255,255,.075);
  font-size:10px;
  font-weight:620;
}
.ugc-history-tag.is-status{
  color:#ff8ab2;
  background:rgba(255,45,104,.12);
  border-color:rgba(255,45,104,.24);
}
.ugc-history-tag.is-running{
  color:#ff8ab2;
  background:rgba(255,45,104,.12);
  border-color:rgba(255,45,104,.24);
}
.ugc-history-tag.is-error{
  max-width:100%;
  height:auto;
  min-height:20px;
  padding:3px 7px;
  line-height:1.4;
  white-space:normal;
  overflow-wrap:anywhere;
  text-align:left;
  color:#ff9d93;
  background:rgba(255,113,100,.12);
  border-color:rgba(255,113,100,.24);
}
.ugc-history-actions{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
}
.ugc-history-btn{
  height:30px;
  padding:0 10px;
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:#cfd3d8;
  background:rgba(255,255,255,.055);
  border:1px solid rgba(255,255,255,.1);
  font-size:10.5px;
  font-weight:680;
  cursor:pointer;
  transition:background .16s ease,border-color .16s ease;
}
.ugc-history-btn:hover{
  background:rgba(255,255,255,.1);
  border-color:rgba(255,255,255,.16);
}
.ugc-history-btn:disabled{
  cursor:not-allowed;
  opacity:.42;
}
.ugc-history-btn.is-danger:hover{
  color:#ffb3ac;
  background:rgba(255,113,100,.1);
  border-color:rgba(255,113,100,.28);
}
.ugc-history-btn svg{
  width:13px;
  height:13px;
}
/* 历史下载按钮固定最小宽度：加载、成功、失败状态切换时不推动同排按钮换行。 */
.ugc-history-btn[data-history-action="download"]{
  width:90px;
  min-width:90px;
  flex:0 0 auto;
  justify-content:center;
  white-space:nowrap;
}
.ugc-history-btn[data-history-action="download"] span{
  min-width:46px;
  text-align:center;
}
.ugc-history-btn[data-history-action="download"].is-downloading,
.ugc-history-btn[data-history-action="download"].is-download-success,
.ugc-history-btn[data-history-action="download"].is-download-error{
  pointer-events:none;
  opacity:1;
  font-variant-numeric:tabular-nums;
}
.ugc-history-btn[data-history-action="download"].is-downloading:disabled{
  opacity:1;
}
.ugc-history-btn[data-history-action="download"].is-downloading svg,
.ugc-history-btn[data-history-action="download"].is-download-success svg,
.ugc-history-btn[data-history-action="download"].is-download-error svg{
  display:none;
}
.ugc-history-btn[data-history-action="download"].is-downloading::before{
  content:"";
  width:11px;
  height:11px;
  flex:none;
  border:2px solid rgba(255,255,255,.24);
  border-top-color:currentColor;
  border-radius:50%;
  animation:ugc-spin-flat .72s linear infinite;
}
.ugc-history-btn[data-history-action="download"].is-download-success{
  color:#9be8c3;
  border-color:rgba(112,220,170,.3);
  background:rgba(34,119,82,.14);
}
.ugc-history-btn[data-history-action="download"].is-download-success::before{
  content:"";
  width:12px;
  height:12px;
  flex:none;
  background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ugc-history-btn[data-history-action="download"].is-download-error{
  color:#ffaaa4;
  border-color:rgba(255,113,100,.32);
  background:rgba(255,113,100,.12);
}
.ugc-history-btn[data-history-action="download"].is-download-error::before{
  content:"!";
  width:12px;
  height:12px;
  flex:none;
  display:grid;
  place-items:center;
  font-size:12px;
  font-weight:800;
  line-height:1;
}

/* 历史卡片里的「画布创作」入口：渐变胶囊 + 流光 + 呼吸光晕，
   成片生成后才出现，点击会把视频带进画布并预填同类型的执行节点。 */
.ugc-history-btn.ugc-history-canvas{
  position:relative;
  overflow:hidden;
  border-color:transparent;
  background:linear-gradient(120deg,#ff2d68 0%,#ff4d9b 55%,#ff8ab2 100%);
  background-origin:border-box;
  color:#fff;
  box-shadow:0 4px 14px rgba(255,45,104,.3);
  animation:ugc-history-canvas-glow 3.4s ease-in-out infinite;
  transition:background .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.ugc-history-btn.ugc-history-canvas::after{
  content:"";
  position:absolute;
  top:-60%;
  bottom:-60%;
  left:-40%;
  width:34%;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.55),transparent);
  transform:translateX(-160%) rotate(12deg);
  animation:ugc-history-canvas-shine 4.2s ease-in-out infinite;
  pointer-events:none;
}
.ugc-history-btn.ugc-history-canvas:hover{
  border-color:transparent;
  background:linear-gradient(120deg,#ff4d9b 0%,#ff8ab2 46%,#ffc1d5 100%);
  background-origin:border-box;
  box-shadow:0 6px 18px rgba(255,77,155,.45);
}
.ugc-history-canvas-icon{
  color:#ffe39a;
  filter:drop-shadow(0 0 4px rgba(255,205,120,.55));
}
.ugc-history-btn.ugc-history-canvas.is-loading{
  opacity:1;
  cursor:progress;
  animation:none;
}
.ugc-history-btn.ugc-history-canvas.is-loading::after{
  display:none;
}
.ugc-history-canvas-spinner{
  width:11px;
  height:11px;
  flex:none;
  border:2px solid rgba(255,255,255,.3);
  border-top-color:#fff;
  border-radius:50%;
  animation:ugc-spin-flat .8s linear infinite;
}
@keyframes ugc-history-canvas-shine{
  0%,62%{transform:translateX(-160%) rotate(12deg)}
  86%,100%{transform:translateX(420%) rotate(12deg)}
}
@keyframes ugc-history-canvas-glow{
  0%,100%{box-shadow:0 4px 14px rgba(255,45,104,.28)}
  50%{box-shadow:0 6px 22px rgba(255,45,104,.5)}
}
@media (prefers-reduced-motion: reduce){
  .ugc-history-btn.ugc-history-canvas{animation:none}
  .ugc-history-btn.ugc-history-canvas::after{display:none}
  .ugc-history-canvas-spinner{animation:none}
}
/* 删除确认后的即时反馈：按钮转圈显示“删除中”，卡片淡出收起，避免等待期间像是没响应。 */
.ugc-history-btn.is-deleting{
  cursor:progress;
  color:#ffb3ac;
  background:rgba(255,113,100,.14);
  border-color:rgba(255,113,100,.34);
}
.ugc-history-btn.is-deleting:disabled{
  opacity:1;
}
.ugc-history-btn.is-deleting svg{
  display:none;
}
.ugc-history-btn.is-deleting::before{
  content:"";
  width:11px;
  height:11px;
  flex:none;
  border:2px solid rgba(255,179,172,.32);
  border-top-color:#ffb3ac;
  border-radius:50%;
  animation:ugc-delete-spin .7s linear infinite;
}
.ugc-history-card.is-deleting{
  opacity:.55;
  pointer-events:none;
  transition:opacity .2s ease;
}
.ugc-history-card.is-removing{
  height:0;
  padding-top:0;
  padding-bottom:0;
  opacity:0;
  transform:translateY(-4px) scale(.98);
  pointer-events:none;
  transition:height .28s ease,padding .28s ease,opacity .28s ease,transform .28s ease;
}
@keyframes ugc-delete-spin{
  to{transform:rotate(360deg)}
}
.ugc-history-empty{
  display:grid;
  place-items:center;
  align-content:center;
  gap:10px;
  padding:28px;
  color:#7e858d;
  text-align:center;
}
.ugc-history-empty svg{
  width:38px;
  height:38px;
  color:#61676f;
}
.ugc-history-empty strong{
  color:#d9dce0;
  font-size:14px;
}
.ugc-history-empty p{
  margin:0;
  font-size:11.5px;
  line-height:1.55;
}
.ugc-pagination{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  margin-top:14px;
}
.ugc-page-btn{
  min-width:30px;
  height:30px;
  padding:0 8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#aeb3ba;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.08);
  font-size:11px;
  font-weight:680;
  cursor:pointer;
  transition:background .16s ease,color .16s ease,border-color .16s ease;
}
.ugc-page-btn:hover:not(:disabled):not(.is-active){
  color:#fff;
  background:rgba(255,255,255,.09);
  border-color:rgba(255,255,255,.14);
}
.ugc-page-btn.is-active{
  color:#111214;
  background:linear-gradient(180deg,#f5f7f8,#c2c8cd);
  border-color:rgba(255,255,255,.18);
}
.ugc-page-btn:disabled{
  cursor:not-allowed;
  opacity:.35;
}
.ugc-more-btn{
  width:auto;
  min-width:120px;
  height:34px;
  padding:0 18px;
  color:#b6bcc3;
}
.ugc-case-list{
  display:grid;
  gap:12px;
}
.ugc-case-card{
  min-width:0;
  position:relative;
  border-radius:16px;
  overflow:hidden;
  transition:transform .18s ease,background .18s ease,box-shadow .18s ease;
}
.ugc-case-card::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  background:
    linear-gradient(115deg,rgba(255,255,255,.055),transparent 28%,transparent 72%,rgba(255,45,104,.045));
  pointer-events:none;
}
.ugc-case-index{
  position:absolute;
  top:12px;
  right:15px;
  z-index:2;
  font-size:34px;
  line-height:1;
  font-weight:860;
  letter-spacing:-.06em;
  pointer-events:none;
}
.ugc-case-media{
  position:relative;
  z-index:1;
  border-radius:12px;
  overflow:hidden;
  background:#000;
}
.ugc-case-media video{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  filter:saturate(1.06) contrast(1.03);
}
.ugc-case-body{
  position:relative;
  z-index:1;
  display:grid;
  gap:6px;
  padding:11px 2px 0;
}
.ugc-case-tag{
  width:max-content;
  height:21px;
  padding:0 8px;
  border-radius:6px;
  display:inline-flex;
  align-items:center;
  color:#ff8ab2;
  background:rgba(255,45,104,.12);
  font-size:9.5px;
  font-weight:760;
  letter-spacing:.06em;
}
.ugc-case-title{
  margin-top:1px;
  color:#f1f2f4;
  font-size:13px;
  font-weight:720;
  line-height:1.4;
  letter-spacing:-.01em;
}
.ugc-case-desc{
  margin-top:0;
  color:#858b93;
  font-size:10.5px;
  line-height:1.55;
}

.ugc-lightbox{
  position:fixed;
  inset:0;
  z-index:200;
  display:grid;
  place-items:center;
  padding:28px;
}
.ugc-lightbox[hidden]{
  display:none;
}
.ugc-lightbox-backdrop{
  position:absolute;
  inset:0;
  background:rgba(5,6,8,.82);
  backdrop-filter:blur(8px);
}
.ugc-lightbox-content{
  position:relative;
  z-index:1;
  width:min(920px,100%);
  max-height:86vh;
  display:grid;
  place-items:center;
}
.ugc-lightbox-image,
.ugc-lightbox-video{
  max-width:100%;
  max-height:86vh;
  width:auto;
  height:auto;
  border-radius:14px;
  background:#000;
}
.ugc-lightbox-video{
  width:min(920px,100%);
  aspect-ratio:16 / 9;
  object-fit:contain;
}
.ugc-lightbox-close{
  position:absolute;
  top:-12px;
  right:-12px;
  width:32px;
  height:32px;
  padding:0;
  border-radius:50%;
  display:grid;
  place-items:center;
  color:#fff;
  background:rgba(20,22,26,.9);
  border:1px solid rgba(255,255,255,.18);
  cursor:pointer;
  font-size:0;
  line-height:0;
  -webkit-tap-highlight-color:transparent;
}
.ugc-lightbox-close svg{
  width:14px;
  height:14px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  pointer-events:none;
}
.ugc-lightbox-close:hover{
  background:rgba(34,36,42,.96);
  border-color:rgba(255,255,255,.32);
}
.ugc-lightbox-close:focus-visible{
  outline:2px solid rgba(255,45,104,.7);
  outline-offset:2px;
}

/* FAQ SEO section */
.ugc-faq{
  margin-top:16px;
  border-radius:22px;
  background:
    radial-gradient(520px 150px at 12% 0%,rgba(255,45,104,.08),transparent 70%),
    rgba(24,26,30,.97);
  box-shadow:0 20px 48px rgba(0,0,0,.22);
}
.ugc-faq-heading{
  margin-bottom:18px;
}
.ugc-faq-kicker{
  color:#ff8ab2;
  font-size:10px;
  font-weight:800;
  letter-spacing:.14em;
  margin-bottom:7px;
}
.ugc-faq-heading h2,
.ugc-faq-heading h3{
  margin:0;
  font-size:22px;
  line-height:1;
  font-weight:830;
  letter-spacing:-.04em;
}
.ugc-faq-heading p{
  margin:9px 0 0;
  color:#8b919a;
  font-size:12px;
  line-height:1.55;
}
.ugc-faq-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}
.ugc-faq-item{
  padding:14px 15px;
  border-radius:13px;
  background:rgba(255,255,255,.035);
  border:0;
}
.ugc-faq-item summary{
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color:#f2f3f5;
  font-size:13px;
  font-weight:720;
  cursor:pointer;
}
.ugc-faq-item summary::-webkit-details-marker{
  display:none;
}
.ugc-faq-item summary span{
  width:18px;
  height:18px;
  flex:none;
  position:relative;
}
.ugc-faq-item summary span::before,
.ugc-faq-item summary span::after{
  content:"";
  position:absolute;
  left:4px;
  top:8px;
  width:10px;
  height:1.5px;
  background:#9ca2aa;
  transition:transform .18s ease;
}
.ugc-faq-item summary span::after{
  transform:rotate(90deg);
}
.ugc-faq-item[open] summary span::after{
  transform:rotate(0deg);
}
.ugc-faq-item p{
  margin:11px 0 0;
  color:#8d939b;
  font-size:11.5px;
  line-height:1.65;
}
.ugc-faq-item p a{
  color:#ff8ab2;
  text-decoration:none;
}
.ugc-faq-item p a:hover{
  color:#ff8ab2;
}

@keyframes ugc-shimmer{
  to{background-position:-220% 0}
}
@keyframes ugc-spin{
  to{transform:translateY(-50%) rotate(360deg)}
}
@keyframes ugc-menu-in{
  from{opacity:0;transform:translateY(-4px) scale(.985)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@keyframes ugc-menu-up{
  from{opacity:0;transform:translateY(4px) scale(.985)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
.ugc-select-trigger,
.ugc-upload-zone,
.ugc-submit,
.ugc-history-btn,
.ugc-page-btn,
.ugc-page-hero-media,
.ugc-case-media,
.ugc-image-item{
  box-shadow:none;
}
.ugc-case-card:hover{
  transform:none;
}
.ugc-case-wide{
  display:grid;
  grid-template-columns:minmax(0,42%) minmax(0,1fr);
  align-items:center;
  gap:14px;
}
.ugc-case-wide .ugc-case-media{
  margin:0;
}
.ugc-case-wide .ugc-case-body{
  padding:0;
}
.ugc-field .ugc-select-caret{
  display:none;
}
.ugc-case-list{
  grid-template-columns:repeat(2,minmax(220px,320px));
  justify-content:start;
}
.ugc-case-card{
  padding:9px 9px 11px;
}
.ugc-case-media{
  aspect-ratio:16 / 9;
}

@media (max-width:1180px){
  .ugc-video-body{
    height:auto;
    overflow:auto;
  }
  .ugc-video-page{
    height:auto;
    overflow:visible;
    grid-template-rows:42px 58px auto;
  }
  .ugc-main{
    height:auto;
    min-height:0;
    overflow:visible;
  }
  .ugc-workspace{
    height:auto;
    min-height:0;
  }
  .ugc-left{
    height:auto;
    max-height:none;
  }
  .ugc-left-scroll{
    overflow:visible;
  }
}

@media (max-width:720px){
  .ugc-case-wide{
    grid-template-columns:1fr;
  }
  .ugc-param-grid{
    grid-template-columns:1fr;
  }
  .ugc-case-list,
  .ugc-faq-grid{
    grid-template-columns:1fr;
  }
}

.ugc-video-page .site-footer,
.ugc-faq{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* UGC creator workspace: preview-led split layout */
/* 字距重置只作用于工具主体（.ugc-main）：顶部导航、页头横幅与页脚是全站公共组件，
   样式定义在 index.css，不能被页面级 * 选择器覆盖，否则 GammHub 品牌字、导航项与
   右侧账户按钮的字距会与首页/价格页不一致。 */
.ugc-video-body .page > main.ugc-main,
.ugc-video-body .page > main.ugc-main *{
  letter-spacing:0;
}
.ugc-main{
  max-width:1560px;
  padding-top:8px;
}
.ugc-workspace{
  padding-bottom:14px;
}
.ugc-right{
  grid-area:stage;
}
.ugc-left{
  grid-area:builder;
}

/* Builder panel */
.ugc-left-scroll{
  padding:0 22px 8px;
}
.ugc-form-section{
  position:relative;
  padding:8px 0 9px;
}
.ugc-form-section:last-child{
  border-bottom:0;
}
.ugc-form-title{
  align-items:center;
  margin-bottom:8px;
}
.ugc-form-name{
  font-size:13px;
  font-weight:720;
}
.ugc-select-trigger{
  min-height:44px;
  padding:8px 12px;
  border:1px solid var(--ugc-line);
  border-radius:9px;
  box-shadow:none;
}
.ugc-select-trigger:hover,
.ugc-select-trigger.is-open{
  border-color:var(--ugc-line-strong);
  background:#272a30;
  transform:none;
}
.ugc-model-select .ugc-select-trigger{
  min-height:50px;
  padding:9px 13px;
  border-radius:9px;
  border:1px solid rgba(255,45,104,.52);
  box-shadow:0 0 0 1px rgba(255,45,104,.07) inset;
}
.ugc-model-select .ugc-select-trigger:hover,
.ugc-model-select .ugc-select-trigger.is-open{
  border-color:rgba(255,45,104,.72);
}
.ugc-model-select .ugc-select-desc{
  color:#b7b9ad;
}
.ugc-select-menu{
  border:1px solid var(--ugc-line);
  border-radius:10px;
  background:#24272d;
  box-shadow:0 18px 38px rgba(0,0,0,.42);
}
.ugc-select-option{
  border-radius:7px;
}
.ugc-select-option.is-active{
  background:var(--ugc-purple-soft);
}
.ugc-model-group{
  display:grid;
  gap:2px;
}
.ugc-model-group + .ugc-model-group{
  margin-top:6px;
  padding-top:6px;
  border-top:1px solid rgba(255,255,255,.09);
}
.ugc-model-group-head{
  display:flex;
  align-items:center;
  gap:7px;
  min-height:25px;
  padding:2px 9px 3px;
  color:rgba(255,255,255,.5);
  font-size:10px;
  font-weight:650;
  letter-spacing:.035em;
}
.ugc-model-group-letter{
  display:grid;
  place-items:center;
  width:17px;
  height:17px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:5px;
  background:rgba(255,255,255,.035);
  color:rgba(255,255,255,.66);
  font-size:9px;
  line-height:1;
}
.ugc-model-group-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.ugc-model-group-count{
  margin-left:auto;
  color:rgba(255,255,255,.32);
  font-weight:500;
  white-space:nowrap;
}
/* 需要解释的下拉：弹层加宽，选项支持标题 + 多行说明 */
.ugc-select-menu.is-detailed{
  right:auto;
  width:max(100%, 330px);
  min-width:330px;
  max-width:min(440px, calc(100vw - 44px));
  padding:7px;
}
.ugc-select-menu.is-detailed .ugc-select-option{
  height:auto;
  min-height:58px;
  padding:9px 11px;
  align-items:flex-start;
}
.ugc-select-menu.is-detailed .ugc-option-check{
  margin-top:2px;
}
.ugc-select-menu.is-detailed .ugc-option-title{
  font-size:12.5px;
  line-height:1.35;
  white-space:normal;
}
.ugc-select-menu.is-detailed .ugc-option-desc{
  display:-webkit-box;
  overflow:hidden;
  color:#8f959d;
  font-size:10.5px;
  line-height:1.45;
  white-space:normal;
  text-overflow:clip;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
}
.ugc-upload-zone{
  min-height:78px;
  padding:10px;
  border-radius:9px;
  border:1px dashed rgba(255,255,255,.2);
}
.ugc-upload-zone:hover,
.ugc-upload-zone.is-dragging{
  border-color:rgba(255,45,104,.7);
  background:#1d2216;
}
.ugc-upload-icon{
  width:32px;
  height:32px;
  border-radius:9px;
}
.ugc-upload-main{
  font-size:12px;
}
.ugc-upload-hint{
  max-width:270px;
  color:#747b85;
  text-align:center;
}
.ugc-image-list{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.ugc-image-item{
  border-radius:8px;
  border:1px solid rgba(255,255,255,.08);
}
.ugc-prompt-box{
  border-color:var(--ugc-line);
  border-radius:9px;
}
.ugc-prompt-box textarea{
  min-height:125px;
  padding:13px 13px 42px;
}
.ugc-param-grid{
  gap:9px;
}
.ugc-field{
  gap:7px;
}
.ugc-field .ugc-select-trigger{
  min-height:40px;
  min-width:0;
}
.ugc-left-footer{
  padding:8px 22px 10px;
}
.ugc-submit{
  height:42px;
  border-radius:9px;
  color:#fff;
  border:1px solid rgba(255,45,104,.32);
}
.ugc-cost-inline{
  color:rgba(255,255,255,.6);
}
.ugc-cost-inline strong{
  color:#fff;
}
.ugc-submit-loading{
  border-color:rgba(255,255,255,.28);
  border-top-color:#fff;
}

/* Main preview and history stage */
.ugc-right{
  position:relative;
  padding:18px 22px 18px;
  background-size:32px 32px;
}
.ugc-tabs-row{
  border-top:1px solid rgba(255,255,255,.065);
  border-bottom:1px solid rgba(255,255,255,.065);
}
.ugc-tab-panel{
  padding-top:14px;
}
.ugc-page-hero{
  min-height:250px;
  grid-template-columns:minmax(220px,.75fr) minmax(320px,1.25fr);
  gap:24px;
  margin:0 0 14px;
  padding:22px;
  border-radius:12px;
}
.ugc-page-hero::before{
  background:linear-gradient(120deg,rgba(255,45,104,.08),transparent 42%);
}
.ugc-page-hero-media{
  border-radius:9px;
}
.ugc-case-wide{
  min-height:210px;
  margin-top:0;
  padding:14px;
  border-radius:12px;
  background:#17191d;
}
.ugc-case-wide .ugc-case-media{
  border-radius:9px;
}
.ugc-case-index{
  color:rgba(255,255,255,.11);
}
.ugc-history-list{
  gap:12px;
}

.ugc-history-media,
.ugc-history-card.is-running .ugc-history-media{
  height:152px;
  border-radius:8px;
  background:#111317;
}
.ugc-history-tag{
  border-radius:5px;
}
.ugc-history-btn,
.ugc-page-btn{
  border-radius:7px;
}
.ugc-history-empty{
  grid-column:1 / -1;
}

/* Public case view: one centered media stack, matching the reference composition. */
.ugc-case-showcase{
  position:relative;
  display:block;
  min-height:100%;
  margin:0;
  overflow:visible;
  border-radius:12px;
}
.ugc-case-showcase::before{
  background:linear-gradient(105deg,rgba(255,255,255,.05),transparent 40%,rgba(255,45,104,.06));
}
.ugc-case-stack{
  position:relative;
  width:min(480px,78%);
}
.ugc-case-stack-back,
.ugc-case-stack-front{
  position:absolute;
  left:50%;
  overflow:hidden;
}
.ugc-case-stack-back{
  z-index:1;
  top:2px;
  aspect-ratio:16 / 9;
  transform:translateX(-50%) translateY(0) scale(.94);
  opacity:.68;
}
.ugc-case-stack-front{
  z-index:2;
  display:block;
  grid-template-columns:none;
  width:100%;
  min-height:0;
  padding:0;
  aspect-ratio:16 / 9;
  transform:translateX(-50%);
  border-radius:14px;
}
.ugc-case-stack-back video,
.ugc-case-stack-front .ugc-case-media,
.ugc-case-stack-front .ugc-case-media video{
  width:100%;
  height:100%;
  display:block;
}
.ugc-case-stack-back video,
.ugc-case-stack-front .ugc-case-media video{
  object-fit:cover;
}
.ugc-case-stack-front .ugc-case-media{
  position:relative;
  width:100%;
  height:100%;
  border-radius:0;
}
.ugc-case-stack-front .ugc-case-body,
.ugc-case-stack-front .ugc-case-index{
  display:none;
}
.ugc-case-example-label{
  position:absolute;
  left:14px;
  top:13px;
  z-index:4;
  height:22px;
  padding:0 8px;
  display:inline-flex;
  align-items:center;
  border-radius:6px;
  color:#f3f2ef;
  background:rgba(45,46,46,.78);
  font-size:10px;
  font-weight:780;
}
.ugc-case-dots{
  position:absolute;
  left:calc(50% - min(610px,86%) / 2 - 28px);
  top:50%;
  z-index:4;
  display:grid;
  gap:8px;
}
.ugc-case-dots span{
  width:7px;
  height:7px;
  border-radius:50%;
  background:rgba(255,255,255,.32);
}
.ugc-case-dots span.is-active{
  background:#f5f5f5;
  box-shadow:0 0 0 3px rgba(255,255,255,.12);
}
.ugc-right:has(#ugc-panel-cases:not([hidden])) .ugc-tabs-row{
  border-color:rgba(255,255,255,.09);
}

@media (max-width:1320px){
  .ugc-right{
    padding:24px 22px 20px;
  }
  .ugc-history-list{
    grid-template-columns:1fr;
  }
}

@media (max-width:1180px){
  .ugc-workspace{
    padding-bottom:0;
  }
  .ugc-right{
    min-height:680px;
  }
  .ugc-history-list{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:720px){
  .ugc-left-scroll{
    padding:2px 16px 14px;
  }
  .ugc-form-section{
    padding:25px 0 14px;
  }
  .ugc-form-title{
    margin-bottom:10px;
  }
  .ugc-upload-zone{
    min-height:104px;
    padding:14px;
  }
  .ugc-upload-icon{
    width:38px;
    height:38px;
  }
  .ugc-prompt-box textarea{
    min-height:135px;
  }
  .ugc-field .ugc-select-trigger,
  .ugc-submit{
    min-height:44px;
  }
  .ugc-left-footer{
    padding:13px 16px 16px;
  }
  .ugc-right{
    min-height:620px;
    padding:16px 12px 14px;
    background-size:24px 24px;
  }
  .ugc-tabs-row{
    align-items:stretch;
    flex-direction:column;
  }
  .ugc-tab,
  .ugc-range-btn{
    flex:1;
  }
  .ugc-page-hero{
    min-height:0;
    grid-template-columns:1fr;
    padding:14px;
  }
  .ugc-case-stack{
    width:92%;
  }
  .ugc-case-dots{
    left:5px;
  }
  .ugc-history-list{
    grid-template-columns:1fr;
  }
  .ugc-history-card,
  .ugc-history-card.is-running{
    grid-template-columns:auto minmax(0,1fr);
  }
  .ugc-history-media,
  .ugc-history-card.is-running .ugc-history-media{
    min-height:0;
    height:150px;
  }
}

/* Final creator split: the reference keeps the media stage left and controls right. */
.ugc-workspace{
  grid-template-columns:minmax(0,1.58fr) minmax(390px,.82fr);
  grid-template-areas:"stage builder";
}
.ugc-stage-copy{
  flex:none;
  display:grid;
  justify-items:center;
  gap:7px;
  padding:5px 0 16px;
  text-align:center;
}
.ugc-stage-copy h1{
  margin:0;
  font-family:var(--h1-font);
  font-size:24px;
  line-height:1.14;
  font-weight:var(--h1-weight);
  letter-spacing:var(--h1-track);
  text-wrap:balance;
}
.ugc-stage-copy p{
  margin:0;
  color:#a8abb1;
  font-size:11px;
  line-height:1.5;
}
.ugc-tabs-row{
  position:relative;
  justify-content:center;
}
.ugc-tabs{
  width:min(220px,100%);
}
.ugc-tab{
  flex:1;
}
.ugc-history-range{
  position:absolute;
  top:50%;
  right:0;
  transform:translateY(-50%);
}
.ugc-history-empty{
  min-height:390px;
}
.ugc-case-showcase{
  padding:0 18px 18px;
}
.ugc-case-stack{
  height:100%;
  min-height:340px;
  margin:0 auto;
}
.ugc-case-stack-back{
  width:80%;
}
.ugc-case-stack-front{
  top:48px;
}

@media (max-width:1320px){
  .ugc-workspace{
    grid-template-columns:minmax(0,1.35fr) minmax(370px,.85fr);
  }
}

@media (max-width:1180px){
  .ugc-workspace{
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:"builder" "stage";
  }
}

/* Keep the original one-record-per-row history layout. */
.ugc-history-list{
  grid-template-columns:1fr;
}

@media (max-width:720px){
  .ugc-stage-copy{
    padding:3px 0 14px;
  }
  .ugc-stage-copy h1{
    font-size:19px;
  }
  .ugc-history-range{
    position:static;
    width:100%;
    transform:none;
  }
  .ugc-case-showcase{
    padding:0 10px 14px;
  }
  .ugc-case-stack{
    min-height:250px;
  }
}

/* Reference finish: flat surfaces, restrained separators, and matching neutral tones. */
.ugc-workspace{
  gap:1px;
}
.ugc-left,
.ugc-right{
  border:0;
  box-shadow:none;
}
/* 两张卡片中间是拼接边，靠内的一侧不做圆角，只圆外侧。 */
.ugc-right{
  border-radius:18px 0 0 18px;
}
.ugc-left{
  border-radius:0 18px 18px 0;
}
.ugc-left{
  background:linear-gradient(180deg,#1f2224 0%,#1b1d1f 100%);
}
.ugc-right,
.ugc-right:has(#ugc-panel-cases:not([hidden])){
  background:linear-gradient(180deg,#303234 0%,#2f3133 56%,#25282a 100%);
}
.ugc-form-section{
  border-top:0;
  border-bottom:0;
}
.ugc-upload-icon{
  color:#aeb1b6;
  background:#2c2e30;
  border:0;
}
.ugc-left-footer{
  border-top:0;
  background:#1b1d1f;
}
.ugc-select-trigger,
.ugc-upload-zone,
.ugc-prompt-box{
  background:#222426;
}
.ugc-model-select .ugc-select-trigger{
  background:
    radial-gradient(ellipse at 50% 0%,rgba(255,45,104,.10),transparent 72%),
    #1a1d16;
}
.ugc-model-select .ugc-select-trigger:hover,
.ugc-model-select .ugc-select-trigger.is-open{
  background:
    radial-gradient(ellipse at 50% 0%,rgba(255,45,104,.17),transparent 72%),
    #20251a;
}
.ugc-submit{
  background:#ff2d68;
  border-color:rgba(255,45,104,.32);
  box-shadow:none;
}
.ugc-submit:hover{
  background:#ff4d9b;
  box-shadow:none;
}
.ugc-tabs-row,
.ugc-right:has(#ugc-panel-cases:not([hidden])) .ugc-tabs-row{
  padding:9px 0 11px;
  border:0;
}
.ugc-tabs{
  gap:28px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}
.ugc-tab{
  position:relative;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.ugc-tab{
  height:34px;
  padding:0 10px;
  color:#989b9f;
}
.ugc-tab.is-active,
.ugc-tab.is-active:hover{
  color:#f2f2f3;
  background:transparent;
  box-shadow:none;
}
.ugc-tab.is-active::after{
  content:"";
  position:absolute;
  left:10px;
  right:10px;
  bottom:0;
  height:2px;
  border-radius:2px;
  background:#ff2d68;
}
.ugc-tab:focus,
.ugc-tab:focus-visible,
.ugc-range-btn:focus,
.ugc-range-btn:focus-visible{
  outline:0;
}
.ugc-range-btn.is-active,
.ugc-range-btn.is-active:hover{
  color:#ffffff;
  background:linear-gradient(135deg,#ff2d68 0%,#ff2d68 100%);
  box-shadow:0 5px 14px rgba(255,45,104,.42),inset 0 1px 0 rgba(255,255,255,.26);
}
.ugc-range-btn.is-active:hover{
  background:linear-gradient(135deg,#ff2d68 0%,#ff2d68 100%);
}
.ugc-range-btn:focus-visible{
  box-shadow:0 0 0 2px rgba(255,45,104,.55);
}
.ugc-range-btn.is-active:focus-visible{
  box-shadow:0 5px 14px rgba(255,45,104,.42),inset 0 1px 0 rgba(255,255,255,.26),0 0 0 2px rgba(255,45,104,.6);
}
.ugc-tab-panel,
.ugc-page-hero,
.ugc-case-showcase,
.ugc-case-card,
.ugc-history-card,
.ugc-history-card.is-running,
.ugc-history-empty{
  border:0;
  background:transparent;
  box-shadow:none;
}
.ugc-page-hero::before,
.ugc-case-card::before,
.ugc-case-showcase::before{
  display:none;
}
.ugc-history-card{
  padding:10px 0;
  border-radius:0;
}

.ugc-history-empty{
  border-radius:0;
}
.ugc-case-stack-back,
.ugc-case-stack-front,
.ugc-page-hero-media,
.ugc-case-wide{
  border:0;
}
.ugc-case-stack-back,
.ugc-case-stack-front{
  box-shadow:0 18px 38px rgba(0,0,0,.24);
}
.ugc-case-stack-front,
.ugc-case-stack-front .ugc-case-media{
  background:transparent;
}

/* Public examples alternate front/back every five seconds. */
.ugc-case-stack-back,
.ugc-case-stack-front{
  transition:none;
  will-change:top,width,transform,opacity;
}
.ugc-case-stack-back{
  animation:ugc-case-back-cycle 10s ease-in-out infinite;
}
.ugc-case-stack-front{
  animation:ugc-case-front-cycle 10s ease-in-out infinite;
}
.ugc-case-stack:hover .ugc-case-stack-back,
.ugc-case-stack:hover .ugc-case-stack-front{
  animation-play-state:running;
}
.ugc-case-stack-back:hover,
.ugc-case-stack-front:hover,
.ugc-case-card:hover{
  background:transparent;
  filter:none;
}
.ugc-case-card:hover{
  box-shadow:0 18px 38px rgba(0,0,0,.24);
}
.ugc-case-stack video,
.ugc-case-stack video:hover{
  transform:none;
  filter:none;
  transition:none;
}

@keyframes ugc-case-back-cycle{
  0%,46%{
    z-index:1;
    top:2px;
    width:80%;
    border-radius:9px;
    opacity:.68;
    transform:translateX(-50%) scale(.94);
  }
  50%,96%{
    z-index:2;
    top:48px;
    width:100%;
    border-radius:14px;
    opacity:1;
    transform:translateX(-50%) scale(1);
  }
  100%{
    z-index:1;
    top:2px;
    width:80%;
    border-radius:9px;
    opacity:.68;
    transform:translateX(-50%) scale(.94);
  }
}

@keyframes ugc-case-front-cycle{
  0%,46%{
    z-index:2;
    top:48px;
    width:100%;
    border-radius:14px;
    opacity:1;
    transform:translateX(-50%) scale(1);
  }
  50%,96%{
    z-index:1;
    top:2px;
    width:80%;
    border-radius:9px;
    opacity:.68;
    transform:translateX(-50%) scale(.94);
  }
  100%{
    z-index:2;
    top:48px;
    width:100%;
    border-radius:14px;
    opacity:1;
    transform:translateX(-50%) scale(1);
  }
}

@media (max-width:1180px){
  .ugc-workspace{
    gap:12px;
    border-radius:0;
    overflow:visible;
  }
  .ugc-left,
  .ugc-right{
    border-radius:14px;
  }
}

.ugc-form-section:first-child{
  padding-top:18px;
}

@media (max-width:720px){
  .ugc-form-section:first-child{
    padding-top:25px;
  }
}

/* 视频功能切换：两张卡片外层的 4 个功能 TAB */
.ugc-main:has(> .ugc-func-tabs){
  display:flex;
  flex-direction:column;
  /* 顶部留白还给创作区：吃掉 topbar 与主区之间的 12px 网格间隙，并去掉原 8px 上内边距 */
  margin-top:-12px;
  padding-top:0;
  height:auto;
  min-height:0;
}
.ugc-main:has(> .ugc-func-tabs) .ugc-workspace{
  flex:1;
  min-height:0;
  height:auto;
}
.ugc-func-tabs{
  flex:none;
  display:inline-flex;
  align-self:flex-start;
  align-items:center;
  gap:3px;
  margin:0 0 8px;
  padding:3px;
  border-radius:12px;
  background:rgba(255,255,255,.05);
}
.ugc-func-tab{
  display:inline-flex;
  align-items:center;
  height:30px;
  padding:0 14px;
  border-radius:9px;
  color:#9ba1a8;
  font-size:12px;
  font-weight:650;
  line-height:1;
  white-space:nowrap;
  text-decoration:none;
  transition:color .16s ease,background .16s ease;
}
.ugc-func-tab:hover{
  color:#e9eaec;
  background:rgba(255,255,255,.06);
}
.ugc-func-tab.is-active,
.ugc-func-tab.is-active:hover{
  color:#fff5f8;
  background:rgba(255,45,104,.18);
}
.ugc-func-tab:focus-visible{
  outline:1px solid rgba(255,45,104,.68);
  outline-offset:1px;
}

/* 桌面端：底部留白还给主卡片，卡片向下延伸但不贴边 */
@media (min-width:1181px){
  .ugc-video-page:has(.ugc-func-tabs){
    padding-bottom:8px;
  }
  .ugc-main:has(> .ugc-func-tabs) .ugc-workspace{
    padding-bottom:6px;
  }
}

/* 矮屏（720p 视口）压缩留白，保证卡片与案例视频仍在首屏内 */
@media (max-height:820px){
  .ugc-func-tabs{
    margin-bottom:6px;
    padding:2px;
  }
  .ugc-func-tab{
    height:28px;
    padding:0 12px;
    font-size:11.5px;
  }
  .ugc-main:has(> .ugc-func-tabs) .ugc-stage-copy{
    gap:5px;
    padding:2px 0 10px;
  }
  .ugc-main:has(> .ugc-func-tabs) .ugc-tab-panel{
    padding-top:10px;
  }
  .ugc-main:has(> .ugc-func-tabs) .ugc-case-showcase{
    padding:10px 18px 8px;
  }
  .ugc-main:has(> .ugc-func-tabs) .ugc-case-stack{
    min-height:318px;
  }
  .ugc-main:has(> .ugc-func-tabs) .ugc-history-empty{
    min-height:290px;
  }
}

@media (max-width:720px){
  .ugc-func-tabs{
    display:flex;
    width:100%;
    gap:2px;
  }
  .ugc-func-tab{
    flex:1;
    justify-content:center;
    padding:0 6px;
    font-size:10.5px;
  }
}

/* UGC 带货视频公共案例：4 条 9:16 成片同排等比例缩小展示，整排上下居中。
   首个默认静音循环播放，其余鼠标悬停时播放、移出暂停。 */
.ugc-case-row-showcase{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:100%;
  padding:22px 18px 18px;
}
.ugc-case-row{
  width:100%;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  align-items:center;
}
.ugc-case-tile{
  position:relative;
  margin:0;
  min-width:0;
  aspect-ratio:9 / 16;
  border-radius:10px;
  overflow:hidden;
  background:#14171a;
  box-shadow:0 0 0 1px rgba(255,255,255,.07);
  transition:box-shadow .2s ease;
}
.ugc-case-tile .ugc-case-media{
  width:100%;
  height:100%;
  border-radius:0;
  background:transparent;
}
.ugc-case-tile video{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  background:transparent;
}
.ugc-case-tile .ugc-case-example-label{
  left:8px;
  top:8px;
  height:18px;
  padding:0 6px;
  border-radius:5px;
  font-size:9px;
}
/* 未播放的案例右下角播放按钮：悬停或播放中隐藏 */
.ugc-case-play{
  position:absolute;
  right:40px;
  bottom:8px;
  z-index:3;
  width:26px;
  height:26px;
  padding:0;
  display:grid;
  place-items:center;
  border:0;
  border-radius:50%;
  color:#f5f6f7;
  background:rgba(12,13,15,.62);
  box-shadow:0 2px 8px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.16);
  cursor:pointer;
  transition:opacity .18s ease,visibility .18s ease,transform .18s ease;
}
.ugc-case-play svg{
  width:12px;
  height:12px;
  display:block;
  margin-left:1px;
}
.ugc-case-play:hover{
  background:rgba(12,13,15,.78);
}
.ugc-case-tile.is-playing .ugc-case-play{
  opacity:0;
  visibility:hidden;
  transform:scale(.86);
}
/* 只在有 hover 的指针设备上按悬停隐藏按钮，避免触屏出现「粘住」的 hover 态。 */
@media (hover:hover){
  .ugc-case-tile:hover .ugc-case-play{
    opacity:0;
    visibility:hidden;
    transform:scale(.86);
  }
}
.ugc-case-tile.is-active{
  box-shadow:0 0 0 1.5px rgba(255,45,104,.5),0 10px 22px rgba(0,0,0,.32);
}
.ugc-case-tile:hover{
  box-shadow:0 0 0 1px rgba(255,255,255,.22),0 10px 22px rgba(0,0,0,.3);
}
.ugc-case-tile.is-active:hover{
  box-shadow:0 0 0 1.5px rgba(255,45,104,.62),0 10px 22px rgba(0,0,0,.32);
}

@media (max-width:720px){
  .ugc-case-row-showcase{
    padding:10px 10px 12px;
  }
  .ugc-case-row{
    gap:6px;
  }
  .ugc-case-tile .ugc-case-example-label{
    display:none;
  }
}

/* ==========================================================================
   Higgsfield 主题层（最终覆盖）
   参照 higgsfield.ai/effects/use 的暗色设计语言：近黑底 + 半透明白卡片 + 霓虹紫主色。
   1) 只改视觉：不改任何 DOM 结构、id / data-* 钩子与 JS 逻辑，素材路径原样保留。
   2) 所有规则都以 .ugc-video-body 收窄作用域，覆盖共用本文件壳层的 8 个工具页
      （ugc_video / ad_video / clone_video / edit_video / image / set_image / clone_image /
      details_image）；顶栏 / 页头横幅 / 页脚等全站组件由 index.css 里的
      历史强调色 → 霓虹紫替换统一覆盖。
   3) 层级顺序：本层在文件末尾，同权重时覆盖前面的历史图层。
   取色与圆角全部来自参考页计算样式：
      底色 #0f1113 · 文本 #fff / 70% / 45% / #828282
      面 rgba(255,255,255,.05) · 抬升面 rgba(255,255,255,.10)
      描边 rgba(255,255,255,.10) · 轻描边 rgba(255,255,255,.05)
      霓虹紫 #ff2d68 · 紫底文字 #ffffff · 紫底按压缩边 #c81b4f
      圆角 面板 20px / 卡片 16px / 控件 12px / 小胶囊 8px
   ========================================================================== */
.ugc-video-body{
  /* —— 设计令牌 —— */
  --hf-ground:#0a0b0d;
  --hf-surface:rgba(255,255,255,.05);
  --hf-surface-2:rgba(255,255,255,.10);
  --hf-line:rgba(255,255,255,.10);
  --hf-line-soft:rgba(255,255,255,.05);
  --hf-text:#ffffff;
  --hf-text-2:rgba(255,255,255,.70);
  --hf-text-3:rgba(255,255,255,.45);
  --hf-accent:#ff2d68;
  --hf-accent-ink:#ffffff;
  --hf-accent-ring:0 0 0 3px rgba(255,45,104,.13);
  --hf-shadow-tertiary:inset 0 2px 3px rgba(255,255,255,.05);
  --hf-shadow-primary:inset 0 -3px 0 0 #c81b4f, 0 6px 4px rgba(0,0,0,.25), 0 32px 24px rgba(0,0,0,.15);
  --hf-shadow-pop:0 24px 48px rgba(0,0,0,.55);
  --hf-r-panel:20px;
  --hf-r-card:16px;
  --hf-r-control:12px;
  --hf-r-chip:8px;
  /* 兼容旧图层引用的变量，避免遗留规则带出旧配色 */
  --ugc-line:var(--hf-line);
  --ugc-line-strong:rgba(255,255,255,.17);
  --ugc-purple-soft:rgba(255,255,255,.06);
  background:var(--hf-ground);
}
/* 页面外壳：去掉全站默认的彩色顶部光晕，只留一层极淡的白色顶部渐隐 */
.ugc-video-body .page{
  background:
    radial-gradient(1100px 340px at 50% -170px,rgba(255,255,255,.05),transparent 70%),
    var(--hf-ground);
}

/* ---------- 顶部功能 TAB（UGC 带货视频 / ADS 广告视频 / 视频复刻 / 视频编辑） ---------- */
.ugc-video-body .ugc-func-tabs{
  padding:3px;
  border:1px solid var(--hf-line-soft);
  border-radius:var(--hf-r-control);
  background:rgba(255,255,255,.04);
}
.ugc-video-body .ugc-func-tab{
  height:30px;
  padding:0 14px;
  border-radius:9px;
  color:var(--hf-text-3);
  font-size:12px;
  font-weight:500;
}
.ugc-video-body .ugc-func-tab:hover{
  color:var(--hf-text);
  background:var(--hf-surface);
}
.ugc-video-body .ugc-func-tab.is-active,
.ugc-video-body .ugc-func-tab.is-active:hover{
  color:var(--hf-text);
  background:rgba(255,255,255,.08);
  box-shadow:inset 0 0 0 1px var(--hf-line-soft);
}
.ugc-video-body .ugc-func-tab:focus-visible{
  outline:0;
  box-shadow:0 0 0 2px rgba(255,45,104,.5);
}

/* ---------- 两张主卡片：左侧内容舞台 + 右侧参数面板，各自独立成卡 ---------- */
.ugc-video-body .ugc-workspace{
  gap:12px;
}
.ugc-video-body .ugc-left,
.ugc-video-body .ugc-right{
  border-radius:var(--hf-r-panel);
}
/* 参数面板：Higgsfield 的半透明白面 */
.ugc-video-body .ugc-left{
  background:var(--hf-surface);
  box-shadow:inset 0 0 0 1px var(--hf-line-soft);
}
/* 内容舞台（视觉左侧的大区域）：对齐画布页卡片的中性灰，往白里提一档
   （#303030 = 画布令牌 --canvas-earth-soft），描边也用画布卡片的
   rgba(255,255,255,.14)，整块纯色、不带渐变/光晕。 */
.ugc-video-body .ugc-right,
.ugc-video-body .ugc-right:has(#ugc-panel-cases:not([hidden])){
  padding:18px 22px 20px;
  background:#303030;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.14);
}

/* ---------- 左侧配置项 ---------- */
.ugc-video-body .ugc-left-scroll{
  padding:0 20px 10px;
  scrollbar-color:rgba(255,255,255,.14) transparent;
}
.ugc-video-body .ugc-form-section{
  padding:12px 0;
  border-top:0;
  border-bottom:1px solid var(--hf-line-soft);
}
.ugc-video-body .ugc-form-section:first-child{
  padding-top:18px;
}
.ugc-video-body .ugc-form-section:last-child{
  border-bottom:0;
}
.ugc-video-body .ugc-form-name{
  color:var(--hf-text);
  font-size:13px;
  font-weight:600;
}
.ugc-video-body .ugc-form-title span{
  color:var(--hf-text-3);
}

/* 选择控件：统一为 5% 白面 + 5% 描边 + 12px 圆角 */
.ugc-video-body .ugc-select-trigger{
  min-height:44px;
  padding:9px 12px;
  border:1px solid var(--hf-line-soft);
  border-radius:var(--hf-r-control);
  background:var(--hf-surface);
  color:var(--hf-text);
}
.ugc-video-body .ugc-select-trigger:hover,
.ugc-video-body .ugc-select-trigger.is-open{
  border-color:var(--hf-line);
  background:var(--hf-surface-2);
  transform:none;
}
.ugc-video-body .ugc-select-trigger:focus-visible{
  outline:0;
  border-color:rgba(255,255,255,.24);
  box-shadow:0 0 0 3px rgba(255,255,255,.07);
}
.ugc-video-body .ugc-select-label{
  color:var(--hf-text);
}
.ugc-video-body .ugc-select-desc,
.ugc-video-body .ugc-model-select .ugc-select-desc{
  color:var(--hf-text-3);
  font-size:11px;
}
.ugc-video-body .ugc-select-caret{
  color:var(--hf-text-3);
}
.ugc-video-body .ugc-select-trigger.is-open .ugc-select-caret{
  color:var(--hf-text);
}

/* 模型选择：同级里最高一级的控件，悬停 / 展开时用霓虹紫描边点名 */
.ugc-video-body .ugc-model-select .ugc-select-trigger{
  min-height:56px;
  padding:10px 12px;
  border:1px solid var(--hf-line);
  border-radius:var(--hf-r-control);
  background:var(--hf-surface);
  box-shadow:none;
}
.ugc-video-body .ugc-model-select .ugc-select-trigger:hover,
.ugc-video-body .ugc-model-select .ugc-select-trigger.is-open{
  border-color:rgba(255,255,255,.24);
  background:var(--hf-surface-2);
}
.ugc-video-body .ugc-model-select .ugc-select-label{
  color:var(--hf-text);
  font-size:13px;
  font-weight:600;
}
.ugc-video-body .ugc-option-brand{
  border:1px solid var(--hf-line-soft);
  border-radius:9px;
  background:rgba(255,255,255,.08);
  box-shadow:none;
  color:var(--hf-text);
}
.ugc-video-body .ugc-model-icon .ugc-option-brand{
  width:30px;
  height:30px;
  border-radius:10px;
}

/* 下拉弹层：卡片面 + 大圆角 + 深投影 */
.ugc-video-body .ugc-select-menu{
  padding:6px;
  border:1px solid var(--hf-line);
  border-radius:var(--hf-r-card);
  background:#17191c;
  box-shadow:var(--hf-shadow-pop);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.ugc-video-body .ugc-select-option{
  height:44px;
  min-height:44px;
  border-radius:10px;
  color:var(--hf-text-2);
}
.ugc-video-body .ugc-select-option:hover{
  color:var(--hf-text);
  background:var(--hf-surface);
}
.ugc-video-body .ugc-select-option.is-active{
  color:var(--hf-text);
  background:var(--hf-surface);
}
.ugc-video-body .ugc-option-title{
  font-size:12.5px;
  font-weight:600;
}
.ugc-video-body .ugc-option-desc{
  color:var(--hf-text-3);
  font-size:10.5px;
}
.ugc-video-body .ugc-option-check{
  border:1px solid var(--hf-line);
}
.ugc-video-body .ugc-select-option.is-active .ugc-option-check{
  background:var(--hf-accent);
  border-color:#ff8ab2;
}
.ugc-video-body .ugc-option-check svg{
  color:var(--hf-accent-ink);
}
/* 模型列表里的每秒算力：默认中性灰，不做彩色标签 */
.ugc-video-body .ugc-option-credit{
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:rgba(255,255,255,.42);
  font-size:10px;
  font-weight:500;
}

/* 上传区：参考页的虚线投放框 */
.ugc-video-body .ugc-upload-zone{
  min-height:108px;
  padding:14px;
  border:1px dashed var(--hf-line);
  border-radius:var(--hf-r-control);
  background:var(--hf-surface);
  color:var(--hf-text-3);
}
.ugc-video-body .ugc-upload-zone:hover,
.ugc-video-body .ugc-upload-zone.is-dragging{
  border-color:rgba(255,255,255,.24);
  background:rgba(255,255,255,.04);
  color:var(--hf-text);
}
.ugc-video-body .ugc-upload-icon{
  width:34px;
  height:34px;
  border-radius:999px;
  background:var(--hf-surface-2);
  color:var(--hf-text);
  box-shadow:none;
}
.ugc-video-body .ugc-upload-main{
  color:var(--hf-text);
  font-size:12.5px;
  font-weight:600;
}
.ugc-video-body .ugc-upload-hint{
  color:var(--hf-text-3);
  font-size:11px;
}
.ugc-video-body .ugc-upload-status{
  color:var(--hf-text-3);
}
.ugc-video-body .ugc-upload-status.is-error{
  color:#ff9d93;
}
.ugc-video-body .ugc-image-item{
  border:1px solid var(--hf-line-soft);
  border-radius:10px;
  background:var(--hf-surface);
}
.ugc-video-body .ugc-image-remove{
  border-radius:999px;
  background:rgba(15,17,19,.72);
}
.ugc-video-body .ugc-image-remove:hover{
  background:rgba(255,113,100,.85);
}

/* 提示语输入框聚焦不再改变边框或外发光 */
.ugc-video-body .ugc-prompt-box{
  border:1px solid var(--hf-line-soft);
  border-radius:var(--hf-r-control);
  background:var(--hf-surface);
}
.ugc-video-body .ugc-prompt-box textarea{
  color:var(--hf-text);
  font-size:12.5px;
}
.ugc-video-body .ugc-prompt-box textarea::placeholder{
  color:rgba(255,255,255,.32);
}
.ugc-video-body .ugc-prompt-foot{
  color:rgba(255,255,255,.32);
  font-size:10px;
}
/* 参数配置：四个字段标签 + 控件 */
.ugc-video-body .ugc-field{
  gap:7px;
}
.ugc-video-body .ugc-field > span{
  color:var(--hf-text-3);
  font-size:10.5px;
  font-weight:500;
}
.ugc-video-body .ugc-field .ugc-select-trigger{
  min-height:44px;
}
.ugc-video-body .ugc-field .ugc-select-label{
  font-size:12px;
  font-weight:600;
}

/* 底部主按钮：参考页的霓虹紫 CTA（紫底、白字、底部按压缩边） */
.ugc-video-body .ugc-left-footer{
  padding:12px 20px 16px;
  border-top:1px solid var(--hf-line-soft);
  background:transparent;
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
}
.ugc-video-body .ugc-submit{
  height:52px;
  padding:0 18px;
  border:0;
  border-radius:var(--hf-r-control);
  color:var(--hf-accent-ink);
  background-color:#ff2d68;
  background-image:linear-gradient(180deg,rgba(255,255,255,0) 0%,rgba(200,27,79,.32) 100%);
  box-shadow:var(--hf-shadow-primary);
  font-size:15px;
  font-weight:600;
}
.ugc-video-body .ugc-submit:hover{
  background-color:#ff4d9b;
  box-shadow:var(--hf-shadow-primary);
  transform:translateY(-1px);
}
.ugc-video-body .ugc-submit:active{
  transform:translateY(0);
  box-shadow:inset 0 -1px 0 0 #c81b4f;
}
.ugc-video-body .ugc-submit:disabled{
  opacity:.42;
  transform:none;
}
.ugc-video-body .ugc-submit-label{
  font-size:15px;
  font-weight:600;
}
.ugc-video-body .ugc-cost-inline{
  color:rgba(255,255,255,.72);
  font-weight:600;
}
.ugc-video-body .ugc-cost-inline strong{
  color:var(--hf-accent-ink);
  font-weight:700;
}
.ugc-video-body .ugc-submit-loading{
  border-color:rgba(255,255,255,.25);
  border-top-color:var(--hf-accent-ink);
}

/* ---------- 右侧内容项 ---------- */
.ugc-video-body .ugc-stage-copy{
  padding:6px 0 18px;
}
.ugc-video-body .ugc-main .ugc-stage-copy h1{
  font-family:var(--h1-font);
  font-size:24px;
  font-weight:var(--h1-weight);
  letter-spacing:var(--h1-track);
  text-wrap:balance;
}
.ugc-video-body .ugc-main .ugc-stage-copy p{
  color:var(--hf-text-3);
  font-size:12px;
}
/* 创作历史：收起顶部标题与描述，把空间让给历史内容；切回公共案例自动恢复 */
.ugc-right:has([id$="-panel-history"]:not([hidden])) .ugc-stage-copy{
  display:none;
}

/* 切换公共案例 / 创作历史：标题高度由 JS 平滑收放（CSS 的 display:none 是瞬跳 76px 的根因），
   Tab 行的内边距 / 外边距同步过渡。面板本身不做整块淡入，否则内容会先“空一下”再出现。 */
@media (prefers-reduced-motion: no-preference){
  .ugc-video-body .ugc-tabs-row{
    transition:padding-top .24s cubic-bezier(.4,0,.2,1),padding-bottom .24s cubic-bezier(.4,0,.2,1),margin-bottom .24s cubic-bezier(.4,0,.2,1);
  }
}

/* 公共案例 / 创作历史：参考页的分段控件（白底胶囊指示器） */
.ugc-video-body .ugc-tabs-row{
  padding:0 0 12px;
  border:0;
}
/* 创作历史：日期筛选相对本行绝对定位并垂直居中，而绝对定位的居中基准是
   本行的内边距盒（含 padding-bottom）。把底部 12px 间距交给 margin 承担，
   居中基准就等于分段控件自身，日期胶囊与「公共案例 / 创作历史」垂直对齐。 */
.ugc-video-body .ugc-tabs-row:has(> .ugc-history-range:not([hidden])){
  padding-bottom:0;
  margin-bottom:12px;
}
.ugc-video-body .ugc-tabs{
  gap:3px;
  width:min(240px,100%);
  padding:3px;
  border:1px solid var(--hf-line-soft);
  border-radius:var(--hf-r-control);
  background:rgba(255,255,255,.04);
}
.ugc-video-body .ugc-tab{
  height:32px;
  padding:0 12px;
  border-radius:9px;
  background:transparent;
  color:rgba(255,255,255,.5);
  font-size:12px;
  font-weight:500;
}
.ugc-video-body .ugc-tab:hover{
  color:var(--hf-text);
  background:var(--hf-surface);
}
.ugc-video-body .ugc-tab.is-active,
.ugc-video-body .ugc-tab.is-active:hover{
  color:var(--hf-text);
  background:rgba(255,255,255,.08);
  box-shadow:inset 0 0 0 1px var(--hf-line-soft);
}
/* 参考页用填充胶囊表示选中，不用下划线 */
.ugc-video-body .ugc-tab.is-active::after{
  display:none;
}
.ugc-video-body .ugc-history-range{
  gap:3px;
  padding:3px;
  border:1px solid var(--hf-line-soft);
  border-radius:var(--hf-r-control);
  background:rgba(255,255,255,.04);
  box-shadow:none;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.ugc-video-body .ugc-range-btn{
  height:32px;
  padding:0 12px;
  border-radius:9px;
  color:rgba(255,255,255,.5);
  font-size:12px;
  font-weight:500;
}
.ugc-video-body .ugc-range-btn:hover{
  color:var(--hf-text);
  background:var(--hf-surface);
}
.ugc-video-body .ugc-range-btn.is-active,
.ugc-video-body .ugc-range-btn.is-active:hover{
  color:var(--hf-text);
  background:rgba(255,255,255,.08);
  box-shadow:inset 0 0 0 1px var(--hf-line-soft);
}
.ugc-video-body .ugc-range-btn:focus-visible{
  box-shadow:0 0 0 2px rgba(255,45,104,.5);
}
.ugc-video-body .ugc-range-btn.is-active:focus-visible{
  box-shadow:inset 0 0 0 1px var(--hf-line-soft),0 0 0 2px rgba(255,45,104,.5);
}
.ugc-video-body .ugc-tab-panel{
  padding-top:14px;
  scrollbar-color:rgba(255,255,255,.14) transparent;
}

/* 公共案例：4 张 9:16 成片卡，圆角 16px、5% 白面、播放中亮绿描边 */
.ugc-video-body .ugc-case-row{
  gap:12px;
}
.ugc-video-body .ugc-case-tile{
  border-radius:var(--hf-r-card);
  background:var(--hf-surface);
  box-shadow:0 0 0 1px var(--hf-line-soft);
}
.ugc-video-body .ugc-case-tile:hover{
  box-shadow:0 0 0 1px var(--hf-line),0 14px 30px rgba(0,0,0,.4);
}
.ugc-video-body .ugc-case-tile.is-active{
  box-shadow:0 0 0 1.5px rgba(255,45,104,.55),0 14px 30px rgba(0,0,0,.4);
}
.ugc-video-body .ugc-case-tile.is-active:hover{
  box-shadow:0 0 0 1.5px rgba(255,45,104,.75),0 14px 30px rgba(0,0,0,.4);
}
.ugc-video-body .ugc-case-example-label{
  height:22px;
  padding:0 8px;
  border-radius:8px;
  color:var(--hf-text);
  background:rgba(15,17,19,.66);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  font-size:10px;
  font-weight:600;
}
.ugc-video-body .ugc-case-play{
  color:var(--hf-text);
  border:1px solid var(--hf-line);
  background:rgba(15,17,19,.62);
  box-shadow:none;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
.ugc-video-body .ugc-case-play:hover{
  background:rgba(15,17,19,.84);
}
.ugc-video-body .ugc-case-showcase{
  padding:0 18px 18px;
}

/* 创作历史：每条记录一张卡片面，替代原来的纯分割线列表 */
.ugc-video-body .ugc-history-list{
  gap:12px;
}
.ugc-video-body .ugc-history-card{
  padding:12px;
  border-radius:var(--hf-r-card);
  background:var(--hf-surface);
  box-shadow:inset 0 0 0 1px var(--hf-line-soft);
  transition:background .18s ease,box-shadow .18s ease,padding .28s ease;
}
.ugc-video-body .ugc-history-card:hover{
  background:rgba(255,255,255,.07);
  box-shadow:inset 0 0 0 1px var(--hf-line);
}
/* 保留删除后"塌陷收起"的原有反馈：内边距必须回到 0 */
.ugc-video-body .ugc-history-card.is-removing{
  padding-top:0;
  padding-bottom:0;
}
.ugc-video-body .ugc-history-media,
.ugc-video-body .ugc-history-card.is-running .ugc-history-media{
  border-radius:var(--hf-r-control);
}
.ugc-video-body .ugc-history-media{
  background:#0b0c0e;
}
.ugc-video-body .ugc-history-title{
  color:var(--hf-text);
  font-size:13px;
  font-weight:600;
}
.ugc-video-body .ugc-history-tag{
  height:22px;
  padding:0 8px;
  border:0;
  border-radius:var(--hf-r-chip);
  color:var(--hf-text-2);
  background:var(--hf-surface);
  font-size:10px;
  font-weight:500;
}
.ugc-video-body .ugc-history-tag.is-status{
  color:#ff8ab2;
  background:rgba(255,45,104,.16);
}
.ugc-video-body .ugc-history-tag.is-running{
  color:#ff8ab2;
  background:rgba(255,45,104,.16);
}
.ugc-video-body .ugc-history-tag.is-error{
  max-width:100%;
  height:auto;
  min-height:22px;
  padding:3px 8px;
  line-height:1.4;
  white-space:normal;
  overflow-wrap:anywhere;
  color:#ff9d93;
  background:rgba(255,113,100,.16);
}
/* 失败卡不是加载中：不保留缩略图骨架扫光，避免误以为还在生成。 */
.ugc-history-media.is-failed::before{
  display:none !important;
  animation:none !important;
}
.ugc-video-body .ugc-history-media.is-failed{
  background-image:none !important;
  animation:none !important;
}
/* 失败原因较长：在缩略图内允许缩小并换行，不改变卡片原有的两栏结构。 */
.ugc-history-failure-text{
  display:block;
  max-width:100%;
  padding:0 6px;
  font-size:9.5px;
  line-height:1.45;
  text-align:center;
  overflow-wrap:anywhere;
}
.ugc-video-body .ugc-history-thumb,
.ugc-video-body .ugc-history-thumb-more{
  border-radius:9px;
  background:var(--hf-surface);
}
.ugc-video-body .ugc-history-thumb-more{
  color:var(--hf-text-2);
}
.ugc-video-body .ugc-history-btn,
.ugc-video-body .ugc-page-btn{
  height:32px;
  padding:0 12px;
  border:1px solid var(--hf-line);
  border-radius:var(--hf-r-chip);
  color:var(--hf-text);
  background:var(--hf-surface);
  box-shadow:var(--hf-shadow-tertiary);
  font-size:11.5px;
  font-weight:500;
}
.ugc-video-body .ugc-history-btn:hover{
  background:var(--hf-surface-2);
  border-color:var(--hf-line);
}
.ugc-video-body .ugc-history-btn.is-danger:hover{
  color:#ffb3ac;
  background:rgba(255,113,100,.12);
  border-color:rgba(255,113,100,.3);
}
.ugc-video-body .ugc-history-btn:disabled{
  opacity:.4;
}
/* 播放按钮不带品牌色：深色半透明圆底 + 白色描边，和案例卡上的小播放键保持一致 */
.ugc-video-body .ugc-video-play{
  color:#fff;
  border:1px solid var(--hf-line);
  background:rgba(15,17,19,.62);
  box-shadow:none;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
.ugc-video-body .ugc-video-play:hover{
  background:rgba(255,255,255,.16);
  border-color:rgba(255,255,255,.26);
}
.ugc-video-body .ugc-history-empty{
  color:var(--hf-text-3);
}
.ugc-video-body .ugc-history-empty svg{
  color:rgba(255,255,255,.24);
}
.ugc-video-body .ugc-history-empty strong{
  /* 空态标题不要用纯白，太扎眼；跟正文一起降到次级灰 */
  color:var(--hf-text-2);
  font-size:14px;
  font-weight:600;
}
.ugc-video-body .ugc-pagination{
  gap:6px;
  margin-top:14px;
}
.ugc-video-body .ugc-page-btn{
  min-width:32px;
  padding:0 8px;
  color:var(--hf-text-2);
}
.ugc-video-body .ugc-page-btn:hover:not(:disabled):not(.is-active){
  color:var(--hf-text);
  background:var(--hf-surface-2);
  border-color:var(--hf-line);
}
.ugc-video-body .ugc-page-btn.is-active{
  color:var(--hf-text);
  background:rgba(255,255,255,.14);
  border-color:transparent;
}
.ugc-video-body .ugc-history-skeleton{
  border-radius:var(--hf-r-card);
  background:linear-gradient(100deg,rgba(255,255,255,.04) 20%,rgba(255,255,255,.10) 40%,rgba(255,255,255,.04) 60%) !important;
  background-size:220% 100% !important;
}

/* 大图 / 视频预览弹层 */
.ugc-video-body .ugc-lightbox-backdrop{
  background:rgba(8,9,11,.84);
}
.ugc-video-body .ugc-lightbox-image,
.ugc-video-body .ugc-lightbox-video{
  border-radius:var(--hf-r-card);
}
.ugc-video-body .ugc-lightbox-close{
  width:36px;
  height:36px;
  border:1px solid var(--hf-line);
  border-radius:999px;
  background:rgba(23,25,28,.92);
}
.ugc-video-body .ugc-lightbox-close:hover{
  background:rgba(255,255,255,.14);
  border-color:rgba(255,255,255,.24);
}
.ugc-video-body .ugc-lightbox-close:focus-visible{
  outline:2px solid rgba(255,45,104,.7);
  outline-offset:2px;
}

/* SEO 区块（当前布局里被隐藏，仅同步配色，避免残留旧配色） */
.ugc-video-body .ugc-faq{
  background:var(--hf-surface);
  box-shadow:none;
}
.ugc-video-body .ugc-faq-kicker{
  color:#ff8ab2;
}
.ugc-video-body .ugc-faq-heading h2,
.ugc-video-body .ugc-faq-heading h3,
.ugc-video-body .ugc-faq-item summary{
  color:var(--hf-text);
}
.ugc-video-body .ugc-faq-heading p,
.ugc-video-body .ugc-faq-item p{
  color:var(--hf-text-3);
}
.ugc-video-body .ugc-faq-item{
  border-radius:var(--hf-r-control);
  background:rgba(255,255,255,.04);
}
.ugc-video-body .ugc-faq-item p a{
  color:#ff8ab2;
}

/* 矮屏压缩时保持新控件的节奏 */
@media (max-height:820px){
  .ugc-video-body .ugc-model-select .ugc-select-trigger{
    min-height:52px;
  }
  .ugc-video-body .ugc-upload-zone{
    min-height:92px;
  }
  .ugc-video-body .ugc-submit{
    height:48px;
  }
}
@media (max-width:1180px){
  .ugc-video-body .ugc-workspace{
    gap:12px;
  }
  .ugc-video-body .ugc-left,
  .ugc-video-body .ugc-right{
    border-radius:var(--hf-r-panel);
  }
}
@media (max-width:720px){
  .ugc-video-body .ugc-left-scroll{
    padding:2px 16px 14px;
  }
  /* 单列堆叠时把桌面端的内边距还给移动端，避免本层的高权重规则吃掉原有的窄屏留白 */
  /* 必须带上 :has() 那一份，否则会被上方 (0,4,0) 的桌面端内边距压回去 */
  .ugc-video-body .ugc-right,
  .ugc-video-body .ugc-right:has(#ugc-panel-cases:not([hidden])){
    padding:16px 12px 14px;
  }
  .ugc-video-body .ugc-left-footer{
    padding:13px 16px 16px;
  }
  .ugc-video-body .ugc-stage-copy{
    padding:3px 0 14px;
  }
  .ugc-video-body .ugc-main .ugc-stage-copy h1{
    font-size:19px;
  }
  .ugc-video-body .ugc-case-showcase{
    padding:0 10px 14px;
  }
  .ugc-video-body .ugc-case-row{
    gap:6px;
  }
  .ugc-video-body .ugc-upload-icon{
    width:38px;
    height:38px;
  }
  .ugc-video-body .ugc-upload-zone{
    min-height:104px;
    padding:14px;
  }
  .ugc-video-body .ugc-submit{
    height:48px;
  }
  .ugc-video-body .ugc-tabs{
    width:100%;
  }
}

/* 工具页主标题：纯白，不做渐变 */
.ugc-stage-copy h1,
.ugc-video-body .ugc-main .ugc-stage-copy h1{
  color:#ffffff;
  background:none;
  -webkit-background-clip:border-box;
  background-clip:border-box;
  -webkit-text-fill-color:#ffffff;
  filter:none;
}

/* 视频工具页的提示语输入框：正文用常规内边距；带底栏的页面在下方单独
   抬高输入框并给底栏留出空间。 */
.ugc-video-body:not(.image-tool-body) .ugc-prompt-box textarea{
  min-height:125px;
  padding:13px;
}

/* 商品图区域：已上传图片与上传卡片合并成同一个网格单元，视觉上是一体的一张卡。
   只作用于 4 个视频工具页，图片工具页复用同一份样式表但保持原样。 */
.ugc-video-body:not(.image-tool-body) .ugc-media-card:has(.ugc-video-preview.has-video){
  padding:10px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:12px;
  background:rgba(255,255,255,.022);
}
/* 参考视频上传后与参考图片缩略图等大：同一套 4 列网格 + 同样的卡片内边距，视频占第一格 */
.ugc-video-body:not(.image-tool-body) .ugc-media-card .ugc-video-preview.has-video{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  place-items:stretch;
  margin-top:9px;
  min-height:0;
  border-radius:0;
  background:transparent;
}
.ugc-video-body:not(.image-tool-body) .ugc-media-card .ugc-video-preview.has-video video{
  grid-column:1;
  grid-row:1;
  width:100%;
  height:100%;
  aspect-ratio:1 / 1;
  object-fit:cover;
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px;
  background:#141619;
}
/* 删除按钮贴住视频那一格的右上角，不跑到整行最右侧 */
.ugc-video-body:not(.image-tool-body) .ugc-media-card .ugc-video-preview.has-video .ugc-image-remove{
  position:static;
  grid-column:1;
  grid-row:1;
  justify-self:end;
  align-self:start;
  margin:5px;
}
.ugc-video-body:not(.image-tool-body) .ugc-media-card:has(.ugc-image-list:not(:empty)){
  padding:10px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:12px;
  background:rgba(255,255,255,.022);
}
/* 卡片里的已选提示：已选 3 / 6 张 · 含数字人库 */
.ugc-video-body:not(.image-tool-body) .ugc-media-count{
  margin-bottom:8px;
  color:#8b9199;
  font-size:11px;
  line-height:1.4;
}
.ugc-video-body:not(.image-tool-body) .ugc-media-card .ugc-image-list{
  margin-top:0;
}
.ugc-video-body:not(.image-tool-body) .ugc-media-card .ugc-image-item{
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px;
}
/* 有图时上传区收成与图片等大的「+」方块，和缩略图完全对齐 */
.ugc-video-body:not(.image-tool-body) .ugc-upload-zone.has-images{
  width:100%;
  height:auto;
  min-height:0;
  aspect-ratio:1 / 1;
  padding:0;
  gap:0;
  border:1px dashed rgba(255,255,255,.22);
  border-radius:8px;
  background:transparent;
  color:#7f858d;
}
.ugc-video-body:not(.image-tool-body) .ugc-upload-zone.has-images:hover,
.ugc-video-body:not(.image-tool-body) .ugc-upload-zone.has-images.is-dragging{
  border-color:rgba(255,255,255,.26);
  background:rgba(255,255,255,.05);
  color:#e7e9ec;
}
.ugc-video-body:not(.image-tool-body) .ugc-upload-zone.has-images .ugc-upload-icon{
  width:auto;
  height:auto;
  border-radius:0;
  background:none;
  color:inherit;
}
.ugc-video-body:not(.image-tool-body) .ugc-upload-zone.has-images .ugc-upload-icon svg{
  width:18px;
  height:18px;
}
.ugc-video-body:not(.image-tool-body) .ugc-upload-zone.has-images .ugc-upload-main,
.ugc-video-body:not(.image-tool-body) .ugc-upload-zone.has-images .ugc-upload-hint{
  display:none;
}
.ugc-video-body:not(.image-tool-body) .ugc-media-card .ugc-upload-status{
  margin-top:8px;
}
.ugc-video-body:not(.image-tool-body) .ugc-media-card .gmp-person-chip{
  margin-top:8px;
}
/* 视频编辑 / 视频复刻没有 AI提示语润色按钮，收回为它预留的底部空白 */
.ugc-video-body[data-video-type="edit_video"] .ugc-prompt-box textarea,
.ugc-video-body[data-video-type="clone_video"] .ugc-prompt-box textarea{
  padding-bottom:26px;
}

/* ---------- 内部滚动区「下面还有内容」提示 ---------- */
/* 配置面板 / 右侧舞台内容超出高度时，底部（顶部）做渐隐，
   即使系统滚动条自动隐藏，用户也能感知还有未展示的配置项与选择项。 */
.ugc-left-scroll,
.ugc-tab-panel{
  --scroll-fade:104px;
  --scroll-fade-strong:rgba(0,0,0,.82);
  --scroll-fade-mid:rgba(0,0,0,.42);
}
.scroll-fade-bottom{
  -webkit-mask-image:linear-gradient(180deg,#000 0,#000 calc(100% - var(--scroll-fade)),var(--scroll-fade-strong) calc(100% - 56px),var(--scroll-fade-mid) calc(100% - 26px),transparent 100%);
          mask-image:linear-gradient(180deg,#000 0,#000 calc(100% - var(--scroll-fade)),var(--scroll-fade-strong) calc(100% - 56px),var(--scroll-fade-mid) calc(100% - 26px),transparent 100%);
}
.scroll-fade-top{
  -webkit-mask-image:linear-gradient(180deg,transparent 0,var(--scroll-fade-mid) 26px,var(--scroll-fade-strong) 56px,#000 var(--scroll-fade),#000 100%);
          mask-image:linear-gradient(180deg,transparent 0,var(--scroll-fade-mid) 26px,var(--scroll-fade-strong) 56px,#000 var(--scroll-fade),#000 100%);
}
.scroll-fade-top.scroll-fade-bottom{
  -webkit-mask-image:linear-gradient(180deg,transparent 0,var(--scroll-fade-mid) 26px,var(--scroll-fade-strong) 56px,#000 var(--scroll-fade),#000 calc(100% - var(--scroll-fade)),var(--scroll-fade-strong) calc(100% - 56px),var(--scroll-fade-mid) calc(100% - 26px),transparent 100%);
          mask-image:linear-gradient(180deg,transparent 0,var(--scroll-fade-mid) 26px,var(--scroll-fade-strong) 56px,#000 var(--scroll-fade),#000 calc(100% - var(--scroll-fade)),var(--scroll-fade-strong) calc(100% - 56px),var(--scroll-fade-mid) calc(100% - 26px),transparent 100%);
}
/* 下拉菜单展开时不渐隐，避免选项被遮罩淡掉 */
.ugc-left-scroll:has(.ugc-select-menu:not([hidden])),
.ugc-tab-panel:has(.ugc-select-menu:not([hidden])){
  -webkit-mask-image:none;
          mask-image:none;
}

/* ---------- 上传卡片：从本地上传 / 资产库 / 数字人库 ---------- */
/* 空态：虚线投放框里并排三入口；有图后收成「+」小方块（只保留图标）。 */
.ugc-upload-actions{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:13px;
  width:100%;
}
.ugc-upload-sub{
  position:relative;
  display:flex;
  align-items:center;
  gap:13px;
}
/* 入口之间的细分隔线：绝对定位，落在两枚按钮的间隙正中，不参与排版 */
.ugc-upload-sub::before,
.ugc-upload-sub .ugc-upload-btn + .ugc-upload-btn::before{
  content:'';
  position:absolute;
  top:50%;
  left:-7px;
  width:1px;
  height:12px;
  transform:translateY(-50%);
  background:rgba(255,255,255,.16);
}
.ugc-upload-sub .ugc-upload-btn + .ugc-upload-btn{
  position:relative;
}
.ugc-upload-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-height:28px;
  padding:0 12px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#8f959d;
  font:inherit;
  font-size:12px;
  font-weight:600;
  line-height:1.2;
  white-space:nowrap;
  cursor:pointer;
  transition:background .16s ease,color .16s ease;
}
.ugc-upload-btn:hover{
  background:rgba(255,255,255,.06);
  color:#fff;
}
/* 三个入口视觉一致：从本地上传不做强调色，保持简洁 */
.ugc-upload-btn-icon{
  display:inline-grid;
  place-items:center;
  width:13px;
  height:13px;
}
.ugc-upload-btn-icon svg{
  width:13px;
  height:13px;
}
/* 三入口卡片不需要虚线框那么高的留白 */
.ugc-video-body .ugc-upload-zone:has(.ugc-upload-actions):not(.has-images){
  min-height:76px;
}
/* 有图后收成「+」小方块：hover / 点击弹出「继续上传」菜单，三个入口依然可选 */
.ugc-upload-zone:has(.ugc-upload-menu){
  position:relative;
}
.ugc-upload-zone.is-menu-open{
  border-color:rgba(255,255,255,.32);
  background:rgba(255,255,255,.05);
  color:#e9ecef;
}
.ugc-upload-menu{
  position:absolute;
  left:50%;
  bottom:calc(100% + 8px);
  z-index:40;
  display:flex;
  flex-direction:column;
  gap:1px;
  min-width:132px;
  padding:5px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(22,23,26,.98);
  box-shadow:0 18px 40px rgba(0,0,0,.5);
  transform:translateX(-50%);
}
.ugc-upload-menu[hidden]{
  display:none;
}
.ugc-upload-menu::after{
  content:'';
  position:absolute;
  left:50%;
  bottom:-5px;
  width:8px;
  height:8px;
  border-right:1px solid rgba(255,255,255,.12);
  border-bottom:1px solid rgba(255,255,255,.12);
  background:rgba(22,23,26,.98);
  transform:translateX(-50%) rotate(45deg);
}
.ugc-upload-menu-item{
  display:flex;
  align-items:center;
  gap:7px;
  width:100%;
  min-height:28px;
  padding:0 9px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#dfe2e7;
  font:inherit;
  font-size:12px;
  font-weight:600;
  line-height:1.2;
  white-space:nowrap;
  text-align:left;
  cursor:pointer;
  transition:background .14s ease,color .14s ease;
}
.ugc-upload-menu-item svg{
  width:13px;
  height:13px;
  flex:0 0 13px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
  color:#8f959d;
}
.ugc-upload-menu-item:hover{
  background:rgba(255,255,255,.08);
  color:#fff;
}
.ugc-upload-menu-item:hover svg{
  color:#fff;
}
/* 空态不展示单独的大图标，避免和三入口重复（只作用于带三入口的卡片，
   参考视频等没有三入口的投放框保持原样） */
.ugc-upload-zone:has(.ugc-upload-actions):not(.has-images) .ugc-upload-icon{
  display:none;
}
/* 三入口卡片空态：上面三个小图标（图片 / 视频 / 人物）+ 下面一行「上传XX」文案，
   hover / 拖拽 / 键盘聚焦时才展开三个入口；两种状态都是同一个 76px 虚线框，不会跳动。 */
.ugc-upload-zone:has(.ugc-upload-actions):not(.has-images) .ugc-upload-placeholder{
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  color:var(--hf-text-3);
  /* 文案比正文更小更轻，配图标才精致 */
  font-size:11px;
  font-weight:500;
  letter-spacing:.5px;
}
.ugc-upload-zone:has(.ugc-upload-actions):not(.has-images) .ugc-upload-placeholder > span:last-child{
  line-height:1.2;
}
/* 图标组：图片 / 视频 / 人物，扁平风 —— 单一中性色、纯色底、无渐变无投影，
   只靠间距排开；不给每个图标单独配色。 */
.ugc-upload-stack{
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.ugc-upload-stack-item{
  display:grid;
  place-items:center;
  width:24px;
  height:24px;
  border-radius:7px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.05);
  color:rgba(255,255,255,.58);
}
.ugc-upload-stack-item svg{
  width:13px;
  height:13px;
}
/* 人物图标跟随卡片的 hover 入口：卡片 hover 里有「数字人库」才展示人物图标。
   ugc_video / ad_video 的卡片有三个入口，其余工具页只有「从本地上传 + 资产库」，
   空态图标组不要出现点不到的数字人图标。 */
.ugc-upload-stack-item.is-person{
  display:none;
}
.ugc-upload-zone:has([data-media-source="person"]) .ugc-upload-stack-item.is-person{
  display:grid;
}
.ugc-upload-zone:has(.ugc-upload-actions):not(.has-images) .ugc-upload-actions{
  display:none;
}
.ugc-upload-zone:has(.ugc-upload-actions):not(.has-images):hover .ugc-upload-placeholder,
.ugc-upload-zone:has(.ugc-upload-actions):not(.has-images):focus-within .ugc-upload-placeholder,
.ugc-upload-zone:has(.ugc-upload-actions):not(.has-images).is-dragging .ugc-upload-placeholder{
  display:none;
}
.ugc-upload-zone:has(.ugc-upload-actions):not(.has-images):hover .ugc-upload-actions,
.ugc-upload-zone:has(.ugc-upload-actions):not(.has-images):focus-within .ugc-upload-actions,
.ugc-upload-zone:has(.ugc-upload-actions):not(.has-images).is-dragging .ugc-upload-actions{
  display:flex;
}
/* 有图后卡片收成「+」小方块，不要再出现占位文案 */
.ugc-upload-zone.has-images .ugc-upload-placeholder{
  display:none;
}
/* 触屏没有 hover：直接常驻展示三个入口，保证可点 */
@media (hover:none){
  .ugc-upload-zone:has(.ugc-upload-actions):not(.has-images) .ugc-upload-placeholder{
    display:none;
  }
  .ugc-upload-zone:has(.ugc-upload-actions):not(.has-images) .ugc-upload-actions{
    display:flex;
  }
}
/* 有图后只留「+」小方块，三入口收起 */
.ugc-upload-zone.has-images:has(.ugc-upload-actions) .ugc-upload-actions{
  display:none;
}
button.ugc-upload-icon{
  padding:0;
  border:0;
  background:none;
  color:inherit;
  font:inherit;
  cursor:pointer;
}

/* ==================== 提示语输入框底栏：参数聚合 + 算力 + 发送 ====================
   参考画布节点面板的排法：参数收成输入框内左下角一颗聚合按钮（点开弹层里选
   清晰度/时长/尺寸/语言），算力与发送按钮并在右下角；发送按钮只留图标。 */
.ugc-prompt-box:has(.ugc-prompt-bar){
  overflow:visible;
}
.ugc-prompt-bar{
  position:absolute;
  left:11px;
  right:11px;
  bottom:9px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  /* 底栏本身不吃点击：空白处点下去仍然是聚焦输入框 */
  pointer-events:none;
}
.ugc-prompt-bar > *{
  pointer-events:auto;
}
/* 带润色卡片的底栏：参数卡片与润色卡片并排靠左，算力与发送仍然贴右。
   新增卡片不能改变这条底栏原有的左右分区。 */
.ugc-prompt-bar:has(.ugc-polish-card){
  justify-content:flex-start;
  gap:6px;
}
.ugc-prompt-bar:has(.ugc-polish-card) .ugc-prompt-actions{
  margin-left:auto;
}
.ugc-prompt-bar .ugc-params-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  flex:0 1 auto;
  min-height:32px;
  min-width:0;
  max-width:68%;
  padding:7px 11px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:8px;
  background:rgba(255,255,255,.05);
  color:#cfd3d9;
  font:inherit;
  font-size:11.5px;
  font-weight:600;
  cursor:pointer;
  transition:background .16s ease,border-color .16s ease,color .16s ease;
}
.ugc-prompt-bar .ugc-params-btn:hover,
.ugc-prompt-bar .ugc-params-btn.is-open{
  background:rgba(255,255,255,.09);
  border-color:rgba(255,255,255,.22);
  color:#fff;
}
.ugc-prompt-bar .ugc-params-icon{
  flex:0 0 14px;
  width:14px;
  height:14px;
  opacity:.75;
}
.ugc-prompt-bar .ugc-params-summary{
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
/* 提示语润色小卡片：紧挨参数卡片右侧、同高 32px 的纯图标按钮（书本）；
   hover / 键盘聚焦时向上弹出「提示词润色」气泡。 */
.ugc-prompt-bar .ugc-polish-card{
  position:relative;
  flex:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:32px;
  min-width:0;
  padding:0;
  border:1px solid rgba(255,255,255,.10);
  border-radius:8px;
  background:rgba(255,255,255,.05);
  color:#cfd3d9;
  cursor:pointer;
  transition:background .16s ease,border-color .16s ease,color .16s ease,opacity .16s ease;
}
.ugc-prompt-bar .ugc-polish-icon{
  flex:none;
  width:18px;
  height:18px;
  opacity:.85;
  transition:opacity .16s ease;
}
.ugc-prompt-bar .ugc-polish-card:hover{
  background:rgba(255,255,255,.09);
  border-color:rgba(255,255,255,.22);
  color:#fff;
}
.ugc-prompt-bar .ugc-polish-card:hover .ugc-polish-icon,
.ugc-prompt-bar .ugc-polish-card:focus-visible .ugc-polish-icon{
  opacity:1;
}
.ugc-prompt-bar .ugc-polish-card:focus-visible{
  outline:0;
  border-color:rgba(255,45,104,.55);
  color:#fff;
  box-shadow:0 0 0 2px rgba(255,45,104,.32);
}
.ugc-prompt-bar .ugc-polish-card:disabled{
  cursor:not-allowed;
  opacity:.5;
}
.ugc-prompt-bar .ugc-polish-card:disabled:hover{
  background:rgba(255,255,255,.05);
  border-color:rgba(255,255,255,.10);
  color:#cfd3d9;
}
.ugc-prompt-bar .ugc-polish-card:disabled:hover .ugc-polish-icon{
  opacity:.85;
}
.ugc-prompt-bar .ugc-polish-spinner{
  display:none;
  flex:none;
  width:12px;
  height:12px;
  border:2px solid rgba(255,255,255,.22);
  border-top-color:currentColor;
  border-radius:50%;
}
.ugc-prompt-bar .ugc-polish-card.is-loading .ugc-polish-icon{
  display:none;
}
.ugc-prompt-bar .ugc-polish-card.is-loading .ugc-polish-spinner{
  display:block;
  animation:ugc-spin-flat .8s linear infinite;
}
/* 「提示词润色」气泡：与参数弹层里的说明气泡同款，向上弹出 */
.ugc-prompt-bar .ugc-polish-card[data-tooltip]::after{
  content:attr(data-tooltip);
  position:absolute;
  left:50%;
  bottom:calc(100% + 8px);
  z-index:7;
  width:max-content;
  max-width:230px;
  padding:7px 9px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:8px;
  background:rgba(27,30,36,.97);
  box-shadow:0 8px 20px rgba(0,0,0,.34);
  color:#eef1f5;
  font-size:11px;
  font-weight:500;
  line-height:1.45;
  white-space:nowrap;
  pointer-events:none;
  opacity:0;
  transform:translate(-50%,4px);
  transition:opacity .15s ease,transform .15s ease;
}
.ugc-prompt-bar .ugc-polish-card[data-tooltip]:hover::after,
.ugc-prompt-bar .ugc-polish-card[data-tooltip]:focus-visible::after{
  opacity:1;
  transform:translate(-50%,0);
}
/* 参数弹层打开时，润色卡片的说明气泡不再浮到弹层上面 */
.ugc-prompt-bar:has(.ugc-params-pop:not([hidden])) .ugc-polish-card[data-tooltip]::after{
  opacity:0;
  transform:translate(-50%,4px);
}
.ugc-prompt-bar .ugc-prompt-actions{
  display:inline-flex;
  align-items:center;
  gap:9px;
}
.ugc-prompt-bar .ugc-cost{
  display:inline-flex;
  align-items:center;
  gap:3px;
  color:#cfd3d9;
  font-size:11.5px;
  font-weight:700;
}
.ugc-prompt-bar .ugc-cost svg{
  width:12px;
  height:12px;
  /* 和右侧发送键同色（白色），不再是品牌紫 */
  color:#f4f5f6;
}
.ugc-prompt-bar .ugc-submit{
  width:28px;
  height:28px;
  min-height:0;
  padding:0;
  display:inline-grid;
  place-items:center;
  border:0;
  border-radius:50%;
  background:linear-gradient(180deg,#ffffff,#e4e7eb);
  color:#141518;
  box-shadow:none;
  cursor:pointer;
  transition:filter .16s ease,opacity .16s ease;
}
/* 白色圆形发送键：hover 只提亮，不加边框/光圈，也不位移 */
.ugc-prompt-bar .ugc-submit:hover{
  transform:none;
  background:linear-gradient(180deg,#ffffff,#e4e7eb);
  color:#141518;
  box-shadow:none;
  filter:brightness(.94);
}
.ugc-prompt-bar .ugc-submit:active{
  transform:none;
  background:linear-gradient(180deg,#ffffff,#e4e7eb);
  color:#141518;
  box-shadow:none;
  filter:brightness(.88);
}
.ugc-prompt-bar .ugc-submit:disabled{
  opacity:.5;
  filter:none;
}
.ugc-prompt-bar .ugc-submit-icon{
  width:14px;
  height:14px;
}
.ugc-prompt-bar .ugc-submit-loading{
  position:static;
  top:auto;
  right:auto;
  transform:none;
  width:14px;
  height:14px;
  border:2px solid rgba(20,21,24,.22);
  border-top-color:#141518;
  border-radius:50%;
  display:none;
}
.ugc-prompt-bar .ugc-submit.is-loading .ugc-submit-icon{
  display:none;
}
.ugc-prompt-bar .ugc-submit.is-loading .ugc-submit-loading{
  display:block;
  /* 这里必须用只旋转的关键帧：ugc-spin 是给旧的大按钮写的，带 translateY(-50%)，
     套在用在这颗静态居中的小转圈上会一圈一跳。 */
  animation:ugc-spin-flat .8s linear infinite;
}
@keyframes ugc-spin-flat{
  to{transform:rotate(360deg)}
}
/* 参数弹层：宽度、留白、分段控件与标题行都对齐画布节点面板的参数面板 */
.ugc-prompt-bar .ugc-params-pop{
  position:absolute;
  /* 比输入框略宽一点即可，不用顶满面板 */
  left:-14px;
  bottom:calc(100% + 8px);
  width:calc(100% + 28px);
  max-width:none;
  min-height:186px;
  box-sizing:border-box;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  gap:16px;
  padding:14px 18px 20px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:14px;
  background:rgba(26,27,30,.98);
  /* 扁平：只留一层柔和投影，不再叠内描边高光 */
  box-shadow:0 18px 40px rgba(0,0,0,.45);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  pointer-events:auto;
}
.ugc-prompt-bar .ugc-params-pop[hidden]{
  display:none;
}
.ugc-prompt-bar .ugc-params-pop-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin:0 0 -2px;
  padding:0 1px 10px;
  /* 1px 的分割线在深色面板上太硬，用半透明白压一层 */
  border-bottom:1px solid rgba(255,255,255,.1);
}
.ugc-prompt-bar .ugc-params-pop-body{
  display:grid;
  gap:14px;
  align-content:start;
  min-height:0;
}
.ugc-prompt-bar .ugc-params-pop-title{
  color:#99a0a8;
  font-size:11px;
  font-weight:700;
  letter-spacing:.02em;
}
.ugc-prompt-bar .ugc-params-pop-close{
  flex:none;
  width:22px;
  height:22px;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:7px;
  background:transparent;
  color:#8d939b;
  font-size:14px;
  line-height:1;
  cursor:pointer;
  transition:background .15s ease,color .15s ease;
}
.ugc-prompt-bar .ugc-params-pop-close:hover{
  background:rgba(255,255,255,.1);
  color:#fff;
}
/* 每项：名称在上、选项独占一排 */
.ugc-prompt-bar .ugc-params-group{
  display:block;
  min-width:0;
}
.ugc-prompt-bar .ugc-params-group-title{
  display:flex;
  align-items:center;
  gap:6px;
  margin-bottom:8px;
  color:#9aa1aa;
  font-size:10.5px;
  font-weight:700;
  letter-spacing:.01em;
}
.ugc-prompt-bar .ugc-params-group-icon{
  flex:0 0 13px;
  width:13px;
  height:13px;
  opacity:.75;
}
/* 每组选项共用一整块背景（画布那种分段控件底），选项本身保持干净 */
.ugc-prompt-bar .ugc-params-choices{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  min-width:0;
  padding:5px;
  border:1px solid rgba(255,255,255,.13);
  border-radius:10px;
  background:rgba(255,255,255,.055);
}
/* 选中态只留一层淡填充，不加描边高亮和投影 */
.ugc-prompt-bar .ugc-params-choice{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:32px;
  padding:0 11px;
  border:1px solid transparent;
  border-radius:8px;
  background:transparent;
  color:#c4cad4;
  font:inherit;
  font-size:11px;
  font-weight:600;
  line-height:1.2;
  white-space:nowrap;
  cursor:pointer;
  transition:border-color .16s ease,background .16s ease,color .16s ease;
}
.ugc-prompt-bar .ugc-params-choice:hover{
  border-color:rgba(255,255,255,.24);
  background:rgba(255,255,255,.06);
  color:#fff;
}
.ugc-prompt-bar .ugc-params-choice.is-active{
  border-color:rgba(255,255,255,.26);
  background:rgba(255,255,255,.12);
  color:#fff;
}
/* 尺寸选项：小方块按真实比例缩放，竖屏/横屏/方形一眼可辨 */
.ugc-prompt-bar .ugc-params-choice:has(.ugc-params-ratio-mark){
  min-height:38px;
  /* 带示意方块的选项更宽，收紧一点，让 5 个比例仍排成一行 */
  gap:5px;
  padding:0 8px;
}
/* 语言选项的国旗：16×12 的小旗，圆角裁切，描一圈极淡的边避免白旗糊在深底上 */
.ugc-prompt-bar .ugc-params-flag{
  flex:0 0 16px;
  width:16px;
  height:12px;
  border-radius:3px;
  overflow:hidden;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.14);
}
.ugc-prompt-bar .ugc-params-flag--fallback{
  color:#9aa1aa;
  box-shadow:none;
}
/* 带国旗的选项本来就宽，收紧一点内边距，让 11 种语言排得更省行 */
.ugc-prompt-bar .ugc-params-choice:has(.ugc-params-flag){
  gap:5px;
  padding:0 8px;
}
.ugc-prompt-bar .ugc-params-ratio-mark{
  flex:0 0 18px;
  width:18px;
  height:18px;
  display:grid;
  place-items:center;
  opacity:.8;
}
.ugc-prompt-bar .ugc-params-ratio-mark::after{
  content:'';
  display:block;
  width:15px;
  height:8.5px;
  border:1.6px solid currentColor;
  border-radius:3px;
}
.ugc-prompt-bar .ugc-params-choice[data-value="9:16"] .ugc-params-ratio-mark::after{
  width:8.5px;
  height:15px;
}
.ugc-prompt-bar .ugc-params-choice[data-value="16:9"] .ugc-params-ratio-mark::after{
  width:15px;
  height:8.5px;
}
.ugc-prompt-bar .ugc-params-choice[data-value="1:1"] .ugc-params-ratio-mark::after{
  width:12px;
  height:12px;
}
.ugc-prompt-bar .ugc-params-choice[data-value="3:4"] .ugc-params-ratio-mark::after{
  width:10px;
  height:13.5px;
}
.ugc-prompt-bar .ugc-params-choice[data-value="4:3"] .ugc-params-ratio-mark::after{
  width:13.5px;
  height:10px;
}
.ugc-prompt-bar .ugc-params-choice[data-value="3:2"] .ugc-params-ratio-mark::after{
  width:15px;
  height:10px;
}
.ugc-prompt-bar .ugc-params-choice[data-value="2:3"] .ugc-params-ratio-mark::after{
  width:10px;
  height:15px;
}
/* 带底栏的输入框：正文更高，底部留出底栏的位置 */
.ugc-video-body:not(.image-tool-body) .ugc-prompt-box:has(.ugc-prompt-bar) textarea{
  min-height:170px;
  padding:13px 13px 58px;
}
/* 参数收进输入框后，提示语区自然吃掉面板剩余高度：输入框跟着变高，
   不留大片空白；窗口变矮时靠 min-height 兜底并回到滚动。 */
.ugc-video-body:not(.image-tool-body) .ugc-left-scroll{
  display:flex;
  flex-direction:column;
}
.ugc-video-body:not(.image-tool-body) .ugc-form-section:has(.ugc-prompt-bar){
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
}
.ugc-video-body:not(.image-tool-body) .ugc-form-section:has(.ugc-prompt-bar) .ugc-prompt-box{
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
}
.ugc-video-body:not(.image-tool-body) .ugc-prompt-box:has(.ugc-prompt-bar) textarea{
  flex:1 1 auto;
  height:auto;
  min-height:170px;
}
/* 参考素材卡片高一些：空态的上传框给足展示高度（只作用于带底栏输入框的工具页） */
.ugc-video-body .ugc-left-scroll:has(.ugc-prompt-bar) .ugc-upload-zone:has(.ugc-upload-actions):not(.has-images){
  min-height:104px;
}
/* 底栏只放「积分 + 发送」时（视频编辑页）整体靠右 */
.ugc-prompt-bar:not(:has(.ugc-params-btn)){
  justify-content:flex-end;
}
/* 底栏左侧可以并排两颗卡片按钮（参数配置 / 复刻方式） */
.ugc-prompt-bar .ugc-prompt-left{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.ugc-clone-mode-field{
  position:relative;
  min-width:0;
  /* 复刻方式卡片按内容宽度撑开，文字不截断；挤不下时让参数卡片先让位 */
  flex:0 0 auto;
}
.ugc-clone-mode-field > .ugc-params-btn{
  flex:none;
  max-width:none;
}
/* 复刻方式自己的弹层：贴着它那颗按钮往上弹，选项排成模型列表那样的整行 */
.ugc-prompt-bar .ugc-clone-pop{
  /* 位置和参数卡片完全一致（同一个 left / 宽度），只是内容更矮 */
  min-height:0;
  gap:10px;
  padding:12px 14px 14px;
}
.ugc-prompt-bar .ugc-clone-mode-list{
  display:grid;
  gap:2px;
}
/* 未选中只留空心圆，选中圈换成品牌黄打勾（与模型列表一致） */
.ugc-prompt-bar .ugc-clone-mode-list .ugc-select-option:not(.is-active) .ugc-option-check{
  background:transparent;
}
.ugc-prompt-bar .ugc-clone-mode-list .ugc-select-option:not(.is-active) .ugc-option-check svg{
  opacity:0;
}
/* 参数卡片里的附加行容器（视频复刻的「复刻方式」占一行，参数行跟在后面） */
.ugc-prompt-bar .ugc-params-rows{
  display:grid;
  gap:14px;
  min-height:0;
}
/* 复刻方式：hover / 键盘聚焦时给出解释气泡，样式对齐画布节点面板 */
.ugc-prompt-bar .ugc-params-choice[data-tooltip]::after,
.ugc-prompt-bar .ugc-select-option[data-tooltip]::after{
  content:attr(data-tooltip);
  position:absolute;
  left:50%;
  bottom:calc(100% + 8px);
  z-index:6;
  width:max-content;
  max-width:230px;
  padding:7px 9px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:8px;
  background:rgba(27,30,36,.97);
  box-shadow:0 8px 20px rgba(0,0,0,.34);
  color:#eef1f5;
  font-size:11px;
  font-weight:500;
  line-height:1.45;
  text-align:left;
  white-space:normal;
  pointer-events:none;
  opacity:0;
  transform:translate(-50%,4px);
  transition:opacity .15s ease,transform .15s ease;
}
.ugc-prompt-bar .ugc-params-choice[data-tooltip],
.ugc-prompt-bar .ugc-select-option[data-tooltip]{
  position:relative;
}
.ugc-prompt-bar .ugc-params-choice[data-tooltip]:hover::after,
.ugc-prompt-bar .ugc-params-choice[data-tooltip]:focus-visible::after,
.ugc-prompt-bar .ugc-select-option[data-tooltip]:hover::after,
.ugc-prompt-bar .ugc-select-option[data-tooltip]:focus-visible::after{
  opacity:1;
  transform:translate(-50%,0);
}
/* 参数 / 复刻方式卡片打开时，把上面的内容压暗一档：
   卡片底色和面板里的其它卡片同色，压暗后就不会糊成一片 */
.ugc-video-body:not(.image-tool-body) .ugc-left-scroll:has(.ugc-params-pop:not([hidden])) > .ugc-form-section:not(:has(.ugc-prompt-bar)),
.ugc-video-body:not(.image-tool-body) .ugc-left-scroll:has(.ugc-clone-pop:not([hidden])) > .ugc-form-section:not(:has(.ugc-prompt-bar)){
  opacity:.45;
  transition:opacity .18s ease;
}
/* 卡片本身再提一档描边与投影，浮起来更明确 */
.ugc-prompt-bar .ugc-params-pop{
  border-color:rgba(255,255,255,.18);
  box-shadow:0 22px 52px rgba(0,0,0,.55);
}

/* 画布创作按钮：工具页的 .ugc-video-body .ugc-history-btn 会覆盖通用底色，
   这里用更高的优先级把品牌渐变补回来（放在文件末尾确保生效）。 */
.ugc-video-body .ugc-history-btn.ugc-history-canvas{
  border-color:transparent;
  background:linear-gradient(120deg,#ff2d68 0%,#ff4d9b 55%,#ff8ab2 100%);
  background-origin:border-box;
  color:#fff;
  font-weight:640;
  box-shadow:0 4px 14px rgba(255,45,104,.3);
  animation:ugc-history-canvas-glow 3.4s ease-in-out infinite;
}
.ugc-video-body .ugc-history-btn.ugc-history-canvas:hover{
  border-color:transparent;
  background:linear-gradient(120deg,#ff4d9b 0%,#ff8ab2 46%,#ffc1d5 100%);
  background-origin:border-box;
  box-shadow:0 6px 18px rgba(255,77,155,.45);
}
.ugc-video-body .ugc-history-btn.ugc-history-canvas.is-loading{
  animation:none;
}

/* ==========================================================================
   大屏自适应：8 个工具页共用
   背景：桌面端内容宽度固定死在 1560px，2K/4K 显示器上两侧留白过多，
   且左侧舞台与右侧参数栏都不随视口继续增长。
   处理：1600px 以下保持原布局；1601px 起把外壳放宽到 2400px，左右留白
   随视口渐增，右侧参数栏从 529px 缓慢长到 620px，把新增宽度交给左侧舞台。
   舞台内的公共案例同步放大并设上限，避免面板变宽后内容仍然很小。
   ========================================================================== */
@media (min-width:1601px){
  .ugc-main{
    max-width:2400px;
    padding-left:clamp(0px,calc((100vw - 1600px) * .08),32px);
    padding-right:clamp(0px,calc((100vw - 1600px) * .08),32px);
    box-sizing:border-box;
  }
  .ugc-workspace{
    grid-template-columns:minmax(0,1fr) clamp(529px,calc(529px + (100vw - 1600px) * .1),620px);
  }
  /* 图片复刻：从 700px 平滑长到 1200px；clone-image.css 在共享样式之后加载，
     这里用 body 作用域保证优先级。 */
  .clone-image-body .clone-case-stack{
    width:min(100%,calc(700px + (100vw - 1600px) * .7),1200px);
  }
  /* 视频复刻 / ADS / 视频编辑：从 480px 平滑长到 1100px。 */
  .ugc-case-stack{
    width:min(100%,calc(480px + (100vw - 1600px) * .9),1100px);
  }
  /* 案例指示点跟随新的案例宽度，保持在卡片左缘内侧。 */
  .ugc-case-dots{
    left:calc(7% - 28px);
  }
  /* UGC 4 条 9:16 成片：大屏上限宽，避免单条视频被拉得过高。 */
  .ugc-case-row{
    max-width:1320px;
    margin-inline:auto;
  }
}
/* 全能生图图片墙：大屏上限宽并居中；矮屏仍由 image.css 的
   760px/660px 规则接管，保证两排图片不出现上下滚动。 */
@media (min-width:1601px) and (min-height:831px){
  .image-tool-body .case-wall{
    max-width:1440px;
    margin-inline:auto;
  }
}

/* 8 个工具页的公共案例首屏骨架：先占住与最终案例一致的空间，
   避免等待脚本和媒体请求时左侧舞台出现整块空白。JS 首次渲染案例时会整体替换这些节点。 */
.case-skeleton-card{
  position:relative;
  display:block;
  width:100%;
  min-width:0;
  aspect-ratio:1 / 1;
  overflow:hidden;
  border-radius:12px;
  background-color:#24272a;
  background-image:linear-gradient(100deg,rgba(255,255,255,.045) 20%,rgba(255,255,255,.13) 42%,rgba(255,255,255,.045) 64%);
  background-size:220% 100%;
  animation:case-skeleton-shimmer 1.45s ease-in-out infinite;
}
.case-skeleton-card::after{
  content:"";
  position:absolute;
  inset:0;
  border:1px solid rgba(255,255,255,.07);
  border-radius:inherit;
  pointer-events:none;
}
.ugc-case-row > .case-skeleton-card{
  aspect-ratio:9 / 16;
  border-radius:16px;
}
.image-tool-body .image-case-grid.set-image-case-grid > .case-skeleton-card{
  border-radius:18px;
  box-shadow:0 18px 40px rgba(0,0,0,.24);
}
.image-tool-body .details-image-case-grid .details-case-row > .case-skeleton-card{
  aspect-ratio:1464 / 600;
  border-radius:14px;
  box-shadow:0 14px 32px rgba(0,0,0,.26);
}
@keyframes case-skeleton-shimmer{
  0%{background-position:200% 0}
  100%{background-position:-20% 0}
}
@media (prefers-reduced-motion:reduce){
  .case-skeleton-card{
    animation:none;
    background-image:linear-gradient(100deg,rgba(255,255,255,.055),rgba(255,255,255,.11));
  }
}
