/*
 * Scale AI Snippets Design System
 * CSS Custom Properties using official Scale AI brand colors
 * Based on SCALE_BRAND_GUIDE.md
 */

/* ============================================
   FONT FACES - Scale AI Brand Typography
   ============================================ */
@font-face {
  font-family: 'Aeonik';
  src: url(/assets/Aeonik-Light.woff2) format('woff2'),
       url(/assets/Aeonik-Light.woff) format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aeonik';
  src: url(/assets/Aeonik-Regular.woff2) format('woff2'),
       url(/assets/Aeonik-Regular.woff) format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aeonik';
  src: url(/assets/Aeonik-Medium.woff2) format('woff2'),
       url(/assets/Aeonik-Medium.woff) format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Aeonik';
  src: url(/assets/Aeonik-Bold.woff2) format('woff2'),
       url(/assets/Aeonik-Bold.woff) format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   ROOT VARIABLES - Dark Mode (Default)
   ============================================ */
:root {
  /* Scale AI Primary Brand Colors */
  --scale-mauve: #C88BC4;
  --scale-periwinkle: #7B8FDD;
  --scale-skyblue: #86BFF2;
  --scale-lightmauve: #D1AAD7;
  --scale-lightskyblue: #BBDEF2;

  /* Scale AI Utility Colors */
  --scale-blue: #0076FF;
  --scale-magenta: #DD45D3;
  --scale-purple: #943CFF;
  --scale-orange: #FD9D52;

  /* Brand Colors (using Scale periwinkle as primary) */
  --scale-brand: #7B8FDD;
  --scale-brand-hover: #6B80D2;
  --scale-brand-active: #5B70C2;
  --scale-brand-soft: rgba(123, 143, 221, 0.2);
  --scale-brand-muted: rgba(123, 143, 221, 0.15);

  /* Signature Gradient (Pink-to-Blue through all 5 brand colors) */
  --scale-gradient: linear-gradient(90deg, #D1AAD7 0%, #C88BC4 25%, #7B8FDD 50%, #86BFF2 75%, #BBDEF2 100%);

  /* Background Colors (Scale AI dark theme) */
  --scale-bg-primary: #020202;    /* Off Black from brand guide */
  --scale-bg-secondary: #0A0A0A;
  --scale-bg-tertiary: #111111;
  --scale-bg-elevated: #1A1A1A;
  --scale-bg-hover: rgba(255, 255, 255, 0.05);
  --scale-bg-active: rgba(255, 255, 255, 0.08);

  /* Text Colors */
  --scale-text-primary: #FFFFFF;
  --scale-text-secondary: #A1A1A1;
  --scale-text-muted: #6B7280;
  --scale-text-disabled: #4B5563;
  --scale-text-inverse: #030712;

  /* Border Colors */
  --scale-border: rgba(255, 255, 255, 0.10);
  --scale-border-hover: rgba(255, 255, 255, 0.15);
  --scale-border-focus: #2563EB;
  --scale-border-muted: rgba(255, 255, 255, 0.06);

  /* Semantic Colors */
  --scale-success: #10B981;
  --scale-success-soft: rgba(16, 185, 129, 0.15);
  --scale-success-text: #34D399;

  --scale-warning: #F59E0B;
  --scale-warning-soft: rgba(245, 158, 11, 0.15);
  --scale-warning-text: #FBBF24;

  --scale-error: #EF4444;
  --scale-error-soft: rgba(239, 68, 68, 0.15);
  --scale-error-text: #F87171;

  --scale-info: #2563EB;
  --scale-info-soft: rgba(37, 99, 235, 0.15);
  --scale-info-text: #60A5FA;

  /* Typography (Scale AI brand fonts) */
  --scale-font-heading: 'Aeonik', -apple-system, Arial, sans-serif;
  --scale-font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --scale-font-mono: 'IBM Plex Mono', 'JetBrains Mono', 'Fira Code', 'SF Mono', Monaco, monospace;

  /* Font Sizes */
  --scale-text-xs: 0.75rem;
  --scale-text-sm: 0.875rem;
  --scale-text-base: 1rem;
  --scale-text-lg: 1.125rem;
  --scale-text-xl: 1.25rem;
  --scale-text-2xl: 1.5rem;
  --scale-text-3xl: 1.875rem;
  --scale-text-4xl: 2.25rem;
  --scale-text-5xl: 3rem;

  /* Line Heights */
  --scale-leading-none: 1;
  --scale-leading-tight: 1.25;
  --scale-leading-snug: 1.375;
  --scale-leading-normal: 1.5;
  --scale-leading-relaxed: 1.625;

  /* Font Weights */
  --scale-font-normal: 400;
  --scale-font-medium: 500;
  --scale-font-semibold: 600;
  --scale-font-bold: 700;

  /* Spacing */
  --scale-space-0: 0;
  --scale-space-1: 0.25rem;
  --scale-space-2: 0.5rem;
  --scale-space-3: 0.75rem;
  --scale-space-4: 1rem;
  --scale-space-5: 1.25rem;
  --scale-space-6: 1.5rem;
  --scale-space-8: 2rem;
  --scale-space-10: 2.5rem;
  --scale-space-12: 3rem;
  --scale-space-16: 4rem;
  --scale-space-20: 5rem;
  --scale-space-24: 6rem;

  /* Border Radius */
  --scale-radius-none: 0;
  --scale-radius-sm: 0.25rem;
  --scale-radius-md: 0.5rem;
  --scale-radius-lg: 0.75rem;
  --scale-radius-xl: 1rem;
  --scale-radius-2xl: 1.5rem;
  --scale-radius-full: 9999px;

  /* Shadows */
  --scale-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --scale-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
  --scale-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
  --scale-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  --scale-shadow-glow: 0 0 20px rgba(37, 99, 235, 0.3);

  /* Focus Ring */
  --scale-ring: 0 0 0 3px rgba(37, 99, 235, 0.25);
  --scale-ring-error: 0 0 0 3px rgba(239, 68, 68, 0.25);

  /* Transitions */
  --scale-transition-fast: 100ms ease;
  --scale-transition-base: 150ms ease;
  --scale-transition-slow: 300ms ease;
  --scale-transition-enter: 200ms ease-out;
  --scale-transition-exit: 150ms ease-in;

  /* Z-Index Scale */
  --scale-z-dropdown: 10;
  --scale-z-sticky: 20;
  --scale-z-overlay: 30;
  --scale-z-modal: 40;
  --scale-z-tooltip: 50;
  --scale-z-toast: 60;

  /* Layout */
  --scale-max-width-sm: 640px;
  --scale-max-width-md: 768px;
  --scale-max-width-lg: 1024px;
  --scale-max-width-xl: 1280px;
  --scale-max-width-2xl: 1536px;

  /* Code Block Theme */
  --code-bg: #0A0A0A;
  --code-text: #E5E5E5;
  --code-comment: #6B7280;
  --code-keyword: #A78BFA;
  --code-string: #34D399;
  --code-number: #F59E0B;
  --code-function: #60A5FA;
  --code-class: #F472B6;
  --code-variable: #E5E5E5;
  --code-operator: #9CA3AF;
  --code-punctuation: #6B7280;
  --code-constant: #FBBF24;
  --code-regex: #F87171;
  --code-line-number: #4B5563;
  --code-selection: rgba(37, 99, 235, 0.3);
  --code-line-highlight: rgba(255, 255, 255, 0.05);
}

/* ============================================
   LIGHT MODE OVERRIDES
   ============================================ */
[data-theme="light"],
.light {
  /* Background Colors */
  --scale-bg-primary: #FFFFFF;
  --scale-bg-secondary: #F9FAFB;
  --scale-bg-tertiary: #F3F4F6;
  --scale-bg-elevated: #FFFFFF;
  --scale-bg-hover: rgba(0, 0, 0, 0.03);
  --scale-bg-active: rgba(0, 0, 0, 0.05);

  /* Text Colors */
  --scale-text-primary: #030712;
  --scale-text-secondary: #374151;
  --scale-text-muted: #6B7280;
  --scale-text-disabled: #9CA3AF;
  --scale-text-inverse: #FFFFFF;

  /* Border Colors */
  --scale-border: #E5E7EB;
  --scale-border-hover: #D1D5DB;
  --scale-border-muted: #F3F4F6;

  /* Semantic Colors - Adjusted for light mode */
  --scale-success-text: #059669;
  --scale-warning-text: #D97706;
  --scale-error-text: #DC2626;
  --scale-info-text: #2563EB;

  /* Shadows - Lighter for light mode */
  --scale-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --scale-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --scale-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --scale-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  /* Code Block Theme - Light */
  --code-bg: #F8FAFC;
  --code-text: #1E293B;
  --code-comment: #64748B;
  --code-keyword: #7C3AED;
  --code-string: #059669;
  --code-number: #D97706;
  --code-function: #2563EB;
  --code-class: #DB2777;
  --code-variable: #1E293B;
  --code-operator: #475569;
  --code-punctuation: #64748B;
  --code-constant: #CA8A04;
  --code-regex: #DC2626;
  --code-line-number: #94A3B8;
  --code-selection: rgba(37, 99, 235, 0.2);
  --code-line-highlight: rgba(0, 0, 0, 0.03);
}

/* ============================================
   THEME TRANSITION
   ============================================ */
html {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

body,
body * {
  transition: background-color var(--scale-transition-slow),
              border-color var(--scale-transition-slow),
              color var(--scale-transition-fast);
}

/* Disable transitions for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  body,
  body * {
    transition: none !important;
  }
}

/* ============================================
   BASE STYLES
   ============================================ */
body {
  font-family: var(--scale-font-sans);
  background-color: var(--scale-bg-primary);
  color: var(--scale-text-primary);
  line-height: var(--scale-leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   COMPONENT STYLES
   ============================================ */

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--scale-space-2);
  padding: var(--scale-space-3) var(--scale-space-6);
  font-family: var(--scale-font-sans);
  font-size: var(--scale-text-sm);
  font-weight: var(--scale-font-semibold);
  line-height: var(--scale-leading-tight);
  border-radius: var(--scale-radius-md);
  cursor: pointer;
  transition: all var(--scale-transition-base);
  border: 1px solid transparent;
  text-decoration: none;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--scale-ring);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--scale-brand);
  color: white;
  border-color: var(--scale-brand);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--scale-brand-hover);
  border-color: var(--scale-brand-hover);
}

