/* ============================================================
   QRGenPlus — Custom CSS
   Design tokens, animations, and specialty components
   All layout handled by Tailwind; this file adds motion/polish
   ============================================================ */

/* ----- Google Fonts Import ----- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ----- Design Tokens ----- */
:root {
  --qr-navy:        #0F172A;
  --qr-navy-mid:    #1E293B;
  --qr-navy-light:  #334155;
  --qr-indigo:      #6366F1;
  --qr-indigo-dark: #4F46E5;
  --qr-indigo-glow: rgba(99, 102, 241, 0.35);
  --qr-teal:        #14B8A6;
  --qr-white:       #F8FAFC;
  --qr-muted:       #94A3B8;
  --qr-border:      rgba(99, 102, 241, 0.2);
  --qr-card-bg:     rgba(30, 41, 59, 0.8);
  --qr-success:     #10B981;
  --qr-error:       #EF4444;
  --qr-radius:      12px;
  --qr-radius-lg:   20px;
  --qr-shadow:      0 8px 32px rgba(0, 0, 0, 0.4);
  --qr-shadow-glow: 0 0 24px rgba(99, 102, 241, 0.3);
  --transition:     0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--qr-navy);
  color: var(--qr-white);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----- Scrollbar Styling ----- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--qr-navy); }
::-webkit-scrollbar-thumb { background: var(--qr-navy-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--qr-indigo); }

/* Custom Light Scrollbar for Tables */
.table-scrollbar::-webkit-scrollbar { height: 10px; }
.table-scrollbar::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 4px; }
.table-scrollbar::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; }
.table-scrollbar::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* ----- Selection Color ----- */
::selection {
  background: var(--qr-indigo);
  color: #fff;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.qr-nav {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid var(--qr-border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background var(--transition);
}

.qr-logo {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--qr-indigo) 0%, var(--qr-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.qr-nav-link {
  color: var(--qr-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}

.qr-nav-link:hover {
  color: var(--qr-white);
  background: rgba(99, 102, 241, 0.12);
}

/* ============================================================
   AD PLACEHOLDER ZONES — AdSense-Ready Blocks
   Replace the inner content with AdSense <ins> tags when live
   ============================================================ */
.ad-zone {
  border: 1.5px dashed rgba(99, 102, 241, 0.35);
  border-radius: var(--qr-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.04);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition);
}

.ad-zone::before {
  content: 'Advertisement';
  position: absolute;
  top: 6px;
  left: 10px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(99, 102, 241, 0.5);
}

.ad-zone--leaderboard {
  width: 100%;
  height: 90px;
  max-width: 728px;
  margin: 0 auto;
}

.ad-zone--rectangle {
  width: 300px;
  height: 250px;
  flex-shrink: 0;
}

.ad-zone--mobile {
  width: 100%;
  height: 50px;
}

/* ============================================================
   HERO / HEADER SECTION
   ============================================================ */
.qr-hero {
  background: radial-gradient(ellipse 80% 60% at 50% -10%,
    rgba(99, 102, 241, 0.18) 0%,
    transparent 70%),
    var(--qr-navy);
  padding: 4rem 1rem 2rem;
  text-align: center;
}

.qr-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.1;
  text-align: center;
  background: linear-gradient(135deg, #fff 30%, var(--qr-indigo) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.qr-hero p {
  color: var(--qr-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 1rem auto 0;
  text-align: center;
}

/* ============================================================
   TOOL CARD — Main generator container
   ============================================================ */
.qr-card {
  background: var(--qr-card-bg);
  border: 1px solid var(--qr-border);
  border-radius: var(--qr-radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--qr-shadow);
  transition: box-shadow var(--transition);
}

.qr-card:hover {
  box-shadow: var(--qr-shadow), var(--qr-shadow-glow);
}

/* ============================================================
   TAB SYSTEM
   ============================================================ */
.qr-tabs {
  display: flex;
  gap: 2px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 14px;
  padding: 4px;
  position: relative;
}

.qr-tab-btn {
  flex: 1;
  padding: 0.6rem 0.5rem;
  border: none;
  background: transparent;
  color: var(--qr-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), transform var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  position: relative;
  z-index: 1;
}

.qr-tab-btn:hover:not(.active) {
  color: var(--qr-white);
  background: rgba(99, 102, 241, 0.1);
}

.qr-tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--qr-indigo) 0%, var(--qr-indigo-dark) 100%);
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.qr-tab-btn .tab-icon {
  font-size: 1rem;
}

