/* ==========================================================================
   GetMeAQRCode - Design System & Modern Responsive Stylesheet
   Vanilla CSS with CSS Custom Properties, Glassmorphism & Micro-animations
   ========================================================================== */

:root {
  /* Color Palette - Vibrant Indigo & Violet Modern SaaS */
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.25);
  
  --accent: #8b5cf6;
  --accent-pink: #ec4899;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* Light Theme (Default) */
:root,
[data-theme="light"] {
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-hover: #e2e8f0;
  --border-subtle: #e2e8f0;
  --border-focus: #6366f1;
  
  --text-main: #0f172a;
  --text-muted: #334155;
  --text-subtle: #475569;
  --primary-light: #4338ca;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.18);

  --canvas-bg: #ffffff;
  --preview-grid: rgba(0, 0, 0, 0.04);
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-app: #090d16;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #1e293b;
  --bg-surface-hover: #283548;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #6366f1;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --primary-light: #c7d2fe;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.35);

  --canvas-bg: #141d30;
  --preview-grid: rgba(255, 255, 255, 0.03);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.app-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.brand-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.brand-logo svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.badge-pro {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all var(--transition-fast);
}

.nav-link svg {
  width: 16px;
  height: 16px;
}

.nav-link:hover {
  color: var(--text-main);
  background: var(--bg-surface-elevated);
}

.nav-link.active {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.badge-new {
  background: linear-gradient(135deg, var(--primary), var(--accent-pink));
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: var(--radius-full);
}

.history-count {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  color: var(--text-main);
  border-color: var(--primary);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

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

/* Buttons */
.btn {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #ffffff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--text-muted);
}

/* ==========================================================================
   Notification Bar
   ========================================================================== */
.notification-bar {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.12));
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.825rem;
  color: var(--text-main);
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 auto;
}

.notification-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 0.5rem;
}

/* ==========================================================================
   App Workspace Layout
   ========================================================================== */
.app-main {
  flex: 1;
  padding: 1.5rem 1rem 3rem;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.workspace-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1080px) {
  .workspace-container {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Left Config Panel (Forms & Design Engine)
   ========================================================================== */
.config-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

/* Workflow Step Tabs */
.workflow-tabs {
  display: flex;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  flex: 1;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

.tab-btn.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.step-num {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--border-subtle);
  color: var(--text-main);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-btn.active .step-num {
  background: var(--primary);
  color: #fff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

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

/* Types Selector Grid */
.section-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.section-label {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Dynamic QR Switch */
.qr-mode-switch {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-surface-elevated);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.mode-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.mode-label.pro-tag {
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.badge-mini {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 0.55rem;
  padding: 1px 4px;
  border-radius: var(--radius-full);
}

.switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--border-subtle);
  transition: .2s;
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(14px);
}

.dynamic-alert {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  display: flex;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-main);
}

.dynamic-alert svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
  flex-shrink: 0;
}

.dynamic-alert code {
  font-family: var(--font-mono);
  background: rgba(99, 102, 241, 0.2);
  padding: 1px 4px;
  border-radius: var(--radius-sm);
  color: var(--primary-light);
}

/* Category Grid */
.types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.type-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.5rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.type-btn:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
  transform: translateY(-1px);
}

.type-btn.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.type-icon {
  font-size: 1.3rem;
}

.type-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

/* Dynamic Form Fields */
.form-fields-container {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

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

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.875rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.flex-1 { flex: 1; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.85rem; }
.mt-4 { margin-top: 1.25rem; }
.hidden { display: none !important; }

.step-footer {
  display: flex;
  justify-content: flex-end;
}

.btn-next {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
}

.btn-next svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   Accordion Customization (Tab 2)
   ========================================================================== */
.design-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.accordion-item {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface-elevated);
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  background: transparent;
  border: none;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.acc-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.acc-icon {
  font-size: 1.15rem;
}

.acc-arrow {
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.accordion-item.open .acc-arrow {
  transform: rotate(180deg);
}

.accordion-body {
  padding: 0 1.25rem 1.25rem;
  display: none;
}

.accordion-item.open .accordion-body {
  display: block;
}

/* Frame Presets */
.frame-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.frame-preset {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.frame-preset:hover {
  border-color: var(--text-muted);
}

.frame-preset.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  box-shadow: 0 0 10px var(--primary-glow);
}

.frame-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 800;
  border: 1px dashed var(--border-subtle);
  color: var(--text-muted);
}

.frame-preview-pill {
  background: #6366f1;
  color: #fff;
  border-radius: 20px;
  height: 20px;
  width: 44px;
}

.frame-preview-badge {
  background: #6366f1;
  color: #fff;
  height: 20px;
  width: 44px;
}

.frame-preview-top {
  background: #6366f1;
  color: #fff;
  height: 20px;
  width: 44px;
}

.frame-preview-circle {
  border: 2px solid #6366f1;
  border-radius: 50%;
  color: #6366f1;
}

.frame-preset span {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Color Picker Components */
.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px 8px;
}

.color-picker-wrapper input[type="color"] {
  border: none;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
}

.color-hex {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-main);
  text-transform: uppercase;
}

/* Patterns & Shapes Grid */
.patterns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.pattern-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.5rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.pattern-btn svg {
  width: 24px;
  height: 24px;
}

.pattern-btn:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.pattern-btn.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.pattern-btn span {
  font-size: 0.75rem;
  font-weight: 600;
}

/* Corner Eyes */
.group-subtitle {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.eye-frame-options,
.eye-ball-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.eye-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.eye-btn:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.eye-btn.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-main);
  cursor: pointer;
}

