/* ===== 首页 ===== */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(52px, 9vw, 116px) clamp(16px, 4vw, 48px) clamp(30px, 5vw, 54px);
}

.hero__eyebrow {
  margin-bottom: 20px;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero__title {
  margin-bottom: 22px;
  font-family: var(--serif);
  font-size: clamp(36px, 6.2vw, 74px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.hero__title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent-strong), var(--accent) 45%, #b8834f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  max-width: 56ch;
  color: var(--text-dim);
  font-size: clamp(14.5px, 1.4vw, 16.5px);
  line-height: 1.75;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 28px;
  color: var(--text-mute);
  font-size: 12.5px;
}

.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero__meta span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

/* ===== 应用卡片 ===== */
/* 应用区不锁 1180px 居中：占满整屏宽度，卡片按当前大小尽量并排 */
.apps-section {
  max-width: none;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px) clamp(46px, 7vw, 84px);
}

/* 标题行与卡片组对齐居中（3×640 + 2×间距） */
.apps-section .section-head {
  max-width: 1972px;
  margin: 0 auto clamp(18px, 2.4vw, 30px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 24px;
  margin-bottom: clamp(18px, 2.4vw, 28px);
}

.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 500;
  letter-spacing: -0.015em;
}

.section-head p {
  color: var(--text-mute);
  font-size: 13px;
}

.apps-grid {
  display: grid;
  /* 卡片 520–640px，有多少并多少，整组始终居中 */
  grid-template-columns: repeat(auto-fit, minmax(520px, 640px));
  justify-content: center;
  gap: clamp(16px, 2.2vw, 26px);
}

@media (max-width: 780px) {
  .apps-grid {
    grid-template-columns: 1fr;
  }
}

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  transition: transform 0.26s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.26s, box-shadow 0.26s;
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: rgba(230, 185, 141, 0.4);
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.5);
}

.app-card__cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(145deg, #221d2b 0%, #14131a 55%, #1b1612 100%);
}

.app-card__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.app-card:hover .app-card__cover img {
  transform: scale(1.035);
}

.app-card__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(60% 60% at 30% 25%, rgba(230, 185, 141, 0.22), transparent 70%),
    radial-gradient(50% 50% at 78% 75%, rgba(126, 96, 210, 0.2), transparent 70%);
}

.app-card__fallback span {
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 44px);
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.45);
}

.app-card__badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(10, 10, 14, 0.62);
  backdrop-filter: blur(8px);
  font-size: 12px;
  color: var(--accent-strong);
  letter-spacing: 0.02em;
}

.app-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 22px clamp(18px, 2.2vw, 26px) clamp(20px, 2.2vw, 26px);
}

.app-card__title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 25px);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.app-card__title small {
  font-family: var(--font);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.app-card__desc {
  flex: 1;
  color: var(--text-dim);
  font-size: 13.5px;
  line-height: 1.7;
}

.app-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.app-card__cost {
  font-size: 12.5px;
  color: var(--text-mute);
}

.app-card__cost strong {
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
}

/* ===== 案例区 ===== */
.cases-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(80px, 12vh, 130px) clamp(16px, 4vw, 48px) clamp(56px, 8vw, 104px);
}

.cases-grid {
  display: grid;
  /* 卡片缩小，一行最多 5 个（容器 1180px，窗口变窄自动减列） */
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: clamp(14px, 1.9vw, 22px);
}

@media (max-width: 780px) {
  .cases-grid {
    grid-template-columns: 1fr;
  }
}

.case-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-card);
  transition: border-color 0.2s;
}

.case-card:hover {
  border-color: var(--line-strong);
}

.case-card__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  font-size: 12.5px;
  color: var(--text-mute);
}

.case-card__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.case-card__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
}

.case-card__expand {
  border: none;
  background: none;
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: 0.16s;
}

.case-card__expand:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

/* ===== 对比组件（卡片内） ===== */
.compare {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #101015;
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.compare__img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  /* 必须和全屏查看器一致：拉伸到同一个框（不用 cover），
     否则两张分辨率不同的图会按各自比例裁切，接缝处出现亚像素错位 */
  object-fit: fill;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* 裁切层：整体平移来移动分割位置，内部图片反向平移抵消位移。
   不用 clip-path（它会触发合成层重新生成栅格，拖动时画面会轻微漂移）。 */
.compare__clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transform: translate3d(-50%, 0, 0);
}

.compare__clip .compare__img {
  transform: translate3d(50%, 0, 0);
}

