/* ==========================================================================
   QR KING — Clean Blue & White Design System
   Light-first, premium, AdSense-ready — responsive, accessible
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700;14..32,800&family=Poppins:wght@700;800&display=swap');

/* ============================================================
   CSS DESIGN TOKENS — LIGHT (DEFAULT)
   ============================================================ */
:root {
  /* ---- Brand Colors ---- */
  --primary:           #1558d6;
  --primary-hover:     #1248b8;
  --primary-dark:      #0d3a8e;
  --primary-light:     #eff6ff;
  --primary-mid:       #3b82f6;

  --secondary:         #16a34a;
  --secondary-hover:   #15803d;
  --secondary-light:   #f0fdf4;

  /* ---- Backgrounds ---- */
  --bg-base:           #f7f9fc;
  --bg-surface:        #ffffff;
  --bg-card:           #ffffff;
  --bg-card-hover:     #f8fafc;
  --bg-glass:          rgba(255,255,255,0.97);
  --bg-input:          #f1f5f9;
  --bg-input-focus:    #eff6ff;
  --bg-muted:          #f1f5f9;
  --bg-alt:            #f8fafc;

  /* ---- Text ---- */
  --text-primary:      #0f172a;
  --text-secondary:    #475569;
  --text-subtle:       #94a3b8;
  --text-inverse:      #ffffff;

  /* ---- Borders ---- */
  --border-dim:        #e2e8f0;
  --border-mid:        #cbd5e1;
  --border-blue:       rgba(21,88,214,0.22);
  --border-green:      rgba(22,163,74,0.22);
  --border-aurora:     var(--border-blue);
  --border-glow:       var(--border-green);
  --border-main:       #e2e8f0;
  --border-medium:     #cbd5e1;

  /* ---- Gradients ---- */
  --grad-brand:        linear-gradient(135deg, #1558d6 0%, #3b82f6 100%);
  --grad-text:         linear-gradient(120deg, #0f172a 0%, #1558d6 100%);
  --grad-surface:      linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  --grad-hero-bg:      linear-gradient(150deg, #eef4ff 0%, #f0fdf4 50%, #f7f9fc 100%);
  --grad-aurora:       var(--grad-brand);
  --grad-aurora-r:     linear-gradient(135deg, #3b82f6 0%, #1558d6 100%);

  /* ---- Semantic Colors ---- */
  --success:           #16a34a;
  --success-bg:        #f0fdf4;
  --warning:           #d97706;
  --warning-bg:        #fffbeb;
  --error:             #dc2626;
  --error-bg:          #fef2f2;

  /* ---- Shadows ---- */
  --shadow-xs:         0 1px 3px rgba(15,23,42,0.06);
  --shadow-sm:         0 2px 8px rgba(15,23,42,0.07), 0 1px 3px rgba(15,23,42,0.04);
  --shadow-md:         0 6px 24px rgba(15,23,42,0.08), 0 2px 8px rgba(15,23,42,0.04);
  --shadow-lg:         0 20px 48px rgba(15,23,42,0.10), 0 4px 16px rgba(15,23,42,0.05);
  --shadow-blue:       0 4px 20px rgba(21,88,214,0.18);
  --shadow-card:       0 1px 4px rgba(15,23,42,0.07), 0 4px 16px rgba(15,23,42,0.05);
  --glow-cyan:         var(--shadow-blue);
  --glow-teal:         0 4px 20px rgba(22,163,74,0.15);
  --glow-card:         var(--shadow-card);

  /* ---- Typography ---- */
  --font-display:      'Poppins', 'Inter', system-ui, sans-serif;
  --font-body:         'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:         'JetBrains Mono', 'Fira Code', monospace;

  /* ---- Sizing ---- */
  --radius-xs:    5px;
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --radius-xl:    28px;
  --radius-full:  9999px;
  --container:    1260px;
  --nav-h:        68px;

  /* ---- Motion ---- */
  --ease-spring:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:        cubic-bezier(0.0, 0.0, 0.2, 1);
  --t-fast:          0.14s ease;
  --t-mid:           0.24s var(--ease-spring);
  --t-slow:          0.44s var(--ease-spring);
  --transition-fast: var(--t-fast);

  /* ---- Legacy Aliases (keep old JS/HTML classes working) ---- */
  --aurora-cyan:    var(--primary);
  --aurora-teal:    var(--secondary);
  --aurora-violet:  #7c3aed;
  --aurora-pink:    #ec4899;
  --aurora-mid:     var(--primary-mid);
  --accent-primary: var(--primary);
  --color-success:  var(--success);
  --color-error:    var(--error);
  --text-main:      var(--text-primary);
  --text-muted:     var(--text-subtle);
}

/* ---- Dark Theme Overrides ---- */
[data-theme="dark"] {
  --primary:           #4f8ef7;
  --primary-hover:     #6ba3fa;
  --primary-dark:      #93c5fd;
  --primary-light:     rgba(79,142,247,0.12);
  --primary-mid:       #60a5fa;

  --secondary:         #34d399;
  --secondary-hover:   #6ee7b7;
  --secondary-light:   rgba(52,211,153,0.10);

  --bg-base:           #0b1120;
  --bg-surface:        #111827;
  --bg-card:           rgba(255,255,255,0.05);
  --bg-card-hover:     rgba(255,255,255,0.09);
  --bg-glass:          rgba(17,24,39,0.93);
  --bg-input:          rgba(255,255,255,0.07);
  --bg-input-focus:    rgba(79,142,247,0.12);
  --bg-muted:          rgba(255,255,255,0.04);
  --bg-alt:            rgba(255,255,255,0.03);

  --text-primary:      #f1f5f9;
  --text-secondary:    #94a3b8;
  --text-subtle:       #475569;
  --text-inverse:      #0b1120;

  --border-dim:        rgba(255,255,255,0.08);
  --border-mid:        rgba(255,255,255,0.14);
  --border-blue:       rgba(79,142,247,0.30);
  --border-green:      rgba(52,211,153,0.25);
  --border-main:       rgba(255,255,255,0.08);
  --border-medium:     rgba(255,255,255,0.14);

  --grad-brand:        linear-gradient(135deg, #4f8ef7 0%, #60a5fa 100%);
  --grad-text:         linear-gradient(120deg, #f1f5f9 0%, #94a3b8 100%);
  --grad-surface:      linear-gradient(180deg, rgba(79,142,247,0.06) 0%, transparent 100%);
  --grad-hero-bg:      linear-gradient(150deg, rgba(79,142,247,0.10) 0%, rgba(52,211,153,0.05) 50%, transparent 100%);
  --grad-aurora:       linear-gradient(135deg, #4f8ef7 0%, #34d399 100%);
  --grad-aurora-r:     linear-gradient(135deg, #34d399 0%, #4f8ef7 100%);

  --success:           #34d399;
  --success-bg:        rgba(52,211,153,0.10);
  --warning:           #fbbf24;
  --warning-bg:        rgba(251,191,36,0.10);
  --error:             #f87171;
  --error-bg:          rgba(248,113,113,0.10);

  --shadow-xs:         0 1px 3px rgba(0,0,0,0.40);
  --shadow-sm:         0 2px 8px rgba(0,0,0,0.40);
  --shadow-md:         0 8px 24px rgba(0,0,0,0.50);
  --shadow-lg:         0 20px 48px rgba(0,0,0,0.60);
  --shadow-blue:       0 4px 20px rgba(79,142,247,0.22);
  --shadow-card:       0 0 0 1px rgba(255,255,255,0.07), 0 4px 16px rgba(0,0,0,0.40);

  --aurora-cyan:    var(--primary);
  --aurora-teal:    var(--secondary);
  --accent-primary: var(--primary);
  --color-success:  var(--success);
  --color-error:    var(--error);
  --text-main:      var(--text-primary);
  --text-muted:     var(--text-subtle);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  background-color: #ffffff;
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--t-mid), color var(--t-mid);
}

[data-theme="dark"] body,
[data-theme="dark"] {
  background-color: #0b1120;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
ul { list-style: none; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   SKIP LINK (ACCESSIBILITY)
   ============================================================ */
.skip-link {
  position: absolute;
  top: -120px;
  left: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: var(--text-inverse);
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 9999;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 1rem; }

/* ============================================================
   BACKGROUND — clean, no animation
   ============================================================ */
/* bg-canvas div is hidden — no animated background used */
.bg-canvas { display: none; }
.aurora-orb  { display: none; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
  background-color: #ffffff;
}

/* Alternating white / light-gray section backgrounds */
.section-gray {
  background-color: #f4f6f9;
}

[data-theme="dark"] .section {
  background-color: #111827;
}
[data-theme="dark"] .section-gray {
  background-color: #0e1729;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}

.section-eyebrow::before, .section-eyebrow::after {
  content: '';
  width: 24px;
  height: 1.5px;
  background: var(--primary);
  opacity: 0.4;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 1rem;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================================
   SCROLL-REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s var(--ease-spring), transform 0.55s var(--ease-spring);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal-children > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease-spring), transform 0.5s var(--ease-spring);
}
.reveal-children.is-visible > *:nth-child(1) { transition-delay: 0.04s; opacity: 1; transform: none; }
.reveal-children.is-visible > *:nth-child(2) { transition-delay: 0.10s; opacity: 1; transform: none; }
.reveal-children.is-visible > *:nth-child(3) { transition-delay: 0.16s; opacity: 1; transform: none; }
.reveal-children.is-visible > *:nth-child(4) { transition-delay: 0.22s; opacity: 1; transform: none; }
.reveal-children.is-visible > *:nth-child(5) { transition-delay: 0.28s; opacity: 1; transform: none; }
.reveal-children.is-visible > *:nth-child(6) { transition-delay: 0.34s; opacity: 1; transform: none; }

/* ============================================================
   CARD
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: border-color var(--t-mid), box-shadow var(--t-mid), transform var(--t-mid);
}

.card:hover {
  border-color: var(--border-blue);
  box-shadow: var(--shadow-blue), var(--shadow-card);
}

/* ============================================================
   STICKY NAVBAR
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-dim);
  transition: background var(--t-mid), border-color var(--t-mid), box-shadow var(--t-mid);
}
.header.scrolled {
  border-bottom-color: var(--border-blue);
  box-shadow: 0 4px 24px rgba(21,88,214,0.07);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--grad-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(21,88,214,0.30);
  flex-shrink: 0;
}
.brand-icon svg {
  width: 19px;
  height: 19px;
  fill: #ffffff;
}

.brand-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}
.nav-link {
  padding: 0.42rem 0.8rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Nav CTA Button */
.btn-nav-cta {
  padding: 0.5rem 1.2rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
  white-space: nowrap;
}
.btn-nav-cta:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 14px rgba(21,88,214,0.28);
  transform: translateY(-1px);
  color: #ffffff;
}
.btn-nav-cta:active { transform: translateY(0); }

/* Theme + Mobile toggle buttons */
.theme-toggle, .mobile-toggle {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-dim);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
}
.theme-toggle:hover, .mobile-toggle:hover {
  background: var(--primary-light);
  border-color: var(--border-blue);
  color: var(--primary);
}
.theme-toggle svg, .mobile-toggle svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}
.mobile-toggle { display: none; }

/* Theme icon visibility */
.icon-sun, .icon-moon { display: none; }
[data-theme="light"] .icon-moon { display: block; }
[data-theme="dark"]  .icon-sun  { display: block; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
  background-color: #f4f6f9; /* Light gray — distinct from white sections below */
}

[data-theme="dark"] .hero {
  background-color: #0e1729;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 4rem;
  align-items: center;
}

/* Hero Left */
.hero-left { max-width: 620px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 1rem 0.38rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(21,88,214,0.08);
  border: 1px solid var(--border-blue);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}
.hero-badge .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px rgba(21,88,214,0.5);
  animation: pulseDot 2.2s infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 4px rgba(21,88,214,0.4); }
  50%       { box-shadow: 0 0 12px rgba(21,88,214,0.7); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 1.4rem;
  color: var(--text-primary);
}
.hero-title .highlight {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2.2rem;
  max-width: 500px;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

/* Feature Pills */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.28rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-full);
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.pill:hover {
  border-color: var(--border-blue);
  color: var(--primary);
  background: var(--primary-light);
}
.pill svg { width: 12px; height: 12px; fill: var(--secondary); flex-shrink: 0; }

/* Hero Right — Floating QR Visual */
.hero-right {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-qr-frame {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-blue);
  box-shadow: var(--shadow-blue), var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: heroFloat 5s ease-in-out infinite alternate;
}

@keyframes heroFloat {
  0%   { transform: translateY(0px) rotate(-0.5deg); }
  100% { transform: translateY(-16px) rotate(0.5deg); }
}

/* Corner markers */
.hero-qr-frame::before, .hero-qr-frame::after {
  content: '';
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: var(--primary);
  border-style: solid;
}
.hero-qr-frame::before {
  top: 14px; left: 14px;
  border-width: 3px 0 0 3px;
  border-radius: 4px 0 0 0;
}
.hero-qr-frame::after {
  bottom: 14px; right: 14px;
  border-width: 0 3px 3px 0;
  border-radius: 0 0 4px 0;
}

/* Demo QR SVG */
.qr-demo-svg {
  width: 210px;
  height: 210px;
  opacity: 0.92;
}

/* Floating badges */
.hero-float-badge {
  position: absolute;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-blue);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.hero-float-badge svg { width: 13px; height: 13px; fill: var(--secondary); }
.fb-top    { top: -16px; right: -20px; animation: fbFloat1 4s ease-in-out infinite alternate; }
.fb-bottom { bottom: -16px; left: -20px; animation: fbFloat2 4.5s ease-in-out infinite alternate; }
@keyframes fbFloat1 { 0% { transform: translateY(0); } 100% { transform: translateY(-7px); } }
@keyframes fbFloat2 { 0% { transform: translateY(0); } 100% { transform: translateY(7px); } }

/* Glow ring */
.hero-glow-ring {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(21,88,214,0.08) 0%, transparent 70%);
  pointer-events: none;
  animation: ringPulse 3s ease-in-out infinite alternate;
}
@keyframes ringPulse {
  0%   { opacity: 0.5; transform: scale(0.9); }
  100% { opacity: 1;   transform: scale(1.05); }
}

/* Trust Bar */
.trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-dim);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 3.5rem;
}
.trust-item {
  background: var(--bg-surface);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: background var(--t-fast);
}
.trust-item:hover { background: var(--primary-light); }
.trust-value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.trust-label {
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-top: 0.3rem;
  font-weight: 500;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-body);
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--t-mid);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(21,88,214,0.20);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(21,88,214,0.30);
  color: #ffffff;
}
.btn-primary:active { transform: translateY(0); }