.btn-primary:active:not(:disabled) {
  background-color: var(--scale-brand-active);
}

.btn-secondary {
  background-color: transparent;
  color: var(--scale-text-primary);
  border-color: var(--scale-border);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--scale-bg-hover);
  border-color: var(--scale-border-hover);
}

.btn-ghost {
  background-color: transparent;
  color: var(--scale-text-secondary);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background-color: var(--scale-bg-hover);
  color: var(--scale-text-primary);
}

.btn-danger {
  background-color: var(--scale-error);
  color: white;
  border-color: var(--scale-error);
}

.btn-danger:hover:not(:disabled) {
  background-color: #DC2626;
  border-color: #DC2626;
}

.btn-sm {
  padding: var(--scale-space-2) var(--scale-space-4);
  font-size: var(--scale-text-xs);
}

.btn-lg {
  padding: var(--scale-space-4) var(--scale-space-8);
  font-size: var(--scale-text-base);
}

/* --- Inputs --- */
.input {
  width: 100%;
  padding: var(--scale-space-3) var(--scale-space-4);
  font-family: var(--scale-font-sans);
  font-size: var(--scale-text-sm);
  color: var(--scale-text-primary);
  background-color: var(--scale-bg-tertiary);
  border: 1px solid var(--scale-border);
  border-radius: var(--scale-radius-md);
  transition: all var(--scale-transition-base);
}