/* Color Mode Tabs */
.color-mode-tabs {
  display: flex;
  gap: 0.4rem;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.sub-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.45rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sub-tab-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

/* Slider Component */
.slider-group {
  margin-top: 0.75rem;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Palette Swatches */
.palette-swatches {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.swatch-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.swatch-btn:hover {
  transform: scale(1.15);
  border-color: #ffffff;
}

/* Logo Library */
.logo-presets-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
}

.logo-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.logo-btn svg {
  width: 20px;
  height: 20px;
}

.logo-btn:hover {
  border-color: var(--text-muted);
}

.logo-btn.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.12);
}

.upload-dropzone {
  position: relative;
  background: var(--bg-surface);
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: border-color var(--transition-fast);
}

.upload-dropzone:hover {
  border-color: var(--primary);
  color: var(--text-main);
}

.upload-dropzone input[type="file"] {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-dropzone svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.upload-hint {
  font-size: 0.7rem;
  color: var(--text-subtle);
}

.uploaded-logo-preview {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-surface);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.uploaded-logo-preview img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 2px;
}

.btn-remove-logo {
  background: transparent;
  border: none;
  color: var(--danger);
  font-size: 1.25rem;
  cursor: pointer;
  margin-left: auto;
}

/* ==========================================================================
   Tab 3: AI Art Generator Studio
   ========================================================================== */
.ai-banner {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(236, 72, 153, 0.15));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.ai-banner-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 8px rgba(236, 72, 153, 0.5));
}

.ai-banner-text h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.ai-banner-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.prompt-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.suggestion-tag {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.suggestion-tag:hover {
  color: var(--text-main);
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.ai-styles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.ai-style-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.ai-style-card:hover {
  border-color: var(--text-muted);
}

.ai-style-card.active {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.12);
  box-shadow: 0 0 10px var(--primary-glow);
}

.style-thumb {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-sm);
}

.style-cyberpunk { background: linear-gradient(135deg, #090979, #00d4ff, #ff007f); }
.style-watercolor { background: linear-gradient(135deg, #ff9a9e, #fecfef, #a1c4fd); }
.style-anime { background: linear-gradient(135deg, #fbc2eb, #a6c1ee); }
.style-isometric { background: linear-gradient(135deg, #667eea, #764ba2); }
.style-luxury { background: linear-gradient(135deg, #111827, #d97706, #fbbf24); }
.style-synthwave { background: linear-gradient(135deg, #2b1055, #7597de, #ff5e36); }

.ai-style-card span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-subtle);
  margin-top: 0.25rem;
}

.btn-ai-generate {
  width: 100%;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  color: #fff;
  border: none;
  padding: 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.35);
  transition: all var(--transition-fast);
}

.btn-ai-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(236, 72, 153, 0.5);
}

/* ==========================================================================
   Right Panel: Real-Time Live Preview & Export Studio
   ========================================================================== */
.preview-panel {
  position: sticky;
  top: 5rem;
}

.preview-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.preview-title-row h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--success);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Contrast Score Badge */
.contrast-score-badge {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.contrast-score-badge.warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--warning);
}

/* Preview Stage Canvas */
.preview-stage-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.preview-stage {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1;
  background-color: var(--canvas-bg);
  background-image: 
    linear-gradient(45deg, var(--preview-grid) 25%, transparent 25%),
    linear-gradient(-45deg, var(--preview-grid) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--preview-grid) 75%),
    linear-gradient(-45deg, transparent 75%, var(--preview-grid) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
}

#qr-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--transition-fast);
}

/* AI Generating Loader Overlay */
.ai-loader-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.5rem;
  text-align: center;
  z-index: 10;
}

.ai-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(236, 72, 153, 0.2);
  border-top-color: #ec4899;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.ai-loader-overlay h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: #fff;
}

.ai-loader-overlay p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.ai-progress-bar {
  width: 160px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.ai-progress-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6, #ec4899);
  animation: progressFill 2.5s ease-in-out infinite;
}

@keyframes progressFill {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* Quick Scan Tester Button */
.btn-scan-test {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.btn-scan-test svg {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

.btn-scan-test:hover {
  background: var(--bg-surface-hover);
  border-color: var(--primary);
}

/* Resolution Chips */
.resolution-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.res-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.res-label-row label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.res-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--primary-light);
}

.res-buttons-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
}

.res-chip {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.res-chip:hover {
  color: var(--text-main);
}

.res-chip.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  color: var(--primary);
}

/* Export Buttons Grid */
.export-actions-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 0.8fr;
  gap: 0.5rem;
}

.btn-download-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.7rem 0.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: 0 4px 12px var(--primary-glow);
  transition: all var(--transition-fast);
}

.btn-download-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--primary-glow);
}

