:root {
  color-scheme: dark;
  --bg: #06100d;
  --panel: rgba(13, 31, 25, 0.88);
  --line: rgba(144, 255, 214, 0.15);
  --line-strong: rgba(49, 229, 165, 0.4);
  --text: #effbf6;
  --muted: #91a8a0;
  --green: #31e5a5;
  --green-strong: #08b981;
  --danger: #ff8378;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(
      circle at 82% 3%,
      rgba(8, 185, 129, 0.15),
      transparent 34rem
    ),
    linear-gradient(180deg, #07130f, #06100d 65%, #081511);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}
.noise {
  position: fixed;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a {
  color: inherit;
  text-decoration: none;
}
.site-header,
main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}
.site-header {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 760;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--green);
  color: #052019;
  font-weight: 900;
  box-shadow: 0 0 28px rgba(49, 229, 165, 0.18);
}
nav {
  display: flex;
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
}
nav a:hover,
footer a:hover {
  color: var(--green);
}
.intro {
  padding: 70px 0 38px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
}
.eyebrow,
.kicker {
  color: var(--green);
  font:
    750 11px/1 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  letter-spacing: 0.16em;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}
.eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}
h1 {
  margin: 0;
  font-size: clamp(45px, 7vw, 78px);
  line-height: 1;
  letter-spacing: -0.06em;
}
.intro > div > p:last-child {
  max-width: 690px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}
.privacy-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 205px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 29, 23, 0.65);
}
.privacy-badge i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px var(--green);
}
.privacy-badge span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.privacy-badge strong {
  font-size: 13px;
}
.privacy-badge small {
  color: var(--muted);
  font-size: 11px;
}
.workspace {
  padding: 22px 0 100px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  gap: 18px;
  align-items: start;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  background: linear-gradient(
    145deg,
    rgba(17, 42, 33, 0.86),
    rgba(8, 23, 18, 0.9)
  );
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.16);
}
.preview-panel {
  position: sticky;
  top: 18px;
}
.panel-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.step {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--green);
  font:
    700 11px/1 ui-monospace,
    monospace;
}
.panel h2 {
  margin: 0;
  font-size: 20px;
}
.panel-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(2, 13, 10, 0.45);
  margin-bottom: 18px;
}
.segmented button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.segmented button.active {
  background: var(--green);
  color: #052019;
  font-weight: 800;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #c8dbd4;
  font-size: 13px;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(2, 13, 10, 0.62);
  color: var(--text);
  outline: none;
  font: inherit;
}
.field input,
.field select {
  min-height: 46px;
  padding: 0 13px;
}
.field textarea {
  min-height: 154px;
  resize: vertical;
  padding: 14px;
  line-height: 1.6;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--green-strong);
  box-shadow: 0 0 0 3px rgba(49, 229, 165, 0.08);
}
.field small {
  align-self: flex-end;
  color: var(--muted);
  font-size: 11px;
}
.field small b {
  color: var(--green);
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field-grid .wide {
  grid-column: 1/-1;
}
.password-wrap {
  display: flex;
  position: relative;
}
.password-wrap input {
  padding-right: 58px;
}
.password-wrap button {
  position: absolute;
  right: 5px;
  top: 5px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  color: var(--green);
  background: rgba(49, 229, 165, 0.08);
  cursor: pointer;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.check input {
  accent-color: var(--green-strong);
}
.customize {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.color-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #c8dbd4;
  font-size: 13px;
}
.color-field > span:last-child {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(2, 13, 10, 0.62);
}
.color-field input {
  width: 32px;
  height: 32px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.color-field b {
  font:
    600 12px/1 ui-monospace,
    monospace;
  color: var(--muted);
}
.qr-stage {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}
.qr-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.empty-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: #476059;
  text-align: center;
}
.empty-qr strong {
  color: #173c31;
}
.empty-qr small {
  font-size: 12px;
}
.preview-actions,
.result-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 16px;
}
button {
  font: inherit;
}
.primary,
.ghost,
.link-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
}
.primary {
  padding: 0 17px;
  gap: 28px;
  border: 0;
  background: var(--green);
  color: #052019;
  font-weight: 800;
  box-shadow: 0 12px 32px rgba(8, 185, 129, 0.16);
}
.primary:hover {
  transform: translateY(-1px);
}
.primary:disabled {
  cursor: not-allowed;
  opacity: 0.35;
  transform: none;
}
.ghost,
.link-button {
  padding: 0 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: #bcd1c9;
}
.ghost:hover,
.link-button:hover {
  border-color: var(--line-strong);
  color: var(--text);
}
.scanner {
  padding: 10px 0 120px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 28px;
}
.section-heading h2 {
  font-size: clamp(38px, 5vw, 58px);
  letter-spacing: -0.05em;
  margin: 10px 0 0;
}
.section-heading p {
  color: var(--muted);
  margin: 0 0 7px;
}
.scanner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.drop-zone,
.scan-result {
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(
    145deg,
    rgba(17, 42, 33, 0.84),
    rgba(8, 23, 18, 0.88)
  );
}
.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-style: dashed;
  cursor: pointer;
  transition: 0.2s ease;
}
.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--green);
  background: rgba(49, 229, 165, 0.07);
}
.drop-zone.dragover {
  transform: scale(1.006);
}
.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.scan-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  color: var(--green);
  font-size: 34px;
}
.drop-zone > span:nth-of-type(2) {
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 5px;
}
.drop-zone small {
  color: var(--muted);
}
.drop-zone > b {
  margin-top: 8px;
  padding: 9px 13px;
  border-radius: 9px;
  background: var(--green);
  color: #052019;
  font-size: 12px;
}
.scan-result {
  padding: 26px;
  display: grid;
}
.result-placeholder {
  place-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}
