/* ==========================================================================
   QR Studio Pro - Modern, Professional, Mobile-First Stylesheet
   ========================================================================== */

:root {
  /* Core Ocean Multivision Brand Colors */
  --primary: #0891b2;
  --primary-hover: #0e7490;
  --primary-glow: rgba(8, 145, 178, 0.25);
  --primary-light: #ecfeff;
  --primary-accent: #f43f5e;
  --primary-text: #ffffff;
  
  /* Neutral Palette (Light Mode Default) */
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-input: #ffffff;
  
  --border-light: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-focus: #0891b2;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  /* Status Colors */
  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  
  --error: #ef4444;
  --error-bg: #fef2f2;
  --error-border: #fecaca;

  /* Elevational Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 30px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  /* Radius & Transitions */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Variables */
[data-theme="dark"] {
  --primary: #22d3ee;
  --primary-hover: #67e8f9;
  --primary-glow: rgba(34, 211, 238, 0.35);
  --primary-light: #164e63;
  --primary-accent: #fb7185;
  --primary-text: #082f49;

  --bg-page: #0b111e;
  --bg-card: #111a2e;
  --bg-subtle: #1a253c;
  --bg-input: #0e1626;

  --border-light: #1e293b;
  --border-hover: #334155;
  --border-focus: #22d3ee;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --success: #34d399;
  --success-bg: rgba(16, 185, 129, 0.12);
  --success-border: rgba(16, 185, 129, 0.25);

  --error: #f87171;
  --error-bg: rgba(239, 68, 68, 0.12);
  --error-border: rgba(239, 68, 68, 0.25);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 35px rgba(0, 0, 0, 0.6);
}

/* System Dark Mode Fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.35);
    --primary-light: #1e1b4b;
    --primary-text: #ffffff;

    --bg-page: #0b0f19;
    --bg-card: #131b2e;
    --bg-subtle: #1e293b;
    --bg-input: #101726;

    --border-light: #1e293b;
    --border-hover: #334155;
    --border-focus: #818cf8;

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;

    --success: #34d399;
    --success-bg: rgba(16, 185, 129, 0.12);
    --success-border: rgba(16, 185, 129, 0.25);

    --error: #f87171;
    --error-bg: rgba(239, 68, 68, 0.12);
    --error-border: rgba(239, 68, 68, 0.25);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 35px rgba(0, 0, 0, 0.6);
  }
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  background-image: 
    radial-gradient(at 0% 0%, var(--primary-glow) 0px, transparent 50%),
    radial-gradient(at 100% 100%, var(--primary-glow) 0px, transparent 50%);
  background-attachment: fixed;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Header Navigation
   ========================================================================== */
.site-header {
  border-bottom: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .site-header,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-header {
    background: rgba(19, 27, 46, 0.75);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-img {
  height: 40px;
  max-width: 200px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.25s ease;
}

.brand:hover .brand-logo-img {
  transform: translateY(-1px) scale(1.02);
}

[data-theme="dark"] .brand-logo-img {
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.45));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-logo-img {
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.45));
  }
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--primary-accent));
  color: #fff;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 2px 6px var(--primary-glow);
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--border-light);
  transform: translateY(-1px);
}

.moon-icon { display: none; }
.sun-icon { display: block; }

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

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .moon-icon { display: block; }
  :root:not([data-theme="light"]) .sun-icon { display: none; }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  text-align: center;
  padding: 36px 20px 24px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 16px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
  animation: pulse 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse {
  to {
    box-shadow: 0 0 0 8px rgba(99, 102, 241, 0);
  }
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  line-height: 1.15;
  max-width: 680px;
  margin: 0 auto 12px;
}

.hero-sub {
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto;
}

/* ==========================================================================
   Main Grid Layout
   ========================================================================== */
.app-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 48px;
}

@media (max-width: 880px) {
  .app-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Panels */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.panel:hover {
  border-color: var(--border-hover);
}

/* ==========================================================================
   Tabs Navigation
   ========================================================================== */
.tabs-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: var(--bg-subtle);
  padding: 5px;
  border-radius: var(--radius-md);
  margin-bottom: 22px;
}

.tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

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

.tab-btn.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Form Fields & Inputs
   ========================================================================== */
.field-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.field-label-sm {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-prefix-icon {
  position: absolute;
  left: 14px;
  color: var(--text-subtle);
  pointer-events: none;
  display: flex;
  align-items: center;
}

input[type="text"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-main);
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  outline: none;
  transition: var(--transition);
}

.input-with-icon input {
  padding-left: 42px;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

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

.form-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Custom Checkbox */
.custom-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-main);
  font-weight: 500;
  user-select: none;
}

