:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b1016;
  color: #edf2f7;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    radial-gradient(circle at 16% 10%, rgba(20, 184, 166, 0.18), transparent 30rem),
    radial-gradient(circle at 88% 4%, rgba(59, 130, 246, 0.16), transparent 28rem),
    linear-gradient(135deg, #101720 0%, #151923 54%, #090d13 100%);
  color: #edf2f7;
  overflow-x: hidden;
}

.app-shell {
  width: min(100%, 1240px);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 42px);
  display: grid;
  align-content: start;
  gap: 18px;
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow,
.subtitle,
h1,
h2,
.note {
  margin: 0;
  letter-spacing: 0;
}

.eyebrow {
  color: #5eead4;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  margin-top: 6px;
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.95;
}

.subtitle {
  max-width: 720px;
  margin-top: 12px;
  color: #aab7c8;
  font-size: clamp(0.98rem, 2vw, 1.12rem);
  line-height: 1.55;
}

.status-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(94, 234, 212, 0.36);
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.26);
  color: #ccfbf1;
  font-weight: 900;
  white-space: nowrap;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 18px;
  align-items: start;
}

.controls,
.preview-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(10, 15, 22, 0.74);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.controls {
  padding: 16px;
  display: grid;
  gap: 16px;
}

.field {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.field span,
.preview-header span {
  color: #8794a7;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

textarea,
select {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font: inherit;
  font-weight: 700;
}

textarea {
  min-height: 170px;
  resize: vertical;
  padding: 13px;
  line-height: 1.5;
}

select {
  min-height: 46px;
  padding: 0 13px;
}

select option {
  color: #111827;
}

textarea::placeholder {
  color: #718096;
}

textarea:focus,
select:focus {
  border-color: rgba(94, 234, 212, 0.78);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

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

input[type="range"] {
  accent-color: #14b8a6;
}

output {
  color: #cbd5e1;
  font-weight: 900;
}

input[type="color"] {
  width: 100%;
  height: 46px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

button {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 8px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, border-color 160ms ease, background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.primary {
  border: 0;
  background: linear-gradient(135deg, #14b8a6, #2563eb);
  color: #ffffff;
}

.secondary,
.ghost {
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.08);
  color: #e5edf7;
}

.ghost {
  color: #aab7c8;
}

.preview-card {
  overflow: hidden;
  position: sticky;
  top: 18px;
}

.preview-header {
  min-height: 54px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

h2 {
  color: #f8fafc;
  font-size: 1rem;
}

.qr-stage {
  min-height: 390px;
  padding: 26px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(0, 0, 0, 0.16);
}

#qrCode {
  min-width: 128px;
  min-height: 128px;
  padding: 18px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

#qrCode img,
#qrCode canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.note {
  padding: 14px 18px 18px;
  color: #8794a7;
  font-weight: 700;
  line-height: 1.45;
}

@media (max-width: 920px) {
  .app-shell {
    padding: 16px;
  }

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

  .workspace,
  .control-grid {
    grid-template-columns: 1fr;
  }

  .preview-card {
    position: static;
  }

  .qr-stage {
    min-height: 320px;
  }
}