/* Green download / success button */
.btn-success, .btn-download {
  background: var(--secondary);
  color: #ffffff;
  border-color: var(--secondary);
  box-shadow: 0 2px 8px rgba(22,163,74,0.20);
}
.btn-success:hover, .btn-download:hover {
  background: var(--secondary-hover);
  border-color: var(--secondary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(22,163,74,0.28);
  color: #ffffff;
}

.btn-secondary {
  background: var(--bg-card);
  border-color: var(--border-mid);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-blue);
  color: var(--primary);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-mid);
  color: var(--text-secondary);
}
.btn-ghost:hover {
  color: var(--primary);
  border-color: var(--border-blue);
  background: var(--primary-light);
}

.btn-icon { width: 17px; height: 17px; fill: currentColor; flex-shrink: 0; }
.btn-lg { padding: 0.88rem 1.9rem; font-size: 1rem; border-radius: var(--radius-md); }

/* ============================================================
   GENERATOR SECTION
   ============================================================ */
.generator-section {
  padding: 1.5rem 0 5rem;
  background-color: #ffffff;
}

[data-theme="dark"] .generator-section {
  background-color: #111827;
}

.generator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 2rem;
  align-items: start;
}

.generator-grid > .card:first-child {
  min-width: 0;
  overflow: hidden;
}