/* 旧结构（已不再使用），保留以防外部页面还在用 */
.compare__after {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.compare__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.compare__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.94);
  color: #17130f;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.compare__labels {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.66), transparent);
  pointer-events: none;
}

.compare__labels span {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(4px);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.86);
  letter-spacing: 0.04em;
}

.compare__zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  background: rgba(8, 8, 11, 0.55);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  transition: 0.18s;
}

.case-card:hover .compare__zoom,
.compare__zoom:focus-visible {
  opacity: 1;
}

.cases-empty {
  padding: 48px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--text-mute);
  text-align: center;
  font-size: 13.5px;
}

.cases-more {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

/* 只有一个应用时居中，避免右侧留空 */
.apps-grid--single {
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
}

/* 卡片不再显示积分，底部只留「开始使用」按钮 */
.app-card__foot {
  justify-content: flex-end;
}

/* 案例分类标签 */
.cases-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.cases-tab {
  padding: 7px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  transition: 0.16s;
}

.cases-tab:hover {
  border-color: var(--accent);
  color: var(--text);
}

.cases-tab.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 600;
}

.cases-tab__count {
  margin-left: 6px;
  color: var(--text-mute);
  font-size: 11.5px;
}


/* ===== 首页快速生成（原「AI 应用」卡片区改为直接上传生成） ===== */
.studio-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(180px, 25vh, 220px) clamp(16px, 4vw, 48px) clamp(46px, 7vw, 84px);
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(16px, 2.2vw, 26px);
  align-items: start;
}

@media (max-width: 960px) {
  .studio-layout {
    grid-template-columns: 1fr;
  }
}

/* 上传区 */
.studio-upload {
  position: relative;
  min-height: 420px;
  border: 1.5px dashed rgba(84, 13, 21, 0.45);
  border-radius: var(--radius-lg);
  background: #E0D4C6;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s ease;
  display: flex;
  flex-direction: column;
}

.studio-upload:hover,
.studio-upload.is-drag {
  border-color: #540D15;
}

.studio-dropzone-empty {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  gap: 10px;
}

.studio-dropzone-title {
  font-size: 17px;
  font-weight: 600;
  color: #540D15;
}

.studio-dropzone-hint {
  color: rgba(84, 13, 21, 0.72);
  font-size: 13px;
  line-height: 1.7;
  max-width: 40ch;
}

.studio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  align-content: start;
  flex: 1;
}

.studio-tile {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
}

.studio-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.studio-tile.is-working img {
  opacity: 0.55;
}

.studio-tile.is-done {
  border-color: var(--ok);
}

.studio-tile.is-failed {
  border-color: var(--danger);
}

.studio-tile__mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.studio-tile__badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ok);
  color: #0b0b0f;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.studio-tile__badge.is-fail {
  background: var(--danger);
  color: #fff;
}

.studio-tile__remove {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

.studio-tile__state {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 6px 5px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
  color: #f4efe9;
  font-size: 11px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spinner.spinner--manual {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--accent);
}

/* 清空按钮 + 合规提示：面板底部一行，流式布局不重叠 */
.studio-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 12px;
}

.studio-clear {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: rgba(84, 13, 21, 0.72);
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: underline;
}

.studio-clear:hover {
  color: #540D15;
}

.studio-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  color: rgba(84, 13, 21, 0.72);
  font-size: 12.5px;
}