/* Tab Panels */
.qr-tab-panel {
  display: none;
  animation: fadeInUp 0.3s ease both;
}

.qr-tab-panel.active {
  display: block;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.qr-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--qr-muted);
  margin-bottom: 0.45rem;
}

.qr-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  border: 1.5px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--qr-radius);
  color: var(--qr-white);
  font-family: 'Inter', sans-serif;
  font-size: 0.925rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.qr-input:focus {
  border-color: var(--qr-indigo);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  background: rgba(15, 23, 42, 0.95);
}

.qr-input::placeholder {
  color: rgba(148, 163, 184, 0.5);
}

.qr-input.error {
  border-color: var(--qr-error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.qr-textarea {
  resize: vertical;
  min-height: 110px;
}

.qr-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236366F1' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* ----- Generate Button ----- */
.qr-btn-generate {
  width: 100%;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, var(--qr-indigo) 0%, var(--qr-indigo-dark) 100%);
  border: none;
  border-radius: var(--qr-radius);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.45);
  position: relative;
  overflow: hidden;
}

.qr-btn-generate::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.5s ease;
}

.qr-btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
  filter: brightness(1.08);
}

.qr-btn-generate:hover::before {
  left: 100%;
}

.qr-btn-generate:active {
  transform: translateY(0);
}

/* ----- Action Buttons Row (Download + Copy side by side) ----- */
.qr-action-row {
  display: flex;
  gap: 0.6rem;
  width: 100%;
}

.qr-action-row .qr-btn-download,
.qr-action-row .qr-btn-copy {
  flex: 1;
  padding: 0.75rem 0.75rem;
  font-size: 0.83rem;
}

/* ----- Download Button ----- */

.qr-btn-download {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--qr-teal) 0%, #0D9488 100%);
  border: none;
  border-radius: var(--qr-radius);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.qr-btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(20, 184, 166, 0.55);
  filter: brightness(1.08);
}

.qr-btn-download:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: none;
}

/* ----- Copy to Clipboard Button ----- */
.qr-btn-copy {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--qr-indigo) 0%, var(--qr-indigo-dark) 100%);
  border: none;
  border-radius: var(--qr-radius);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.qr-btn-copy::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
  transition: left 0.5s ease;
}

.qr-btn-copy:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.55);
  filter: brightness(1.08);
}

.qr-btn-copy:hover::before {
  left: 100%;
}

.qr-btn-copy:active {
  transform: translateY(0);
}

.qr-btn-copy:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: none;
}




/* ============================================================
   SCANNER PREVIEW — Animated phone mockup
   ============================================================ */
.scanner-preview {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0,0,0,0.85);
  border: 2px solid var(--qr-navy-light);
  flex-shrink: 0;
}

.scanner-preview-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Hide broken image icon when no QR has been generated yet */
.scanner-preview-canvas[src=""] {
  display: none;
}

.scanner-corners {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
}

.scanner-corners::before,
.scanner-corners::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--qr-indigo);
  border-style: solid;
}

.scanner-corners::before {
  top: 8px; left: 8px;
  border-width: 2.5px 0 0 2.5px;
  border-radius: 2px 0 0 0;
}

.scanner-corners::after {
  bottom: 8px; right: 8px;
  border-width: 0 2.5px 2.5px 0;
  border-radius: 0 0 2px 0;
}

.scanner-corner-tr,
.scanner-corner-bl {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--qr-indigo);
  border-style: solid;
}

.scanner-corner-tr {
  top: 8px; right: 8px;
  border-width: 2.5px 2.5px 0 0;
  border-radius: 0 2px 0 0;
}

.scanner-corner-bl {
  bottom: 8px; left: 8px;
  border-width: 0 0 2.5px 2.5px;
  border-radius: 0 0 0 2px;
}

/* ----- Laser Scan Line ----- */
.scanner-laser {
  position: absolute;
  left: 8px; right: 8px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--qr-indigo), var(--qr-teal), var(--qr-indigo), transparent);
  border-radius: 1px;
  box-shadow: 0 0 8px var(--qr-indigo), 0 0 16px rgba(99, 102, 241, 0.5);
  animation: scanLaser 2s ease-in-out infinite;
}

