:root {
  color-scheme: dark;
  --bg: #06101f;
  --panel: rgba(8, 17, 32, .78);
  --panel-strong: rgba(9, 18, 34, .94);
  --card: rgba(255, 255, 255, .07);
  --card-strong: rgba(255, 255, 255, .11);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, .13);
  --line-strong: rgba(147, 197, 253, .34);
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --purple: #8b5cf6;
  --green: #22c55e;
  --shadow: 0 24px 80px rgba(0, 0, 0, .35);
  --soft-shadow: 0 18px 60px rgba(15, 23, 42, .25);
  --radius: 26px;
  --max: 1200px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #edf4ff;
  --panel: rgba(255, 255, 255, .78);
  --panel-strong: rgba(255, 255, 255, .96);
  --card: rgba(15, 23, 42, .055);
  --card-strong: rgba(15, 23, 42, .085);
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, .12);
  --line-strong: rgba(37, 99, 235, .24);
  --shadow: 0 24px 80px rgba(15, 23, 42, .14);
  --soft-shadow: 0 18px 60px rgba(15, 23, 42, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 14% 12%, rgba(59, 130, 246, .36), transparent 30%),
    radial-gradient(circle at 82% 8%, rgba(139, 92, 246, .30), transparent 28%),
    radial-gradient(circle at 48% 96%, rgba(6, 182, 212, .18), transparent 34%),
    linear-gradient(135deg, #07111f, #101827 46%, #080b14);
}
:root[data-theme="light"] .page-bg {
  background:
    radial-gradient(circle at 16% 10%, rgba(59, 130, 246, .18), transparent 28%),
    radial-gradient(circle at 82% 8%, rgba(139, 92, 246, .14), transparent 27%),
    linear-gradient(135deg, #eef4ff, #fff 52%, #eaf6ff);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  width: min(100% - 28px, var(--max));
  min-height: 70px;
  margin: 14px auto 0;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 17, 31, .74);
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 60px rgba(0, 0, 0, .18);
}
:root[data-theme="light"] .topbar { background: rgba(255, 255, 255, .84); }

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand img { width: 44px; height: 44px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.02rem; letter-spacing: -.035em; }
.brand small { color: var(--muted); font-size: .74rem; font-weight: 800; }

.topnav { display: flex; justify-content: center; gap: 8px; }
.topnav a {
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 850;
}
.topnav a:hover { color: var(--text); background: var(--card); }

.hero, .app-shell, .examples, .roadmap, .footer {
  width: min(100% - 28px, var(--max));
  margin-left: auto;
  margin-right: auto;
}

.hero {
  min-height: 720px;
  padding: 86px 0 58px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(330px, .75fr);
  gap: 44px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .74rem;
  font-weight: 950;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 820px;
  margin-bottom: 22px;
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  line-height: .88;
  letter-spacing: -.08em;
}
h2 {
  margin-bottom: 14px;
  font-size: clamp(2.1rem, 4vw, 3.65rem);
  line-height: .95;
  letter-spacing: -.064em;
}
h3 { letter-spacing: -.04em; }
.hero-text, .section-heading p, .feature-grid p, .timeline p, .auth-card p {
  color: var(--muted);
  line-height: 1.72;
}
.hero-text { max-width: 640px; font-size: 1.09rem; }

.hero-actions, .form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.primary-button, .secondary-button, .ghost-button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 950;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--blue), var(--cyan));
  box-shadow: 0 20px 42px rgba(37, 99, 235, .30);
}
.secondary-button { color: var(--text); border: 1px solid var(--line); background: var(--card); }
.ghost-button { color: var(--text); border: 1px solid var(--line); background: transparent; }
.primary-button:hover, .secondary-button:hover, .ghost-button:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.primary-button:disabled, .secondary-button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.full { width: 100%; }

.trust-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 27px; }
.trust-row span, .status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: var(--card);
  font-size: .82rem;
  font-weight: 850;
}
.status-pill { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.status-pill span { width: 8px; height: 8px; border-radius: 999px; background: var(--green); box-shadow: 0 0 0 5px rgba(34, 197, 94, .12); }

.hero-showcase {
  min-height: 560px;
  display: grid;
  place-items: center;
  position: relative;
  perspective: 1300px;
}
.showcase-card {
  width: min(360px, 90vw);
  min-height: 520px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 36px;
  background: linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.045));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