.input::placeholder {
  color: var(--scale-text-muted);
}

.input:hover:not(:disabled):not(:focus) {
  border-color: var(--scale-border-hover);
}

.input:focus {
  outline: none;
  border-color: var(--scale-border-focus);
  box-shadow: var(--scale-ring);
}

.input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.input-error {
  border-color: var(--scale-error);
}

.input-error:focus {
  box-shadow: var(--scale-ring-error);
}

/* Textarea specific */
.textarea {
  min-height: 120px;
  resize: vertical;
}

/* Monospace input for code */
.input-mono {
  font-family: var(--scale-font-mono);
}

/* Select */
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

/* --- Cards --- */
.card {
  background-color: var(--scale-bg-tertiary);
  border: 1px solid var(--scale-border);
  border-radius: var(--scale-radius-2xl);
  padding: var(--scale-space-6);
}

.card-compact {
  padding: var(--scale-space-4);
  border-radius: var(--scale-radius-lg);
}

.card-elevated {
  background-color: var(--scale-bg-elevated);
  box-shadow: var(--scale-shadow-lg);
}

.card-glass {
  background: radial-gradient(398.67% 398.67% at 50% 100%, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.00) 60%);
  border: 1px solid var(--scale-border);
  backdrop-filter: blur(8px);
}

.card-interactive {
  cursor: pointer;
  transition: all var(--scale-transition-base);
}

.card-interactive:hover {
  background-color: var(--scale-bg-hover);
  border-color: var(--scale-border-hover);
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--scale-space-1);
  padding: var(--scale-space-1) var(--scale-space-2);
  font-size: var(--scale-text-xs);
  font-weight: var(--scale-font-medium);
  border-radius: var(--scale-radius-md);
}

.badge-default {
  background-color: var(--scale-bg-hover);
  color: var(--scale-text-secondary);
}

.badge-brand {
  background-color: var(--scale-brand-muted);
  color: var(--scale-info-text);
}

.badge-success {
  background-color: var(--scale-success-soft);
  color: var(--scale-success-text);
}

.badge-warning {
  background-color: var(--scale-warning-soft);
  color: var(--scale-warning-text);
}

.badge-error {
  background-color: var(--scale-error-soft);
  color: var(--scale-error-text);
}

/* --- Code Blocks --- */
.code-block {
  background-color: var(--code-bg);
  border: 1px solid var(--scale-border);
  border-radius: var(--scale-radius-lg);
  overflow: hidden;
}

.code-block pre {
  margin: 0;
  padding: var(--scale-space-4);
  overflow-x: auto;
  font-family: var(--scale-font-mono);
  font-size: var(--scale-text-sm);
  line-height: var(--scale-leading-relaxed);
  color: var(--code-text);
}

.code-block code {
  font-family: inherit;
}

/* Line numbers */
.code-block .line-numbers {
  user-select: none;
  color: var(--code-line-number);
  text-align: right;
  padding-right: var(--scale-space-4);
  border-right: 1px solid var(--scale-border);
  margin-right: var(--scale-space-4);
}

/* --- Alerts --- */
.alert {
  display: flex;
  gap: var(--scale-space-3);
  padding: var(--scale-space-4);
  border-radius: var(--scale-radius-lg);
  border: 1px solid;
}

.alert-success {
  background-color: var(--scale-success-soft);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--scale-success-text);
}

.alert-warning {
  background-color: var(--scale-warning-soft);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--scale-warning-text);
}

.alert-error {
  background-color: var(--scale-error-soft);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--scale-error-text);
}

.alert-info {
  background-color: var(--scale-info-soft);
  border-color: rgba(37, 99, 235, 0.3);
  color: var(--scale-info-text);
}