/* QR Type Tabs */
.qr-types-container {
  overflow: visible;
  margin-bottom: 1.5rem;
  padding: 0.35rem;
  background: #f0f2f5;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-dim);
}
[data-theme="dark"] .qr-types-container {
  background: rgba(255,255,255,0.05);
  border-color: var(--border-dim);
}

.qr-types-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0;
  min-width: auto;
  border-bottom: none;
}

.qr-type-more-wrapper {
  position: relative;
  display: flex;
}

.qr-more-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  min-width: 180px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-dim);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 0.5rem;
  display: none;
  z-index: 100;
  list-style: none;
}
.qr-more-menu.show {
  display: block;
}
.qr-more-menu .menu-divider { margin: 0.5rem 0; padding: 0; }
.qr-more-menu .menu-divider hr { border: none; border-top: 1px solid var(--border-dim); margin: 0; }
.qr-more-menu li button { width: 100%; justify-content: flex-start; }


.qr-type-btn {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.44rem 0.9rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1.5px solid transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.qr-type-btn svg { width: 13px; height: 13px; fill: currentColor; }
.qr-type-btn:hover {
  color: var(--primary);
  background: #ffffff;
  border-color: var(--border-blue);
}
[data-theme="dark"] .qr-type-btn:hover {
  background: rgba(255,255,255,0.10);
}
.qr-type-btn.active {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(21,88,214,0.28);
  font-weight: 600;
}

/* ---- QR Studio card header row ---- */
.studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 0.75rem;
}
.studio-header h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex: 1;
  margin: 0;
}
.studio-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.studio-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1.5px solid var(--border-dim);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.studio-icon-btn:hover {
  background: var(--primary-light);
  border-color: var(--border-blue);
  color: var(--primary);
}
.studio-icon-btn svg { width: 16px; height: 16px; fill: currentColor; }

