:root {
  --bg: #050816;
  --bg-secondary: rgba(7, 12, 28, 0.82);
  --panel: rgba(9, 15, 32, 0.74);
  --panel-strong: rgba(12, 19, 40, 0.92);
  --border: rgba(95, 223, 255, 0.18);
  --border-strong: rgba(95, 223, 255, 0.35);
  --text: #f2f7ff;
  --muted: rgba(221, 233, 255, 0.64);
  --cyan: #62e8ff;
  --cyan-soft: rgba(98, 232, 255, 0.14);
  --amber: #ffae42;
  --amber-soft: rgba(255, 174, 66, 0.14);
  --shadow: 0 30px 80px rgba(1, 6, 18, 0.55);
  --mono: "Orbitron", sans-serif;
  --body: "Manrope", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(98, 232, 255, 0.12), transparent 32%),
    radial-gradient(circle at 80% 20%, rgba(255, 174, 66, 0.1), transparent 28%),
    linear-gradient(180deg, #050816 0%, #03050e 100%);
  color: var(--text);
  font-family: var(--body);
  overflow-x: hidden;
}

.page-noise,
.page-grid,
.page-orb {
  pointer-events: none;
  position: fixed;
  inset: 0;
}

.page-noise {
  opacity: 0.16;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.3) 0 0.7px, transparent 0.9px),
    radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.18) 0 0.8px, transparent 1px);
  background-size: 16px 16px, 24px 24px;
  mix-blend-mode: soft-light;
}

.page-grid {
  background-image:
    linear-gradient(rgba(98, 232, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 232, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 85%);
}

.page-orb {
  filter: blur(90px);
  opacity: 0.5;
}

.page-orb--cyan {
  inset: auto auto 12% -8%;
  width: 34rem;
  height: 34rem;
  background: rgba(43, 180, 255, 0.22);
}

.page-orb--amber {
  inset: 4% -6% auto auto;
  width: 26rem;
  height: 26rem;
  background: rgba(255, 174, 66, 0.18);
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px 24px 72px;
}

.app-header,
.hero-panel,
.panel,
.footer-panel {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(12, 19, 40, 0.88) 0%, rgba(7, 12, 28, 0.78) 100%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
  border-radius: 24px;
  margin-bottom: 22px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(98, 232, 255, 0.18), rgba(255, 174, 66, 0.12)),
    rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-strong);
  color: var(--cyan);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 40px rgba(98, 232, 255, 0.12);
}

.brand-icon svg {
  width: 28px;
  height: 28px;
}

.brand-kicker,
.panel-eyebrow,
.hero-eyebrow {
  margin: 0 0 6px;
  font-family: var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: var(--cyan);
}

.brand-name {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.back-link:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: rgba(98, 232, 255, 0.08);
}

.back-link svg {
  width: 16px;
  height: 16px;
}

.hero-panel {
  border-radius: 32px;
  padding: 36px;
  margin-bottom: 22px;
  overflow: hidden;
  position: relative;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(98, 232, 255, 0.6), transparent);
}

.hero-copy {
  max-width: 760px;
}

