@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, "SF Mono", monospace;

  /* Modern Engineering Zinc Palette */
  --bg-canvas: #09090b;
  --bg-surface: #111215;
  --bg-card: #14161b;
  --bg-card-hover: #1a1d24;
  --bg-input: #0d0e11;

  --border-subtle: #1e2027;
  --border-default: #282b35;
  --border-focus: #3e4454;

  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --color-emerald: #10b981;
  --color-emerald-bg: rgba(16, 185, 129, 0.12);
  --color-emerald-border: rgba(16, 185, 129, 0.25);

  --color-sky: #0ea5e9;
  --color-sky-bg: rgba(14, 165, 233, 0.12);
  --color-sky-border: rgba(14, 165, 233, 0.25);

  --color-amber: #f59e0b;
  --color-amber-bg: rgba(245, 158, 11, 0.12);
  --color-amber-border: rgba(245, 158, 11, 0.25);

  --color-rose: #f43f5e;
  --color-rose-bg: rgba(244, 63, 94, 0.12);
  --color-rose-border: rgba(244, 63, 94, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

code, pre, .font-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Ensure code, shell commands and numeric readouts stay LTR regardless of page dir */
code, pre, .dir-ltr-force {
  direction: ltr !important;
  text-align: left !important;
}

/* Grounded Surface Card */
.glass-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.glass-panel:hover {
  border-color: var(--border-default);
  background-color: var(--bg-card-hover);
}

/* Tab View Visibility Management */
.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
  animation: fadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Tab Navigation Buttons */
.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #a1a1aa;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
}

.nav-tab-btn:hover {
  color: #f4f4f5;
  background-color: rgba(255, 255, 255, 0.03);
}

.nav-tab-btn.active {
  color: #ffffff;
  border-bottom-color: var(--color-emerald);
  background-color: rgba(16, 185, 129, 0.06);
}

/* Keyboard Shortcut Badges */
.kbd-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  background: #1e2027;
  color: #a1a1aa;
  border: 1px solid #282b35;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Filter Pills */
.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #a1a1aa;
  background: #14161b;
  border: 1px solid #1e2027;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  color: #f4f4f5;
  border-color: #282b35;
}

.filter-pill.active {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

/* Benchmark Comparison Bars */
.benchmark-track {
  width: 100%;
  height: 12px;
  border-radius: 9999px;
  background: #18191f;
  overflow: hidden;
  position: relative;
  border: 1px solid #22242a;
}

.benchmark-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Interactive Architecture Nodes */
.arch-card {
  transition: all 0.2s ease;
  cursor: pointer;
}

.arch-card:hover {
  border-color: var(--color-emerald);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.08);
}

/* Range Input Styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: #1e2027;
  height: 6px;
  border-radius: 9999px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f4f4f5;
  cursor: pointer;
  border: 2px solid #09090b;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.12s ease;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f4f4f5;
  cursor: pointer;
  border: 2px solid #09090b;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.12s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Code Preview Block */
pre code {
  color: #e4e4e7;
  font-size: 13px;
  line-height: 1.6;
}

/* Scrollbar customization */
.custom-scroll::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

.custom-scroll::-webkit-scrollbar-track {
  background: #111215;
}

.custom-scroll::-webkit-scrollbar-thumb {
  background: #282b35;
  border-radius: 3px;
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
  background: #3e4454;
}

/* Terminal Log Lines */
.log-line {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding: 4px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.log-line:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Modal Backdrops & Dialogs */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modalFadeIn 0.15s ease-out;
}

.modal-dialog {
  background-color: #111215;
  border: 1px solid #282b35;
  border-radius: 12px;
  max-width: 540px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}
