/* ============================================================
   PromptHorizon 官网演示动画 — ph-demo.css
   v2:宿主样式(演示窗口内嵌真实插件 iframe,动画细节在 iframe 内)
   ============================================================ */

/* ---------- 站点集成:替换 hero 右列(原 aside.mentor-card) ---------- */
.hero-content {
  grid-template-columns: minmax(0, 1fr) clamp(380px, 48vw, 720px) !important;
}

/* 左侧文案垂直居中,确保首屏完整可见(原站为底对齐,大窗口下会被压到折叠线以下) */
@media (min-width: 821px) {
  .copy-block { align-self: center; }
}

/* "开始体验"按钮改用插件"立即生成"同款配色(浅蓝→薰衣草渐变 + 深色文字) */
.primary-cta {
  background: linear-gradient(100deg, #e9efff, #9fb7e9 55%, #8d83d3) !important;
  color: #080b12 !important;
  box-shadow: 0 14px 40px rgba(90, 120, 220, .28) !important;
}

.primary-cta:hover {
  background: linear-gradient(100deg, #f3f6ff, #aac0ed 55%, #9890dc) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 18px 46px rgba(90, 120, 220, .4) !important;
}

.ph-demo-shell {
  grid-area: card;
  align-self: center;
  justify-self: end;
  position: relative;
  width: 100%;
  max-width: 720px;
  transform: translateY(-16px);
}

@media (max-width: 820px) {
  .hero-content {
    grid-template-columns: 1fr !important;
    grid-template-areas: "card" "copy" !important;
    gap: 18px !important;
  }
  .ph-demo-shell {
    justify-self: center;
    transform: none;
    max-width: 560px;
  }
}

@media (max-width: 430px) {
  .ph-demo-shell { max-width: calc(100% - 20px); }
}

/* ---------- 演示窗口 ---------- */
.ph-demo {
  position: relative;
  width: 100%;
  aspect-ratio: 420 / 460;
  max-height: calc(100svh - 280px); /* 确保窗口完整落在首屏内 */
  border-radius: 28px;
  overflow: hidden;
  background: #070a12;
  box-shadow: 0 32px 90px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .75);
  contain: layout paint style;
  user-select: none;
}

.ph-demo-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 28px;
  background: #070a12;
}

/* ============================================================
   v3:首屏以下区块补充(showcase 真实图 / 下载安装 / FAQ)
   ============================================================ */

/* ---------- 体验区:解析面板参考图(铺满整个面板,标签浮在左下角) ---------- */
.demo-sphere.ph-real {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: none;
  box-shadow: none;
  background: #0a1022;
  overflow: hidden;
  animation: none;
}
.demo-sphere.ph-real img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.demo-reference .ph-tag {
  position: absolute;
  left: 14px;
  bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(5, 8, 21, .55);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #cfe0ff;
  font: 10px monospace;
  letter-spacing: .12em;
  backdrop-filter: blur(6px);
}

/* ---------- 体验区:中英双语提示词 ---------- */
.demo-prompt p.ph-en {
  margin: 12px 0 0;
  font-family: "DM Mono", "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.85;
  color: rgba(255, 255, 255, .52);
}