/* ---- Green Download Dropdown Button ---- */
.btn-download-dropdown {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  border-radius: var(--radius-sm);
  overflow: visible;
}
.btn-download-main {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-body);
  background: #16a34a;
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: background var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
}
.btn-download-main:hover { background: #15803d; box-shadow: 0 4px 14px rgba(22,163,74,0.30); }
.btn-download-main svg { width: 16px; height: 16px; fill: currentColor; }
.btn-download-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 0.65rem;
  background: #16a34a;
  color: #ffffff;
  border: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  cursor: pointer;
  transition: background var(--t-fast);
  font-size: 0.7rem;
}
.btn-download-arrow:hover { background: #15803d; }
.btn-download-arrow svg { width: 14px; height: 14px; fill: currentColor; }

/* Dropdown menu */
.download-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-dim);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 500;
  display: none;
  overflow: hidden;
}
.download-dropdown-menu.open { display: block; }
.download-dropdown-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
  text-align: left;
}
.download-dropdown-menu button:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.download-dropdown-menu button svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }
.download-dropdown-menu .menu-divider { height: 1px; background: var(--border-dim); margin: 0; }

/* Form Elements */
.form-group { margin-bottom: 1.4rem; }

.form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
  letter-spacing: 0.01em;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.72rem 1rem;
  background: var(--bg-input);
  border: 1.5px solid var(--border-dim);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  transition: all var(--t-fast);
}
.form-select option {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px rgba(21,88,214,0.10);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-subtle); }

