:root {
  --bg: #0c1015;
  --surface: #141b23;
  --surface-2: #19222d;
  --border: #253140;
  --text: #f0f4f8;
  --muted: #8b9bb0;
  --accent: #b5ee3b;
  --accent-ink: #0a1f0f;
  --danger: #ff7b7b;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* Minimal Top Nav */
.nav {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(12, 16, 21, 0.85);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-size: 16px; font-weight: 700; letter-spacing: -0.2px;
}
.brand-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(181, 238, 59, 0.55);
}
.gpu-badge {
  font-size: 12px; color: var(--muted);
  padding: 4px 10px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--border);
}

/* Main Centered Container */
.page {
  max-width: 1120px; margin: 0 auto; padding: 52px 24px 96px;
}

/* Section 1: Hero Upload */
.hero { text-align: center; }
.hero h1 {
  margin: 0 0 12px; font-size: clamp(26px, 4vw, 38px);
  font-weight: 800; letter-spacing: -0.6px; line-height: 1.18;
}
.subtitle {
  margin: 0 auto 30px; max-width: 640px;
  font-size: 15.5px; color: var(--muted);
}
.subtitle strong { color: var(--text); font-weight: 600; }

.upload-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  max-width: 680px;
  margin: 0 auto;
}

.dropzone {
  border: 1.5px dashed #33455a;
  border-radius: 14px;
  padding: 52px 24px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.015);
  transition: border-color .16s ease, background .16s ease;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: rgba(181, 238, 59, 0.045);
}
.drop-icon {
  width: 54px; height: 54px; margin: 0 auto 14px;
  border-radius: 14px; display: grid; place-items: center;
  background: rgba(181, 238, 59, 0.12); color: var(--accent);
}
.drop-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.drop-hint { font-size: 13px; color: var(--muted); }

/* Busy State */
.busy-box { padding: 24px 14px 20px; text-align: left; }
.busy-steps {
  display: flex; align-items: center; gap: 8px; margin-bottom: 18px; flex-wrap: wrap;
}
.bstep {
  font-size: 12px; font-weight: 600; color: var(--muted);
  padding: 4px 10px; border-radius: 99px;
  background: #0d131a; border: 1px solid var(--border);
  transition: all .2s ease;
}
.bstep.active {
  color: var(--accent); border-color: rgba(181, 238, 59, 0.55);
  background: rgba(181, 238, 59, 0.1);
}
.bstep.done {
  color: #7ee2b8; border-color: rgba(126, 226, 184, 0.35);
  background: rgba(126, 226, 184, 0.08);
}
.busy-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin-bottom: 10px;
}
.busy-name {
  font-size: 15px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.busy-pct { font-size: 14.5px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.progress-track {
  height: 10px; border-radius: 99px; background: #0d131a; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #98dc24, var(--accent), #d6ff75, var(--accent));
  background-size: 200% 100%;
  border-radius: 99px;
  transition: width .35s ease;
}
.progress-fill.active {
  animation: barFlow 1.8s linear infinite;
}
@keyframes barFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.busy-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 13px;
}
.busy-status { display: flex; align-items: center; gap: 9px; min-width: 0; }
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(181, 238, 59, 0.75);
  animation: pulseDot 1.2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.78); }
}
.busy-msg { font-size: 13px; color: var(--muted); }
.busy-timer {
  font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; flex-shrink: 0;
  padding: 2px 8px; border-radius: 99px; background: #0d131a; border: 1px solid var(--border);
}