/* ---------- 作品展示:真实效果图 ---------- */
.showcase-card .art.ph-filled { background: #0a1022; }

.ph-compare {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px;
}
.ph-shot {
  margin: 0;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.ph-shot img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .42);
  display: block;
  background: #0a1022;
}
.ph-shot figcaption {
  font-size: 10px;
  letter-spacing: .08em;
  color: #8fa2c9;
}
.ph-arrow {
  flex: 0 0 auto;
  color: var(--accent, #75a7ff);
  font-size: 20px;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(117, 167, 255, .5);
}

/* 多图参考:四张参考图协同 */
.ph-refs {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-content: center;
  padding: 18px;
}
.ph-ref { margin: 0; }
.ph-ref .ph-shot img { aspect-ratio: 1 / 1.25; }

/* ---------- 下载与安装 ---------- */
.ph-grid {
  display: grid;
  grid-template-columns: minmax(0, 420px) 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: stretch;
}
.ph-card {
  border: 1px solid var(--line, #ffffff1a);
  background: #080d1d;
  border-radius: 18px;
  padding: 30px 32px;
}
.ph-dl-card .ph-ver {
  display: inline-block;
  color: var(--accent, #75a7ff);
  border: 1px solid rgba(117, 167, 255, .35);
  border-radius: 999px;
  padding: 5px 14px;
  font: 11px monospace;
  letter-spacing: .06em;
  margin-bottom: 16px;
}
.ph-dl-card h3 { margin: 0 0 18px; font-size: 20px; }
.ph-dl-card ul {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.ph-dl-card li {
  color: #b9c6e4;
  font-size: 13.5px;
  padding-left: 22px;
  position: relative;
}
.ph-dl-card li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent, #75a7ff);
  font-weight: 700;
}
.ph-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.ph-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: .02em;
  text-decoration: none;
  transition: transform .22s, box-shadow .22s, background .22s;
}
.ph-btn-primary {
  background: linear-gradient(100deg, #e9efff, #9fb7e9 55%, #8d83d3);
  color: #080b12;
  box-shadow: 0 12px 34px rgba(90, 120, 220, .28);
}
.ph-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(90, 120, 220, .42);
}
.ph-btn-ghost {
  border: 1px solid rgba(255, 255, 255, .22);
  color: #dfe8ff;
  background: rgba(255, 255, 255, .03);
}
.ph-btn-ghost:hover {
  border-color: rgba(117, 167, 255, .55);
  color: #fff;
  transform: translateY(-2px);
}
.ph-note { margin: 18px 0 0; color: #77839f; font-size: 12px; line-height: 1.7; }

.ph-steps-title {
  color: var(--accent, #75a7ff);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .2em;
  margin-bottom: 20px;
}
.ph-steps ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ph-step;
  display: grid;
  gap: 16px;
}
.ph-steps li {
  counter-increment: ph-step;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: start;
}
.ph-steps li:before {
  content: counter(ph-step);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 13px monospace;
  color: #75a7ff;
  border: 1px solid rgba(117, 167, 255, .4);
  background: rgba(117, 167, 255, .08);
  box-shadow: 0 0 18px rgba(117, 167, 255, .15);
}
.ph-steps b { font-size: 15px; color: #eef3ff; display: block; margin: 4px 0 5px; }
.ph-steps p { grid-column: 2; margin: 0; color: #8fa2c9; font-size: 13px; line-height: 1.75; }

/* ---------- 常见问题 ---------- */
.ph-faq-list {
  display: grid;
  gap: 12px;
  max-width: 820px;
}
.ph-faq-item {
  border: 1px solid var(--line, #ffffff1a);
  background: #080d1d;
  border-radius: 14px;
  overflow: hidden;
}
.ph-faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 19px 26px;
  font-size: 15px;
  font-weight: 600;
  color: #eef3ff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
}
.ph-faq-item summary::-webkit-details-marker { display: none; }
.ph-faq-item summary:after {
  content: "+";
  flex: 0 0 auto;
  color: var(--accent, #75a7ff);
  font: 700 18px monospace;
  transition: transform .25s;
}
.ph-faq-item[open] summary:after { transform: rotate(45deg); }
.ph-faq-item p {
  margin: 0;
  padding: 0 26px 20px;
  color: #9db0d4;
  font-size: 13.5px;
  line-height: 1.85;
}

/* 响应式 */
@media (max-width: 900px) {
  .ph-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .ph-card { padding: 22px 18px; }
  .ph-compare { gap: 8px; padding: 12px; }
  .ph-arrow { font-size: 14px; }
  .ph-refs { gap: 8px; padding: 12px; }
}