/* --- Navigation --- */
.nav-header {
  background-color: var(--scale-bg-primary);
  border-bottom: 1px solid var(--scale-border-muted);
  height: 64px;
}

.nav-link {
  color: var(--scale-text-secondary);
  font-size: var(--scale-text-sm);
  font-weight: var(--scale-font-medium);
  padding: var(--scale-space-2) var(--scale-space-3);
  border-radius: var(--scale-radius-md);
  transition: all var(--scale-transition-fast);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--scale-text-primary);
  background-color: var(--scale-bg-hover);
}

.nav-link-active {
  color: var(--scale-text-primary);
  background-color: var(--scale-bg-active);
}

/* --- Logo --- */
.logo {
  font-size: var(--scale-text-xl);
  font-weight: var(--scale-font-bold);
  color: var(--scale-text-primary);
  text-decoration: none;
}

.logo-gradient {
  background: var(--scale-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Tooltips --- */
.tooltip {
  position: relative;
}

.tooltip-content {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  padding: var(--scale-space-2) var(--scale-space-3);
  background-color: var(--scale-bg-elevated);
  color: var(--scale-text-primary);
  font-size: var(--scale-text-xs);
  border-radius: var(--scale-radius-md);
  box-shadow: var(--scale-shadow-lg);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--scale-transition-fast);
  z-index: var(--scale-z-tooltip);
}

.tooltip:hover .tooltip-content {
  opacity: 1;
  visibility: visible;
}

/* --- Dropdowns --- */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: var(--scale-space-2);
  min-width: 200px;
  background-color: var(--scale-bg-tertiary);
  border: 1px solid var(--scale-border);
  border-radius: var(--scale-radius-lg);
  box-shadow: var(--scale-shadow-xl);
  z-index: var(--scale-z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--scale-transition-enter);
}

.dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: var(--scale-space-3) var(--scale-space-4);
  font-size: var(--scale-text-sm);
  color: var(--scale-text-secondary);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--scale-transition-fast);
}

.dropdown-item:hover {
  background-color: var(--scale-bg-hover);
  color: var(--scale-text-primary);
}

.dropdown-item:first-child {
  border-radius: var(--scale-radius-lg) var(--scale-radius-lg) 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 var(--scale-radius-lg) var(--scale-radius-lg);
}

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--scale-space-4);
  z-index: var(--scale-z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: all var(--scale-transition-base);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background-color: var(--scale-bg-tertiary);
  border: 1px solid var(--scale-border);
  border-radius: var(--scale-radius-2xl);
  padding: var(--scale-space-8);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--scale-shadow-xl);
  transform: scale(0.95) translateY(20px);
  transition: all var(--scale-transition-enter);
  z-index: var(--scale-z-modal);
}

.modal-overlay.open .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  margin-bottom: var(--scale-space-6);
}

.modal-title {
  font-size: var(--scale-text-xl);
  font-weight: var(--scale-font-semibold);
  color: var(--scale-text-primary);
}

.modal-body {
  color: var(--scale-text-secondary);
}

.modal-footer {
  margin-top: var(--scale-space-6);
  display: flex;
  gap: var(--scale-space-3);
  justify-content: flex-end;
}

/* --- Empty States --- */
.empty-state {
  text-align: center;
  padding: var(--scale-space-12) var(--scale-space-6);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--scale-space-4);
  color: var(--scale-text-muted);
  opacity: 0.5;
}

.empty-state-title {
  font-size: var(--scale-text-lg);
  font-weight: var(--scale-font-medium);
  color: var(--scale-text-primary);
  margin-bottom: var(--scale-space-2);
}

.empty-state-description {
  font-size: var(--scale-text-sm);
  color: var(--scale-text-muted);
  margin-bottom: var(--scale-space-6);
}

/* --- Tables --- */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  padding: var(--scale-space-3) var(--scale-space-4);
  text-align: left;
  font-size: var(--scale-text-xs);
  font-weight: var(--scale-font-medium);
  color: var(--scale-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--scale-bg-secondary);
  border-bottom: 1px solid var(--scale-border);
}

.table td {
  padding: var(--scale-space-4);
  font-size: var(--scale-text-sm);
  color: var(--scale-text-secondary);
  border-bottom: 1px solid var(--scale-border);
}

.table tbody tr {
  transition: background-color var(--scale-transition-fast);
}

.table tbody tr:hover {
  background-color: var(--scale-bg-hover);
}

/* --- Utility Classes --- */
.text-gradient {
  background: var(--scale-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.border-gradient {
  border: 1px solid transparent;
  background: linear-gradient(var(--scale-bg-tertiary), var(--scale-bg-tertiary)) padding-box,
              var(--scale-gradient) border-box;
}

.glow {
  box-shadow: var(--scale-shadow-glow);
}

/* Focus visible for accessibility */
.focus-ring:focus-visible {
  outline: none;
  box-shadow: var(--scale-ring);
}

/* Screen reader only */
.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;
}

/* ============================================
   SCALE AI BRAND COMPONENTS
   ============================================ */

/* Scale AI Pill Button (White) */
.btn-scale {
  background: #FFFFFF;
  color: #000000;
  border-radius: 9999px;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 400ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
}

.btn-scale:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-scale:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Scale AI Gradient Button */
.btn-scale-gradient {
  background: linear-gradient(90deg, #D1AAD7 0%, #C88BC4 25%, #7B8FDD 50%, #86BFF2 75%, #BBDEF2 100%);
  color: #000000;
  border-radius: 9999px;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 400ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
}

.btn-scale-gradient:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(200, 139, 196, 0.4);
}

.btn-scale-gradient:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Glass Card - Scale AI signature effect */
.glass-card {
  background: radial-gradient(398.67% 398.67% at 50% 100%, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.00) 60%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px);
  border-radius: 1rem;
}

