/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── Base ───────────────────────────────────────────────────── */
html, body {
  font-family: Poppins, system-ui, sans-serif;
  background: transparent;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color: #e5e7eb;
}

button, input, select {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
input:focus, select:focus, button:focus {
  outline: none;
}

/* ─── Layout ─────────────────────────────────────────────────── */
.qr-app {
  width: 100%;
  background: transparent;
}
.qr-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 16px 12px 48px;
}

/* ─── Card ───────────────────────────────────────────────────── */
.qr-card {
  width: 100%;
  max-width: 720px;
  overflow: hidden;
  background:
    radial-gradient(420px 320px at 8% 6%, rgba(59, 130, 246, .18), transparent 55%),
    radial-gradient(360px 300px at 92% 94%, rgba(59, 130, 246, .10), transparent 55%),
    rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 20px 16px;
}

/* ─── Header ─────────────────────────────────────────────────── */
.qr-header {
  text-align: center;
  margin-bottom: 18px;
}
.qr-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.01em;
}
.qr-subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: rgba(255, 255, 255, .55);
}

/* ─── Field ──────────────────────────────────────────────────── */
.qr-field {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.qr-field:focus-within {
  border-color: rgba(59, 130, 246, .55);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
.qr-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, .55);
  margin-bottom: 8px;
}
.qr-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  padding: 0;
}
.qr-input::placeholder {
  color: rgba(255, 255, 255, .30);
  font-weight: 400;
}

/* ─── Options row ────────────────────────────────────────────── */
.qr-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.qr-opt {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 12px;
  padding: 10px 12px;
}
.qr-opt label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .10em;
  color: rgba(255, 255, 255, .50);
  margin-bottom: 6px;
}
.qr-select {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff88' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right center;
}
.qr-select option {
  background: #0b1220;
  color: #fff;
}

/* ─── Preview ────────────────────────────────────────────────── */
.qr-preview-wrap {
  display: flex;
  justify-content: center;
  padding: 20px 8px 24px;
}
.qr-preview {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .08);
  position: relative;
  transition: transform .2s ease;
  max-width: 100%;
}
.qr-preview svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 240px;
}
.qr-preview.is-empty {
  background: rgba(255, 255, 255, .02);
  border: 1.5px dashed rgba(255, 255, 255, .14);
  box-shadow: none;
  width: 100%;
  max-width: 272px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .35);
  font-size: 13px;
  text-align: center;
  padding: 20px;
}
.qr-preview.is-error {
  background: rgba(239, 68, 68, .06);
  border: 1.5px dashed rgba(239, 68, 68, .35);
  box-shadow: none;
  width: 100%;
  max-width: 272px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fca5a5;
  font-size: 13px;
  text-align: center;
  padding: 20px;
}

/* ─── Actions ────────────────────────────────────────────────── */
.qr-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.qr-btn {
  border: 1px solid rgba(59, 130, 246, .35);
  background: rgba(59, 130, 246, .12);
  color: #bfdbfe;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
}
.qr-btn:hover:not(:disabled) {
  background: rgba(59, 130, 246, .22);
  border-color: rgba(59, 130, 246, .55);
  color: #fff;
  transform: translateY(-1px);
}
.qr-btn:active:not(:disabled) {
  transform: translateY(0);
}
.qr-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.qr-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ─── Hint ───────────────────────────────────────────────────── */
.qr-hint {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, .40);
}

/* ─── Tablet+ ────────────────────────────────────────────────── */
@media (min-width: 520px) {
  .qr-wrap {
    padding: 20px 16px 72px;
  }
  .qr-card {
    border-radius: 24px;
    padding: 24px 22px;
  }
  .qr-title { font-size: 26px; }
  .qr-preview svg {
    max-width: 280px;
  }
}

@media (min-width: 768px) {
  .qr-wrap { padding: 24px 20px 100px; }
  .qr-card { border-radius: 28px; padding: 28px 26px; }
}
