/* ==========================================================================
   JSON Matrix Pro - Next-Level CSS Styles (Host Wallah Suite)
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Monochrome & Royal Blue Theme Palette (Default Light) */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-surface: #f1f5f9;
  --bg-hover: #e2e8f0;

  --border-color: #e2e8f0;
  --border-active: #2563eb;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --accent-purple: #2563eb;
  --accent-cyan: #2563eb;
  --accent-emerald: #10b981;
  --accent-rose: #dc2626;
  --accent-amber: #f59e0b;

  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.03), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-md: 0 8px 16px -4px rgba(15, 23, 42, 0.06), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 20px 30px -8px rgba(15, 23, 42, 0.08), 0 10px 15px -4px rgba(15, 23, 42, 0.04);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;

  /* Syntax Highlighting Colors */
  --json-key: #2563eb;
  --json-str: #0f766e;
  --json-num: #b45309;
  --json-bool: #dc2626;
  --json-null: #64748b;
  --json-badge-bg: #eff6ff;
  --json-badge-text: #2563eb;

  --header-height: 56px;
  --toolbar-height: 48px;
  --footer-height: 34px;
}

[data-theme="dark"] {
  --bg-main: #0f172a;
  --bg-card: #1e293b;
  --bg-surface: #334155;
  --bg-hover: #475569;

  --border-color: #334155;
  --border-active: #3b82f6;

  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;

  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;

  --shadow-md: 0 8px 16px -4px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 30px -8px rgba(0, 0, 0, 0.5), 0 10px 15px -4px rgba(0, 0, 0, 0.3);

  /* Syntax Highlighting Colors */
  --json-key: #60a5fa;
  --json-str: #34d399;
  --json-num: #fbbf24;
  --json-bool: #f87171;
  --json-null: #94a3b8;
  --json-badge-bg: rgba(59, 130, 246, 0.15);
  --json-badge-text: #60a5fa;
}

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

/* Accessibility & SEO Screen Reader Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

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

/* ==========================================================================
   Single-Row Compact Header (Host Wallah Suite)
   ========================================================================== */

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 1.25rem;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  z-index: 50;
  gap: 1rem;
  height: var(--header-height);
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.brand-logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.brand-logo-link:hover {
  transform: scale(1.03);
  opacity: 0.95;
}

.brand-logo-img {
  height: 32px;
  max-height: 32px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}

[data-theme="light"] .logo-dark-mode {
  display: none !important;
}

[data-theme="light"] .logo-light-mode {
  display: block !important;
}

[data-theme="dark"] .logo-light-mode {
  display: none !important;
}

[data-theme="dark"] .logo-dark-mode {
  display: block !important;
}

.brand-text h1 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

.badge-pro {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  background-color: var(--accent-blue);
  color: #ffffff;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  line-height: 1.2;
}

/* Header Center: Compact Search + Metrics */
.header-center {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  max-width: 480px;
}