:root[data-theme="light"] .showcase-card { border-color: rgba(15,23,42,.12); }
.showcase-card-main { transform: rotate(-5deg) rotateY(-15deg) rotateX(5deg); }
.showcase-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; color: var(--muted); font-size: .86rem; }
.showcase-topline span { width: 42px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.30); }
.showcase-phone { border-radius: 32px; padding: 10px; background: #050816; }
.showcase-screen { min-height: 438px; border-radius: 26px; padding: 20px; background: linear-gradient(180deg, #f8fbff, #dfe9ff); overflow: hidden; }
.showcase-app-icon { width: 82px; height: 82px; border-radius: 24px; background: linear-gradient(135deg, #2563eb, #8b5cf6); box-shadow: 0 18px 36px rgba(37,99,235,.24); margin-bottom: 20px; }
.showcase-line { width: 58%; height: 14px; border-radius: 999px; background: rgba(15, 23, 42, .12); margin-bottom: 12px; }
.showcase-line.wide { width: 82%; height: 22px; }
.showcase-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 28px; }
.showcase-grid span { height: 92px; border-radius: 22px; background: rgba(37, 99, 235, .12); }
.floating-metric {
  position: absolute;
  display: grid;
  gap: 2px;
  min-width: 106px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-strong);
  box-shadow: var(--soft-shadow);
}
.floating-metric strong { font-size: 1.18rem; letter-spacing: -.04em; }
.floating-metric span { color: var(--muted); font-size: .78rem; font-weight: 850; }
.metric-one { left: 0; top: 96px; }
.metric-two { right: 12px; bottom: 118px; }

.app-shell { padding: 42px 0; }
.section-heading { max-width: 760px; margin-bottom: 26px; }
.section-heading-row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 20px; }

.wizard-layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 18px; align-items: start; }
.wizard-panel, .generator-card, .preview-section, .feature-grid article, .timeline article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.wizard-panel, .generator-card, .preview-section { padding: 20px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 11px;
  row-gap: 2px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  color: var(--muted);
  background: transparent;
}
.steps li.active { color: var(--text); background: var(--card); }
.steps span {
  grid-row: span 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: .82rem;
  font-weight: 950;
  background: linear-gradient(135deg, var(--purple), var(--blue));
}
.steps strong { font-size: .92rem; }
.steps small { font-size: .76rem; }

.auth-card { margin-top: 18px; border: 1px solid var(--line); border-radius: 20px; padding: 15px; background: var(--card); }
.auth-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.auth-card-head span { color: #bfdbfe; font-size: .74rem; font-weight: 950; border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; }
.tiny { margin: 10px 0 0; font-size: .78rem; }
.muted { color: var(--muted); }

.generator-form { display: grid; gap: 22px; }
.form-section { display: grid; gap: 14px; }
.form-section-title { display: flex; align-items: center; gap: 10px; }
.form-section-title span { color: #bfdbfe; font-size: .78rem; font-weight: 950; }
.form-section-title strong { letter-spacing: -.02em; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label span { display: block; margin-bottom: 7px; color: var(--muted); font-size: .84rem; font-weight: 850; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 12px 13px;
  color: var(--text);
  background: rgba(255, 255, 255, .055);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea { background: rgba(255, 255, 255, .78); }
input:focus, select:focus, textarea:focus { border-color: rgba(96, 165, 250, .72); box-shadow: 0 0 0 4px rgba(59, 130, 246, .16); }
textarea { resize: vertical; }

.upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.upload-box {
  min-height: 132px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  border: 1px dashed rgba(147, 197, 253, .46);
  border-radius: 22px;
  padding: 15px;
  background: rgba(59, 130, 246, .07);
}
.upload-box input { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.upload-box em { color: var(--muted); font-size: .8rem; }

.style-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.style-card {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.style-card:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.style-card input { position: absolute; opacity: 0; pointer-events: none; }
.style-card.selected { border-color: rgba(96, 165, 250, .72); box-shadow: 0 0 0 4px rgba(59, 130, 246, .16); }
.style-card strong, .style-card small { display: block; }
.style-card small { color: var(--muted); }
.swatch { height: 66px; border-radius: 18px; }
.swatch.sport-blue { background: linear-gradient(135deg, #07111f, #2563eb 56%, #06b6d4); }
.swatch.premium-dark { background: linear-gradient(135deg, #050816, #7c3aed 55%, #1e1b4b); }
.swatch.clean-light { background: linear-gradient(135deg, #fff, #dbeafe 58%, #93c5fd); }

.preview-section { margin-top: 18px; }
.preview-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 16px; }
.preview-head h3 { margin: 0; }
.preview-grid { display: grid; grid-template-columns: repeat(4, minmax(210px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.preview-item { display: grid; gap: 10px; }
.preview-frame { width: 100%; aspect-ratio: 9 / 16; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: #020617; box-shadow: var(--soft-shadow); }
.preview-frame canvas { width: 100%; height: 100%; display: block; }
.preview-item-footer { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.preview-item-footer strong { font-size: .9rem; }
.preview-item-footer button { min-height: 36px; padding: 0 12px; }
.empty-state {
  grid-column: 1 / -1;
  min-height: 230px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, .025);
}

.examples, .roadmap { padding: 38px 0; }
.feature-grid, .timeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature-grid article, .timeline article { padding: 22px; }
.feature-grid span {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 950;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  margin-bottom: 18px;
}
.timeline { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.timeline strong { display: block; color: #93c5fd; margin-bottom: 10px; }
.footer { margin-top: 20px; margin-bottom: 34px; padding: 18px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .86rem; }

@media (max-width: 960px) {
  .topbar { grid-template-columns: auto auto; border-radius: 24px; }
  .topnav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 56px; }
  .hero-showcase { min-height: 460px; }
  .wizard-layout { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps li { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .steps span { grid-row: auto; }
  .feature-grid, .timeline { grid-template-columns: 1fr; }
  .section-heading-row { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 680px) {
  .topbar, .hero, .app-shell, .examples, .roadmap, .footer { width: min(100% - 18px, var(--max)); }
  h1 { font-size: clamp(2.8rem, 18vw, 4.8rem); }
  .form-grid.two, .upload-grid, .style-grid { grid-template-columns: 1fr; }
  .preview-head { align-items: stretch; flex-direction: column; }
  .preview-grid { grid-template-columns: repeat(4, 82vw); }
  .showcase-card-main { transform: none; }
  .floating-metric { display: none; }
  .footer { flex-direction: column; }
}
