/* 万物转3D · 设计系统
   原则：单一强调色（琥珀）、大量留白、克制的层级、无装饰性噪音 */
:root {
  --bg: #0a0e1a; --panel: #101627; --panel2: #1a2136;
  --line: #232c44; --text: #e8eaf0; --muted: #8b93a7; --faint: #5a6178;
  --accent: #f0a63c; --ok: #3ecf8e; --err: #f87171;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.7 "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}

/* ---- 头部 ---- */
header {
  display: flex; align-items: center; padding: 20px 32px;
}
.brand { font-size: 17px; font-weight: 600; color: #fff; letter-spacing: 2px; }
.badge {
  margin-left: auto; font-size: 12px; color: #fde68a;
  border: 1px solid #6b5410; padding: 2px 12px; border-radius: 999px;
}

/* ---- Hero：克制、大字、留白 ---- */
.hero { text-align: center; padding: 64px 20px 40px; }
.hero h1 {
  margin: 0; font-size: 46px; line-height: 1.3; color: #fff;
  font-weight: 600; letter-spacing: 1px;
}
.hero-sub { color: var(--muted); font-size: 15px; margin: 18px 0 0; letter-spacing: .5px; }
@media (max-width: 700px) { .hero { padding: 44px 20px 24px; } .hero h1 { font-size: 30px; } }

/* ---- 主工具区 ---- */
main {
  display: grid; grid-template-columns: 380px 1fr; gap: 22px;
  padding: 10px 32px 30px; max-width: 1240px; margin: 0 auto; width: 100%;
}
@media (max-width: 900px) { main { grid-template-columns: 1fr; padding: 0 20px 24px; } .viewer-wrap { min-height: 52vh; } }

.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 16px;
  align-self: start;
}
.tabs { display: flex; gap: 6px; background: var(--panel2); border-radius: 10px; padding: 4px; }
.tab {
  flex: 1; padding: 9px; border: none; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer; font-size: 14px;
}
.tab.active { background: #2a3452; color: #fff; }

.drop {
  border: 1px dashed #333e5e; border-radius: 12px; padding: 36px 16px;
  text-align: center; color: var(--text); cursor: pointer; transition: border-color .2s;
}
.drop:hover, .drop.drag { border-color: var(--accent); }
.drop-icon { font-size: 22px; color: var(--faint); margin-bottom: 6px; }
.hint { color: var(--faint); font-size: 12px; margin-top: 4px; }
#img-preview-wrap { text-align: center; }
#img-preview { max-width: 100%; max-height: 220px; border-radius: 10px; border: 1px solid var(--line); }

textarea {
  width: 100%; background: var(--panel2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  resize: vertical; font: inherit;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 14px; cursor: pointer; font-size: 13px;
}
.chip:hover { color: var(--text); border-color: #3a4667; }

.options { display: flex; gap: 18px; font-size: 14px; color: var(--muted); }
.opt select {
  margin-left: 6px; background: var(--panel2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px;
}
.opt input { accent-color: var(--accent); }

.cta {
  width: 100%; padding: 14px; font-size: 15px; font-weight: 600; color: #14100a;
  background: var(--accent); border: none; border-radius: 10px; cursor: pointer;
  letter-spacing: 1px;
}
.cta:disabled { opacity: .45; cursor: not-allowed; }
.cta:hover { filter: brightness(1.06); }
.pay-hint { text-align: center; color: var(--faint); font-size: 12px; margin-top: -6px; }
.ghost {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 10px; padding: 10px 18px; cursor: pointer;
}
.ghost:hover { color: var(--text); }
.ghost.small { padding: 4px 14px; margin-top: 10px; font-size: 13px; }

/* 进度指示（支付·排队·生成中·完成）*/
.steps { border-top: 1px solid var(--line); padding-top: 14px; }
.step-row { display: flex; align-items: center; gap: 10px; justify-content: center; }
.step { color: var(--faint); font-size: 13px; letter-spacing: 1px; }
.step.active { color: var(--accent); font-weight: 600; }
.step.ok { color: var(--ok); }
.step.fail { color: var(--err); }
.arrow { color: #2c3550; }
.step-note { margin-top: 6px; font-size: 13px; color: var(--muted); text-align: center; min-height: 20px; }
.step-note.err { color: var(--err); }

.history { border-top: 1px solid var(--line); padding-top: 14px; font-size: 13px; }
.history-title { color: var(--faint); margin-bottom: 8px; letter-spacing: 1px; }
#history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
#history-list li {
  display: flex; justify-content: space-between; gap: 8px; cursor: pointer;
  background: var(--panel2); border-radius: 8px; padding: 7px 12px;
}
#history-list li:hover { outline: 1px solid var(--line); }
.st-done { color: var(--ok); }
.st-running, .st-queued { color: var(--accent); }
.st-failed { color: var(--err); }

/* ---- 3D 查看器 ---- */
.viewer-wrap {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; min-height: 480px;
}
#viewer { position: absolute; inset: 0; }
.viewer-tip { position: absolute; left: 14px; bottom: 12px; color: var(--faint); font-size: 12px; pointer-events: none; }
.viewer-brand {
  position: absolute; right: 14px; top: 12px; color: var(--muted); font-size: 12px;
  background: rgba(10, 14, 26, .55); padding: 4px 12px; border-radius: 999px; pointer-events: none;
}
#download-bar {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 16px;
  display: flex; gap: 10px; align-items: center;
  background: rgba(16, 22, 39, .95); border: 1px solid var(--line);
  padding: 10px 14px; border-radius: 12px;
}
.btn-dl {
  background: var(--ok); color: #06281a; font-weight: 600; text-decoration: none;
  padding: 9px 20px; border-radius: 9px; font-size: 14px;
}

/* ---- 信任行：一行灰字，点分隔 ---- */
.trust {
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
  padding: 6px 20px 44px; color: var(--faint); font-size: 13px; letter-spacing: .5px;
}
.trust i { width: 3px; height: 3px; border-radius: 50%; background: #2c3550; }

/* ---- 精品展示 ---- */
.showcase { max-width: 1200px; margin: 0 auto; padding: 8px 32px 30px; width: 100%; }
.showcase-head { text-align: center; margin-bottom: 24px; }
.showcase-head h2 { margin: 0 0 6px; font-size: 24px; color: #fff; font-weight: 600; letter-spacing: 2px; }
.showcase-head p { margin: 0; color: var(--faint); font-size: 13px; letter-spacing: .5px; }
.showcase-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .showcase-grid { grid-template-columns: 1fr; } }
.sc-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s ease, border-color .25s ease;
}
.sc-card:hover { transform: translateY(-3px); border-color: #33405f; }
.sc-canvas-wrap {
  position: relative; height: 280px; cursor: grab;
  background: radial-gradient(ellipse at 50% 130%, #1a2440 0%, #0a0e1a 75%);
}
.sc-canvas-wrap:active { cursor: grabbing; }
.sc-canvas-wrap canvas { display: block; }
.sc-loading {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: var(--faint); font-size: 12px;
}
.sc-meta { display: flex; justify-content: space-between; align-items: baseline; padding: 13px 16px 4px; }
.sc-meta b { color: #fff; font-size: 15px; font-weight: 600; }
.sc-meta span { color: var(--faint); font-size: 12px; }
.sc-btn {
  margin: 6px 16px 15px; align-self: flex-start;
  background: transparent; border: 1px solid var(--line); color: var(--accent);
  border-radius: 8px; padding: 6px 15px; font-size: 12px; cursor: pointer;
}
.sc-btn:hover { border-color: var(--accent); }

/* ---- FAQ ---- */
.faq { max-width: 760px; margin: 0 auto; padding: 26px 32px 40px; width: 100%; }
.faq h2 {
  text-align: center; font-size: 24px; color: #fff; margin: 0 0 22px;
  font-weight: 600; letter-spacing: 2px;
}
.faq details {
  border-bottom: 1px solid var(--line); padding: 0 4px;
}
.faq summary {
  cursor: pointer; color: var(--text); font-size: 15px; padding: 17px 0;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-size: 17px; }
.faq details[open] summary::after { content: "−"; }
.faq .faq-a { color: var(--muted); font-size: 14px; line-height: 1.9; padding: 0 0 18px; }

/* ---- 支付弹窗 ---- */
.modal {
  position: fixed; inset: 0; background: rgba(4, 6, 12, .72);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal-card {
  width: 340px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 26px; text-align: center;
  display: flex; flex-direction: column; gap: 12px;
}
.modal-card h3 { margin: 0; font-size: 17px; color: #fff; }
.pay-desc { color: var(--muted); font-size: 14px; }
.tag { margin-left: 6px; border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; font-size: 12px; }
.pay-amount { font-size: 34px; font-weight: 700; color: var(--accent); }
.pay-qr { color: var(--muted); font-size: 13px; border: 1px dashed var(--line); border-radius: 10px; padding: 18px; }
.pay-note { color: var(--faint); font-size: 12px; }

footer {
  padding: 18px 26px 24px; border-top: 1px solid var(--line);
  color: var(--faint); font-size: 12px; text-align: center; margin-top: 20px;
}
footer a { color: var(--muted); }
