/* Base styles */
:root {
  --background: #ffffff;
  --foreground: #0c0e14;
  --primary: #111927;
  --primary-foreground: #f8fafc;
  --secondary: #f1f5f9;
  --secondary-foreground: #1e293b;
  --muted: #f1f5f9;
  --muted-foreground: #637381;
  --accent: #f1f5f9;
  --accent-foreground: #1e293b;
  --destructive: #ef4444;
  --destructive-foreground: #f8fafc;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --ring: #1e293b;
  --sidebar-width: 260px;
  --sidebar-background: #f8fafc;
  --radius: 0.5rem;
}

/* Dark mode (future support) */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #0c0e14;
    --foreground: #f8fafc;
    --primary: #f8fafc;
    --primary-foreground: #0c0e14;
    --secondary: #1e293b;
    --secondary-foreground: #f8fafc;
    --muted: #1e293b;
    --muted-foreground: #94a3b8;
    --accent: #1e293b;
    --accent-foreground: #f8fafc;
    --destructive: #7f1d1d;
    --destructive-foreground: #f8fafc;
    --border: #1e293b;
    --input: #1e293b;
    --ring: #cbd5e1;
    --sidebar-background: #0f172a;
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
  scroll-behavior: smooth;
  font-size: 13pt;
}

/* Typography */
h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #359756
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #359756
}

h3 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

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

ul, ol {
  margin: 0 0 1.5rem 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

a {
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Mobile menu button */
.mobile-menu-btn {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mobile-menu-btn button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--foreground);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--sidebar-width);
  background-color: var(--sidebar-background);
  border-right: 1px solid var(--border);
  z-index: 30;
  overflow-y: auto;
  transition: transform 0.3s ease-in-out;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
  padding-top: 1rem;
}

.sidebar-content {
  padding: 1.5rem 1rem;
  height: 100%;
  width: 100%;
}

.sidebar-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-top: 1.5rem;
}

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

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.section-header:hover {
  background-color: var(--accent);
}

.section-title {
  font-weight: 600;
  color: #359756;
}

.section-toggle {
  transition: transform 0.2s ease;
  color: #359756;
}

.section-toggle.open {
  transform: rotate(90deg);
}

.subsection-list {
  padding-left: 1.25rem;
  margin-top: 0.5rem;
  display: none;
}

.subsection-list.open {
  display: block;
}

.subsection-item {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.subsection-item:hover {
  background-color: var(--accent);
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 20;
  display: none;
}

/* Main content */
.content {
  padding: 2rem;
  padding-top: 3rem;
  margin-left: var(--sidebar-width);
  max-width: 1200px;
  margin-right: auto;
}

/* Documentation sections */
.doc-section {
  margin-bottom: 4rem;
  scroll-margin-top: 2rem;
}

.doc-subsection {
  margin-bottom: 2.5rem;
  scroll-margin-top: 2rem;
}

/* Images and captions */
.image-with-caption {
  margin: 2rem 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.image-with-caption img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
}

.image-with-caption figcaption {
  text-align: center;
  font-style: italic;
  color: var(--muted-foreground);
  padding: 0.75rem 0;
  font-size: 0.9rem;
}

.mobile-view {
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

/* Problem solution boxes */
.problem-solution {
  background-color: var(--secondary);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.problem-solution h3 {
  margin-top: 0;
  color: var(--primary);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

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

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

tr:nth-child(even) {
  background-color: var(--accent);
}

/* Code blocks */
pre {
  background-color: var(--secondary);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 85%;
    max-width: var(--sidebar-width);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .content {
    margin-left: 0;
    padding: 1rem;
    padding-top: 4rem;
  }
  
  .sidebar-overlay.visible {
    display: block;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.35rem;
  }
  
  h3 {
    font-size: 1.15rem;
  }
}

@media (min-width: 769px) {
  .mobile-menu-btn {
    display: none;
  }
}

.gr{
  color: #359756!important;
}

p {
  text-indent: 30px;
}