:root {
  --bg: #050506;
  --card: #0d0d13;
  --card-2: #12121a;
  --border: rgba(255, 255, 255, 0.09);
  --text: #f2f2f7;
  --muted: #9b9ba7;
  --accent-1: #6366f1;
  --accent-2: #22d3ee;
  --green: #22c55e;
  --red: #ef4444;
  --radius: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  background-image:
    radial-gradient(900px 400px at 80% -10%, rgba(99, 102, 241, 0.14), transparent 60%),
    radial-gradient(700px 350px at 10% -10%, rgba(34, 211, 238, 0.08), transparent 60%);
  background-repeat: no-repeat;
}

.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }

/* ── Nav ─────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 28px;
  background: rgba(5, 5, 6, 0.75);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
}
.brand b { font-weight: 900; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.nav-links { display: flex; gap: 22px; margin-left: 8px; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

.nav-right { margin-left: auto; display: flex; gap: 10px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}
.pill.green { color: #86efac; border-color: rgba(34, 197, 94, 0.3); background: rgba(34, 197, 94, 0.08); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

/* ── Hero ────────────────────────────── */
.hero { text-align: center; padding: 72px 20px 40px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.hero-badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }

.hero h1 {
  margin: 22px 0 14px;
  font-size: clamp(38px, 6.5vw, 64px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.grad {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 640px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16.5px;
}
.hero-sub b { color: var(--text); }

/* ── Layout ──────────────────────────── */
.wrap { max-width: 860px; margin: 0 auto; padding: 24px 20px 60px; }

.card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.engine-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  margin-bottom: 20px;
}
.engine-label .ver { color: var(--muted); font-size: 12px; }
.engine-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: 0.4; } }

/* ── Dropzone ────────────────────────── */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 52px 20px;
  border: 2px dashed rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.drag {
  border-color: var(--accent-1);
  background: rgba(99, 102, 241, 0.07);
  transform: translateY(-1px);
  outline: none;
}
.dz-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  color: var(--accent-2);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.2);
  margin-bottom: 8px;
}
.dz-icon svg { width: 26px; height: 26px; }
.dz-title { font-size: 17px; font-weight: 800; }
.dz-sub { font-size: 13px; color: var(--muted); }

/* ── File info ───────────────────────── */
.file-info { margin-top: 6px; }

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 14px;
}
.file-name {
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.chip {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.c-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.c-val { font-size: 15px; font-weight: 800; }

.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }

select {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239b9ba7' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
select:focus { outline: none; border-color: var(--accent-1); }

.hint { margin-top: 9px; font-size: 12.5px; color: var(--muted); }

.warn { margin-top: 14px; font-size: 13px; color: #fbbf24; font-weight: 600; }

/* ── Buttons ─────────────────────────── */
.btn-primary {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  padding: 16px 28px;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(90deg, var(--accent-1), #8b5cf6);
  box-shadow: 0 8px 26px rgba(99, 102, 241, 0.4);
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.btn-primary svg { width: 19px; height: 19px; }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(99, 102, 241, 0.5); }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
.btn-primary.green { background: linear-gradient(90deg, #16a34a, var(--green)); box-shadow: 0 8px 26px rgba(34, 197, 94, 0.35); }
.btn-primary.green:disabled { background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.3); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.25); }
.btn-ghost:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-ghost.red { color: #fca5a5; border-color: rgba(239, 68, 68, 0.3); }
.btn-ghost.red:hover { background: rgba(239, 68, 68, 0.1); }

/* ── Processing ──────────────────────── */
.proc-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; }
.proc-pct { font-size: 34px; font-weight: 900; letter-spacing: -0.02em; }
.proc-stage { font-size: 14px; font-weight: 700; color: var(--muted); }

.track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  transition: width 0.25s ease;
}

.log {
  margin-top: 16px;
  padding: 14px;
  height: 130px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

.proc-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.proc-actions .btn-primary { flex: 1; margin-top: 0; min-width: 220px; }

.ok-msg { margin-top: 16px; font-size: 14px; font-weight: 700; color: #86efac; }

/* ── Steps ───────────────────────────── */
.steps { margin-top: 70px; }
.steps h2, .faq h2 {
  text-align: center;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 26px;
}

.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.step {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-2), var(--card));
}
.step .n {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  margin-bottom: 12px;
}
.step b { display: block; font-size: 15px; margin-bottom: 7px; }
.step p { font-size: 13px; color: var(--muted); }

/* ── FAQ ─────────────────────────────── */
.faq { margin-top: 70px; }

details {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  margin-bottom: 10px;
  overflow: hidden;
}
summary {
  padding: 17px 20px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 19px; color: var(--muted); font-weight: 400; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
.a { padding: 0 20px 18px; font-size: 13.5px; color: var(--muted); }
.a b { color: var(--text); }

/* ── Footer ──────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 34px 20px 44px;
  text-align: center;
  font-size: 13.5px;
}
.footer .muted { color: var(--muted); font-size: 12px; margin-top: 6px; }

/* ── Responsive ──────────────────────── */
@media (max-width: 720px) {
  .nav { padding: 12px 16px; gap: 12px; }
  .nav-links { display: none; }
  .nav-right .pill:first-child { display: none; }
  .chips { grid-template-columns: repeat(2, 1fr); }
  .step-grid { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .dropzone { padding: 36px 16px; }
  .proc-actions { flex-direction: column; }
  .proc-actions .btn-primary { min-width: 0; }
}