.hero-title {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-title span {
  display: block;
}

.accent-word {
  color: var(--amber);
  text-shadow: 0 0 28px rgba(255, 174, 66, 0.28);
}

.hero-description {
  margin: 18px 0 0;
  max-width: 700px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-badge {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #d7e7ff;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 22px;
}

.panel {
  border-radius: 28px;
  padding: 28px;
}

.panel-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.panel-header h2,
.footer-panel h2 {
  margin: 0;
  font-size: 1.5rem;
}

.control-block + .control-block,
.signal-meta,
.action-row {
  margin-top: 24px;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.label-row label,
.label-row span:first-child {
  color: var(--text);
  font-weight: 700;
}

textarea,
input[type="range"],
input[type="color"] {
  width: 100%;
}

textarea {
  resize: vertical;
  min-height: 180px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 7, 18, 0.68);
  color: var(--text);
  font: inherit;
  line-height: 1.6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

textarea:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 4px rgba(98, 232, 255, 0.1);
}

textarea::placeholder {
  color: rgba(218, 232, 255, 0.38);
}

.example-grid,
.preset-row,
.preview-meta,
.signal-meta,
.action-row {
  display: grid;
  gap: 12px;
}

.example-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.example-chip,
.size-chip,
.action-btn {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.example-chip,
.size-chip {
  border-radius: 18px;
  padding: 12px 14px;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.example-chip:hover,
.size-chip:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: rgba(98, 232, 255, 0.08);
}

.preset-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.size-chip {
  text-align: center;
}

.size-chip.is-active {
  border-color: rgba(255, 174, 66, 0.42);
  background: rgba(255, 174, 66, 0.12);
  color: #ffe2b6;
}

input[type="range"] {
  appearance: none;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(98, 232, 255, 0.28), rgba(255, 174, 66, 0.28));
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--amber));
  box-shadow: 0 8px 20px rgba(98, 232, 255, 0.3);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--amber));
  box-shadow: 0 8px 20px rgba(98, 232, 255, 0.3);
  cursor: pointer;
}

.panel-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

input[type="color"] {
  height: 56px;
  padding: 6px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 7, 18, 0.68);
  cursor: pointer;
}

.signal-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.meta-item,
.meta-card {
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.meta-item span,
.meta-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.meta-item strong,
.meta-card strong {
  display: block;
  font-size: 0.98rem;
}

.action-row {
  grid-template-columns: 1.2fr 0.8fr;
}

.action-btn {
  min-height: 56px;
  border-radius: 18px;
  padding: 0 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.action-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.action-btn--primary {
  border-color: rgba(98, 232, 255, 0.34);
  background: linear-gradient(135deg, rgba(59, 201, 240, 0.32), rgba(255, 174, 66, 0.2));
  box-shadow: 0 20px 36px rgba(17, 94, 138, 0.18);
}

.action-btn--wide {
  width: 100%;
  margin-top: 18px;
}

.preview-stage {
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(4, 9, 20, 0.9), rgba(8, 14, 30, 0.92));
  position: relative;
  overflow: hidden;
}

.preview-stage::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 22px;
  border: 1px solid rgba(98, 232, 255, 0.09);
}

.preview-empty {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 320px;
}

.empty-icon {
  width: 82px;
  height: 82px;
  margin: 0 auto 18px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  background: rgba(98, 232, 255, 0.08);
  border: 1px solid rgba(98, 232, 255, 0.16);
}

.empty-icon svg {
  width: 40px;
  height: 40px;
}

.preview-empty h3 {
  margin: 0 0 10px;
  font-size: 1.3rem;
}

.preview-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.qr-frame {
  position: relative;
  z-index: 1;
  width: min(100%, 340px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 26px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(242, 248, 255, 0.96));
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.65);
}

.scan-line {
  position: absolute;
  inset: 14px 14px auto;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(98, 232, 255, 0.9), transparent);
  opacity: 0.8;
  animation: scan 3.2s linear infinite;
}

.qr-output {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.qr-output canvas,
.qr-output img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.preview-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.footer-panel {
  margin-top: 22px;
  border-radius: 28px;
  padding: 28px;
}

.footer-copy p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
  max-width: 720px;
}

@keyframes scan {
  from {
    transform: translateY(0);
  }
  50% {
    transform: translateY(280px);
  }
  to {
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .preview-stage {
    min-height: 360px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 18px 14px 52px;
  }

  .app-header,
  .hero-panel,
  .panel,
  .footer-panel {
    border-radius: 24px;
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-panel,
  .panel,
  .footer-panel {
    padding: 22px;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .example-grid,
  .preset-row,
  .preview-meta,
  .color-grid,
  .signal-meta,
  .action-row {
    grid-template-columns: 1fr;
  }
}