/* 右侧控制区 */
.studio-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.studio-scenarios {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* From Uiverse.io by alexmaracinaru - https://uiverse.io/alexmaracinaru/perfect-panda-77
   MIT License, Copyright (c) alexmaracinaru (Alex Maracinaru)
   适配：作用域改为 .studio-scenario，箭头色用 currentColor；底色按需求改为象牙白，
   字体用阿里巴巴普惠体（免费商用）加粗，未安装时回退 Noto Sans SC / 系统字体 */
.studio-scenario {
  cursor: pointer;
  font-weight: 800;
  font-family: "Alibaba PuHuiTi 3", "Alibaba PuHuiTi", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  transition: all 0.2s;
  padding: 18px 20px;
  border-radius: 100px;
  background: transparent;
  border: 1px solid rgba(224, 212, 198, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  color: #E0D4C6;
  width: 100%;
}

.studio-scenario:hover {
  background: rgba(224, 212, 198, 0.14);
}

/* 点选后变象牙白（反色），一眼看出选中项 */
.studio-scenario.is-active {
  background: #E0D4C6;
  border-color: #E0D4C6;
  color: #540D15;
}

.studio-scenario.is-active:hover {
  background: #D5C6B2;
}

.studio-scenario > svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  /* 镜像成指向左边 */
  transform: scaleX(-1);
  transition: transform 0.3s ease-in-out;
}

.studio-scenario:hover > svg {
  /* 镜像坐标系里 +x 是视觉上的左边 */
  transform: scaleX(-1) translateX(5px);
}

.studio-scenario:active {
  transform: scale(0.95);
}

.studio-k__label {
  display: block;
  color: var(--text-dim);
  font-size: 12.5px;
  margin-bottom: 8px;
}

.studio-k__buttons {
  display: flex;
  gap: 8px;
}

/* K 按钮：配色与交互跟场景按钮一致（描边默认、点选变象牙白） */
.studio-k__btn {
  flex: 1;
  padding: 12px 0;
  border-radius: 100px;
  border: 1px solid rgba(224, 212, 198, 0.4);
  background: transparent;
  color: #E0D4C6;
  font-size: 14px;
  font-weight: 800;
  font-family: "Alibaba PuHuiTi 3", "Alibaba PuHuiTi", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.studio-k__btn:hover {
  background: rgba(224, 212, 198, 0.14);
}

.studio-k__btn:active {
  transform: scale(0.95);
}

.studio-k__btn.is-active {
  background: #E0D4C6;
  border-color: #E0D4C6;
  color: #540D15;
}

.studio-k__btn.is-active:hover {
  background: #D5C6B2;
}

.studio-cost {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--text-dim);
  font-size: 13.5px;
}

.studio-cost strong {
  font-size: 22px;
  color: var(--text);
  font-weight: 700;
}

.studio-cost-unit {
  color: var(--text-dim);
}

.studio-cost-detail {
  color: var(--text-mute);
  font-size: 12px;
}

.studio-balance {
  display: flex;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 13px;
}

.studio-balance strong {
  color: var(--accent-strong);
}

/* From Uiverse.io by Creatlydev - https://uiverse.io/Creatlydev/silly-cat-86
   MIT License, Copyright (c) Creatlydev (Samir Yangua Ruiz)
   适配：作用域 .studio-run，--clr 用克莱因蓝，全宽、普惠体加粗 */
.studio-run {
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border: none;
  cursor: pointer;
  background-color: #E0D4C6;
  color: #540D15;
  border-radius: 10rem;
  font-weight: 800;
  font-family: "Alibaba PuHuiTi 3", "Alibaba PuHuiTi", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  padding: 1rem 1.5rem;
  padding-left: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.3s;
  width: 100%;
  font-size: 15px;
}

.studio-run:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.studio-run__icon-wrapper {
  flex-shrink: 0;
  width: 25px;
  height: 25px;
  position: relative;
  color: #540D15;
  background-color: #E0D4C6;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.studio-run:hover {
  background-color: #D5C6B2;
  color: #540D15;
}

.studio-run:hover .studio-run__icon-wrapper {
  color: #0b0b0f;
}

.studio-run__icon-svg--copy {
  position: absolute;
  transform: translate(-150%, 150%);
}

.studio-run:hover .studio-run__icon-svg:first-child {
  transition: transform 0.3s ease-in-out;
  transform: translate(150%, -150%);
}

.studio-run:hover .studio-run__icon-svg--copy {
  transition: transform 0.3s ease-in-out 0.1s;
  transform: translate(0);
}

.studio-compliance {
  margin: 0;
  flex: 1;
  color: var(--danger);
  font-size: 11.5px;
  line-height: 1.7;
  opacity: 0.85;
  pointer-events: none;
}

/* 结果区 */
.studio-results {
  margin-top: clamp(24px, 4vw, 40px);
}

.studio-results__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 13.5px;
  margin-bottom: 14px;
}

.studio-results__actions {
  display: flex;
  gap: 10px;
}

.sjob-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.sjob {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.sjob--failed {
  border-color: var(--danger);
}

.sjob__media {
  width: 92px;
  height: 92px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-input);
}

.sjob__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sjob__fail {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--danger);
  font-size: 22px;
  font-weight: 700;
}

.sjob__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.sjob__name {
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sjob__line {
  color: var(--text-dim);
  font-size: 12px;
}

.sjob__refunded {
  color: var(--text-mute);
}

/* 账号菜单里的积分有效期 */
.account__menu-expiry {
  display: block;
  margin-top: 3px;
  color: var(--text-mute);
  font-size: 11.5px;
}






/* 案例滚动加载提示（不再有「加载更多」按钮） */
.cases-loading {
  font-size: 12.5px;
  color: rgba(255, 254, 240, 0.55);
  letter-spacing: 0.04em;
}