.search-box {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-box .search-icon {
  position: absolute;
  left: 0.75rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 36px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 2rem 0 2.25rem;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus {
  background-color: var(--bg-card);
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.search-box .clear-btn {
  position: absolute;
  right: 0.6rem;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.2rem;
  font-size: 0.75rem;
}

.search-box .clear-btn:hover {
  color: var(--text-main);
}

.clear-btn.hidden {
  display: none;
}

.metrics-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 36px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.metric-chip i {
  font-size: 0.7rem;
  color: var(--accent-blue);
}

.metric-chip span {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-main);
}

/* Header Actions Toolbar */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

/* Host Wallah Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 36px;
  padding: 0 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
  font-family: var(--font-sans);
}

.btn i {
  font-size: 0.85rem;
}

.btn-primary {
  background-color: var(--accent-blue) !important;
  color: #ffffff !important;
  border-color: var(--accent-blue) !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background-color: var(--accent-blue-hover) !important;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-surface) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-main) !important;
}

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

.btn-secondary.active {
  background-color: var(--accent-blue) !important;
  border-color: var(--accent-blue) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25) !important;
}

.btn-secondary.active i {
  color: #ffffff !important;
}

.btn-danger {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--accent-rose) !important;
}

.btn-danger:hover {
  background-color: rgba(220, 38, 38, 0.08) !important;
  border-color: var(--accent-rose) !important;
}

.btn-icon {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  background-color: var(--bg-surface) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-main) !important;
}

.btn-icon:hover {
  background-color: var(--bg-hover) !important;
  transform: scale(1.03);
}

.btn-sm {
  height: 32px;
  padding: 0 0.65rem;
  font-size: 0.76rem;
}

/* Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 6px 0;
  min-width: 200px;
  display: none;
  flex-direction: column;
  z-index: 100;
}

.dropdown.active .dropdown-menu {
  display: flex;
  animation: fadeInDown 0.15s ease-out;
}

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

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.12s;
  font-weight: 500;
}

.dropdown-item i {
  color: var(--accent-blue);
  width: 16px;
  text-align: center;
}

.dropdown-item:hover {
  background: var(--bg-surface);
  color: var(--accent-blue);
}

/* ==========================================================================
   Main Layout & Panes
   ========================================================================== */

.app-container {
  display: flex;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  height: calc(100vh - var(--header-height) - var(--footer-height));
  min-height: 620px;
}

/* Left Editor Sidebar */
.editor-pane {
  width: 40%;
  min-width: 240px;
  max-width: 85vw;
  flex-shrink: 0;
  flex-grow: 0;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.editor-header {
  height: var(--toolbar-height);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background: var(--bg-surface);
}

.editor-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.editor-title i {
  color: var(--accent-blue);
}

.editor-tools {
  display: flex;
  gap: 0.35rem;
}

.editor-body {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  background: var(--bg-card);
}

.line-numbers {
  width: 44px;
  padding: 12px 0;
  background: var(--bg-surface);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: right;
  padding-right: 10px;
  user-select: none;
  overflow: hidden;
  border-right: 1px solid var(--border-color);
  line-height: 1.55;
}

#json-input {
  flex: 1;
  padding: 12px 14px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.825rem;
  line-height: 1.55;
  resize: none;
  outline: none;
  white-space: pre;
  overflow: auto;
  tab-size: 2;
}

#json-input::placeholder {
  color: var(--text-dim);
}

.editor-error-banner {
  background: rgba(220, 38, 38, 0.08);
  border-top: 1px solid var(--accent-rose);
  color: var(--accent-rose);
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.editor-error-banner.hidden {
  display: none;
}

/* Resizer Divider */
.resizer {
  width: 6px;
  background: transparent;
  cursor: col-resize;
  transition: background 0.15s;
  z-index: 10;
}

.resizer:hover, .resizer.dragging {
  background: var(--accent-blue);
}

/* Right Viewer Area */
.viewer-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  overflow: hidden;
}

.viewer-pane.viewer-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1500 !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  background: var(--bg-main) !important;
}