/* Glass Border - Gradient border effect */
.glass-border {
  border: 1px solid transparent;
  background: linear-gradient(var(--scale-bg-tertiary), var(--scale-bg-tertiary)) padding-box,
              linear-gradient(90deg, #D1AAD7 0%, #C88BC4 25%, #7B8FDD 50%, #86BFF2 75%, #BBDEF2 100%) border-box;
  border-radius: 1rem;
}

/* Focus Ring with Scale colors */
.focus-ring-scale:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(123, 143, 221, 0.4);
}

/* Heading font family utility */
.font-heading {
  font-family: 'Aeonik', -apple-system, Arial, sans-serif;
}
/*
 * Scale Snippets - Premium UX Components
 * Styles for keyboard shortcuts, toasts, command palette, etc.
 */

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  z-index: var(--scale-z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--scale-space-3);
  pointer-events: none;
  max-width: 420px;
  width: 100%;
  padding: var(--scale-space-4);
}

/* Position variants */
.toast-bottom-right {
  bottom: 0;
  right: 0;
}

.toast-bottom-left {
  bottom: 0;
  left: 0;
}

.toast-top-right {
  top: 0;
  right: 0;
  flex-direction: column-reverse;
}

.toast-top-left {
  top: 0;
  left: 0;
  flex-direction: column-reverse;
}

.toast-top-center {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: column-reverse;
}

.toast-bottom-center {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* Toast item */
.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--scale-space-3);
  padding: var(--scale-space-3) var(--scale-space-4);
  background-color: var(--scale-bg-elevated);
  border: 1px solid var(--scale-border);
  border-radius: var(--scale-radius-lg);
  box-shadow: var(--scale-shadow-lg);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--scale-transition-enter);
}

.toast-show {
  opacity: 1;
  transform: translateY(0);
}

.toast-hide {
  opacity: 0;
  transform: translateY(-10px);
  transition: all var(--scale-transition-exit);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: var(--scale-space-3);
  flex: 1;
  min-width: 0;
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.toast-message {
  font-size: var(--scale-text-sm);
  color: var(--scale-text-primary);
  line-height: var(--scale-leading-snug);
}

.toast-actions {
  display: flex;
  align-items: center;
  gap: var(--scale-space-2);
  flex-shrink: 0;
}

.toast-action {
  font-size: var(--scale-text-sm);
  font-weight: var(--scale-font-medium);
  color: var(--scale-brand);
  background: none;
  border: none;
  padding: var(--scale-space-1) var(--scale-space-2);
  cursor: pointer;
  border-radius: var(--scale-radius-sm);
  transition: background-color var(--scale-transition-fast);
}

.toast-action:hover {
  background-color: var(--scale-bg-hover);
}

.toast-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  color: var(--scale-text-muted);
  cursor: pointer;
  border-radius: var(--scale-radius-sm);
  transition: all var(--scale-transition-fast);
}

.toast-close:hover {
  color: var(--scale-text-primary);
  background-color: var(--scale-bg-hover);
}

/* Toast type variants */
.toast-success {
  border-color: rgba(16, 185, 129, 0.3);
}

.toast-success .toast-icon {
  color: var(--scale-success-text);
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.3);
}

.toast-error .toast-icon {
  color: var(--scale-error-text);
}

.toast-warning {
  border-color: rgba(245, 158, 11, 0.3);
}

.toast-warning .toast-icon {
  color: var(--scale-warning-text);
}

.toast-info {
  border-color: rgba(37, 99, 235, 0.3);
}

.toast-info .toast-icon {
  color: var(--scale-info-text);
}

/* ============================================
   COMMAND PALETTE
   ============================================ */
.command-palette-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--scale-z-modal);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh var(--scale-space-4) var(--scale-space-4);
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all var(--scale-transition-base);
}

.command-palette-overlay.open {
  opacity: 1;
  visibility: visible;
}

.command-palette-dialog {
  width: 100%;
  max-width: 560px;
  background-color: var(--scale-bg-tertiary);
  border: 1px solid var(--scale-border);
  border-radius: var(--scale-radius-xl);
  box-shadow: var(--scale-shadow-xl);
  overflow: hidden;
  transform: scale(0.95) translateY(-10px);
  transition: transform var(--scale-transition-enter);
}

.command-palette-overlay.open .command-palette-dialog {
  transform: scale(1) translateY(0);
}

/* Search input */
.command-palette-input {
  width: 100%;
  padding: var(--scale-space-4) var(--scale-space-5);
  font-size: var(--scale-text-base);
  color: var(--scale-text-primary);
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--scale-border);
  outline: none;
}