.form-select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%231558d6'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-textarea { resize: vertical; min-height: 100px; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.form-hint { font-size: 0.78rem; color: var(--text-subtle); margin-top: 0.4rem; }

input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 0.4rem;
  cursor: pointer;
}

/* Customization Tabs */
.customization-section {
  margin-top: 2rem;
  border-top: 1.5px solid var(--border-dim);
  padding-top: 1.5rem;
}

.customization-tabs {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  border-bottom: 2px solid var(--border-dim);
}

.cust-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 0.25rem 0.75rem 0.25rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--t-fast);
}

.cust-tab-btn:hover {
  color: var(--primary);
}

.cust-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.customization-panels {
  position: relative;
}

.cust-panel {
  display: none;
}

.cust-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* Color Pickers & Range Sliders */
.color-picker-wrapper { display: flex; align-items: center; gap: 0.75rem; }
.color-picker {
  -webkit-appearance: none;
  appearance: none;
  width: 44px; height: 44px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
}
.color-picker::-webkit-color-swatch-wrapper { padding: 0; }
.color-picker::-webkit-color-swatch { border: 1.5px solid var(--border-mid); border-radius: var(--radius-xs); }
.color-picker::-moz-color-swatch { border: 1.5px solid var(--border-mid); border-radius: var(--radius-xs); }

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: var(--bg-input-focus);
  border: 1px solid var(--border-dim);
  border-radius: 0;
  outline: none;
  opacity: 0.85;
  transition: opacity var(--t-fast);
  cursor: pointer;
}
.range-slider:hover {
  opacity: 1;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 24px;
  background: var(--primary);
  border-radius: 0;
  cursor: ew-resize;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.range-slider::-moz-range-thumb {
  width: 18px;
  height: 24px;
  background: var(--primary);
  border-radius: 0;
  cursor: ew-resize;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Live Preview Sidebar */
.preview-card {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preview-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 1rem;
  width: 100%;
  text-align: left;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.preview-box {
  width: 100%;
  flex: 1 1 auto;
  min-height: 180px;
  max-height: 420px;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.preview-box canvas, .preview-box svg { max-width: 100%; height: auto !important; }

.export-actions { width: 100%; display: flex; flex-direction: column; gap: 0.7rem; }
.export-group { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }

/* Warning badge */
.warning-badge {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--warning-bg);
  border: 1px solid rgba(217,119,6,0.25);
  color: var(--warning);
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 1rem;
  text-align: left;
  width: 100%;
}
.warning-badge svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }

/* ============================================================
   HOW-TO STEPS
   ============================================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.step-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 2rem 1.75rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-mid), border-color var(--t-mid), box-shadow var(--t-mid);
}
.step-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-mid);
}
.step-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-blue);
  box-shadow: var(--shadow-md);
}
.step-card:hover::before { transform: scaleX(1); }

.step-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  border: 1.5px solid var(--border-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.step-icon svg { width: 22px; height: 22px; fill: var(--primary); }

.step-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}
.step-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.55rem;
  color: var(--text-primary);
}
.step-desc { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.7; }

/* ============================================================
   FEATURES SHOWCASE
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: border-color var(--t-mid), box-shadow var(--t-mid), transform var(--t-mid);
}
.feature-card:hover {
  border-color: var(--border-blue);
  box-shadow: var(--shadow-blue);
  transform: translateY(-4px);
}

.feature-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.fi-cyan   { background: var(--primary-light);                     border: 1.5px solid var(--border-blue); }
.fi-teal   { background: var(--secondary-light);                   border: 1.5px solid var(--border-green); }
.fi-violet { background: rgba(124,58,237,0.08);  border: 1.5px solid rgba(124,58,237,0.20); }
.fi-pink   { background: rgba(236,72,153,0.08);  border: 1.5px solid rgba(236,72,153,0.20); }

.feature-icon svg { width: 21px; height: 21px; }
.fi-cyan   svg { fill: var(--primary); }
.fi-teal   svg { fill: var(--secondary); }
.fi-violet svg { fill: #7c3aed; }
.fi-pink   svg { fill: #ec4899; }

.feature-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.45rem;
  color: var(--text-primary);
}
.feature-desc { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.65; }

/* ============================================================
   USE CASES GRID
   ============================================================ */
.usecases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
}

.usecase-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: border-color var(--t-mid), transform var(--t-mid), box-shadow var(--t-mid);
  cursor: default;
}
.usecase-card:hover {
  border-color: var(--border-blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}
.usecase-emoji {
  font-size: 1.7rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.usecase-info h3 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.28rem;
}
.usecase-info p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.55; }

