/* =============================================
   QR Pay Editor — Premium CSS Design System
   ============================================= */

:root {
  --bg-base: #0a0b14;
  --bg-card: rgba(255, 255, 255, 0.035);
  --bg-card-hover: rgba(255, 255, 255, 0.055);
  --bg-input: rgba(255, 255, 255, 0.06);
  --bg-input-focus: rgba(255, 255, 255, 0.09);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(139, 92, 246, 0.6);
  --border-card: rgba(255, 255, 255, 0.07);

  --text-primary: #f0f0ff;
  --text-secondary: #9094b8;
  --text-muted: #5a5e7a;
  --text-accent: #a78bfa;

  --accent-primary: #7c3aed;
  --accent-secondary: #6d28d9;
  --accent-glow: rgba(124, 58, 237, 0.4);
  --accent-pink: #ec4899;
  --accent-cyan: #06b6d4;

  --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #5b21b6 100%);
  --gradient-hero: linear-gradient(135deg, #a855f7 0%, #7c3aed 35%, #4f46e5 70%, #06b6d4 100%);
  --gradient-card-border: linear-gradient(135deg, rgba(167, 139, 250, 0.25) 0%, rgba(124, 58, 237, 0.1) 50%, rgba(6, 182, 212, 0.15) 100%);

  --orb-1: rgba(124, 58, 237, 0.18);
  --orb-2: rgba(6, 182, 212, 0.12);
  --orb-3: rgba(236, 72, 153, 0.1);

  --success: #10b981;
  --error: #f87171;
  --warning: #fbbf24;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-card: 0 4px 40px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  --shadow-btn: 0 4px 20px rgba(124, 58, 237, 0.45);
  --shadow-glow: 0 0 60px rgba(124, 58, 237, 0.3);

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* === BACKGROUND ORBS === */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: var(--orb-1);
  top: -200px;
  right: -100px;
  animation: floatOrb 20s ease-in-out infinite;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: var(--orb-2);
  bottom: 20%;
  left: -150px;
  animation: floatOrb 25s ease-in-out infinite reverse;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: var(--orb-3);
  bottom: 10%;
  right: 10%;
  animation: floatOrb 18s ease-in-out infinite 5s;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* === HEADER === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(10, 11, 20, 0.8);
}

.header-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.5);
  flex-shrink: 0;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
  color: white;
}

.logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-accent {
  color: var(--text-accent);
}

.header-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--success);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 10px;
  border-radius: 100px;
}

/* === HERO === */
.hero {
  position: relative;
  z-index: 1;
  padding: 120px 24px 48px;
  text-align: center;
}

.hero-content {
  max-width: 600px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-accent);
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.3);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.tag-dot {
  width: 6px;
  height: 6px;
  background: var(--text-accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.gradient-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 4s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto;
}

/* === MAIN CONTAINER === */
.main-container {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* === CARDS === */
.card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-card);
  padding: 32px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: var(--transition-slow);
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-card-border);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
  pointer-events: none;
}

.card.card-disabled {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(0.3);
}

.card.card-active {
  opacity: 1;
  pointer-events: auto;
  filter: none;
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: var(--shadow-card), 0 0 40px rgba(124, 58, 237, 0.08);
}

.card-header {
  margin-bottom: 28px;
}

.step-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-accent);
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.step-badge.success {
  color: var(--success);
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
}

.card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* === TABS === */
.input-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 5px;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  background: rgba(124, 58, 237, 0.2);
  color: var(--text-accent);
  box-shadow: 0 1px 0 rgba(124, 58, 237, 0.3) inset;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === DROP ZONE === */
.drop-zone {
  position: relative;
  border: 2px dashed rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(124, 58, 237, 0.03);
  overflow: hidden;
}

.drop-zone:hover {
  border-color: rgba(124, 58, 237, 0.6);
  background: rgba(124, 58, 237, 0.07);
}

.drop-zone.drag-over {
  border-color: var(--text-accent);
  background: rgba(124, 58, 237, 0.1);
}

.drop-zone-inner {
  position: relative;
  z-index: 1;
}

.drop-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  color: var(--text-accent);
  opacity: 0.7;
}

.drop-icon svg {
  width: 100%;
  height: 100%;
}

.drop-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.drop-subtitle {
  font-size: 0.825rem;
  color: var(--text-muted);
}

.drop-overlay {
  position: absolute;
  inset: 0;
  background: rgba(124, 58, 237, 0.15);
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
}

.drop-zone.drag-over .drop-overlay {
  display: flex;
}

.drop-overlay-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-accent);
}

/* === PREVIEW === */
.preview-container {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  animation: fadeIn 0.3s ease;
}

