/* ===== Scope only to the designer ===== */
.qr-scope{
  --bg:#0b1220;
  --card:#0f172a;
  --text:#e2e8f0;
  --muted:#94a3b8;
  --accent:#6366f1;
  --line:#1f2937;
  --chip:#111827;

  color:var(--text);
  font:14px/1.35 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Arial, sans-serif;
}
.qr-scope, .qr-scope *{ box-sizing:border-box; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg, #0b1220);
  color: var(--text, #e2e8f0);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Header Styles ===== */
.qr-scope .site-header {
  /* UPDATED: bright silver -> purple gradient */
  background: linear-gradient(to right, #fafafa 0%, #fafafa 60%, #4F46E5 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--line);
}

.qr-scope .site-header .inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 8px; /* tighter so logo sits further left */
  height: 70px;
  display: flex;
  align-items: center;
}

.qr-scope .header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.qr-scope .logo {
  display: flex;
  align-items: center;
  gap: 12px;      /* more space between icon and text */
  font-size: 20px;
  font-weight: 700; /* ensure QR Studio Pro is bold */
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.2s ease;
  margin-left: 0; /* keep flush-left */
}

.qr-scope .logo:hover {
  opacity: 0.9;
}

.logo svg {
  flex-shrink: 0;
}

.qr-scope .nav-links {
  display: flex;
  gap: 24px;
  margin: 0 32px;
}

.qr-scope .nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 0;
  position: relative;
  transition: all 0.2s ease;
}

.qr-scope .nav-links a:hover {
  color: var(--text);
}

.qr-scope .nav-links a.active {
  color: var(--accent);
  font-weight: 600;
}

.qr-scope .nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.qr-scope .header-actions {
  display: flex;
  gap: 12px;
}

.qr-scope .btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
}

.qr-scope .btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--muted);
}

.qr-scope .btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text);
}

.qr-scope .btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.qr-scope .btn-primary:hover {
  background: #4f3ff5;
  border-color: #4f3ff5;
}

/* ===== Footer Styles ===== */
.site-footer {
  /* UPDATED: bright silver -> purple gradient */
  background: linear-gradient(to right, #fafafa 0%, #fafafa 60%, #4F46E5 100%);
  color: #9ca3af; /* original footer text color */
  padding: 64px 0 0;
  margin-top: 64px;
}

.site-footer .inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 48px;
  margin-bottom: 64px;
}

.footer-section h4 {
  color: #f9fafb;
  font-size: 16px;
  margin: 0 0 20px;
  font-weight: 600;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-section a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: #e5e7eb;
}

.footer-section .logo {
  margin-bottom: 16px;
  color: #f9fafb;
}

.tagline {
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.social-links {
  display: flex;
  gap: 16px;
}

.social-links a {
  color: #9ca3af;
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: #e5e7eb;
}

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding: 24px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-bottom p {
  margin: 0;
  font-size: 14px;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #e5e7eb;
}

.footer-links span {
  color: #374151;
  font-size: 12px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .header-actions {
    margin-left: auto;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .header-actions {
    display: none;
  }
  
  .site-header .inner {
    padding: 0 16px;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 8px;
  }
  
  .footer-links span {
    display: none;
  }
}

/* Layout */
.qr-scope .app-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(420px, 560px);
  gap: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #0b1020 0%, #0b1020 50%, #0a0f1d 100%);
  border-top: 1px solid #0a1122;
  min-height: calc(100vh - 70px);
  align-content: start;
}
.qr-scope #leftPane{ overflow:hidden }
.qr-scope #rightPane { 
  overflow-y: auto; 
  overflow-x: hidden;
  padding-right: 8px; 
  max-height: calc(100vh - 82px);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.qr-scope #rightPane::-webkit-scrollbar {
  width: 6px;
}

.qr-scope #rightPane::-webkit-scrollbar-track {
  background: transparent;
}

.qr-scope #rightPane::-webkit-scrollbar-thumb {
  background-color: var(--line);
  border-radius: 3px;
}

/* Cards */
.qr-scope .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  position: relative;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.qr-scope .card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 12px 40px rgba(0, 0, 0, 0.4);
}

.qr-scope .section { 
  margin-bottom: 12px;
}

.qr-scope .section h2 { 
  margin: 0 0 8px; 
  font-size: 14px; 
  font-weight: 600; 
  letter-spacing: 0.3px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}

.qr-scope .section h2::before {
  content: '';
  display: block;
  width: 4px;
  height: 16px;
  background: var(--accent);
  border-radius: 2px;
}

.qr-scope .section-sub h3 { 
  margin: 12px 0 6px; 
  font-size: 12px; 
  color: var(--muted); 
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  opacity: 0.8;
}

.qr-scope .hint { 
  margin: 6px 0 0; 
  color: var(--muted); 
  font-size: 11px;
  line-height: 1.4;
  opacity: 0.8;
  grid-column: 1 / -1;
}

