:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --surface: rgba(255, 255, 255, .72);
  --surface-solid: #fff;
  --surface-muted: #f0f2f8;
  --text: #141720;
  --muted: #6f7483;
  --line: rgba(28, 31, 42, .1);
  --site-accent: #74d680;
  --primary: var(--site-accent);
  --primary-2: #a4eaa9;
  --primary-soft: rgba(116, 214, 128, .12);
  --danger: #dc4c64;
  --success: #279269;
  --shadow: 0 24px 70px rgba(31, 30, 56, .12);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1018;
  --surface: rgba(25, 27, 39, .72);
  --surface-solid: #1a1c27;
  --surface-muted: #222531;
  --text: #f4f3f9;
  --muted: #a4a5b1;
  --line: rgba(255, 255, 255, .1);
  --site-accent: #74d680;
  --primary: var(--site-accent);
  --primary-2: #a4eaa9;
  --primary-soft: rgba(116, 214, 128, .16);
  --shadow: 0 24px 70px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background .25s, color .25s;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 16%, color-mix(in srgb, var(--site-accent), transparent 84%), transparent 20rem),
    radial-gradient(circle at 82% 8%, color-mix(in srgb, var(--site-accent), transparent 90%), transparent 22rem),
    radial-gradient(circle at 72% 88%, color-mix(in srgb, var(--site-accent), transparent 88%), transparent 24rem),
    linear-gradient(180deg, var(--bg), color-mix(in srgb, var(--bg), var(--site-accent) 5%));
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.ambient { display: none; position: fixed; z-index: -1; border-radius: 50%; filter: blur(3px); pointer-events: none; opacity: .7; }
.ambient-one { width: 480px; height: 480px; top: -260px; left: -180px; background: radial-gradient(circle, rgba(117, 96, 244, .2), transparent 70%); }
.ambient-two { width: 520px; height: 520px; right: -260px; top: 28%; background: radial-gradient(circle, rgba(69, 180, 205, .14), transparent 70%); }
.glass { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }

.neon-lines {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.neon-lines span {
  --line-top: 20%;
  --line-delay: 0s;
  --line-duration: 9s;
  position: absolute;
  top: var(--line-top);
  left: -72vw;
  width: 62vw;
  height: 2px;
  border-radius: 999px;
  opacity: 0;
  background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--site-accent), transparent 72%) 16%, color-mix(in srgb, var(--site-accent), white 34%) 48%, color-mix(in srgb, var(--site-accent), transparent 62%) 74%, transparent 100%);
  box-shadow: 0 0 8px color-mix(in srgb, var(--site-accent), transparent 16%), 0 0 22px color-mix(in srgb, var(--site-accent), transparent 34%), 0 0 44px color-mix(in srgb, var(--site-accent), transparent 54%);
  transform: translate3d(0, 0, 0) rotate(-14deg);
  animation: neon-line var(--line-duration) linear infinite;
  animation-delay: var(--line-delay);
}

.neon-lines span:nth-child(1) { --line-top: 13%; --line-delay: -1.5s; --line-duration: 8s; }
.neon-lines span:nth-child(2) { --line-top: 27%; --line-delay: -5.2s; --line-duration: 10.5s; width: 46vw; }
.neon-lines span:nth-child(3) { --line-top: 42%; --line-delay: -3.6s; --line-duration: 9.5s; width: 68vw; }
.neon-lines span:nth-child(4) { --line-top: 58%; --line-delay: -7s; --line-duration: 11.2s; width: 52vw; }
.neon-lines span:nth-child(5) { --line-top: 72%; --line-delay: -4.4s; --line-duration: 12s; width: 58vw; }
.neon-lines span:nth-child(6) { --line-top: 84%; --line-delay: -9s; --line-duration: 13s; width: 72vw; }

:root:not([data-theme="dark"]) .neon-lines { opacity: .42; }

@keyframes neon-line {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(-14deg); }
  9%, 78% { opacity: .9; }
  100% { opacity: 0; transform: translate3d(190vw, -42vh, 0) rotate(-14deg); }
}