/* ============================================================
   FAQ SECTION
   ============================================================ */
.faq-list { max-width: 800px; margin: 0 auto; }

.faq-item { border-bottom: 1.5px solid var(--border-dim); }
.faq-item:last-child { border-bottom: none; }

.faq-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  text-align: left;
  gap: 1rem;
  transition: color var(--t-fast);
}
.faq-button:hover { color: var(--primary); }
.faq-button svg {
  width: 20px; height: 20px; fill: currentColor;
  transition: transform var(--t-mid);
  flex-shrink: 0;
  color: var(--text-subtle);
}
.faq-button[aria-expanded="true"] svg { transform: rotate(180deg); color: var(--primary); }
.faq-button[aria-expanded="true"] { color: var(--primary); }

.faq-content {
  padding-bottom: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  display: none;
  line-height: 1.75;
}
.faq-button[aria-expanded="true"] + .faq-content { display: block; }

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.about-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}
.stat-item {
  background: var(--bg-card);
  border: 1.5px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 1.75rem 1rem;
  text-align: center;
  transition: border-color var(--t-mid), box-shadow var(--t-mid);
}
.stat-item:hover {
  border-color: var(--border-blue);
  box-shadow: var(--shadow-blue);
}
.stat-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-label { font-size: 0.8rem; color: var(--text-subtle); margin-top: 0.4rem; font-weight: 500; }

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-container { max-width: 580px; margin: 0 auto; }

/* ============================================================
   LEGAL SECTION
   ============================================================ */
.legal-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.legal-tab-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1.5px solid var(--border-dim);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--t-fast);
}
.legal-tab-btn:hover { border-color: var(--border-blue); color: var(--primary); }
.legal-tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(21,88,214,0.22);
}

.legal-panel {
  display: none;
  background: var(--bg-card);
  border: 1.5px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.legal-panel.active { display: block; }
.legal-panel h3 { font-size: 1.15rem; font-weight: 700; margin: 1.8rem 0 0.5rem; color: var(--text-primary); }
.legal-panel h3:first-child { margin-top: 0; }
.legal-panel p, .legal-panel ul { color: var(--text-secondary); font-size: 0.9375rem; margin-bottom: 1rem; line-height: 1.75; }
.legal-panel ul { padding-left: 1.5rem; list-style: disc; }
.legal-panel ul li { margin-bottom: 0.5rem; }
.legal-panel a { color: var(--primary); text-decoration: underline; text-decoration-color: rgba(21,88,214,0.35); }
.legal-panel a:hover { text-decoration-color: var(--primary); }
.legal-panel code {
  background: var(--bg-input);
  border: 1px solid var(--border-dim);
  padding: 0.1em 0.45em;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--primary);
}

/* ============================================================
   ADSENSE PLACEHOLDERS
   ============================================================ */
.ad-slot-wrapper { margin: 3rem 0; }
.ad-placeholder {
  width: 100%;
  min-height: 90px;
  background: var(--bg-muted);
  border: 1.5px dashed var(--border-mid);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
}
.ad-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  margin-bottom: 0.3rem;
  font-weight: 600;
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-blue);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.4rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg), var(--shadow-blue);
  z-index: 9998;
  opacity: 0;
  transition: all var(--t-mid);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast svg { width: 20px; height: 20px; fill: var(--secondary); flex-shrink: 0; }