/* Done State */
.done-box { padding: 22px 12px 14px; text-align: center; }
.done-badge {
  display: inline-block; padding: 4px 12px; border-radius: 99px;
  background: rgba(181, 238, 59, 0.14); color: var(--accent);
  font-size: 13px; font-weight: 600; margin-bottom: 10px;
}
.done-summary { font-size: 15px; color: var(--text); margin-bottom: 20px; }
.done-actions {
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
}
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 11px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 14.5px; font-weight: 700; text-decoration: none;
  transition: transform .14s ease, filter .14s ease;
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 16px; border-radius: 11px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: border-color .14s ease, background .14s ease;
}
.btn-secondary:hover { border-color: #415973; background: #202c3a; }
.done-link-note {
  margin-top: 10px; font-size: 12px; color: var(--muted);
}

.result-gallery {
  margin-top: 22px; display: flex; flex-direction: column; gap: 14px; text-align: left;
}
.result-sheet-card {
  background: #0d131a; border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.result-sheet-head {
  padding: 8px 12px; display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; color: var(--muted); border-bottom: 1px solid rgba(255,255,255,0.05);
}
.result-sheet-head strong { color: var(--text); font-weight: 600; }
.result-sheet-card img { width: 100%; height: auto; display: block; cursor: zoom-in; }

.feedback-bar {
  margin-top: 18px; padding: 12px 14px; border-radius: 11px;
  background: #0d131a; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.feedback-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.fb-btn {
  padding: 5px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 600;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  cursor: pointer; transition: border-color .14s ease, color .14s ease;
}
.fb-btn:hover { border-color: var(--accent); color: var(--accent); }

.btn-link {
  color: var(--muted); font-size: 13.5px; text-decoration: none;
  border-bottom: 1px solid rgba(139, 155, 176, 0.35); padding-bottom: 1px;
  transition: color .14s ease, border-color .14s ease;
}
.btn-link:hover { color: var(--text); border-color: var(--text); }

.done-preview-wrap {
  margin-top: 22px;
  border-radius: 12px; border: 1px solid var(--border);
  position: relative; cursor: zoom-in; background: #0a0e13; overflow: hidden;
}
.done-preview-wrap img { width: 100%; height: auto; display: block; }
.done-preview-wrap::after {
  content: "Click for full resolution";
  position: absolute; bottom: 10px; right: 12px;
  padding: 4px 10px; border-radius: 99px; font-size: 12px;
  background: rgba(12, 16, 21, 0.85); color: var(--text); border: 1px solid var(--border);
}

.btn-reset {
  margin-top: 18px; background: none; border: none; color: var(--muted);
  font-size: 13px; cursor: pointer; padding: 6px 10px;
}
.btn-reset:hover { color: var(--text); }

/* Error State */
.error-box { padding: 24px 12px; text-align: center; }
.error-title { color: var(--danger); font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.error-msg { color: var(--muted); font-size: 13.5px; }

/* Section 2: Demo Showcase */
.demo-section {
  margin-top: 68px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.demo-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.demo-head h2 { margin: 0 0 6px; font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.demo-sub { margin: 0; font-size: 14px; color: var(--muted); }

.demo-stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.demo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color .15s ease;
}
.demo-card:hover { border-color: #3d5168; }
.demo-card-top {
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.demo-card-title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.demo-pill {
  font-size: 11px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase;
  padding: 2px 9px; border-radius: 99px;
  background: rgba(181, 238, 59, 0.14); color: var(--accent);
}
.demo-pill.serve { background: rgba(78, 168, 255, 0.16); color: #86c7ff; }
.demo-card-meta { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 14px; }
.demo-img-wrap { position: relative; cursor: zoom-in; background: #0a0e13; }
.demo-img-wrap img {
  width: 100%; display: block; height: auto;
}
.zoom-hint {
  position: absolute; bottom: 12px; right: 12px;
  padding: 4px 10px; border-radius: 99px; font-size: 12px;
  background: rgba(12, 16, 21, 0.84); color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  opacity: 0.85; pointer-events: none;
}

.skeleton {
  aspect-ratio: 16 / 9.5; border-radius: 16px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; padding: 18px;
}
.lightbox-bg { position: absolute; inset: 0; background: rgba(5, 8, 12, 0.9); backdrop-filter: blur(6px); }
.lightbox-card {
  position: relative; z-index: 1; margin: 0;
  max-width: min(1480px, 96vw); max-height: 94vh;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px; display: flex; flex-direction: column; overflow: auto;
}
.lightbox-card img { width: 100%; height: auto; border-radius: 8px; display: block; }
.lightbox-card figcaption {
  margin-top: 10px; font-size: 13px; color: var(--muted); text-align: center;
}
.lightbox-close {
  position: absolute; top: 18px; right: 18px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(12, 16, 21, 0.85);
  color: var(--text); font-size: 14px; cursor: pointer;
}
.lightbox-close:hover { border-color: var(--accent); color: var(--accent); }

/* Minimal Footer */
.footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.footer-sep { opacity: 0.45; }
.footer a { color: var(--muted); text-decoration: none; border-bottom: 1px solid rgba(139, 155, 176, 0.3); }
.footer a:hover { color: var(--text); border-color: var(--text); }

/* Compact FAQ & Guide Page */
.brand-link { color: var(--text); text-decoration: none; }
.faq-section {
  margin-top: 56px; padding-top: 36px; border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.faq-section h2 { margin: 0 0 16px; font-size: 19px; font-weight: 700; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 13px 16px;
}
.faq-item summary {
  cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text); list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
.faq-item summary::after { content: "+"; color: var(--muted); font-size: 16px; font-weight: 400; }
.faq-item[open] summary::after { content: "−"; color: var(--accent); }
.faq-item p { margin: 10px 0 2px; font-size: 13.5px; color: var(--muted); line-height: 1.6; }

.guide-page { max-width: 780px; }
.guide-article h1 { margin: 0 0 14px; font-size: clamp(24px, 4vw, 34px); line-height: 1.2; }
.guide-article h2 { margin: 32px 0 10px; font-size: 19px; color: var(--text); }
.guide-article p, .guide-article li { font-size: 15px; color: var(--muted); line-height: 1.7; }
.guide-article strong { color: var(--text); }
.guide-article ul { padding-left: 20px; }
.guide-article li { margin-bottom: 8px; }
.guide-lead { font-size: 16px !important; }
.guide-cta { margin-top: 32px; }
