/* JSONLens Design Tokens — Crafted Obsidian Dark & Geist Daylight Light */

:root,
[data-theme='dark'] {
  --bg-app: #0b0d12;
  --bg-panel: #10141d;
  --bg-elevated: #161b27;
  --bg-hover: #1d2434;
  --bg-active: #232c41;
  --bg-input: #0d1017;
  --bg-code: #0d1017;

  --border-subtle: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-focus: #6366f1;

  --text-primary: #e5e9f2;
  --text-secondary: #98a3b8;
  --text-muted: #5d687e;

  --accent: #6366f1;
  --accent-hover: #7577f6;
  --accent-bright: #818cf8;
  --accent-soft: rgba(99, 102, 241, 0.14);

  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.14);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.15);
  --danger: #f43f5e;
  --danger-soft: rgba(244, 63, 94, 0.14);

  /* Syntax Highlighting (Tokyo Night / Catppuccin Pro) */
  --tok-key: #7dcfff;
  --tok-str: #9ece6a;
  --tok-num: #ff9e64;
  --tok-bool: #bb9af7;
  --tok-null: #f7768e;
  --tok-punct: #6b7694;
  --tok-comment: #565f89;

  /* Graph Canvas */
  --graph-bg: #090b10;
  --graph-dot: rgba(255, 255, 255, 0.07);
  --graph-card-bg: #141925;
  --graph-card-head: #1c2335;
  --graph-card-border: #2a344c;
  --graph-edge: #424e6b;

  --editor-active-line: rgba(99, 102, 241, 0.075);
  --editor-error-line: rgba(244, 63, 94, 0.18);
  --editor-selection: rgba(99, 102, 241, 0.32);

  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.55);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.32);
}

[data-theme='light'] {
  --bg-app: #f4f6fa;
  --bg-panel: #ffffff;
  --bg-elevated: #f8fafc;
  --bg-hover: #eef2f7;
  --bg-active: #e2e8f2;
  --bg-input: #f8fafc;
  --bg-code: #fbfcfe;

  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #4f46e5;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-bright: #4f46e5;
  --accent-soft: rgba(79, 70, 229, 0.1);

  --success: #059669;
  --success-soft: rgba(5, 150, 105, 0.1);
  --warning: #d97706;
  --warning-soft: rgba(217, 119, 6, 0.12);
  --danger: #e11d48;
  --danger-soft: rgba(225, 29, 72, 0.1);

  /* Syntax Highlighting (GitHub Light High Contrast) */
  --tok-key: #0550ae;
  --tok-str: #116329;
  --tok-num: #b45309;
  --tok-bool: #7c3aed;
  --tok-null: #cf222e;
  --tok-punct: #64748b;
  --tok-comment: #94a3b8;

  /* Graph Canvas */
  --graph-bg: #f1f5f9;
  --graph-dot: rgba(15, 23, 42, 0.1);
  --graph-card-bg: #ffffff;
  --graph-card-head: #eef2ff;
  --graph-card-border: #cbd5e1;
  --graph-edge: #94a3b8;

  --editor-active-line: rgba(79, 70, 229, 0.06);
  --editor-error-line: rgba(225, 29, 72, 0.13);
  --editor-selection: rgba(79, 70, 229, 0.2);

  --shadow-lg: 0 18px 42px rgba(15, 23, 42, 0.14);
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.08);
}

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

/* Custom sleek scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.4);
}

.hidden {
  display: none !important;
}