.command-palette-input::placeholder {
  color: var(--scale-text-muted);
}

/* Results */
.command-palette-results {
  max-height: 400px;
  overflow-y: auto;
  padding: var(--scale-space-2);
}

.command-group {
  padding: var(--scale-space-2) 0;
}

.command-group:not(:last-child) {
  border-bottom: 1px solid var(--scale-border-muted);
}

.command-group-title {
  padding: var(--scale-space-2) var(--scale-space-3);
  font-size: var(--scale-text-xs);
  font-weight: var(--scale-font-semibold);
  color: var(--scale-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.command-item {
  display: flex;
  align-items: center;
  gap: var(--scale-space-3);
  padding: var(--scale-space-3) var(--scale-space-3);
  border-radius: var(--scale-radius-md);
  cursor: pointer;
  transition: background-color var(--scale-transition-fast);
}

.command-item:hover,
.command-item-selected {
  background-color: var(--scale-bg-hover);
}

.command-item-selected {
  background-color: var(--scale-brand-muted);
}

.command-item-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--scale-text-muted);
}

.command-item-icon svg {
  width: 100%;
  height: 100%;
}

.command-item-content {
  flex: 1;
  min-width: 0;
}

.command-item-title {
  font-size: var(--scale-text-sm);
  font-weight: var(--scale-font-medium);
  color: var(--scale-text-primary);
}

.command-item-description {
  font-size: var(--scale-text-xs);
  color: var(--scale-text-muted);
  margin-top: 2px;
}

.command-item-shortcut {
  flex-shrink: 0;
  padding: var(--scale-space-1) var(--scale-space-2);
  font-family: var(--scale-font-mono);
  font-size: var(--scale-text-xs);
  color: var(--scale-text-muted);
  background-color: var(--scale-bg-secondary);
  border: 1px solid var(--scale-border);
  border-radius: var(--scale-radius-sm);
}

.command-empty {
  padding: var(--scale-space-8);
  text-align: center;
  color: var(--scale-text-muted);
  font-size: var(--scale-text-sm);
}

/* ============================================
   KEYBOARD SHORTCUTS MODAL
   ============================================ */
.shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: var(--scale-space-6);
}

.shortcut-group {
  display: flex;
  flex-direction: column;
  gap: var(--scale-space-2);
}

.shortcut-group-title {
  font-size: var(--scale-text-xs);
  font-weight: var(--scale-font-semibold);
  color: var(--scale-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--scale-space-2);
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--scale-space-2) 0;
}

.shortcut-description {
  font-size: var(--scale-text-sm);
  color: var(--scale-text-secondary);
}

.shortcut-key {
  padding: var(--scale-space-1) var(--scale-space-2);
  font-family: var(--scale-font-mono);
  font-size: var(--scale-text-xs);
  color: var(--scale-text-primary);
  background-color: var(--scale-bg-secondary);
  border: 1px solid var(--scale-border);
  border-radius: var(--scale-radius-sm);
  box-shadow: 0 1px 0 0 var(--scale-border);
}

/* ============================================
   FILE DROP ZONE
   ============================================ */
.file-drop-dragging {
  position: relative;
}

.file-drop-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(37, 99, 235, 0.1);
  border: 2px dashed var(--scale-brand);
  border-radius: var(--scale-radius-lg);
  transition: all var(--scale-transition-base);
}

.file-drop-overlay.hidden {
  display: none;
}

.file-drop-active {
  background-color: rgba(37, 99, 235, 0.15);
}

.file-drop-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--scale-space-3);
  padding: var(--scale-space-8);
  text-align: center;
}

.file-drop-message-icon {
  width: 48px;
  height: 48px;
  color: var(--scale-brand);
}

.file-drop-message-text {
  font-size: var(--scale-text-lg);
  font-weight: var(--scale-font-medium);
  color: var(--scale-brand);
}

.file-drop-message-hint {
  font-size: var(--scale-text-sm);
  color: var(--scale-text-muted);
}

/* ============================================
   PREVIEW TABS
   ============================================ */
.preview-tabs {
  display: flex;
  align-items: center;
  gap: var(--scale-space-1);
  padding: var(--scale-space-2);
  background-color: var(--scale-bg-secondary);
  border-bottom: 1px solid var(--scale-border);
  border-radius: var(--scale-radius-lg) var(--scale-radius-lg) 0 0;
}

.preview-tab {
  padding: var(--scale-space-2) var(--scale-space-4);
  font-size: var(--scale-text-sm);
  font-weight: var(--scale-font-medium);
  color: var(--scale-text-muted);
  background: none;
  border: none;
  border-radius: var(--scale-radius-md);
  cursor: pointer;
  transition: all var(--scale-transition-fast);
}

.preview-tab:hover {
  color: var(--scale-text-secondary);
  background-color: var(--scale-bg-hover);
}

.preview-tab-active {
  color: var(--scale-text-primary);
  background-color: var(--scale-bg-tertiary);
}

.preview-split-button {
  margin-left: auto;
}

/* Split view */
.preview-split-mode .preview-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--scale-space-4);
}