@keyframes scanLaser {
  0%   { top: 10%; opacity: 0.8; }
  50%  { top: 85%; opacity: 1; }
  100% { top: 10%; opacity: 0.8; }
}



/* ── LEFT side: QR canvas ── */
.qr-output-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.qr-output-label-text {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--qr-muted);
}

/* Glow frame wrapper */
.qr-frame-outer {
  position: relative;
  padding: 6px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(99,102,241,0.35), rgba(20,184,166,0.2));
}

.qr-frame-glow {
  position: absolute;
  inset: -4px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(20,184,166,0.1));
  filter: blur(12px);
  z-index: 0;
  transition: opacity var(--transition);
  opacity: 0.6;
}

.qr-frame-outer:hover .qr-frame-glow {
  opacity: 1;
}

.qr-canvas-wrapper {
  width: auto;
  min-width: 230px;
  min-height: 230px;
  padding: 15px;
  border-radius: 14px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: box-shadow var(--transition);
}

.qr-canvas-wrapper canvas, .qr-canvas-wrapper svg {
  order: 1;
}

.qr-canvas-text {
  order: 2;
  margin-top: 12px;
}

.qr-canvas-placeholder {
  order: 1;
}

/* Corner accent marks on outer frame */
.frame-corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--qr-indigo);
  border-style: solid;
  z-index: 2;
}
.frame-corner--tl { top: 0; left: 0; border-width: 2px 0 0 2px; border-radius: 4px 0 0 0; }
.frame-corner--tr { top: 0; right: 0; border-width: 2px 2px 0 0; border-radius: 0 4px 0 0; }
.frame-corner--bl { bottom: 0; left: 0; border-width: 0 0 2px 2px; border-radius: 0 0 0 4px; }
.frame-corner--br { bottom: 0; right: 0; border-width: 0 2px 2px 0; border-radius: 0 0 4px 0; }

/* Animated placeholder grid */
.qr-canvas-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  height: 100%;
  background: #fff;
}

.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px;
}

.placeholder-dot {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: rgba(99,102,241,0.12);
  animation: pulseDot 2s ease-in-out infinite;
}

.placeholder-dot:nth-child(2) { animation-delay: 0.15s; }
.placeholder-dot:nth-child(3) { animation-delay: 0.3s; }
.placeholder-dot:nth-child(4) { animation-delay: 0.45s; }
.placeholder-dot.big { background: rgba(99,102,241,0.22); }
.placeholder-dot:nth-child(6) { animation-delay: 0.6s; }
.placeholder-dot:nth-child(7) { animation-delay: 0.75s; }
.placeholder-dot:nth-child(8) { animation-delay: 0.9s; }
.placeholder-dot:nth-child(9) { animation-delay: 1.05s; }

@keyframes pulseDot {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(0.92); }
}

.placeholder-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(99,102,241,0.45);
  text-align: center;
  padding: 0 1rem;
  line-height: 1.4;
}

/* Status badge */
.qr-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid;
  transition: all var(--transition);
}

.qr-status-badge--idle {
  background: rgba(148,163,184,0.08);
  border-color: rgba(148,163,184,0.2);
  color: var(--qr-muted);
}

.qr-status-badge--ready {
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.3);
  color: #34D399;
}

.qr-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.qr-status-badge--ready .qr-status-dot {
  animation: blink 1.4s ease infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── RIGHT side: Phone mockup + actions ── */
.qr-output-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 160px;
}

/* ─── Phone mockup shell ─── */
.phone-mockup {
  perspective: 800px;
}

.phone-shell {
  width: 168px;
  background: #111827;
  border-radius: 30px;
  border: 2px solid #374151;
  box-shadow:
    0 0 0 1px rgba(99,102,241,0.2),
    0 20px 50px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.06);
  overflow: hidden;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

