:root {
  --void: #09090B;
  --surface: #18181B;
  --surface-2: #1F1F23;
  --border: #27272A;
  --primary: #8B5CF6;
  --primary-dim: #7C3AED;
  --accent: #EC4899;
  --text: #FAFAFA;
  --muted: #A1A1AA;
  --muted-2: #71717A;
  --success: #22C55E;
  --error: #F43F5E;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--void);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  background: var(--surface-2);
  padding: 0.15em 0.4em;
  border-radius: 6px;
  font-size: 0.9em;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.wrap-narrow { max-width: 640px; }

/* ─── Background glow ─────────────────────────────────────────────────── */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}
.glow-1 {
  width: 500px; height: 500px;
  background: var(--primary);
  top: -150px; left: -100px;
}
.glow-2 {
  width: 500px; height: 500px;
  background: var(--accent);
  top: 400px; right: -150px;
  opacity: 0.15;
}

/* ─── Header ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(9, 9, 11, 0.7);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.brand .dot { color: var(--primary); }
.header-link {
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.header-link:hover {
  border-color: var(--primary);
  background: var(--surface-2);
}

/* ─── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  padding: 96px 0 72px;
  text-align: center;
}
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
}
h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
}
.grad {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  max-width: 560px;
  margin: 0 auto 40px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
}

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 64px;
  flex-wrap: wrap;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 140px;
}
.step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
}
.step-label {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  font-weight: 500;
}
.step-arrow {
  color: var(--muted-2);
  font-size: 18px;
}

/* ─── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  padding: 14px 28px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 0 0 rgba(139, 92, 246, 0);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.35);
  transform: translateY(-1px);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-lg { padding: 16px 36px; font-size: 16px; }
.btn-block { width: 100%; margin-top: 8px; }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); }
.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
}
.btn-link:hover { color: var(--accent); }

/* ─── Generate section ────────────────────────────────────────────────── */
.generate {
  position: relative;
  z-index: 1;
  padding: 40px 0 120px;
}
.generate h2 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  font-size: 14.5px;
  margin: 0 0 40px;
}

form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.field { margin-bottom: 22px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}

label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 8px;
}
.req { color: var(--accent); }
.opt { color: var(--muted-2); font-weight: 400; }

input[type="text"], input[type="email"], input[type="url"], textarea {
  width: 100%;
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14.5px;
  font-family: inherit;
  transition: border-color 0.15s ease;
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
}
input.invalid { border-color: var(--error); }
textarea { resize: vertical; min-height: 90px; }

.handle-input {
  display: flex;
  align-items: stretch;
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.handle-input:focus-within { border-color: var(--primary); }
.handle-input input {
  border: none;
  background: transparent;
  border-radius: 0;
  flex: 1;
}
.handle-input input:focus { outline: none; }
.handle-suffix {
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--muted-2);
  font-size: 14px;
  background: var(--surface-2);
  border-left: 1px solid var(--border);
  white-space: nowrap;
}
.hint {
  font-size: 12px;
  color: var(--muted-2);
  margin: 6px 0 0;
}
.hint.error-hint { color: var(--error); }

.file-drop {
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 18px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.file-drop:hover, .file-drop.dragover {
  border-color: var(--primary);
  background: rgba(139, 92, 246, 0.05);
}
.file-drop-text {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
}
.file-drop-name {
  display: block;
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  margin-top: 6px;
}

.social-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}
.social-input-row {
  display: flex;
  gap: 8px;
}
.social-input-row input { flex: 1; }
.remove-social {
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  width: 42px;
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
}
.remove-social:hover { color: var(--error); border-color: var(--error); }

.form-note {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted-2);
  margin: 14px 0 0;
}

/* ─── Progress panel ───────────────────────────────────────────────────── */
.progress-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 24px;
}
.progress-panel h3 {
  margin: 0 0 24px;
  font-size: 18px;
  font-weight: 700;
}
#progress-handle { color: var(--primary); }

.progress-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.progress-steps li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14.5px;
  color: var(--muted-2);
  transition: color 0.2s ease;
}
.progress-steps li.active { color: var(--text); }
.progress-steps li.done { color: var(--text); }
.progress-steps li.error { color: var(--error); }

.dot-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.progress-steps li.active .dot-icon {
  border-color: var(--primary);
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}
.progress-steps li.done .dot-icon {
  background: var(--success);
  border-color: var(--success);
}
.progress-steps li.done .dot-icon::after {
  content: '';
  position: absolute;
  left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.progress-steps li.error .dot-icon {
  background: var(--error);
  border-color: var(--error);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Result panels ────────────────────────────────────────────────────── */
.result-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 32px;
  margin-top: 24px;
  text-align: center;
}
.result-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.result-icon.error { background: var(--error); }
.result-panel h3 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 12px;
}
.result-url {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
  word-break: break-all;
}
.result-url:hover { color: var(--accent); }
.result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.error-message {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 24px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--muted-2);
}
.footer-api a { color: var(--muted); }
.footer-api a:hover { color: var(--primary); }

@media (max-width: 640px) {
  form { padding: 22px; }
  .hero { padding: 64px 0 48px; }
}