@media (max-width: 768px) {
  .preview-split-mode .preview-panels {
    grid-template-columns: 1fr;
  }
}

.preview-panel {
  min-height: 300px;
}

.preview-empty {
  color: var(--scale-text-muted);
  font-style: italic;
}

.preview-loading {
  opacity: 0.6;
}

/* Syntax highlighting in preview */
.highlight-comment { color: var(--code-comment); }
.highlight-string { color: var(--code-string); }
.highlight-keyword { color: var(--code-keyword); }
.highlight-number { color: var(--code-number); }
.highlight-function { color: var(--code-function); }

/* ============================================
   ENHANCED CODE BLOCK
   ============================================ */
.code-block-enhanced {
  position: relative;
  background-color: var(--code-bg);
  border: 1px solid var(--scale-border);
  border-radius: var(--scale-radius-lg);
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--scale-space-3) var(--scale-space-4);
  background-color: var(--scale-bg-secondary);
  border-bottom: 1px solid var(--scale-border);
}

.code-block-language {
  font-size: var(--scale-text-xs);
  font-weight: var(--scale-font-medium);
  color: var(--scale-text-muted);
  text-transform: uppercase;
}

.code-block-actions {
  display: flex;
  align-items: center;
  gap: var(--scale-space-2);
}

.code-block-action {
  display: flex;
  align-items: center;
  gap: var(--scale-space-1);
  padding: var(--scale-space-1) var(--scale-space-2);
  font-size: var(--scale-text-xs);
  color: var(--scale-text-muted);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--scale-radius-sm);
  cursor: pointer;
  transition: all var(--scale-transition-fast);
}

.code-block-action:hover {
  color: var(--scale-text-primary);
  background-color: var(--scale-bg-hover);
  border-color: var(--scale-border);
}

.code-block-content {
  display: flex;
  overflow-x: auto;
}

/* Line numbers column */
.code-line-numbers {
  flex-shrink: 0;
  padding: var(--scale-space-4) 0;
  text-align: right;
  user-select: none;
  background-color: var(--scale-bg-secondary);
  border-right: 1px solid var(--scale-border);
}

.code-line-number {
  display: block;
  padding: 0 var(--scale-space-3);
  font-family: var(--scale-font-mono);
  font-size: var(--scale-text-sm);
  line-height: var(--scale-leading-relaxed);
  color: var(--code-line-number);
  cursor: pointer;
  transition: all var(--scale-transition-fast);
}

.code-line-number:hover {
  color: var(--scale-text-secondary);
  background-color: var(--scale-bg-hover);
}

.code-line-number.code-line-highlighted {
  color: var(--scale-text-primary);
  background-color: var(--code-line-highlight);
}

/* Code content */
.code-block-code {
  flex: 1;
  margin: 0;
  padding: var(--scale-space-4);
  overflow-x: auto;
  font-family: var(--scale-font-mono);
  font-size: var(--scale-text-sm);
  line-height: var(--scale-leading-relaxed);
  color: var(--code-text);
}

.code-block-code code {
  font-family: inherit;
}

/* Line highlighting */
.code-line {
  display: block;
  padding: 0 var(--scale-space-2);
  margin: 0 calc(-1 * var(--scale-space-2));
}

.code-line.code-line-highlighted {
  background-color: var(--code-line-highlight);
  border-left: 3px solid var(--scale-brand);
  padding-left: calc(var(--scale-space-2) - 3px);
}

/* Word wrap */
.code-wrap {
  white-space: pre-wrap;
  word-break: break-word;
}

/* Line actions menu */
.code-line-actions-menu {
  position: absolute;
  display: flex;
  align-items: center;
  gap: var(--scale-space-1);
  padding: var(--scale-space-1);
  background-color: var(--scale-bg-elevated);
  border: 1px solid var(--scale-border);
  border-radius: var(--scale-radius-md);
  box-shadow: var(--scale-shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--scale-transition-fast);
  z-index: 10;
}

.code-line-actions-menu.visible {
  opacity: 1;
  visibility: visible;
}

.code-line-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--scale-text-muted);
  background: none;
  border: none;
  border-radius: var(--scale-radius-sm);
  cursor: pointer;
  transition: all var(--scale-transition-fast);
}

.code-line-action:hover {
  color: var(--scale-text-primary);
  background-color: var(--scale-bg-hover);
}

/* No line numbers mode */
.code-block-no-line-numbers .code-line-numbers {
  display: none;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  position: fixed;
  top: 64px; /* Nav height */
  left: 0;
  width: 280px;
  height: calc(100vh - 64px);
  background-color: var(--scale-bg-secondary);
  border-right: 1px solid var(--scale-border);
  overflow-y: auto;
  transform: translateX(0);
  transition: transform var(--scale-transition-slow);
  z-index: var(--scale-z-sticky);
}

.sidebar-collapsed {
  transform: translateX(-100%);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--scale-space-4);
  border-bottom: 1px solid var(--scale-border);
}

.sidebar-title {
  font-size: var(--scale-text-sm);
  font-weight: var(--scale-font-semibold);
  color: var(--scale-text-primary);
}

.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--scale-text-muted);
  background: none;
  border: none;
  border-radius: var(--scale-radius-sm);
  cursor: pointer;
  transition: all var(--scale-transition-fast);
}