.phone-shell:hover {
  transform: translateY(-4px) rotateX(2deg);
  box-shadow:
    0 0 0 1px rgba(99,102,241,0.4),
    0 28px 60px rgba(0,0,0,0.75),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.phone-notch {
  width: 60px;
  height: 20px;
  background: #111827;
  border-radius: 0 0 14px 14px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  border: 2px solid #374151;
  border-top: none;
}

.phone-screen {
  background: #0a0f1e;
  margin: 0;
  padding: 10px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

.phone-screen-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ─── Viewfinder ─── */
.viewfinder {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #0d1117;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(99,102,241,0.15);
}

.viewfinder-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Viewfinder corner brackets */
.vf-corner {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--qr-indigo);
  border-style: solid;
  z-index: 3;
}
.vf-tl { top: 6px; left: 6px; border-width: 2.5px 0 0 2.5px; border-radius: 2px 0 0 0; }
.vf-tr { top: 6px; right: 6px; border-width: 2.5px 2.5px 0 0; border-radius: 0 2px 0 0; }
.vf-bl { bottom: 6px; left: 6px; border-width: 0 0 2.5px 2.5px; border-radius: 0 0 0 2px; }
.vf-br { bottom: 6px; right: 6px; border-width: 0 2.5px 2.5px 0; border-radius: 0 0 2px 0; }

/* Laser scan line */
.vf-laser {
  position: absolute;
  left: 8px; right: 8px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--qr-indigo), var(--qr-teal), var(--qr-indigo), transparent);
  box-shadow: 0 0 6px var(--qr-indigo), 0 0 12px rgba(99,102,241,0.4);
  border-radius: 1px;
  animation: scanLaser 2s ease-in-out infinite;
  z-index: 4;
}

@keyframes scanLaser {
  0%   { top: 8%; opacity: 0.7; }
  50%  { top: 88%; opacity: 1; }
  100% { top: 8%; opacity: 0.7; }
}

/* Viewfinder idle overlay */
.vf-idle-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,15,30,0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  z-index: 5;
  transition: opacity 0.35s ease;
}

.vf-idle-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.vf-idle-icon {
  font-size: 1.75rem;
  opacity: 0.5;
}

.vf-idle-overlay span {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(148,163,184,0.5);
}

/* Phone UI chrome bar */
.phone-ui-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px;
}

.phone-ui-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(99,102,241,0.4);
}

.phone-ui-label {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(148,163,184,0.4);
}

/* Phone home indicator bar */
.phone-home-bar {
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-home-bar::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
}

/* Download button variant */
.qr-btn-download--large {
  width: 100%;
  padding: 0.8rem 1.5rem;
  font-size: 0.9rem;
  gap: 0.6rem;
}

/* Privacy note */
.output-privacy-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 500;
  color: rgba(148,163,184,0.5);
  text-align: center;
  line-height: 1.4;
}

.output-privacy-note svg {
  flex-shrink: 0;
  color: var(--qr-teal);
  opacity: 0.7;
}

/* Responsive: stack on mobile */
@media (max-width: 560px) {
  .qr-output-panel {
    flex-direction: column;
    align-items: center;
  }
  .qr-output-right {
    width: 100%;
    max-width: 220px;
  }
}


/* ============================================================
   WIFI TAB — Wizard Step Component
   ============================================================ */
.wizard-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wizard-step {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--qr-radius);
  padding: 0.875rem 1rem;
  transition: border-color var(--transition);
}

.wizard-step:hover {
  border-color: rgba(99, 102, 241, 0.35);
}

.wizard-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--qr-indigo), var(--qr-indigo-dark));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.wizard-step-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--qr-muted);
}

.wizard-step-text strong {
  color: var(--qr-white);
  display: block;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

/* ============================================================
   TOAST NOTIFICATION SYSTEM
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: toastIn 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
  pointer-events: auto;
  min-width: 260px;
  max-width: 360px;
  border: 1px solid rgba(255,255,255,0.1);
}

.toast.success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.9), rgba(5, 150, 105, 0.9));
  border-color: rgba(16, 185, 129, 0.3);
}

.toast.error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.9));
  border-color: rgba(239, 68, 68, 0.3);
}

.toast.info {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(79, 70, 229, 0.9));
  border-color: rgba(99, 102, 241, 0.3);
}

.toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.toast.exit {
  animation: toastOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%) scale(0.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(100%) scale(0.9); }
}

/* ============================================================
   INPUT VALIDATION FEEDBACK
   ============================================================ */
.input-hint {
  font-size: 0.75rem;
  margin-top: 0.3rem;
  font-weight: 500;
  min-height: 1.1rem;
  transition: color var(--transition);
}

.input-hint.error { color: var(--qr-error); }
.input-hint.success { color: var(--qr-success); }
.input-hint.muted { color: var(--qr-muted); }

/* ============================================================
   FEATURES STRIP — Below tool
   ============================================================ */
.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 100px;
  padding: 0.3rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--qr-indigo);
  transition: background var(--transition), transform var(--transition);
}

