/* ============================================================
   UPI QR Generator — style.css
   Design system: Warm Indigo × Saffron | DM Serif + DM Sans
   ============================================================ */

/* ── 1. Design Tokens ─────────────────────────────────────── */
:root {
  /* Palette — Light */
  --bg:           #f5f3ef;
  --bg-card:      #ffffff;
  --bg-input:     #faf9f7;
  --bg-orb-1:     #e8e0ff;
  --bg-orb-2:     #fde8cb;
  --bg-orb-3:     #d4eaff;

  --ink-primary:  #1a1523;
  --ink-secondary:#5a5369;
  --ink-muted:    #9b94a8;
  --ink-placeholder: #b8b2c3;

  --accent:       #f5761a;      /* saffron */
  --accent-hover: #e06310;
  --accent-light: #fff3e8;
  --accent-glow:  rgba(245, 118, 26, 0.18);

  --indigo:       #3d2b8e;      /* deep indigo */
  --indigo-light: #ede9ff;
  --indigo-hover: #2f1f72;

  --success:      #19a974;
  --error:        #e53935;
  --error-bg:     #fff5f5;

  --border:       #e6e1f0;
  --border-focus: #3d2b8e;
  --shadow-card:  0 2px 3px rgba(26, 21, 35, 0.04),
                  0 8px 24px rgba(26, 21, 35, 0.08),
                  0 24px 48px rgba(26, 21, 35, 0.06);
  --shadow-btn:   0 4px 16px rgba(245, 118, 26, 0.30);
  --shadow-qr:    0 8px 32px rgba(61, 43, 142, 0.14);

  --radius:       20px;
  --radius-sm:    12px;
  --radius-xs:    8px;

  --transition:   180ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode */
[data-theme="dark"] {
  --bg:           #0f0d14;
  --bg-card:      #1c1828;
  --bg-input:     #241f35;
  --bg-orb-1:     #1e1540;
  --bg-orb-2:     #2a1806;
  --bg-orb-3:     #0d1a2a;

  --ink-primary:  #f0ecf8;
  --ink-secondary:#b0a8c8;
  --ink-muted:    #7a7090;
  --ink-placeholder: #554e6a;

  --accent-light: #2a1a06;
  --indigo-light: #1e1540;
  --border:       #2e2840;
  --border-focus: #7c6fe0;

  --shadow-card:  0 2px 3px rgba(0,0,0,0.3),
                  0 8px 32px rgba(0,0,0,0.4);
  --shadow-btn:   0 4px 20px rgba(245, 118, 26, 0.4);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  background: var(--bg);
  color: var(--ink-primary);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition-slow), color var(--transition-slow);
}

/* ── 3. Ambient Background Orbs ───────────────────────────── */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  transition: background var(--transition-slow);
}
.orb-1 {
  width: clamp(280px, 40vw, 500px);
  height: clamp(280px, 40vw, 500px);
  background: var(--bg-orb-1);
  top: -10%;
  left: -8%;
  opacity: 0.7;
  animation: floatOrb 14s ease-in-out infinite;
}
.orb-2 {
  width: clamp(200px, 30vw, 400px);
  height: clamp(200px, 30vw, 400px);
  background: var(--bg-orb-2);
  top: 30%;
  right: -10%;
  opacity: 0.6;
  animation: floatOrb 18s ease-in-out infinite reverse;
}
.orb-3 {
  width: clamp(160px, 25vw, 350px);
  height: clamp(160px, 25vw, 350px);
  background: var(--bg-orb-3);
  bottom: 5%;
  left: 20%;
  opacity: 0.5;
  animation: floatOrb 22s ease-in-out infinite;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(20px, -20px) scale(1.04); }
  66%       { transform: translate(-15px, 15px) scale(0.97); }
}

/* ── 4a. Top Navigation Bar ────────────────────────────────── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  width: 100%;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(26, 21, 35, 0.06);
  transition: background var(--transition-slow), border-color var(--transition-slow);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Brand */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-brand-icon {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--indigo), #7c5de8);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}