.sidebar-toggle:hover {
  color: var(--scale-text-primary);
  background-color: var(--scale-bg-hover);
}

.sidebar-content {
  padding: var(--scale-space-3);
}

/* Sidebar items */
.sidebar-item {
  display: block;
  padding: var(--scale-space-3);
  border-radius: var(--scale-radius-md);
  text-decoration: none;
  transition: background-color var(--scale-transition-fast);
}

.sidebar-item:hover {
  background-color: var(--scale-bg-hover);
}

.sidebar-item-title {
  font-size: var(--scale-text-sm);
  font-weight: var(--scale-font-medium);
  color: var(--scale-text-primary);
  margin-bottom: var(--scale-space-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-item-meta {
  display: flex;
  align-items: center;
  gap: var(--scale-space-2);
  font-size: var(--scale-text-xs);
  color: var(--scale-text-muted);
}

.sidebar-item-language {
  padding: 2px var(--scale-space-1);
  background-color: var(--scale-bg-tertiary);
  border-radius: var(--scale-radius-sm);
}

/* Mobile sidebar */
.sidebar-mobile .sidebar {
  width: 100%;
  max-width: 320px;
}

.sidebar-mobile .sidebar-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: calc(var(--scale-z-sticky) - 1);
}

.sidebar-mobile .sidebar-overlay.hidden {
  display: none;
}

/* Content offset when sidebar is open */
.sidebar-open .main-content {
  margin-left: 280px;
}

@media (max-width: 768px) {
  .sidebar-open .main-content {
    margin-left: 0;
  }
}

/* ============================================
   CLIPBOARD FEEDBACK
   ============================================ */
.clipboard-success {
  color: var(--scale-success-text) !important;
}

.clipboard-error {
  color: var(--scale-error-text) !important;
}

/* ============================================
   KEYBOARD SHORTCUT HINTS
   ============================================ */
.shortcut-hint {
  font-family: var(--scale-font-mono);
  font-size: var(--scale-text-2xs);
  color: var(--scale-text-muted);
  padding: 2px 4px;
  background-color: var(--scale-bg-secondary);
  border: 1px solid var(--scale-border);
  border-radius: var(--scale-radius-sm);
  margin-left: var(--scale-space-2);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .toast,
  .command-palette-overlay,
  .command-palette-dialog,
  .sidebar,
  .code-line-actions-menu {
    transition: none !important;
  }
}

/* Focus visible styles */
.command-item:focus-visible,
.sidebar-item:focus-visible,
.code-line-number:focus-visible {
  outline: 2px solid var(--scale-brand);
  outline-offset: 2px;
}
/*
 * Scale Snippets - Application Styles
 * Uses Tailwind CSS for most styling
 * This file contains Rouge syntax highlighting theme and premium UX components
 *


 */

/* Rouge Syntax Highlighting - Monokai Dark Theme */
.highlight {
  color: #f8f8f2;
}

.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sa { color: #e6db74 } /* Literal.String.Affix */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #a6e22e } /* Name.Function.Magic */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */

/* Custom scrollbar for code blocks */
pre::-webkit-scrollbar {
  height: 8px;
}

pre::-webkit-scrollbar-track {
  background: #1f2937;
  border-radius: 4px;
}

pre::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 4px;
}

pre::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Markdown content styling */
.markdown-content {
  line-height: 1.7;
}

.markdown-content h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: #f3f4f6;
  border-bottom: 1px solid #374151;
  padding-bottom: 0.5rem;
}

.markdown-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #e5e7eb;
}

.markdown-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: #d1d5db;
}

.markdown-content h4, .markdown-content h5, .markdown-content h6 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: #d1d5db;
}

.markdown-content p {
  margin-bottom: 1rem;
}

.markdown-content ul, .markdown-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.markdown-content ul {
  list-style-type: disc;
}

.markdown-content ol {
  list-style-type: decimal;
}

.markdown-content li {
  margin-bottom: 0.25rem;
}

.markdown-content li > ul, .markdown-content li > ol {
  margin-top: 0.25rem;
  margin-bottom: 0;
}

.markdown-content blockquote {
  border-left: 4px solid #6366f1;
  padding-left: 1rem;
  margin: 1rem 0;
  color: #9ca3af;
  font-style: italic;
}

.markdown-content code {
  background-color: #374151;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.875em;
}

.markdown-content pre {
  background-color: #1f2937;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.markdown-content pre code {
  background-color: transparent;
  padding: 0;
}

.markdown-content a {
  color: #818cf8;
  text-decoration: underline;
}

.markdown-content a:hover {
  color: #a5b4fc;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.markdown-content th, .markdown-content td {
  border: 1px solid #374151;
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.markdown-content th {
  background-color: #1f2937;
  font-weight: 600;
}

.markdown-content hr {
  border: 0;
  border-top: 1px solid #374151;
  margin: 1.5rem 0;
}

.markdown-content strong {
  font-weight: 600;
  color: #f3f4f6;
}

.markdown-content em {
  font-style: italic;
}

.markdown-content del {
  text-decoration: line-through;
  color: #9ca3af;
}