.viewer-navbar {
  height: var(--toolbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  gap: 1rem;
}

.view-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.view-tab {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-tab i {
  font-size: 0.8rem;
}

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

.view-tab.active {
  background: var(--bg-card);
  color: var(--accent-blue);
  box-shadow: var(--shadow-sm);
}

/* Query Bar in Viewer Navbar */
.query-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  max-width: 440px;
}

.query-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.query-input-wrapper i {
  position: absolute;
  left: 10px;
  color: var(--text-dim);
  font-size: 0.78rem;
}

.query-input {
  width: 100%;
  height: 32px;
  padding: 0 10px 0 30px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.query-input:focus {
  background: var(--bg-card);
  border-color: var(--border-active);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Path Breadcrumbs Sub-bar */
.path-breadcrumbs-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 6px 1rem;
  font-size: 0.76rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.breadcrumb-container {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.breadcrumb-label {
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--text-muted);
}

.breadcrumb-label i {
  color: var(--accent-blue);
}

.breadcrumb-path {
  color: var(--accent-blue);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--bg-card);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.view-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Viewer Panels Container */
.viewer-content {
  flex: 1;
  overflow: auto;
  position: relative;
}

.view-panel {
  display: none;
  height: 100%;
  overflow: auto;
  padding: 1rem;
}

.view-panel.active {
  display: block;
}

/* Empty State */
.empty-state {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-align: center;
  gap: 0.75rem;
}

.empty-state svg, .empty-state i {
  font-size: 2.5rem;
  opacity: 0.4;
  color: var(--accent-blue);
}

/* ==========================================================================
   Tree View Component Styling
   ========================================================================== */
.json-tree-root {
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.835rem;
  line-height: 1.6;
}

.json-node {
  list-style: none;
  position: relative;
}

.json-node.search-hidden {
  display: none !important;
}

.json-row {
  display: flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  transition: background 0.1s;
  cursor: pointer;
}

.json-row:hover {
  background: var(--bg-hover);
}

.json-node.search-match > .json-row {
  background: rgba(245, 158, 11, 0.15);
  outline: 1px solid var(--accent-amber);
}

.json-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 4px;
  cursor: pointer;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}

.json-node:not(.collapsed) > .json-row .json-caret {
  transform: rotate(90deg);
}

.json-caret-spacer {
  display: inline-block;
  width: 18px;
  margin-right: 4px;
}

.json-children {
  list-style: none;
  padding-left: 20px;
  border-left: 1px dashed var(--border-color);
  margin-left: 8px;
}

.json-node.collapsed > .json-children {
  display: none;
}

.json-key {
  color: var(--json-key);
  font-weight: 600;
}

.json-colon {
  color: var(--text-muted);
  margin-right: 6px;
}

.json-val-string { color: var(--json-str); }
.json-val-number { color: var(--json-num); font-weight: 600; }
.json-val-boolean { color: var(--json-bool); font-weight: 700; }
.json-val-null { color: var(--json-null); font-style: italic; }

.json-type-badge {
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--json-badge-bg);
  color: var(--json-badge-text);
  margin-right: 6px;
  font-weight: 700;
}

.json-val-type {
  font-size: 0.65rem;
  color: var(--text-dim);
  margin-left: 8px;
  opacity: 0.8;
}

.json-collapsed-preview {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.json-row-actions {
  margin-left: auto;
  display: none;
  gap: 4px;
}

.json-row:hover .json-row-actions {
  display: flex;
}

.json-action-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 600;
}

.json-action-btn:hover {
  color: var(--accent-blue);
  border-color: var(--accent-blue);
  background: var(--bg-card);
}

.btn-flashed {
  background: var(--accent-emerald) !important;
  color: #fff !important;
  border-color: var(--accent-emerald) !important;
}

/* ==========================================================================
   Table View Component Styling
   ========================================================================== */
.table-view-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

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

.table-filter-input {
  height: 32px;
  padding: 0 10px;
  font-size: 0.8rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  outline: none;
}

.table-filter-input:focus {
  background: var(--bg-card);
  border-color: var(--border-active);
}

.table-scroll-container {
  flex: 1;
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
}

.modern-json-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.modern-json-table th {
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 10px 14px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  user-select: none;
}

.modern-json-table th.sortable-th {
  cursor: pointer;
}

.modern-json-table th.sortable-th:hover {
  color: var(--accent-blue);
}

.modern-json-table td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-mono);
  white-space: nowrap;
}

.modern-json-table tr:hover td {
  background: var(--bg-hover);
}

.col-index {
  width: 50px;
  color: var(--text-dim);
  text-align: center;
}

.cell-bool { font-weight: bold; }
.cell-bool.true { color: var(--accent-emerald); }
.cell-bool.false { color: var(--accent-rose); }
.cell-num { color: var(--json-num); font-weight: 600; }
.cell-str { color: var(--json-str); }
.cell-null { color: var(--json-null); font-style: italic; }
.cell-link { color: var(--accent-blue); text-decoration: underline; }
.cell-obj { color: var(--accent-blue); font-weight: 600; }

/* ==========================================================================
   Graph Visualizer Component Styling
   ========================================================================== */
.graph-view-wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.graph-toolbar {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  padding: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.graph-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
}

.graph-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent-blue);
}

.graph-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.graph-canvas-container {
  flex: 1;
  width: 100%;
  height: 100%;
  cursor: grab;
  user-select: none;
}

.graph-link {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 2px;
}