.nav-brand-text {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  color: var(--ink-primary);
  letter-spacing: -0.02em;
  line-height: 1;
}
.nav-brand-text em {
  font-style: italic;
  color: var(--accent);
}

/* Nav links list */
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

.nav-item { position: relative; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-xs);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-secondary);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover,
.nav-link:focus-visible {
  color: var(--ink-primary);
  background: var(--bg-input);
  outline: none;
}
.nav-link--active {
  color: var(--indigo);
  background: var(--indigo-light);
  font-weight: 600;
}
[data-theme="dark"] .nav-link--active { color: #9d8cf5; }

/* Dropdown trigger chevron */
.dropdown-chevron {
  transition: transform var(--transition);
  flex-shrink: 0;
}
.nav-item--dropdown:hover .dropdown-chevron,
.nav-item--dropdown:focus-within .dropdown-chevron {
  transform: rotate(180deg);
}

/* Dropdown panel */
.nav-dropdown {
  list-style: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(26, 21, 35, 0.14);
  padding: 0.4rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  pointer-events: none;
  z-index: 300;
}
/* Show on hover and keyboard focus-within */
.nav-item--dropdown:hover .nav-dropdown,
.nav-item--dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ink-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.dropdown-item:hover {
  background: var(--bg-input);
  color: var(--ink-primary);
}
.dd-icon { font-size: 0.9em; }

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.35rem 0;
}

/* Right side actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
  flex-shrink: 0;
}

/* Hamburger (mobile only) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  background: transparent;
  cursor: pointer;
  padding: 4px;
  transition: background var(--transition), border-color var(--transition);
}
.hamburger:hover { background: var(--bg-input); }
.ham-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink-secondary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
/* Hamburger → X animation */
.hamburger.is-open .ham-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.is-open .ham-bar:nth-child(2) { opacity: 0; }
.hamburger.is-open .ham-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav drawer */
@media (max-width: 600px) {
  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem 1rem;
    gap: 0.15rem;
    box-shadow: 0 8px 24px rgba(26,21,35,0.1);
    z-index: 199;
  }
  .nav-links.is-open { display: flex; }

  .nav-item--dropdown .nav-dropdown {
    position: static;
    box-shadow: none;
    border: none;
    border-top: 1px solid var(--border);
    border-radius: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: all;
    display: none;
    padding: 0.25rem 0;
    margin-top: 0.25rem;
  }
  .nav-item--dropdown.mobile-dd-open .nav-dropdown { display: block; }
  .nav-item--dropdown.mobile-dd-open .dropdown-chevron { transform: rotate(180deg); }
}