/* ============================================================
   BACK-TO-TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md), 0 0 16px rgba(21,88,214,0.28);
  z-index: 990;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity var(--t-mid), transform var(--t-mid), box-shadow var(--t-fast);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-lg), 0 0 28px rgba(21,88,214,0.40);
}
.back-to-top svg { width: 19px; height: 19px; fill: currentColor; }

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9995;
  padding: 1rem 1.5rem;
  background: var(--bg-surface);
  border-top: 1.5px solid var(--border-dim);
  box-shadow: 0 -4px 24px rgba(15,23,42,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  transform: translateY(100%);
  transition: transform 0.4s var(--ease-spring);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-text { font-size: 0.875rem; color: var(--text-secondary); max-width: 680px; }
.cookie-text a { color: var(--primary); text-decoration: underline; }
.cookie-actions { display: flex; gap: 0.75rem; flex-shrink: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border-dim);
  background-color: #f4f6f9;
  padding: 4rem 0 2rem;
  margin-top: auto;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-brand);
  opacity: 0.7;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 0.85rem;
  max-width: 280px;
  line-height: 1.65;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.55rem; }
.footer-col a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color var(--t-fast);
}
.footer-col a:hover { color: var(--primary); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1.5px solid var(--border-dim);
  color: var(--text-subtle);
  font-size: 0.8rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  border: 1px solid var(--border-blue);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 600;
}

/* ============================================================
   MODE TOGGLE (UPI / Payment Segmented Control)
   ============================================================ */
.mode-toggle {
  display: flex;
  gap: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--border-mid);
  background: var(--bg-input);
}

.mode-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.62rem 0.75rem;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  transition: all var(--t-fast);
  border-right: 1.5px solid var(--border-mid);
}

.mode-option:last-child { border-right: none; }
.mode-option input[type="radio"] { display: none; }

.mode-option.active {
  background: var(--primary);
  color: #ffffff;
}

.mode-option:not(.active):hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* Account match validation */
.match-success { color: var(--success) !important; font-weight: 600; }
.match-error   { color: var(--error) !important;   font-weight: 600; }

/* Tab divider */
.tab-divider {
  width: 1px;
  min-height: 22px;
  background: var(--border-mid);
  align-self: center;
  margin: 0 0.2rem;
  flex-shrink: 0;
}

/* ============================================================
   BULK QR GRID
   ============================================================ */
.bulk-qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  width: 100%;
  max-height: 600px;
  overflow-y: auto;
  padding: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-mid) transparent;
}

.bulk-qr-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-dim);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.bulk-qr-card:hover {
  border-color: var(--border-blue);
  box-shadow: var(--shadow-blue);
}

.bulk-qr-render {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-dim);
  overflow: hidden;
}

.bulk-qr-render canvas,
.bulk-qr-render svg {
  max-width: 100% !important;
  max-height: 100% !important;
  height: auto !important;
  width: auto !important;
}