.topbar { position: relative; z-index: 1; width: min(1180px, calc(100% - 40px)); height: 84px; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 17px; letter-spacing: 0; }
.brand strong { font-weight: 700; }
.brand-mark { width: 35px; height: 35px; display: inline-grid; place-items: center; border-radius: 11px; color: #071017; background: linear-gradient(145deg, var(--primary-2), var(--primary)); font-weight: 800; box-shadow: 0 8px 20px color-mix(in srgb, var(--primary), transparent 70%); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.hub-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  font-weight: 750;
}
.hub-link:hover { color: var(--text); background: var(--surface-solid); }
.icon-button, .select-wrap { min-width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.icon-button:hover { background: var(--surface-solid); }
.icon-button .sun { display: none; }
[data-theme="dark"] .icon-button .sun { display: block; }
[data-theme="dark"] .icon-button .moon { display: none; }
.select-wrap select { border: 0; outline: 0; color: var(--text); background: transparent; cursor: pointer; font-weight: 700; font-size: 13px; padding: 0 8px; }

main { position: relative; z-index: 1; width: min(900px, calc(100% - 40px)); margin: 72px auto 0; }
.hero { text-align: center; }
.eyebrow { color: var(--primary); font-size: 12px; text-transform: uppercase; letter-spacing: .18em; font-weight: 750; }
.hero h1 { margin: 20px 0 18px; font-size: clamp(39px, 6vw, 64px); line-height: 1.04; letter-spacing: 0; font-weight: 760; }
.hero h1 span { color: var(--muted); font-weight: 570; }
.hero p { max-width: 590px; margin: auto; color: var(--muted); font-size: 17px; line-height: 1.65; }

.qr-card {
  width: min(780px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 20px;
  margin: 48px auto 0;
  padding: 18px;
  border-radius: 25px;
}
.qr-form { min-width: 0; padding: 8px; }
.qr-form h2 { margin: 0 0 20px; font-size: 20px; letter-spacing: 0; }
.qr-form label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 650; }
.input-row { display: flex; align-items: stretch; gap: 12px; }
.input-row input {
  min-width: 0;
  flex: 1;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  outline: none;
  color: var(--text);
  background: var(--surface-solid);
}
.input-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.hint { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.qr-preview {
  min-height: 250px;
  display: grid;
  place-items: center;
  border: 1px dashed color-mix(in srgb, var(--primary), transparent 62%);
  border-radius: 18px;
  background: linear-gradient(145deg, var(--primary-soft), transparent 65%);
}
.qr-empty { display: grid; place-items: center; gap: 12px; padding: 24px; color: var(--muted); text-align: center; }
.qr-empty p { margin: 0; font-size: 13px; }
.qr-empty-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 17px; color: var(--primary); background: var(--surface-solid); box-shadow: 0 10px 30px color-mix(in srgb, var(--primary), transparent 82%); }
.qr-empty-icon svg { width: 30px; }
.qr-image { width: min(210px, 80%); aspect-ratio: 1; padding: 12px; border-radius: 16px; background: #fff; box-shadow: 0 12px 36px rgba(31, 30, 56, .14); }
.download-row { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 8px 8px; }
.primary-button, .secondary-button {
  height: 48px;
  padding: 0 20px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}
.primary-button { border: 0; color: #071017; background: linear-gradient(135deg, var(--primary-2), var(--primary)); box-shadow: 0 10px 24px color-mix(in srgb, var(--primary), transparent 74%); }
.primary-button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.primary-button:disabled { opacity: .55; cursor: wait; transform: none; }
.primary-button svg { width: 18px; }
.secondary-button { color: var(--text); background: var(--surface-muted); border: 1px solid var(--line); }
.full { width: 100%; }
.error-message { margin: 12px 0 0; padding: 12px; border-radius: 10px; color: var(--danger); background: rgba(220, 76, 100, .1); font-size: 13px; text-align: center; }
.trust-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 28px; margin: 26px auto 0; color: var(--muted); font-size: 12px; }
.trust-row > span { display: flex; align-items: center; gap: 7px; }
.trust-row svg { width: 15px; color: var(--primary); }
footer { position: relative; z-index: 1; width: min(1180px, calc(100% - 40px)); margin: 100px auto 0; padding: 30px 0; display: flex; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--line); font-size: 12px; }
footer a:hover { color: var(--primary); }

@media (max-width: 760px) {
  .topbar { height: 70px; width: calc(100% - 28px); }
  .brand { font-size: 15px; }
  main { width: calc(100% - 24px); margin-top: 52px; }
  .hero h1 { font-size: 39px; }
  .hero p { font-size: 15px; }
  .qr-card { grid-template-columns: 1fr; padding: 10px; margin-top: 35px; border-radius: 20px; }
  .input-row { flex-direction: column; }
  .primary-button { width: 100%; }
  .download-row { grid-template-columns: 1fr; padding: 0 8px 8px; }
  .qr-preview { min-height: 235px; }
  .trust-row { gap: 15px; }
  footer { width: calc(100% - 28px); margin-top: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
