:root {
  /* Colors */
  --color-primary: #4f46e5;
  --color-primary-hover: #4338ca;
  --color-text-main: #0f172a;
  --color-text-muted: #64748b;
  --color-bg-main: #ffffff;
  --color-bg-muted: #f8fafc;
  --color-border: #e2e8f0;

  /* Alert Colors */
  --color-note-bg: #eff6ff;
  --color-note-border: #bfdbfe;
  --color-note-text: #1e3a8a;

  --color-tip-bg: #ecfdf5;
  --color-tip-border: #a7f3d0;
  --color-tip-text: #065f46;

  --color-warning-bg: #fffbeb;
  --color-warning-border: #fde68a;
  --color-warning-text: #92400e;

  --color-success-bg: #f0fdf4;
  --color-success-border: #bbf7d0;
  --color-success-text: #166534;

  /* Typography */
  --font-family-base: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.6;

  /* Layout */
  --header-height: 64px;
  --sidebar-width: 280px;
  --toc-width: 240px;
  --content-max-width: 800px;
  --spacing-base: 1rem;
  
  /* Shadows & Radius */
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 2rem);
}

body {
  margin: 0;
  font-family: var(--font-family-base);
  color: var(--color-text-main);
  background-color: var(--color-bg-main);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-main);
  font-weight: 600;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h1 { font-size: 2.25rem; font-weight: 700; margin-top: 0; }
h2 { font-size: 1.5rem; border-bottom: 1px solid var(--color-border); padding-bottom: 0.5rem; }
h3 { font-size: 1.25rem; }

p, ul, ol {
  margin-top: 0;
  margin-bottom: 1rem;
}

ul, ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background-color: var(--color-bg-muted);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  color: #c026d3;
}
