:root {
  --primary-color: #10a37f;
  --primary-hover: #0d8968;
  --text-primary: #202123;
  --text-secondary: #6e6e80;
  --bg-primary: #ffffff;
  --bg-secondary: #f7f7f8;
  --border-color: #e5e5e5;
  --sidebar-width: 260px;
  --code-bg: #f6f6f6;
  --code-border: #e3e3e3;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  font-size: 16px;
}

/* Layout */
.docs-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  padding: 2rem 0;
}

.sidebar-header {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.sidebar-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.sidebar-header h1 a {
  color: var(--text-primary);
  text-decoration: none;
}

.language-switcher {
  margin-top: 0.75rem;
}

.language-switcher select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.language-switcher select:hover {
  border-color: var(--primary-color);
}

.language-switcher select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.sidebar-nav {
  padding: 0 1rem;
}

.nav-section {
  margin-bottom: 1.5rem;
}

.nav-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  padding: 0 0.5rem;
  margin-bottom: 0.5rem;
}

.nav-section ul {
  list-style: none;
  margin: 0;
}

.nav-section li {
  margin: 0;
}

.nav-section a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.nav-section a:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.nav-section a.active {
  background-color: var(--bg-secondary);
  color: var(--primary-color);
  font-weight: 500;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem 3rem;
  max-width: 900px;
}

/* Typography */
h1 {
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

p {
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Lead paragraph */
.lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Lists */
ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.25rem;
  line-height: 1.6;
}

li:last-child {
  margin-bottom: 0;
}

/* Code */
code {
  background-color: var(--code-bg);
  border: 1px solid var(--code-border);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Courier New', monospace;
  font-size: 0.875em;
  color: var(--text-primary);
}

pre {
  background-color: var(--code-bg);
  border: 1px solid var(--code-border);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
}

/* Code block header */
.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--code-border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.code-block-header + pre {
  border-radius: 0 0 8px 8px;
  margin-top: 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  font-weight: 600;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
}

tr:last-child td {
  border-bottom: none;
}

/* Blockquotes */
blockquote {
  border-left: 3px solid var(--primary-color);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* Callout boxes */
.callout {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 3px solid;
}

.callout-info {
  background-color: #e7f5ff;
  border-color: #1971c2;
  color: #1864ab;
}

.callout-warning {
  background-color: #fff4e6;
  border-color: #f08c00;
  color: #e67700;
}

.callout-success {
  background-color: #ebfbee;
  border-color: var(--primary-color);
  color: #2b8a3e;
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 1.5rem 0;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

figure {
  margin: 1rem 0;
}

figcaption {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 0.5rem;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.5rem;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 968px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    margin-left: 0;
    padding: 2rem 1.5rem;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
}

/* Footer */
footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

footer a {
  color: var(--text-secondary);
}

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