/* AI 生图在线体验（前台 · /ai-studio）
 * 前缀 as-，只作用于本页；不依赖 Vue 页面的 scoped 样式。
 * 与站点主色一致：#1d4ed8，卡片描边 #e6edf8。 */

.as-page {
  overflow-x: hidden;
  --as-ink: #0f1e33;
  --as-mut: #6b7c93;
  --as-line: #e6edf8;
  --as-blue: #1d4ed8;
  --as-blue-d: #1a3fa8;
  background: #f6f9fe;
}

/* ---------------- 顶部 ---------------- */
.as-hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 140% at 12% 0%, #16305c 0%, #0b1a33 55%, #081326 100%);
  /* 站点 header 是 fixed 的（73px），深色背景要延伸到它后面，内容再让开 */
  padding: 128px 0 62px;
}
.as-hero__glow {
  position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(60px); opacity: .55;
}
.as-hero__glow--a {
  width: 420px; height: 420px; left: -60px; top: -180px;
  background: radial-gradient(circle, rgba(59, 130, 246, .55), transparent 70%);
}
.as-hero__glow--b {
  width: 360px; height: 360px; right: -40px; bottom: -200px;
  background: radial-gradient(circle, rgba(34, 211, 238, .32), transparent 70%);
}
.as-hero__in { position: relative; z-index: 1; }
.as-hero__copy { max-width: 680px; }