/* ── 4. Theme Toggle (inside nav) ──────────────────────────── */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform var(--transition), background var(--transition),
              border-color var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover {
  transform: rotate(20deg) scale(1.1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* ── 5. App Wrapper ────────────────────────────────────────── */
.app-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: clamp(1.5rem, 5vw, 3rem) 1rem clamp(2rem, 5vw, 4rem);
  animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 6. Header ─────────────────────────────────────────────── */
.app-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.logo-mark {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--indigo), #7c5de8);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 20px rgba(61, 43, 142, 0.3);
  animation: spinIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both 0.1s;
}

@keyframes spinIn {
  from { opacity: 0; transform: rotate(-15deg) scale(0.8); }
  to   { opacity: 1; transform: rotate(0) scale(1); }
}

.app-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 6vw, 2.6rem);
  font-weight: 400;
  color: var(--ink-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.app-title em {
  font-style: italic;
  color: var(--accent);
}

.app-subtitle {
  font-size: 0.9rem;
  color: var(--ink-muted);
  font-weight: 300;
  letter-spacing: 0.01em;
}

/* ── 7. Card ───────────────────────────────────────────────── */
.card {
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: background var(--transition-slow), border-color var(--transition-slow);
  animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both 0.1s;
}

/* ── 8. Form Section ───────────────────────────────────────── */
.form-section {
  padding: clamp(1.5rem, 5vw, 2rem) clamp(1.25rem, 5vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: -0.25rem;
}

/* ── 9. Field Groups ───────────────────────────────────────── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.label-icon { font-size: 0.85em; }
.label-note {
  font-weight: 300;
  color: var(--ink-muted);
  font-size: 0.8em;
}

.field-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink-primary);
  outline: none;
  transition: border-color var(--transition), background var(--transition),
              box-shadow var(--transition);
  -webkit-appearance: none;
}
.field-input::placeholder { color: var(--ink-placeholder); }
.field-input:hover { border-color: var(--ink-muted); }
.field-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--indigo-light);
}
.field-input.error-state {
  border-color: var(--error);
  background: var(--error-bg);
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.12);
}

/* Hide number spinners */
.field-input[type="number"]::-webkit-inner-spin-button,
.field-input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }
.field-input[type="number"] { -moz-appearance: textfield; }

.field-error {
  font-size: 0.78rem;
  color: var(--error);
  min-height: 1.1em;
  display: block;
  font-weight: 500;
  padding-left: 0.25rem;
}

/* UPI input + Copy button */
.input-with-action {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.input-with-action .field-input { flex: 1; }

.copy-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0 0.9rem;
  background: var(--indigo-light);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--indigo);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  flex-shrink: 0;
}
.copy-btn:hover {
  background: var(--indigo);
  color: #fff;
  border-color: var(--indigo);
}
.copy-btn.copied {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

/* Amount input */
.amount-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.currency-symbol {
  position: absolute;
  left: 1rem;
  font-size: 0.95rem;
  color: var(--ink-muted);
  font-weight: 500;
  pointer-events: none;
  z-index: 1;
}
.amount-input { padding-left: 2rem; }

/* Live preview toggle */
.live-preview-toggle {
  display: flex;
  align-items: center;
  margin-top: -0.25rem;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  user-select: none;
}
.toggle-checkbox { display: none; }

.toggle-track {
  width: 40px;
  height: 22px;
  background: var(--border);
  border-radius: 100px;
  position: relative;
  transition: background var(--transition);
  flex-shrink: 0;
}
.toggle-thumb {
  position: absolute;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform var(--transition);
}
.toggle-checkbox:checked + .toggle-track { background: var(--indigo); }
.toggle-checkbox:checked + .toggle-track .toggle-thumb { transform: translateX(18px); }

.toggle-text {
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-weight: 400;
}

/* ── 10. Buttons ───────────────────────────────────────────── */
.btn-row {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-xs);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn:active { transform: scale(0.97); }

/* Primary */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ff9a40);
  color: #fff;
  box-shadow: var(--shadow-btn);
  flex: 1;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent));
  box-shadow: 0 6px 24px rgba(245, 118, 26, 0.40);
  transform: translateY(-1px);
}

/* Ghost */
.btn-ghost {
  background: var(--bg-input);
  color: var(--ink-secondary);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-card);
  border-color: var(--ink-muted);
  color: var(--ink-primary);
}

/* Download */
.btn-download {
  background: linear-gradient(135deg, var(--indigo), #6b4fd8);
  color: #fff;
  box-shadow: 0 4px 16px rgba(61, 43, 142, 0.30);
  flex: 1;
  padding: 0.8rem 1.4rem;
}
.btn-download:hover {
  background: linear-gradient(135deg, var(--indigo-hover), var(--indigo));
  box-shadow: 0 6px 24px rgba(61, 43, 142, 0.40);
  transform: translateY(-1px);
}

/* Small variant */
.btn-sm { padding: 0.6rem 1rem; font-size: 0.82rem; }

/* ── 11. Divider ───────────────────────────────────────────── */
.card-divider {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 clamp(1.25rem, 5vw, 2rem);
}
.divider-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
}

/* ── 12. Result Section ────────────────────────────────────── */
.result-section {
  padding: clamp(1.5rem, 5vw, 2rem) clamp(1.25rem, 5vw, 2rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  min-height: 200px;
  justify-content: center;
}

/* Placeholder */
.placeholder-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0;
  animation: fadeIn 0.3s ease;
}
.placeholder-qr {
  color: var(--ink-muted);
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.04); }
}
.placeholder-text {
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-align: center;
  max-width: 220px;
  line-height: 1.5;
}