.feature-pill:hover {
  background: rgba(99, 102, 241, 0.18);
  transform: translateY(-1px);
}

/* ============================================================
   GUIDE / BLOG CARDS
   ============================================================ */
.guide-card {
  background: var(--qr-card-bg);
  border: 1px solid var(--qr-border);
  border-radius: var(--qr-radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  backdrop-filter: blur(12px);
}

.guide-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(99, 102, 241, 0.4);
  border-color: rgba(99, 102, 241, 0.5);
}

.guide-card .guide-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.guide-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--qr-white);
}

.guide-card p {
  font-size: 0.825rem;
  color: var(--qr-muted);
  line-height: 1.55;
}

.guide-read-more {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--qr-indigo);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.qr-footer {
  border-top: 1px solid var(--qr-border);
  background: rgba(15, 23, 42, 0.9);
  margin-top: auto;
}

.qr-footer a {
  color: var(--qr-muted);
  text-decoration: none;
  font-size: 0.825rem;
  transition: color var(--transition);
}

.qr-footer a:hover {
  color: var(--qr-indigo);
}

/* ============================================================
   TRUST / STATIC PAGES (about, privacy, tos, contact)
   ============================================================ */
.page-hero {
  background: radial-gradient(ellipse 60% 50% at 50% 0%,
    rgba(99, 102, 241, 0.15) 0%,
    transparent 70%);
  padding: 3.5rem 1rem 2rem;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.75px;
}

.prose-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1rem 4rem;
  color: var(--qr-muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

.prose-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--qr-white);
  margin: 2.25rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--qr-border);
}

.prose-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--qr-white);
  margin: 1.5rem 0 0.5rem;
}

.prose-content p {
  margin-bottom: 1rem;
}

.prose-content ul,
.prose-content ol {
  margin: 0.75rem 0 1rem 1.5rem;
}

.prose-content li {
  margin-bottom: 0.4rem;
}

.prose-content a {
  color: var(--qr-indigo);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose-content strong {
  color: var(--qr-white);
  font-weight: 600;
}

/* Contact Form */
.contact-form-wrapper {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.qr-btn-submit {
  padding: 0.8rem 2rem;
  background: linear-gradient(135deg, var(--qr-indigo), var(--qr-indigo-dark));
  border: none;
  border-radius: var(--qr-radius);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.qr-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.55);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
  50%       { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.15); }
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-fade-in {
  animation: fadeIn 0.4s ease both;
}

/* ============================================================
   BADGE / CHIP
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-indigo {
  background: rgba(99, 102, 241, 0.15);
  color: var(--qr-indigo);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-teal {
  background: rgba(20, 184, 166, 0.12);
  color: var(--qr-teal);
  border: 1px solid rgba(20, 184, 166, 0.25);
}

/* ============================================================
   RESPONSIVE OVERRIDES
   ============================================================ */
@media (max-width: 768px) {
  .qr-tab-btn {
    font-size: 0.72rem;
    padding: 0.55rem 0.3rem;
    gap: 0.2rem;
  }

  .tab-label {
    display: none; /* Icon only on small screens */
  }

  .qr-tab-btn .tab-icon {
    font-size: 1.15rem;
  }

  .ad-zone--rectangle {
    width: 100%;
    height: 100px;
  }

  .ad-zone--leaderboard {
    height: 60px;
  }

  .scanner-preview {
    width: 110px;
    height: 110px;
  }

  .qr-canvas-wrapper {
    width: 175px;
    height: 175px;
  }
}

@media (max-width: 480px) {
  .qr-hero h1 { font-size: 1.75rem; }
}

/* ============================================================
   UTILITY HELPERS
   ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.divider {
  border: none;
  border-top: 1px solid var(--qr-border);
  margin: 1.5rem 0;
}

.text-gradient {
  background: linear-gradient(135deg, var(--qr-indigo) 0%, var(--qr-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   MODAL STYLES
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease both;
}

.modal-content {
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slideUp {
  0% { opacity: 0; transform: translateY(20px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