.preview-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.preview-info {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preview-filename {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clear-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: var(--radius-sm);
  color: var(--error);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
}

.clear-btn:hover {
  background: rgba(248, 113, 113, 0.2);
}

.clear-btn svg {
  width: 14px;
  height: 14px;
}

/* === PASTE TAB === */
.paste-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.paste-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.payload-textarea {
  width: 100%;
  min-height: 130px;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Courier New', 'Cascadia Code', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  resize: vertical;
  transition: var(--transition);
  outline: none;
}

.payload-textarea:focus {
  border-color: var(--border-focus);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.payload-textarea::placeholder {
  color: var(--text-muted);
}

.paste-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.paste-hint svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* === CARD ACTIONS === */
.card-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* === BUTTONS === */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-btn);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0.12), transparent);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.55);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary svg {
  width: 18px;
  height: 18px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn-secondary svg {
  width: 18px;
  height: 18px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-ghost svg {
  width: 18px;
  height: 18px;
}

/* === ERROR BOX === */
.error-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: var(--radius-md);
  color: var(--error);
  font-size: 0.875rem;
  line-height: 1.5;
  animation: fadeIn 0.3s ease;
}

.error-box svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* === FIELDS CONTAINER === */
.fields-container {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.field-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.field-row.field-highlight {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.3);
}

.field-id {
  font-family: monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-accent);
  background: rgba(124, 58, 237, 0.15);
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

.field-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  min-width: 120px;
}

.field-value {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.field-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-accent);
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
}

/* === LOGO PICKER === */
.logo-picker {
  margin-bottom: 24px;
  animation: fadeIn 0.3s ease;
}

.logo-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}

.logo-picker-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.logo-picker-title svg {
  width: 16px;
  height: 16px;
  color: var(--text-accent);
  flex-shrink: 0;
}

.deco-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-pink);
  background: rgba(236, 72, 153, 0.1);
  border: 1px solid rgba(236, 72, 153, 0.25);
  padding: 3px 9px;
  border-radius: 100px;
  white-space: nowrap;
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.logo-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 320px;
}

.logo-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.logo-btn:hover {
  background: rgba(124, 58, 237, 0.08);
  border-color: rgba(124, 58, 237, 0.3);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.logo-btn.active {
  background: rgba(124, 58, 237, 0.12);
  border-color: rgba(124, 58, 237, 0.55);
  color: var(--text-accent);
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.3) inset;
}

.logo-preview {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  transition: var(--transition);
}

/* No Logo */
.logo-preview-none {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}
.logo-preview-none svg { width: 32px; height: 32px; }
.logo-btn.active .logo-preview-none,
.logo-btn:hover .logo-preview-none { color: var(--text-accent); }

.logo-preview-custom {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px dashed rgba(124, 58, 237, 0.4);
  color: var(--text-muted);
}
.logo-preview-custom svg { width: 22px; height: 22px; }
.logo-preview-custom.has-image { border: none; padding: 0; }
.logo-preview-custom img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* InstaPay / QR Ph preset logos */
.logo-preview-image {
  background: #ffffff;
  border-radius: 10px;
  padding: 6px;
}
.logo-preview-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

/* Custom upload area */
.custom-logo-area {
  margin-top: 12px;
  animation: fadeIn 0.25s ease;
}

.custom-logo-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border: 1.5px dashed rgba(124, 58, 237, 0.35);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  background: rgba(124, 58, 237, 0.04);
  transition: var(--transition);
}
.custom-logo-label:hover {
  border-color: rgba(124, 58, 237, 0.6);
  background: rgba(124, 58, 237, 0.08);
  color: var(--text-primary);
}
.custom-logo-label svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-accent);
}

/* === NAME EDITOR === */
.name-editor {
  padding: 24px;
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: var(--radius-lg);
  animation: fadeIn 0.3s ease;
}

.name-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
  flex-wrap: wrap;
}

.name-editor-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.char-counter {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.char-counter.warning {
  color: var(--warning);
}

.char-counter.danger {
  color: var(--error);
}

.name-input-wrapper {
  position: relative;
}

.name-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  outline: none;
  transition: var(--transition);
}

.name-input:focus {
  border-color: var(--border-focus);
  background: rgba(124, 58, 237, 0.1);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
}

.name-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.95rem;
}

.name-input-glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
  filter: blur(12px);
  pointer-events: none;
}

.name-input:focus ~ .name-input-glow {
  opacity: 0.25;
}

.name-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* === RESULT === */
.result-container {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: start;
}

.qr-display-wrapper {
  position: relative;
  flex-shrink: 0;
}

.qr-display {
  background: white;
  border-radius: var(--radius-lg);
  padding: 16px;
  display: inline-block;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  position: relative;
  z-index: 1;
}

/* qrcodejs renders both a <canvas> and an <img> inside the container */
.qr-display canvas,
.qr-display img:not(.logo-ol) {
  display: block;
  width: 240px !important;
  height: 240px !important;
  border-radius: 4px;
}

.qr-glow {
  position: absolute;
  inset: -10px;
  background: var(--accent-glow);
  filter: blur(30px);
  border-radius: 50%;
  z-index: 0;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

.result-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.result-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.result-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-payload {
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  word-break: break-all;
  line-height: 1.7;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  max-height: 90px;
  overflow-y: auto;
}

/* === TOAST === */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 100px;
  color: var(--success);
  font-size: 0.9rem;
  font-weight: 600;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast svg {
  width: 18px;
  height: 18px;
}

/* === FOOTER === */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.7;
  border-top: 1px solid var(--border-subtle);
  max-width: 800px;
  margin: 0 auto;
}

/* === LOADING STATE === */
.btn-primary.loading {
  pointer-events: none;
}

.btn-primary.loading::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.4);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.6);
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .hero {
    padding: 100px 20px 36px;
  }

  .card {
    padding: 24px 20px;
  }

  .result-container {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .card-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary,
  .btn-ghost {
    justify-content: center;
    width: 100%;
  }

  .input-tabs {
    flex-direction: column;
  }

  .logo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