/* QR Output */
.qr-output {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: fadeUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* QR Frame */
.qr-frame {
  position: relative;
  padding: 1.25rem;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-qr);
  display: inline-flex;
  transition: box-shadow var(--transition);
}
.qr-frame:hover {
  box-shadow: 0 12px 48px rgba(61, 43, 142, 0.20);
  transform: translateY(-2px);
  transition: all var(--transition-slow);
}

/* Corner accent marks */
.qr-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--accent);
  border-style: solid;
  border-radius: 3px;
}
.qr-corner--tl { top: 6px; left: 6px; border-width: 2.5px 0 0 2.5px; }
.qr-corner--tr { top: 6px; right: 6px; border-width: 2.5px 2.5px 0 0; }
.qr-corner--bl { bottom: 6px; left: 6px; border-width: 0 0 2.5px 2.5px; }
.qr-corner--br { bottom: 6px; right: 6px; border-width: 0 2.5px 2.5px 0; }

/* QR Info Card */
.qr-info-card {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  overflow: hidden;
}
.qr-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.qr-info-row:last-child { border-bottom: none; }
.qr-info-row:hover { background: var(--bg-card); }

.info-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.info-value {
  font-size: 0.88rem;
  color: var(--ink-primary);
  text-align: right;
  word-break: break-all;
  font-weight: 500;
}
.info-value.mono {
  font-variant-numeric: tabular-nums;
  font-size: 0.83rem;
  color: var(--indigo);
}
[data-theme="dark"] .info-value.mono { color: #9d8cf5; }

.info-value.highlight {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: 'DM Serif Display', serif;
}

/* Download row */
.download-row {
  display: flex;
  gap: 0.65rem;
  width: 100%;
}

/* ── 13. Footer ────────────────────────────────────────────── */
.app-footer {
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.78rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.footer-note { opacity: 0.7; }

/* ── 14. Toast ──────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--ink-primary);
  color: #fff;
  padding: 0.65rem 1.25rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.3s ease;
  opacity: 0;
  white-space: nowrap;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ── 15. Utility ────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* QRcode.js canvas override — hide duplicate <img>, show only <canvas> */
#qrCanvas canvas { display: block !important; border-radius: 4px; }
#qrCanvas img    { display: none  !important; }

/* ── About Section ─────────────────────────────────────────── */
.about-section {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding-top: 0.5rem;
  animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both 0.15s;
}

.about-heading {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 400;
  color: var(--ink-primary);
  text-align: center;
  letter-spacing: -0.02em;
}
.about-heading em { font-style: italic; color: var(--accent); }

.about-lead {
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-secondary);
  line-height: 1.7;
  margin-top: -1rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: box-shadow var(--transition), transform var(--transition);
}
.about-card:hover {
  box-shadow: 0 4px 20px rgba(61, 43, 142, 0.1);
  transform: translateY(-2px);
}
.about-card-icon { font-size: 1.4rem; }
.about-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-primary);
}
.about-card p {
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.about-steps {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.25rem 1.4rem;
}
.steps-heading {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--ink-secondary);
  line-height: 1.55;
}
.step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--indigo), #7c5de8);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 1px;
}
.steps-list code {
  font-family: monospace;
  font-size: 0.82em;
  background: var(--indigo-light);
  color: var(--indigo);
  padding: 1px 5px;
  border-radius: 4px;
}
[data-theme="dark"] .steps-list code { color: #9d8cf5; }

/* ── 16. Responsive ─────────────────────────────────────────── */
@media (max-width: 400px) {
  .btn-row { flex-direction: column; }
  .btn-primary { flex: unset; }
  .copy-btn { padding: 0 0.65rem; }
}

@media (min-width: 640px) {
  .app-wrapper { padding: 3rem 1.5rem 4rem; }
}

/* ── 17. Reduced Motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