.graph-node-rect {
  fill: var(--bg-surface);
  stroke: var(--border-color);
  stroke-width: 1.5px;
  transition: all 0.15s ease;
}

.graph-node-group:hover .graph-node-rect {
  stroke: var(--accent-blue);
  fill: var(--bg-card);
}

.graph-node-text {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--text-main);
  font-weight: 600;
  pointer-events: none;
}

.graph-toggle-circle {
  fill: var(--accent-blue);
}

.graph-toggle-text {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: #fff;
  font-weight: bold;
  pointer-events: none;
}

/* ==========================================================================
   Diff View Component Styling
   ========================================================================== */
.diff-view-wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.diff-view-wrapper.diff-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999 !important;
  background: var(--bg-main) !important;
  padding: 1.25rem !important;
  box-sizing: border-box !important;
}

.diff-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.diff-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  color: var(--text-muted);
}

.legend-item:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--text-muted);
}

.legend-item.active {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--accent-blue);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2);
}

/* Read-only stat badge — no click interaction */
.legend-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 600;
  user-select: none;
}

.legend-count {
  padding: 1px 5px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.08);
  font-size: 0.7rem;
  font-weight: 700;
}

[data-theme="dark"] .legend-count {
  background: rgba(255, 255, 255, 0.12);
}