.btn-download-primary svg,
.btn-download-secondary svg,
.btn-copy svg {
  width: 16px;
  height: 16px;
}

.btn-download-secondary {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.btn-download-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--text-muted);
}

.btn-copy {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.btn-copy:hover {
  background: var(--bg-surface-hover);
}

.btn-save-code {
  width: 100%;
  background: transparent;
  border: 1px dashed var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.6rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.btn-save-code svg {
  width: 16px;
  height: 16px;
}

.btn-save-code:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.guarantee-box {
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  gap: 0.6rem;
  font-size: 0.725rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.guarantee-box strong {
  color: var(--text-main);
}

.shield-icon {
  font-size: 1.1rem;
}

/* ==========================================================================
   Modals & Overlays
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.modal-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-window.modal-lg {
  max-width: 880px;
}

.modal-window.modal-xl {
  max-width: 1040px;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
}

/* Scan Verified Result Card */
.scan-verified-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.verified-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.decoded-payload-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--primary-light);
  word-break: break-all;
  max-width: 100%;
}

.scannability-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Pricing Grid in Modal */
.pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .pricing-cards-grid {
    grid-template-columns: 1fr;
  }
}

.pricing-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

.pricing-card.popular {
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

.popular-ribbon {
  position: absolute;
  top: -10px;
  right: 15px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.plan-header h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
}

.plan-header p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.price-val {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  margin: 1rem 0;
}

.price-val span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.plan-features {
  list-style: none;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-main);
}

.full-width {
  width: 100%;
}

/* Analytics KPIs */
.kpi-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .kpi-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kpi-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.kpi-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.kpi-num {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.kpi-trend {
  font-size: 0.7rem;
  color: var(--text-subtle);
}

.kpi-trend.positive {
  color: var(--success);
}

.analytics-charts-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .analytics-charts-grid {
    grid-template-columns: 1fr;
  }
}

.chart-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.chart-box h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.chart-canvas-container {
  width: 100%;
  height: 180px;
}

.analytics-table-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.analytics-table-box h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.analytics-table th {
  text-align: left;
  padding: 0.5rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.analytics-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

/* History List in Modal */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
}

.history-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.history-thumb {
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 2px;
}

.history-info h5 {
  font-size: 0.85rem;
  font-weight: 700;
}

.history-info span {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.history-actions {
  display: flex;
  gap: 0.4rem;
}

/* ==========================================================================
   Footer & Legal Attribution
   ========================================================================== */
.app-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 2rem 1.5rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
}

.denso-attribution {
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 0.25rem;
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
}

/* ==========================================================================
   Google AdSense Placements & Responsive Slots
   ========================================================================== */
.ad-banner-wrapper {
  margin: 1.25rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.top-ad-banner {
  max-width: 1440px;
  margin: 1rem auto 0;
  padding: 0 1rem;
}

.sidebar-ad-banner {
  margin-top: 1.25rem;
  width: 100%;
}

.modal-ad-banner {
  margin: 1rem 0;
}

.ad-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

.ad-slot {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.ad-leaderboard {
  min-height: 90px;
  max-width: 728px;
  width: 100%;
}

.ad-medium-rectangle {
  min-height: 250px;
  max-width: 300px;
  width: 100%;
}

.ad-modal-slot {
  min-height: 180px;
  width: 100%;
}

.ad-placeholder {
  width: 100%;
  min-height: 90px;
  background: var(--bg-surface-elevated);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 1rem;
  text-align: center;
  transition: all var(--transition-fast);
}

.ad-placeholder:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.ad-placeholder.medium-rect {
  min-height: 250px;
  width: 300px;
}

.ad-placeholder.modal-rect {
  min-height: 160px;
}

.ad-placeholder-icon {
  font-size: 1.5rem;
}

.ad-hint {
  font-size: 0.65rem;
  color: var(--text-subtle);
}

/* Download Preparation Countdown */
.download-countdown-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-surface-elevated);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.countdown-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.countdown-text {
  font-size: 0.85rem;
  color: var(--text-main);
}

.countdown-text strong {
  color: var(--primary);
  font-size: 1.1rem;
}

/* ==========================================================================
   SEO Content & Marketing Section Styling
   ========================================================================== */
.seo-content-section {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: 4.5rem 1.5rem 5rem;
  margin-top: 3rem;
}

.seo-container {
  max-width: 1200px;
  margin: 0 auto;
}

.text-center {
  text-align: center;
}

.mt-5 {
  margin-top: 4rem;
}

.seo-pill {
  display: inline-block;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--primary-light);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.seo-header h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.seo-lead {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

/* Features Grid */
.seo-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.seo-feature-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.seo-feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.seo-feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-main);
}