/* Tone accents (colored top bars + subtle tinted background) */
.qr-scope .card::before{
  content:""; position:absolute; left:-1px; right:-1px; top:-1px; height:6px;
  border-top-left-radius:12px; border-top-right-radius:12px;
}
.qr-scope .tone-1::before{ background:#06b6d4; }  /* Colors */
.qr-scope .tone-2::before{ background:#22c55e; }  /* Toggles */
.qr-scope .tone-3::before{ background:#f59e0b; }  /* Transparency */
.qr-scope .tone-4::before{ background:#60a5fa; }  /* Canvas/BG */
.qr-scope .tone-5::before{ background:#a78bfa; }  /* QR */
.qr-scope .tone-6::before{ background:#f43f5e; }  /* Logo */
.qr-scope .tone-7::before{ background:#34d399; }  /* Banner */
.qr-scope .tone-8::before{ background:#f97316; }  /* Title */
.qr-scope .tone-9::before{ background:#10b981; }  /* Description */
.qr-scope .tone-10::before{ background:#8b5cf6; } /* Preset JSON */

.qr-scope .tone-1{ background:linear-gradient(180deg, rgba(8,145,178,.12), transparent), var(--card); }
.qr-scope .tone-2{ background:linear-gradient(180deg, rgba(34,197,94,.12), transparent), var(--card); }
.qr-scope .tone-3{ background:linear-gradient(180deg, rgba(245,158,11,.12), transparent), var(--card); }
.qr-scope .tone-4{ background:linear-gradient(180deg, rgba(96,165,250,.12), transparent), var(--card); }
.qr-scope .tone-5{ background:linear-gradient(180deg, rgba(167,139,250,.12), transparent), var(--card); }
.qr-scope .tone-6{ background:linear-gradient(180deg, rgba(244,63,94,.12), transparent), var(--card); }
.qr-scope .tone-7{ background:linear-gradient(180deg, rgba(52,211,153,.12), transparent), var(--card); }
.qr-scope .tone-8{ background:linear-gradient(180deg, rgba(249,115,22,.12), transparent), var(--card); }
.qr-scope .tone-9{ background:linear-gradient(180deg, rgba(16,185,129,.12), transparent), var(--card); }
.qr-scope .tone-10{ background:linear-gradient(180deg, rgba(139,92,246,.12), transparent), var(--card); }

/* Grids */
.qr-scope .grid.two { 
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.qr-scope .grid.three{ grid-template-columns: repeat(3, 1fr); }

.qr-scope label{ display:flex; flex-direction:column; gap:6px; }
.qr-scope label.inline{ flex-direction:row; align-items:center; gap:8px; }

.qr-scope label {
  display: block;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2px;
}

.qr-scope label span {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

.qr-scope input[type="text"],
.qr-scope input[type="number"],
.qr-scope input[type="url"],
.qr-scope input[type="color"],
.qr-scope input[type="file"],
.qr-scope select,
.qr-scope textarea {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  transition: all 0.2s ease;
  height: 32px;
}

.qr-scope textarea {
  min-height: 60px;
  resize: vertical;
  line-height: 1.4;
}

.qr-scope input[type="text"]:focus,
.qr-scope input[type="number"]:focus,
.qr-scope input[type="url"]:focus,
.qr-scope input[type="color"]:focus,
.qr-scope select:focus,
.qr-scope textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
  background: var(--card);
}

.qr-scope input[type="number"]::-webkit-inner-spin_button,
.qr-scope input[type="number"]::-webkit-outer-spin_button {
  -webkit-appearance: none;
  margin: 0;
}

.qr-scope input[type="file"] {
  padding: 6px 0;
  border: 1px dashed var(--line);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.qr-scope input[type="file"]:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent);
}

.qr-scope input[type="color"] {
  height: 38px;
  padding: 2px;
  cursor: pointer;
}

.qr-scope select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
  cursor: pointer;
}

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

.qr-scope .color-row{ flex-direction:row; align-items:center; justify-content:space-between; gap:10px; }
.qr-scope .color-row input[type="color"]{
  appearance:none; width:28px; height:28px;
  border:1px solid #1f2937; border-radius:6px; padding:0; background:transparent; cursor:pointer;
}

/* ... rest of the code remains the same ... */
.qr-scope .actions { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 6px; 
  align-items: center; 
  margin-bottom: 8px; 
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.qr-scope .btn.small {
  padding: 4px 10px;
  font-size: 12px;
  height: 28px;
  min-width: auto;
  flex: 1;
}

.qr-scope .btn.subtle {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.qr-scope .btn.subtle:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent);
  color: var(--accent);
}
.qr-scope select.compact{ padding:6px 8px; height:32px; }
/* Buttons */
.qr-scope .btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.qr-scope .btn:hover {
  background: #4f3ff5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

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

.qr-scope .btn.small { 
  padding: 6px 12px;
  font-size: 13px;
  height: 32px;
}

.qr-scope .btn.subtle { 
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
}

.qr-scope .btn.subtle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.qr-scope .preset-actions { 
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

/* Canvas preview */
.qr-scope .main-canvas {
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: 12px;
  min-height: 420px;
  padding: 32px;
  overflow: auto;
  transition: all 0.3s ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.qr-scope .main-canvas:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: inset 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.qr-scope #preview { 
  display: flex; 
  gap: 2px; 
  align-items: center; 
  justify-content: center; 
  margin: auto;
  width: 100%;
  height: 100%;
  min-height: 300px;
}

.qr-scope #qr-container { 
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.qr-scope .qr-stage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.qr-scope .qr-stage:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.qr-scope #canvas { 
  display: inline-block;
  max-width: 100%;
  height: auto;
}

/* Toast */
.qr-scope #toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  max-width: 90%;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 8px;
}

.qr-scope #toast::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.qr-scope #toast.show { 
  opacity: 1; 
  transform: translateX(-50%) translateY(0);
  animation: toast-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toast-in {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Responsive */
@media (max-width:1100px){
  .qr-scope .app-grid{ grid-template-columns: 1fr; }
  .qr-scope #rightPane{ order:2; max-height:none; }
  .qr-scope #leftPane{ order:1; }
  .qr-scope .main-canvas{ min-height:360px; }
}

.qr-scope label.full{ grid-column:1 / -1; }
.qr-scope .full{ grid-column:1 / -1; }