.result-placeholder > span {
  font-size: 42px;
  color: var(--green);
}
.result-content {
  min-width: 0;
}
.result-meta {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px;
}
.result-meta span {
  color: var(--green);
  font-size: 12px;
}
.result-meta small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result-content textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(2, 13, 10, 0.62);
  color: var(--text);
  font:
    13px/1.65 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}
.primary.small {
  min-height: 40px;
}
.toast {
  position: fixed;
  z-index: 10;
  top: 22px;
  right: 22px;
  max-width: min(420px, calc(100% - 44px));
  padding: 11px 15px;
  border: 1px solid rgba(49, 229, 165, 0.35);
  border-radius: 11px;
  background: #0f3025;
  color: #dffff3;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.28);
  font-size: 13px;
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: 0.2s ease;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast.error {
  border-color: rgba(255, 131, 120, 0.4);
  background: #38201d;
  color: #ffd8d4;
}
footer {
  min-height: 100px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .preview-panel {
    position: static;
  }
  .preview-panel .qr-stage {
    max-width: 460px;
    margin-inline: auto;
    width: 100%;
  }
  .scanner-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1180px);
  }
  .site-header {
    height: 70px;
  }
  nav a:first-child {
    display: none;
  }
  .intro {
    padding: 55px 0 28px;
    align-items: flex-start;
    flex-direction: column;
  }
  .privacy-badge {
    width: 100%;
  }
  .panel {
    padding: 20px;
    border-radius: 18px;
  }
  .field-grid,
  .customize {
    grid-template-columns: 1fr;
  }
  .field-grid .wide {
    grid-column: auto;
  }
  .preview-actions .primary {
    width: 100%;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .drop-zone,
  .scan-result {
    min-height: 260px;
  }
  .scanner {
    padding-bottom: 90px;
  }
  footer {
    padding: 24px 0;
    gap: 18px;
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111315;
  --panel: rgba(29, 32, 34, 0.92);
  --line: rgba(255, 255, 255, 0.11);
  --text: #f4f7f6;
  --muted: #9aa2a0;
}
:root[data-theme="dark"] body {
  background: radial-gradient(circle at 82% 3%, rgba(49, 229, 165, 0.07), transparent 34rem), linear-gradient(180deg, #151719, #101214 65%, #17191b);
}
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .drop-zone,
:root[data-theme="dark"] .scan-result {
  background: linear-gradient(145deg, rgba(31, 34, 36, 0.96), rgba(21, 23, 25, 0.94));
}
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field textarea,
:root[data-theme="dark"] .field select,
:root[data-theme="dark"] .segmented,
:root[data-theme="dark"] .color-field > span:last-child,
:root[data-theme="dark"] .result-content textarea {
  background: rgba(9, 10, 11, 0.58);
}
nav { align-items: center; }
.theme-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 18px;
}
.theme-toggle:hover { border-color: var(--line-strong); color: var(--green); }
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f5;
  --panel: rgba(255, 255, 255, 0.94);
  --line: rgba(17, 34, 29, 0.12);
  --line-strong: rgba(11, 185, 129, 0.4);
  --text: #18201d;
  --muted: #65716d;
  --green: #0bb981;
  --green-strong: #078b63;
}
:root[data-theme="light"] body {
  background: radial-gradient(circle at 82% 3%, rgba(11, 185, 129, 0.08), transparent 32rem), linear-gradient(180deg, #fafcfb, #f0f3f2 65%, #f7f9f8);
}
:root[data-theme="light"] .panel,
:root[data-theme="light"] .drop-zone,
:root[data-theme="light"] .scan-result {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(246, 249, 248, 0.93));
  box-shadow: 0 16px 42px rgba(20, 54, 43, 0.06);
}
:root[data-theme="light"] .field input,
:root[data-theme="light"] .field textarea,
:root[data-theme="light"] .field select,
:root[data-theme="light"] .segmented,
:root[data-theme="light"] .color-field > span:last-child,
:root[data-theme="light"] .result-content textarea {
  background: #fff;
  color: var(--text);
}
:root[data-theme="light"] .field,
:root[data-theme="light"] .color-field { color: #31413b; }
:root[data-theme="light"] .privacy-badge {
  color: #18201d;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(20, 54, 43, 0.06);
}
:root[data-theme="light"] .privacy-badge small { color: #65716d; }
:root[data-theme="light"] .ghost,
:root[data-theme="light"] .link-button,
:root[data-theme="light"] .theme-toggle { color: #34453f; background: rgba(255, 255, 255, 0.75); }
:root[data-theme="light"] .primary,
:root[data-theme="light"] .brand-mark,
:root[data-theme="light"] .drop-zone > b { color: #fff; }