.seo-feature-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Step Cards */
.steps-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 860px) {
  .steps-cards-row {
    grid-template-columns: 1fr;
  }
}

.step-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  position: relative;
}

.step-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.step-card h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

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

/* Solutions Tags Grid */
.solutions-tags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.solution-item {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.solution-item strong {
  font-size: 0.95rem;
  color: var(--text-main);
}

.solution-item span {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* SEO FAQ Accordion */
.seo-faq-accordion {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.faq-item {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--primary);
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  gap: 1rem;
}

.faq-toggle {
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--primary);
  transition: transform var(--transition-fast);
  line-height: 1;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
}

.faq-item.active .faq-answer {
  display: block;
}

/* ==========================================================================
   Trust Bar & High-CTR SEO Elements
   ========================================================================== */
.trust-features-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.65rem 1rem;
}

.trust-features-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-main);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.trust-icon {
  font-size: 1rem;
}

/* SEO Comparison Table */
.comparison-table-wrapper {
  overflow-x: auto;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-top: 1.5rem;
}

.seo-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.seo-table th,
.seo-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.seo-table th {
  background: rgba(0, 0, 0, 0.15);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.seo-table .highlight-col {
  background: rgba(99, 102, 241, 0.08);
  font-weight: 600;
  border-left: 1px solid rgba(99, 102, 241, 0.2);
  border-right: 1px solid rgba(99, 102, 241, 0.2);
}

.check-green {
  color: var(--success);
  font-weight: 700;
}

.cross-red {
  color: var(--danger);
}

/* SEO Tech Specs Grid */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.spec-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.spec-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.spec-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  font-weight: 700;
}

.spec-value {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0.25rem 0;
  line-height: 1.25;
}

.spec-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ==========================================================================
   Comprehensive Educational Guide & AdSense Shield Styles
   ========================================================================== */
.mid-ad-banner {
  max-width: 1440px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.seo-guide-article {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  margin-top: 3.5rem;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
  .seo-guide-article {
    padding: 2rem 1.25rem;
  }
}

.guide-block {
  margin-top: 2.5rem;
}

.guide-block:first-child {
  margin-top: 1rem;
}

.guide-block h3 {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-block p {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.guide-block p strong {
  color: var(--text-main);
}

.guide-block code {
  font-family: var(--font-mono);
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.guide-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.25rem 0;
  padding-left: 0.5rem;
}

.guide-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.guide-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.guide-list li strong {
  color: var(--text-main);
}

/* Scanner Guide Dual Cards */
.scanner-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.25rem;
}

@media (max-width: 768px) {
  .scanner-guide-grid {
    grid-template-columns: 1fr;
  }
}

.scanner-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.scanner-card h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.scanner-card ol {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.scanner-card ol li strong {
  color: var(--text-main);
}

.scanner-card em {
  color: var(--primary-light);
  font-style: normal;
}

/* Static vs Dynamic Cards */
.static-dynamic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 1.25rem;
}

@media (max-width: 768px) {
  .static-dynamic-grid {
    grid-template-columns: 1fr;
  }
}

.type-explanation-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.type-explanation-card h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.type-explanation-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.type-explanation-card ul {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.type-explanation-card ul li strong {
  color: var(--text-main);
}

/* High-Value Formats Grid */
.high-value-formats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
}

@media (max-width: 860px) {
  .high-value-formats-grid {
    grid-template-columns: 1fr;
  }
}

.format-highlight-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
}

.format-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 0.6rem;
}

.format-highlight-card h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.format-highlight-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Best Practices Box */
.best-practices-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.25rem;
}

.practice-item {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.85rem;
}

.practice-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.practice-item strong {
  color: var(--text-main);
}

.practice-item code {
  font-family: var(--font-mono);
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}