.as-tag {
  display: inline-block; margin-bottom: 16px; padding: 5px 12px;
  font-size: 12.5px; letter-spacing: .02em; color: #9fc4ff;
  background: rgba(59, 130, 246, .14);
  border: 1px solid rgba(96, 165, 250, .32); border-radius: 999px;
}
.as-hero h1 {
  margin: 0 0 14px; font-size: 40px; line-height: 1.24;
  font-weight: 700; color: #fff; letter-spacing: -.01em;
}
.as-grad {
  background: linear-gradient(96deg, #60a5fa, #22d3ee 55%, #a5b4fc);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.as-hero p {
  margin: 0; font-size: 15.5px; line-height: 1.8; color: rgba(226, 236, 250, .82);
}
.as-hero__facts { display: flex; gap: 42px; margin-top: 30px; }
.as-hero__facts b {
  display: block; font-size: 26px; font-weight: 700; color: #fff; line-height: 1.2;
}
.as-hero__facts b em {
  font-style: normal; font-size: 13px; font-weight: 500;
  color: rgba(203, 222, 248, .72); margin-left: 3px;
}
.as-hero__facts span { font-size: 12.5px; color: rgba(203, 222, 248, .62); }

/* ---------------- 主体 ---------------- */
.as-body { padding: 0 0 64px; margin-top: -28px; position: relative; z-index: 2; }

.as-grid {
  display: grid; grid-template-columns: 404px minmax(0, 1fr);
  gap: 18px; align-items: start;
}

.as-panel {
  min-width: 0;
  background: #fff; border: 1px solid var(--as-line); border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 30, 51, .06), 0 1px 2px rgba(15, 30, 51, .04);
  padding: 20px;
}

.as-lab {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 8px; font-size: 13px; font-weight: 600; color: #33455e;
}
.as-lab em { font-style: normal; font-size: 12px; font-weight: 400; color: #9aa8bd; }
.as-lab--mt { margin-top: 18px; }

.as-ta {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 112px;
  padding: 12px 13px; border: 1px solid #dde6f4; border-radius: 11px;
  background: #fbfdff; color: var(--as-ink);
  font: inherit; font-size: 14px; line-height: 1.7;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.as-ta::placeholder { color: #a6b3c6; }
.as-ta:focus {
  outline: none; background: #fff; border-color: #93b4f5;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .11);
}

.as-tpls { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.as-tpl {
  max-width: 100%; padding: 5px 11px; border-radius: 999px;
  border: 1px solid #e2eaf8; background: #f6faff; color: #536887;
  font-size: 12px; line-height: 1.5; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: all .14s ease;
}
.as-tpl:hover { border-color: #b9d0f7; background: #edf4ff; color: var(--as-blue); }

.as-sizes { display: flex; gap: 8px; }
.as-sizes button {
  flex: 1 1 0; padding: 9px 6px; border-radius: 10px;
  border: 1px solid #dde6f4; background: #fff; color: #5b6b80;
  font: inherit; font-size: 12.5px; cursor: pointer;
  transition: all .14s ease;
}
.as-sizes button:hover { border-color: #b9d0f7; color: var(--as-blue); }
.as-sizes button.on {
  border-color: #9bb8f2; background: #eef4ff; color: var(--as-blue);
  font-weight: 600; box-shadow: inset 0 0 0 1px rgba(29, 78, 216, .08);
}

.as-cap { display: flex; gap: 9px; align-items: stretch; }
.as-cap__in {
  flex: 1 1 auto; min-width: 0; padding: 9px 12px; border-radius: 10px;
  border: 1px solid #dde6f4; background: #fbfdff;
  font: inherit; font-size: 15px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--as-ink);
}
.as-cap__in:focus {
  outline: none; background: #fff; border-color: #93b4f5;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .11);
}
.as-cap__img {
  flex: none; padding: 0; width: 132px; height: 48px; overflow: hidden;
  border: 1px solid #dde6f4; border-radius: 10px; background: #f2f6fd;
  cursor: pointer; line-height: 0;
}
.as-cap__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.as-cap__img img:not([src]) { visibility: hidden; }
.as-cap__img:hover { border-color: #93b4f5; }

.as-go {
  width: 100%; margin-top: 18px; padding: 13px 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 11px; cursor: pointer;
  background: linear-gradient(96deg, #2563eb, #1d4ed8 60%, #1e40af);
  color: #fff; font: inherit; font-size: 14.5px; font-weight: 600;
  box-shadow: 0 8px 20px rgba(29, 78, 216, .22);
  transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease;
}
.as-go:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(29, 78, 216, .28); }
.as-go:active { transform: translateY(0); }
.as-go[disabled] { cursor: not-allowed; opacity: .72; transform: none; box-shadow: none; }
.as-go__spin {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: asSpin .8s linear infinite;
}
@keyframes asSpin { to { transform: rotate(360deg); } }

.as-usage { margin-top: 11px; font-size: 12.5px; color: #7b8aa0; text-align: center; }
.as-usage b { color: #33455e; font-weight: 600; }

.as-err {
  margin-top: 11px; padding: 9px 12px; border-radius: 9px;
  font-size: 12.5px; line-height: 1.65;
  background: #fff5f5; border: 1px solid #f8d3d3; color: #a8322f;
}
.as-err[hidden] { display: none; }

/* 未开放时把可操作区域压暗，明确「现在点不了」 */
.as-page.is-locked .as-ta,
.as-page.is-locked .as-tpls,
.as-page.is-locked .as-sizes,
.as-page.is-locked .as-cap { opacity: .5; }

/* ---------------- 结果 ---------------- */
.as-out { padding: 20px 20px 22px; }
.as-out__hd {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid #eff3fa;
}
.as-out__hd b { font-size: 13.5px; color: #33455e; }
.as-out__hd span { font-size: 12px; color: #9aa8bd; }

.as-out__body { min-height: 424px; display: flex; flex-direction: column; }

.as-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 9px; padding: 60px 20px;
  color: #93a3b8; text-align: center;
  border: 1px dashed #e2eaf8; border-radius: 13px; background: #fbfdff;
}
.as-empty b { font-size: 14px; color: #5b6b80; font-weight: 600; }
.as-empty span { font-size: 12.5px; line-height: 1.7; max-width: 300px; }

.as-loading {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px; padding: 60px 20px; text-align: center;
}
.as-loading__ring {
  width: 46px; height: 46px; border-radius: 50%;
  border: 3px solid #e6eefc; border-top-color: var(--as-blue);
  animation: asSpin 1s linear infinite;
}
.as-loading b { font-size: 14px; color: #33455e; font-weight: 600; }
.as-loading span { font-size: 12.5px; color: #8fa0b6; }

.as-shot { position: relative; border-radius: 13px; overflow: hidden; background: #f2f6fd; }
.as-shot img {
  display: block; width: 100%; height: auto; max-height: 560px;
  object-fit: contain; background: #f7faff;
}
.as-wm {
  position: absolute; right: 12px; bottom: 10px;
  padding: 4px 9px; border-radius: 6px;
  font-size: 11px; letter-spacing: .04em; color: rgba(255, 255, 255, .9);
  background: rgba(11, 26, 51, .42); backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, .18);
  pointer-events: none; user-select: none;
}

.as-acts { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.as-acts a, .as-acts button {
  padding: 9px 15px; border-radius: 9px; font: inherit; font-size: 13px;
  border: 1px solid #dde6f4; background: #fff; color: #47597a;
  cursor: pointer; text-decoration: none; transition: all .14s ease;
}
.as-acts a:hover, .as-acts button:hover {
  border-color: #9bb8f2; color: var(--as-blue); background: #f7faff;
}

/* ---------------- 规则与 CTA ---------------- */
.as-rules {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px; margin-top: 20px;
}
.as-rule {
  padding: 15px 16px; border-radius: 13px;
  background: #fff; border: 1px solid var(--as-line);
}
.as-rule b { display: block; margin-bottom: 6px; font-size: 13px; color: #33455e; }
.as-rule span { font-size: 12.5px; line-height: 1.72; color: #7b8aa0; }

.as-cta {
  margin-top: 18px; padding: 22px 24px; border-radius: 15px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(100deg, #101f3a, #16305c);
  border: 1px solid rgba(96, 165, 250, .18);
}
.as-cta b { display: block; margin-bottom: 6px; font-size: 15px; color: #fff; }
.as-cta span { font-size: 13px; line-height: 1.7; color: rgba(203, 222, 248, .74); }
.as-cta__btn {
  margin-left: auto; flex: none; padding: 11px 20px; border-radius: 10px;
  background: #fff; color: #16305c; font-size: 13.5px; font-weight: 600;
  text-decoration: none; transition: transform .14s ease, box-shadow .14s ease;
}
.as-cta__btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, .22); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .as-grid { grid-template-columns: minmax(0, 1fr); }
  .as-out__body { min-height: 320px; }
  .as-rules { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .as-hero { padding: 92px 0 46px; }
  .as-hero h1 { font-size: 27px; }
  .as-hero p { font-size: 14px; }
  .as-hero__facts { gap: 24px; margin-top: 22px; }
  .as-hero__facts b { font-size: 21px; }
  .as-body { margin-top: -18px; padding-bottom: 44px; }
  .as-panel { padding: 16px; border-radius: 14px; }
  .as-sizes { flex-wrap: wrap; }
  .as-sizes button { flex: 1 1 30%; }
  .as-cap__img { width: 116px; height: 44px; }
  .as-cta { padding: 18px; }
  .as-cta__btn { margin-left: 0; width: 100%; text-align: center; }
}