.legend-box {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.legend-box.added, .diff-line.diff-added { background: rgba(16, 185, 129, 0.15); }
.legend-box.removed, .diff-line.diff-removed { background: rgba(239, 68, 68, 0.15); }
.legend-box.modified, .diff-line.diff-modified { background: rgba(245, 158, 11, 0.15); }

.diff-split-pane {
  flex: 1;
  display: flex;
  gap: 1rem;
  overflow: hidden;
}

.diff-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.diff-col-header {
  padding: 8px 12px;
  background: var(--bg-surface);
  font-size: 0.75rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.diff-content {
  flex: 1;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.diff-editor-body {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
}

.diff-line-numbers {
  width: 40px;
  padding: 12px 0;
  background: var(--bg-surface);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: right;
  padding-right: 8px;
  user-select: none;
  overflow: hidden;
  border-right: 1px solid var(--border-color);
  line-height: 1.55;
}

.diff-backdrop {
  position: absolute;
  top: 0;
  left: 40px;
  right: 0;
  bottom: 0;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.825rem;
  line-height: 1.55;
  pointer-events: none;
  overflow: hidden;
  user-select: none;
}

.diff-highlight-line {
  height: calc(0.825rem * 1.55);
  line-height: calc(0.825rem * 1.55);
  border-radius: 2px;
}

.diff-highlight-line.diff-added { background: rgba(16, 185, 129, 0.22); border-left: 3px solid #10b981; }
.diff-highlight-line.diff-removed { background: rgba(239, 68, 68, 0.22); border-left: 3px solid #ef4444; }
.diff-highlight-line.diff-modified { background: rgba(245, 158, 11, 0.22); border-left: 3px solid #f59e0b; }
.diff-highlight-line.normal { background: transparent; }

.diff-full-textarea {
  position: relative;
  z-index: 2;
  flex: 1;
  padding: 12px 14px;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.825rem;
  line-height: 1.55;
  resize: none;
  outline: none;
  white-space: pre;
  overflow: auto;
  tab-size: 2;
}

.diff-line {
  display: flex;
  line-height: 1.5;
  padding: 1px 4px;
}

.diff-line-num {
  width: 36px;
  color: var(--text-dim);
  text-align: right;
  padding-right: 8px;
  user-select: none;
}

.diff-line-code {
  flex: 1;
  white-space: pre;
}

/* ==========================================================================
   Modals & Popups
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 650px;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-header h3 i {
  color: var(--accent-blue);
}

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

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

.modal-body {
  padding: 18px;
  overflow: auto;
  flex: 1;
}

.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.code-output-box {
  width: 100%;
  height: 340px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.825rem;
  padding: 12px;
  resize: none;
  outline: none;
  white-space: pre;
}

/* ==========================================================================
   Footer & Status Bar (Host Wallah Suite)
   ========================================================================== */
.app-footer {
  height: var(--footer-height);
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  z-index: 10;
  flex-shrink: 0;
}

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

.footer-stat-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-stat-item i {
  color: var(--accent-blue);
  font-size: 0.72rem;
}

.footer-stat-item span {
  color: var(--text-main);
  font-family: var(--font-mono);
  font-weight: 700;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

#footer-status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.footer-divider {
  opacity: 0.3;
}

.footer-brand {
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-brand i {
  color: var(--accent-blue);
}

.site-bottom-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ==========================================================================
   Toast Notifications (Host Wallah Suite)
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  padding: 0.85rem 1.35rem;
  background: var(--bg-card);
  border-left: 4px solid var(--accent-blue);
  color: var(--text-main);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-success {
  border-left-color: var(--accent-emerald) !important;
}
.toast-error {
  border-left-color: var(--accent-rose) !important;
}

.toast-info {
  border-left-color: var(--accent-blue) !important;
}

/* ==========================================================================
   Luxury Landing & Feature Showcase Sections (Responsive Light & Dark Themes)
   ========================================================================== */

.seo-content-section {
  padding: 4.5rem 1.5rem;
  width: 100%;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Theme Landing Blueprint Background */
[data-theme="dark"] .seo-content-section {
  background-color: #0b1120;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.22) 0%, transparent 60%),
    radial-gradient(#1e293b 1.2px, transparent 1.2px),
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 32px 32px, 64px 64px, 64px 64px;
  background-position: center top, 0 0, 0 0, 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

/* Light Theme Landing Blueprint Background */
[data-theme="light"] .seo-content-section {
  background-color: #f0f4f9;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.09) 0%, transparent 60%),
    radial-gradient(#cbd5e1 1.2px, transparent 1.2px),
    linear-gradient(to right, rgba(15, 23, 42, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 32px 32px, 64px 64px, 64px 64px;
  background-position: center top, 0 0, 0 0, 0 0;
  border-top: 1px solid var(--border-color);
  color: #0f172a;
}

.luxury-section-container {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

/* Luxury Common Section Header */
.luxury-section {
  width: 100%;
}

.section-header-centered {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-kicker {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--accent-blue);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
}

.section-header-centered h3 {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

[data-theme="dark"] .section-header-centered h3 {
  color: #ffffff;
}

/* 3-Step Process Timeline */
.process-timeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

@media (max-width: 850px) {
  .process-timeline {
    flex-direction: column;
  }

  .timeline-connector {
    transform: rotate(90deg);
  }
}

.timeline-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 2rem 1.75rem;
  text-align: left;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .timeline-card {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .timeline-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.timeline-card:hover {
  transform: translateY(-4px);
}

[data-theme="dark"] .timeline-card:hover {
  border-color: rgba(96, 165, 250, 0.4);
  background: rgba(23, 37, 84, 0.4);
  box-shadow: 0 16px 36px -6px rgba(37, 99, 235, 0.25);
}

[data-theme="light"] .timeline-card:hover {
  border-color: var(--accent-blue);
  background: #ffffff;
  box-shadow: 0 12px 28px -4px rgba(37, 99, 235, 0.12);
}

.timeline-step {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-dim);
  opacity: 0.5;
}

[data-theme="dark"] .timeline-step {
  color: rgba(255, 255, 255, 0.2);
}

.timeline-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}

[data-theme="dark"] .timeline-icon {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(59, 130, 246, 0.25);
  color: #60a5fa;
}

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

[data-theme="dark"] .timeline-card h4 {
  color: #ffffff;
}

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

[data-theme="dark"] .timeline-card p {
  color: #94a3b8;
}

.timeline-connector {
  color: var(--border-color);
  font-size: 1.25rem;
}

[data-theme="dark"] .timeline-connector {
  color: rgba(255, 255, 255, 0.2);
}

/* Premium Bento Box Feature Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 1140px;
  margin: 0 auto;
}

.bento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .bento-card {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .bento-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.bento-card:hover {
  transform: translateY(-4px);
}

[data-theme="dark"] .bento-card:hover {
  border-color: rgba(96, 165, 250, 0.4);
  background: rgba(23, 37, 84, 0.35);
  box-shadow: 0 16px 36px -6px rgba(37, 99, 235, 0.25);
}

[data-theme="light"] .bento-card:hover {
  border-color: var(--accent-blue);
  background: #ffffff;
  box-shadow: 0 12px 28px -4px rgba(37, 99, 235, 0.12);
}

.bento-span-2 {
  grid-column: span 2;
}

.bento-hero-content {
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
}

.bento-hero-indigo {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .bento-hero-indigo {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

[data-theme="light"] .bento-hero-indigo {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.bento-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bento-mini-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.preview-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-sans);
}

[data-theme="dark"] .preview-pill {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.preview-pill.active {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.3);
  color: var(--accent-blue);
}

[data-theme="dark"] .preview-pill.active {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

.preview-pill.emerald {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: var(--accent-emerald);
}

[data-theme="dark"] .preview-pill.emerald {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.preview-pill.dim {
  color: var(--text-dim);
}

.bento-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  text-transform: uppercase;
  margin-bottom: 0;
  width: fit-content;
}

.bento-badge-indigo {
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-blue);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

[data-theme="dark"] .bento-badge-indigo {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.85rem;
}

@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-span-2 {
    grid-column: span 1;
  }
}

.banner-icon-circle {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.bg-indigo-subtle {
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: var(--accent-blue);
}

[data-theme="dark"] .bg-indigo-subtle {
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #60a5fa;
}

.banner-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

[data-theme="dark"] .banner-content h4 {
  color: #ffffff;
}

.banner-content p {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

[data-theme="dark"] .banner-content p {
  color: #94a3b8;
}

/* Comparison Table (Matching CSV Matrix Pro) */
.seo-table-wrapper {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .seo-table-wrapper {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .seo-table-wrapper {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

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

.seo-comparison-table th, 
.seo-comparison-table td {
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .seo-comparison-table th,
[data-theme="dark"] .seo-comparison-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.seo-comparison-table th {
  background: var(--bg-surface);
  color: var(--text-main);
  font-weight: 700;
}

[data-theme="dark"] .seo-comparison-table th {
  background: rgba(30, 41, 59, 0.6);
  color: #ffffff;
}

.seo-comparison-table td {
  color: var(--text-muted);
}

[data-theme="dark"] .seo-comparison-table td {
  color: #cbd5e1;
}

.seo-comparison-table tr:last-child td {
  border-bottom: none;
}

.badge-success {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-emerald);
  font-weight: 600;
}

[data-theme="dark"] .badge-success {
  color: #34d399;
}

.badge-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-rose);
  font-weight: 600;
}

[data-theme="dark"] .badge-danger {
  color: #f87171;
}

.badge-neutral {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-weight: 600;
}

[data-theme="dark"] .badge-neutral {
  color: #94a3b8;
}

/* FAQ Accordion Container (Matching CSV Matrix Pro) */
.faq-accordion-container {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 860px;
  margin: 0 auto;
}

.faq-accordion-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

[data-theme="dark"] .faq-accordion-item {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .faq-accordion-item {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.faq-accordion-item[open] {
  border-color: var(--accent-blue);
}

[data-theme="dark"] .faq-accordion-item[open] {
  border-color: rgba(96, 165, 250, 0.4);
  background: rgba(23, 37, 84, 0.25);
}

.faq-summary {
  padding: 1.15rem 1.45rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  list-style: none;
}

[data-theme="dark"] .faq-summary {
  color: #ffffff;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-chevron {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.faq-accordion-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent-blue);
}

[data-theme="dark"] .faq-accordion-item[open] .faq-chevron {
  color: #60a5fa;
}

.faq-content {
  padding: 0 1.45rem 1.35rem 1.45rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  border-top: 1px solid var(--border-color);
}

[data-theme="dark"] .faq-content {
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Site Footer */
.site-bottom-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 1.75rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .site-bottom-footer {
  background: #070d18;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #64748b;
}

.site-bottom-footer a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}

.site-bottom-footer a:hover {
  text-decoration: underline;
}

/* Ultra-Smooth Scroll-Triggered Entrance Animations (Matching CSV Matrix Pro) */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(35px) scale(0.97);
  filter: blur(3px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), 
              filter 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