.custom-checkbox input {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-hover);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.custom-checkbox input:checked + .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.custom-checkbox input:checked + .checkmark::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

/* ==========================================================================
   Image Drop Zone
   ========================================================================== */
.drop-zone {
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius-md);
  padding: 24px 18px;
  background: var(--bg-subtle);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.drop-zone:hover,
.drop-zone.over {
  border-color: var(--primary);
  background: var(--primary-light);
}

.drop-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.drop-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.drop-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  display: block;
}

.drop-accent {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.drop-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

/* Image Preview */
.drop-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.drop-preview img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.preview-info {
  flex: 1;
  text-align: left;
  overflow: hidden;
}

.file-name {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-remove {
  background: transparent;
  border: none;
  color: var(--text-subtle);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-remove:hover {
  color: var(--error);
  background: var(--error-bg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* API Card */
.api-card {
  margin-top: 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
}

.api-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  user-select: none;
}

.summary-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.api-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.api-body {
  padding: 12px 14px 16px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-subtle);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.api-body p {
  margin-bottom: 10px;
  line-height: 1.45;
}

.api-body a {
  color: var(--primary);
  font-weight: 600;
}

/* ==========================================================================
   Styling & Customization Section
   ========================================================================== */
.styling-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.preset-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

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

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.preset-chip:hover {
  border-color: var(--border-hover);
  background: var(--bg-subtle);
}

.preset-chip.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.chip-color {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
}

.custom-opts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .custom-opts-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 5px 8px;
  height: 44px;
}

input[type="color"] {
  -webkit-appearance: none;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  padding: 0;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

input[type="color"]::-webkit-color-swatch {
  border: 1px solid var(--border-light);
  border-radius: 6px;
}

.color-hex {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ==========================================================================
   Generate Button & Feedback
   ========================================================================== */
.btn-primary-glow {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: var(--primary-text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-top: 20px;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: var(--transition);
}

.btn-primary-glow:hover {
  background: linear-gradient(135deg, var(--primary-hover), #4f46e5);
  box-shadow: 0 6px 20px var(--primary-glow);
  transform: translateY(-1.5px);
}

.btn-primary-glow:active {
  transform: translateY(0);
}

.btn-primary-glow:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Status Toast */
.status-toast {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeIn 0.3s ease;
}

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

.status-toast.err {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error-border);
}

.status-toast.ok {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.status-toast.loading {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

/* ==========================================================================
   Preview Section
   ========================================================================== */
.preview-panel {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 88px;
}

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

.preview-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.preview-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.preview-badge.ready {
  background: var(--success-bg);
  color: var(--success);
}

.preview-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 290px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border-light);
}

.placeholder-state {
  text-align: center;
  max-width: 260px;
}

.placeholder-art {
  color: var(--text-subtle);
  margin-bottom: 12px;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.placeholder-primary {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.placeholder-secondary {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.qr-canvas-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.qr-display {
  padding: 18px;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 280px;
  width: 100%;
  aspect-ratio: 1 / 1;
}

.qr-display canvas,
.qr-display img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

.scan-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Target Data Card */
.target-card {
  margin-top: 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.target-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.target-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-main);
  word-break: break-all;
  line-height: 1.4;
}

/* Action Buttons */
.action-buttons-group {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-download {
  flex: 1.6;
  background: var(--primary);
  color: var(--primary-text);
  border: 1px solid var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-download:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  flex: 1.2;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1.5px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.btn-icon-only {
  width: 44px;
  padding: 0;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1.5px solid var(--border-light);
}

.btn-icon-only:hover {
  background: var(--bg-subtle);
  border-color: var(--border-hover);
}

/* ==========================================================================
   Features Section
   ========================================================================== */
.features-section {
  margin: 20px auto 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.feature-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.feature-item p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-light);
  background: var(--bg-card);
  padding: 28px 0;
}

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

.footer-brand {
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
}

.footer-logo-img {
  height: 38px;
  max-width: 170px;
  width: auto;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.footer-logo-img:hover {
  opacity: 1;
}

[data-theme="dark"] .footer-logo-img {
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.45));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .footer-logo-img {
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.45));
  }
}

.footer-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 8px;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-subtle);
}

/* ==========================================================================
   Print Styling
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .site-header,
  .hero,
  .editor-panel,
  .preview-header,
  .action-buttons-group,
  .features-section,
  .site-footer,
  .scan-hint {
    display: none !important;
  }
  .app-grid {
    display: block !important;
  }
  .preview-panel {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .preview-stage {
    background: none !important;
    border: none !important;
  }
  .qr-display {
    box-shadow: none !important;
    max-width: 400px !important;
  }
  .target-card {
    border: 1px solid #ccc !important;
    background: #fff !important;
  }
}
