/* Custom styles complementing Tailwind for QR Parrot */

/* Generator form fields — used by script.js dynamic form rendering */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: inherit; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-glass, #e5e7eb);
  background: var(--surface, #faf9ff);
  color: inherit;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.dark .field input, .dark .field textarea, .dark .field select {
  background: rgba(26, 29, 21, 0.6);
  border-color: rgba(68, 72, 62, 1);
}
.field textarea { min-height: 72px; resize: vertical; }
.tool-desc { font-size: 14px; color: #6b7280; margin-bottom: 14px; line-height: 1.6; }
.dark .tool-desc { color: #9ca3af; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 12px; color: #9ca3af; margin-bottom: 6px; line-height: 1.45; }
.dark .hint { color: #6b7280; }
@media (max-width: 640px) { .row2 { grid-template-columns: 1fr; } }

.glass-panel {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(229, 231, 235, 1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.dark .glass-panel {
  background: rgba(26, 29, 21, 0.8);
  border-color: rgba(68, 72, 62, 1);
}

.glass-panel-inner {
  background: rgba(249, 249, 255, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(229, 231, 235, 0.5);
}

.dark .glass-panel-inner {
  background: rgba(30, 33, 24, 0.6);
  border-color: rgba(68, 72, 62, 0.5);
}

.dest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Classes used by script.js for destination buttons */
.ic { width: 1.5em; height: 1.5em; display: inline-block; vertical-align: middle; }

.dest {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: 12px;
  border: 1px solid var(--border-glass, #e5e7eb);
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.18s;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.dest:hover, .dest-btn:hover {
  background: #f3f4f6;
  border-color: #00ffab;
  color: #111827;
}

.dark .dest:hover, .dark .dest-btn:hover {
  background: rgba(55, 55, 55, 0.5);
  color: #e5e7eb;
}

.dest.active, .dest-btn.active {
  background: rgba(0, 255, 171, 0.15);
  border-color: #00ffab;
  color: #005234;
}

.dark .dest.active, .dark .dest-btn.active {
  color: #00ffab;
}

.dest .material-symbols-outlined,
.dest-btn .material-symbols-outlined {
  font-size: 24px;
}
.dest svg, .dest-btn svg {
  width: 22px;
  height: 22px;
}

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.swatch {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.12s, border-color 0.12s;
  flex-shrink: 0;
}

.swatch:hover { transform: scale(1.15); }
.swatch.active { border-color: #00ffab; box-shadow: 0 0 0 2px white inset; }

.dark .swatch.active { box-shadow: 0 0 0 2px #1a1d15 inset; }

#bgOptions label.active {
  border-color: #00ffab;
  background: rgba(0, 255, 171, 0.08);
}
.dark #bgOptions label.active {
  background: rgba(0, 255, 171, 0.12);
}

#transparentBg {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: white;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
  position: relative;
}
#transparentBg:checked {
  background: #00FFAB;
  border-color: #00FFAB;
}
#transparentBg:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: white;
}

.swatch-custom {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(229, 231, 235, 0.5);
  border-color: #d1d5db;
}

.dark .swatch-custom {
  background: rgba(55, 55, 55, 0.5);
  border-color: #6b7280;
}

.swatch-custom .material-symbols-outlined {
  font-size: 18px;
  color: #6b7280;
  pointer-events: none;
}

.dark .swatch-custom .material-symbols-outlined {
  color: #9ca3af;
}

.swatch-custom input[type="color"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
}

.pattern-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.pattern-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s;
}

.dark .pattern-btn {
  background: rgba(55, 55, 55, 0.4);
  border-color: rgba(68, 72, 62, 1);
}

.pattern-btn:hover { border-color: #00ffab; }
.pattern-btn.active { border: 2px solid #00ffab; background: rgba(0, 255, 171, 0.1); }
.pattern-btn svg { width: 24px; height: 24px; }

.vrule {
  width: 1px;
  height: 36px;
  background: #e5e7eb;
}

.dark .vrule { background: rgba(68, 72, 62, 1); }

.logo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 44px;
  border-radius: 10px;
  border: 1px dashed #9ca3af;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}

.dark .logo-btn {
  color: #9ca3af;
  border-color: #6b7280;
}

.logo-btn:hover { background: #f3f4f6; border-color: #00ffab; color: #005234; }
.dark .logo-btn:hover { background: rgba(55,55,55,0.5); color: #00ffab; }
.logo-btn.has-logo { border-style: solid; border-color: #00ffab; color: #005234; }
.dark .logo-btn.has-logo { color: #00ffab; }

.preview-frame {
  aspect-ratio: 1;
  width: 100%;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.preview-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 0;
  pointer-events: none;
  padding: 1.5px;
  background: conic-gradient(
    from 0deg,
    transparent,
    transparent 70%,
    rgba(0, 255, 171, 0.2) 78%,
    rgba(0, 255, 171, 0.4) 82%,
    rgba(0, 255, 171, 0.2) 86%,
    transparent 94%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
  to { transform: rotate(360deg); }
}

.dark .preview-frame {
  background: #1a1d15;
  border-color: rgba(68, 72, 62, 1);
}

.preview-frame svg { width: 100%; height: 100%; display: block; position: relative; z-index: 1; }
.preview-frame > * { position: relative; z-index: 1; }
.preview-empty {
  text-align: center;
  font-size: 14px;
  color: #9ca3af;
  padding: 0 12px;
}

.scanline {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00ffab, transparent);
  opacity: 0;
  pointer-events: none;
}

.scanline.run {
  animation: scan 1s ease;
}

@keyframes scan {
  0% { top: 12%; opacity: 0; }
  15% { opacity: 0.9; }
  85% { opacity: 0.9; }
  100% { top: 88%; opacity: 0; }
}

.size-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.size-presets button {
  font-size: 13px;
  font-weight: 500;
  padding: 9px 4px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  background: transparent;
  color: #6b7280;
  transition: all 0.15s;
}

.dark .size-presets button {
  border-color: rgba(68, 72, 62, 1);
  color: #9ca3af;
}

.size-presets button:hover { border-color: #00ffab; }
.size-presets button.active { background: #00ffab; color: #005234; border-color: #00ffab; }

.dl-format {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.dl-format button {
  font-size: 13px;
  font-weight: 500;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  background: #f3f4f6;
  color: #6b7280;
  transition: all 0.15s;
}

.dark .dl-format button {
  background: rgba(55,55,55,0.4);
  color: #9ca3af;
}

.dl-format button.active { background: #00ffab; color: #005234; }

.contrast-warn {
  display: none;
  padding: 10px 12px;
  background: #fef2f2;
  color: #991b1b;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  border: 1px solid #fecaca;
}

.dark .contrast-warn {
  background: rgba(186, 26, 26, 0.15);
  color: #fca5a5;
  border-color: rgba(186, 26, 26, 0.3);
}

.contrast-warn.show { display: block; }

.recent-section { border-top: 1px solid #e5e7eb; padding-top: 16px; margin-top: 20px; }
.dark .recent-section { border-color: rgba(68, 72, 62, 1); }

.recent-list { display: flex; flex-direction: column; gap: 8px; }

.recent-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  background: #f9fafb;
  border: 1px solid transparent;
  text-align: left;
  transition: all 0.15s;
}

.dark .recent-chip {
  background: rgba(30, 33, 24, 0.6);
}

.recent-chip:hover { border-color: #00ffab; background: #f3f4f6; }
.dark .recent-chip:hover { background: rgba(55,55,55,0.4); }

.recent-type {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #005234;
  background: rgba(0, 255, 171, 0.2);
  padding: 3px 8px;
  border-radius: 9999px;
  flex-shrink: 0;
}

.dark .recent-type { color: #00ffab; }

.recent-text {
  font-size: 13px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dark .recent-text { color: #9ca3af; }

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1f2937;
  color: white;
  padding: 13px 22px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 9px;
}

.dark .toast { background: #374151; }

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.prose-content { max-width: 760px; margin: 0 auto; }

.prose-content h2 {
  font-size: clamp(24px, 3.5vw, 30px);
  margin-bottom: 20px;
  font-weight: 700;
}

.prose-content h3 {
  font-size: 21px;
  margin: 34px 0 12px;
  color: #005234;
}

.dark .prose-content h3 { color: #00ffab; }

.prose-content p { color: #6b7280; margin-bottom: 16px; font-size: 16.5px; line-height: 1.7; }
.dark .prose-content p { color: #9ca3af; }

.prose-content ul { padding-left: 22px; margin-bottom: 16px; color: #6b7280; }
.dark .prose-content ul { color: #9ca3af; }

.prose-content li { margin-bottom: 8px; }

.doc-content { max-width: 760px; margin: 0 auto; }
.doc-content h1 { font-size: clamp(28px, 5vw, 40px); margin-bottom: 10px; }
.doc-content h2 { font-size: 23px; margin: 34px 0 12px; color: #005234; }
.dark .doc-content h2 { color: #00ffab; }
.doc-content h3 { font-size: 19px; margin: 26px 0 10px; }
.doc-content p, .doc-content li { color: #6b7280; margin-bottom: 14px; font-size: 16.5px; line-height: 1.7; }
.dark .doc-content p, .dark .doc-content li { color: #9ca3af; }
.doc-content ul { padding-left: 22px; margin-bottom: 14px; }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-q {
  border-bottom: 1px solid var(--color-border-glass, rgba(0,0,0,.06));
}

.dark .faq-item.open .faq-q {
  border-bottom-color: rgba(255,255,255,.06);
}

.faq-item.open .faq-q .material-symbols-outlined:last-child {
  transform: rotate(180deg);
}

/* Ad slot */
.ad-inner {
  background: #f3f4f6;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  min-height: 28px;
  display: grid;
  place-items: center;
  color: #9ca3af;
  font-size: 11px;
  margin: 0;
  padding: 2px 0;
}

.dark .ad-inner {
  background: rgba(30, 33, 24, 0.6);
  border-color: rgba(68, 72, 62, 1);
}

/* Range slider */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background: #e5e7eb;
  cursor: pointer;
  accent-color: #00ffab;
}

.dark input[type="range"] {
  background: rgba(68, 72, 62, 1);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #00ffab;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #00ffab;
  cursor: pointer;
  border: 2px solid white;
}

input[type="text"]:focus, input[type="url"]:focus, input[type="email"]:focus,
input[type="tel"]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #00ffab !important;
  box-shadow: 0 0 0 3px rgba(0, 255, 171, 0.2) !important;
}

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

.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: clamp(24px, 3.5vw, 30px); margin-bottom: 20px; font-weight: 700; }
.prose p { color: #6b7280; margin-bottom: 16px; font-size: 16.5px; line-height: 1.7; }
.dark .prose p { color: #9ca3af; }

/* Hero highlight animation */
.hero-highlight {
  position: relative;
  display: inline-block;
  color: #002112;
  z-index: 1;
  padding: 0 0.15em;
}

.dark .hero-highlight {
  color: #002112;
}

.hero-highlight::before {
  content: '';
  position: absolute;
  inset: 0;
  background: #01FFAB;
  border-radius: 0.15em;
  z-index: -1;
  animation: heroHighlightGrow 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s both;
  transform-origin: left;
  transform: scaleX(0);
}

@keyframes heroHighlightGrow {
  to {
    transform: scaleX(1);
  }
}

:focus-visible {
  outline: 2px solid #00ffab;
  outline-offset: 2px;
}

/* ── Entrance animations (scroll reveal) ──────────────────── */
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.animate-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.animate-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.animate-in-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.animate-in-scale.visible {
  opacity: 1;
  transform: scale(1);
}

.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }
.animate-delay-5 { transition-delay: 0.5s; }
.animate-delay-6 { transition-delay: 0.6s; }

/* ── Floating orbs ─────────────────────────────────────────── */
/* ── Animated hero background ────────────────────────────── */
#generator {
  background: linear-gradient(135deg,
    rgba(0, 255, 171, 0.25) 0%,
    rgba(0, 82, 52, 0.1) 35%,
    rgba(20, 195, 142, 0.18) 65%,
    rgba(0, 255, 171, 0.12) 100%
  );
  background-size: 300% 300%;
  animation: heroBgShift 12s ease-in-out infinite alternate;
}

@keyframes heroBgShift {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 100%; }
}

@media (prefers-reduced-motion: reduce) {
  #generator { animation: none; }
}

/* ── Gradient shimmer ──────────────────────────────────────── */
.shimmer {
  position: relative;
  overflow: hidden;
}
.shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.25) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: shimmerSweep 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shimmerSweep {
  100% { transform: translateX(100%); }
}

/* ── Glow pulse on QR preview ─────────────────────────────── */
.preview-frame.has-code {
  animation: glowPulse 1.5s ease-out;
}
@keyframes glowPulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 255, 171, 0); }
  25%  { box-shadow: 0 0 28px 6px rgba(0, 255, 171, 0.25); }
  70%  { box-shadow: 0 0 16px 2px rgba(0, 255, 171, 0.1); }
  100% { box-shadow: 0 0 0 0 rgba(0, 255, 171, 0); }
}

/* ── Compact nav on scroll ─────────────────────────────────── */
nav.scrolled {
  top: 0 !important;
  background: transparent !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  box-shadow: 0 4px 28px rgba(0,0,0,0.06);
  border-color: rgba(229, 231, 235, 0.6) !important;
}
.dark nav.scrolled {
  background: transparent !important;
  box-shadow: 0 4px 28px rgba(0,0,0,0.25);
}
nav.scrolled .nav-inner {
  height: 3.25rem !important;
}
nav.scrolled + #mobileMenu {
  top: 3.25rem !important;
}

/* Generator / Hero section — clear fixed nav */
#generator { padding-top: 120px; }
@media (min-width: 768px) {
  #generator { padding-top: 160px; }
}




