:root {
  --bg-primary: #f2f3f5;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e3e5e8;
  --bg-hover: #d4d7dc;
  --accent: #4a7c59;
  --accent-hover: #3d6649;
  --accent-light: rgba(74, 124, 89, 0.1);
  --text-primary: #2e3338;
  --text-secondary: #5f6368;
  --text-tertiary: #949ba4;
  --border: #e3e5e8;
  --border-strong: #d4d7dc;
  --sidebar-width: 280px;
}

[data-theme="dark"] {
  --bg-primary: #1e2124;
  --bg-secondary: #282b30;
  --bg-tertiary: #36393e;
  --bg-hover: #424549;
  --accent: #5a9c6e;
  --accent-hover: #6ab07e;
  --accent-light: rgba(90, 156, 110, 0.1);
  --text-primary: #dcddde;
  --text-secondary: #96989d;
  --text-tertiary: #72767d;
  --border: #36393e;
  --border-strong: #424549;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 15px;
}

.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  padding: 0 1rem;
  align-items: center;
  justify-content: space-between;
}

.menu-toggle {
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-title {
  font-weight: 600;
  font-size: 1rem;
}

.home-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
}

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

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.125rem;
}

.logo-link .logo {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
}

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

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

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

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

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

.nav-section li a.active {
  color: var(--accent);
  background: var(--accent-light);
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.15s;
}

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

.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

p.lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

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

li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

ul li {
  list-style-type: none;
}

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

a:hover {
  text-decoration: underline;
}

code {
  background: var(--bg-tertiary);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
  font-size: 0.875em;
  color: var(--text-primary);
}

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

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

.tip, .warning, .info {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid;
}

.tip {
  background: var(--accent-light);
  border-left-color: var(--accent);
}

.tip strong {
  color: var(--accent);
}

.warning {
  background: rgba(249, 166, 58, 0.1);
  border-left-color: #f9a63a;
}

.warning strong {
  color: #f9a63a;
}

.info {
  background: rgba(88, 101, 242, 0.1);
  border-left-color: #5865f2;
}

.faq-item {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
}

.page-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.page-footer p {
  margin-bottom: 0.5rem;
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .mobile-header {
    display: flex;
  }
  
  .main-content {
    margin-left: 0;
    margin-top: 60px;
  }
  
  .content {
    padding: 2rem 1.5rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
}

section[id] {
  scroll-margin-top: 80px;
}

::selection {
  background: var(--accent-light);
  color: var(--text-primary);
}