.bulk-qr-label {
  font-size: 0.75rem;
  color: var(--text-subtle);
  text-align: center;
  word-break: break-all;
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bulk-dl-btn {
  width: 100%;
  padding: 0.4rem 0.6rem !important;
  font-size: 0.75rem !important;
  gap: 0.3rem !important;
}
.bulk-dl-btn .btn-icon { width: 13px; height: 13px; }

/* ============================================================
   RESPONSIVE — MEDIA QUERIES
   ============================================================ */

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

/* Large tablet / small desktop */
@media (max-width: 1024px) {
  .preview-card { position: static; }
  .preview-card { position: static; }
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }
  .hero-left { max-width: 100%; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-cta-row { justify-content: center; }
  .hero-pills { justify-content: center; }
  .hero-right { order: -1; }
  .trust-bar { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    border-bottom: 1.5px solid var(--border-dim);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.25rem 1.25rem;
    gap: 0.2rem;
    box-shadow: var(--shadow-md);
    z-index: 999;
  }
  .nav-links.active { display: flex; }
  .nav-link { padding: 0.6rem 0.75rem; width: 100%; }
  .mobile-toggle { display: flex; }

  /* Hide nav CTA on small screens — show in mobile menu instead */
  .btn-nav-cta { display: none; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero-title { font-size: 2.4rem; }
  .hero-qr-frame { width: 240px; height: 240px; }
  .qr-demo-svg { width: 170px; height: 170px; }
  .section { padding: 3.5rem 0; }
  .card { padding: 1.5rem; }
  .about-stats { gap: 1rem; }
  .stat-number { font-size: 1.8rem; }
  .cookie-banner { flex-direction: column; align-items: flex-start; }
  .trust-bar { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 480px) {
  :root { --nav-h: 62px; }
  .footer-grid { grid-template-columns: 1fr; }
  .export-group { grid-template-columns: 1fr; }
  .trust-bar { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 2rem; letter-spacing: -0.03em; }
  .hero-badge { font-size: 0.74rem; }
  .hero-qr-frame { width: 200px; height: 200px; }
  .qr-demo-svg { width: 142px; height: 142px; }
  .fb-top, .fb-bottom { display: none; }
  .section-title { font-size: 1.65rem; }
  .about-stats { grid-template-columns: repeat(3, 1fr); }
  .legal-panel { padding: 1.4rem; }
  .cookie-actions { width: 100%; flex-direction: column; }
  .cookie-actions .btn { width: 100%; justify-content: center; }
  .hero-cta-row .btn-lg { padding: 0.78rem 1.5rem; font-size: 0.9375rem; }
}

/* Tiny screens */
@media (max-width: 360px) {
  .hero-title { font-size: 1.75rem; }
  .hero-cta-row { flex-direction: column; width: 100%; }
  .hero-cta-row .btn { width: 100%; justify-content: center; }
  .about-stats { grid-template-columns: 1fr 1fr; }
}

/* Bulk QR mobile */
@media (max-width: 768px) {
  .bulk-qr-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
  }
  .mode-toggle { flex-direction: column; }
  .mode-option { border-right: none; border-bottom: 1.5px solid var(--border-mid); }
  .mode-option:last-child { border-bottom: none; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .reveal-children > * { opacity: 1; transform: none; }
  .hero-qr-frame { animation: none; }
  .hero-float-badge { animation: none; }
  .hero-glow-ring { animation: none; }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  body { background: #fff !important; color: #000 !important; }
  .header, .hero, .qr-types-container, .customization-section,
  .ad-slot-wrapper, .section, .footer, .export-actions,
  .back-to-top, .toast, .cookie-banner {
    display: none !important;
  }
  .generator-grid { display: block; }
  .preview-box { box-shadow: none !important; border: 1px solid #ccc !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ============================================================
   USER OVERRIDES
   ============================================================ */
/* Remove ALL rounded corners */
* {
  border-radius: 0 !important;
}

/* Distinct Colors for Export Buttons */
#btn-download-png {
  background: #16a34a; /* Green */
}
#btn-download-png:hover {
  background: #15803d;
  box-shadow: 0 4px 14px rgba(22,163,74,0.30);
}

#btn-download-svg {
  background: #2563eb; /* Blue */
}
#btn-download-svg:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 14px rgba(37,99,235,0.30);
}

#btn-print-qr {
  background: #475569; /* Slate Gray */
}
#btn-print-qr:hover {
  background: #334155;
  box-shadow: 0 4px 14px rgba(71,85,105,0.30);
}

/* Beautiful File Input Styles */
input[type="file"].form-input {
  padding: 0.35rem 0.35rem;
  display: flex;
  align-items: center;
}
input[type="file"].form-input::file-selector-button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.45rem 1rem;
  margin-right: 1rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background var(--t-fast);
  border-radius: 0 !important;
}
input[type="file"].form-input::file-selector-button:hover {
  background: #1d4ed8;
}

/* ============================================================
   BLOG ARTICLE STYLES
   ============================================================ */
.blog-hero {
  padding: 5rem 1.5rem 3rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-dim);
  text-align: center;
}
.blog-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  color: var(--text-primary);
  max-width: 900px;
  margin: 0 auto 1.5rem;
  line-height: 1.15;
}
.blog-hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.blog-hero-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}
.blog-hero-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50% !important;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}
.blog-hero-date {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.blog-hero-date::before {
  content: '•';
  color: var(--border-mid);
  margin-right: 0.4rem;
}
.blog-article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}
.blog-article-body h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
  line-height: 1.3;
}
.blog-article-body h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 0.8rem;
}
.blog-article-body p { margin-bottom: 1.5rem; }
.blog-article-body a { color: var(--primary); text-decoration: underline; text-decoration-color: rgba(21,88,214,0.3); }
.blog-article-body a:hover { text-decoration-color: var(--primary); }
.blog-article-body ul, .blog-article-body ol { margin: 0 0 1.5rem 2rem; }
.blog-article-body li { margin-bottom: 0.5rem; }

