:root {
  --bg: #07070c;
  --bg2: #101018;
  --card: rgba(255, 255, 255, 0.045);
  --card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --accent: #7c6cf0;
  --accent2: #5eead4;
  --accent-glow: rgba(124, 108, 240, 0.35);
  --text: #f4f4f8;
  --muted: #9b9bab;
  --danger: #ff6b81;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --font: "Manrope", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: -20% -10% auto;
  height: 60vh;
  background:
    radial-gradient(ellipse 50% 60% at 20% 0%, rgba(124, 108, 240, 0.22), transparent 70%),
    radial-gradient(ellipse 40% 50% at 80% 10%, rgba(94, 234, 212, 0.12), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  backdrop-filter: blur(16px);
  background: rgba(7, 7, 12, 0.72);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 8px 24px var(--accent-glow);
}

.topnav { display: flex; gap: 1.25rem; }
.topnav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.topnav-link.muted { color: var(--muted); }

main {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.hero {
  text-align: center;
  padding: 2.5rem 0 3.5rem;
}

.eyebrow {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--accent2);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 16ch;
  margin: 0 auto 1rem;
  background: linear-gradient(120deg, #fff 20%, #c8c2ff 60%, var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  color: var(--muted);
  max-width: 42ch;
  margin: 0 auto 1.75rem;
  font-size: 1.05rem;
}

.hero-bullets {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-bullets li::before {
  content: "•";
  color: var(--accent2);
  margin-right: 0.4rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.35rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6355d8);
  color: #fff;
  box-shadow: 0 12px 32px var(--accent-glow);
}

.btn-primary:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-lg { padding: 0.95rem 1.75rem; font-size: 1rem; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }

.wizard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.stepper {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.stepper-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.stepper-item span {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.stepper-item.active { color: var(--text); }
.stepper-item.active span,
.stepper-item.done span {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0a0a0f;
  border-color: transparent;
}

.stepper-item.done { color: var(--accent2); }

.panel h2 {
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.panel-hint {
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.dropzone {
  display: block;
  border: 2px dashed rgba(124, 108, 240, 0.45);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}

.dropzone:focus-visible {
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.2);
}

.dropzone.dragover {
  border-color: var(--accent2);
  background: rgba(94, 234, 212, 0.06);
}

.dropzone-inner {
  padding: 3rem 1.5rem;
  text-align: center;
}

.dropzone-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: rgba(124, 108, 240, 0.15);
  color: var(--accent2);
}

.dropzone-title { font-weight: 700; margin-bottom: 0.35rem; }
.dropzone-sub { color: var(--muted); font-size: 0.9rem; }

.dropzone-preview {
  padding: 1.25rem;
  text-align: center;
}

.dropzone-preview img {
  max-width: 100%;
  max-height: 280px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
}

.file-name {
  margin: 0.75rem 0;
  color: var(--muted);
  font-size: 0.85rem;
  word-break: break-all;
}

.quality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.quality-card {
  text-align: left;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, background 0.2s;
}

.quality-card:hover {
  background: var(--card-hover);
  transform: translateY(-2px);
}

.quality-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 16px 40px rgba(124, 108, 240, 0.15);
}

.quality-card h3 { margin: 0.5rem 0 0.35rem; font-size: 1.15rem; }
.quality-card p { color: var(--muted); font-size: 0.9rem; }

.quality-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(124, 108, 240, 0.18);
  color: #d4ceff;
}

.quality-badge.premium {
  background: rgba(94, 234, 212, 0.15);
  color: var(--accent2);
}

.quality-time {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.compare-pane {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
}

.compare-pane figcaption {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.compare-pane img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}

.preview-wrap {
  position: relative;
  min-height: 200px;
  display: grid;
  place-items: center;
}

.preview-wrap > * {
  grid-area: 1 / 1;
}

.preview-wrap .loader {
  display: none;
  z-index: 2;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(7, 7, 12, 0.72);
}

.preview-wrap.is-loading .loader {
  display: flex;
}

.preview-wrap.is-loading img {
  opacity: 0.35;
}

.spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid rgba(255,255,255,0.12);
  border-top-color: var(--accent2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.sliders {
  display: grid;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.slider-row {
  display: grid;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.slider-row strong {
  color: var(--accent2);
  font-weight: 800;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.panel-actions.split { justify-content: space-between; }
.panel-actions.center { justify-content: center; flex-wrap: wrap; }

.done-card { text-align: center; }

.done-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent2), #34d399);
  color: #042f2e;
}

.final-preview {
  max-width: 420px;
  margin: 1.25rem auto;
}

.final-preview img {
  width: 100%;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.error {
  color: var(--danger);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.pricing {
  margin-top: 4rem;
  text-align: center;
}

.pricing h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.section-lead {
  color: var(--muted);
  max-width: 50ch;
  margin: 0 auto 2rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.price-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  text-align: left;
}

.price-card.highlight {
  border-color: rgba(124, 108, 240, 0.5);
  box-shadow: 0 20px 50px rgba(124, 108, 240, 0.12);
}

.price-card h3 { margin-bottom: 0.35rem; }
.price {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.price span { font-size: 0.95rem; font-weight: 600; color: var(--muted); }

.price-card ul {
  list-style: none;
  color: var(--muted);
  font-size: 0.9rem;
}

.price-card li + li { margin-top: 0.35rem; }

.footer {
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
.footer a { color: var(--accent2); }

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.65);
  display: grid;
  place-items: center;
  padding: 1rem;
}
.auth-modal[hidden] { display: none !important; }
.auth-card {
  position: relative;
  width: min(400px, 100%);
  background: #12121a;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.auth-card input[type="email"],
.auth-card input[type="password"] {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-family: inherit;
}
.auth-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
}
.check-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.75rem;
}
.auth-switch { margin-top: 1rem; text-align: center; }
.price-card .btn { margin-top: 0.75rem; }

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  background: #1a1a24;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 50;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .stepper-item { font-size: 0; }
  .stepper-item span { font-size: 0.85rem; }
  .topnav-link:not(.muted) { display: none; }
  .wizard { padding: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
