:root {
  --bg: #ffffff;
  --sidebar-bg: #f8f9fa;
  --text: #2d3436;
  --accent: #3776ab;
  --secondary: #ffd43b;
  --code-bg: #1e1e1e;
  --border: #dfe6e9;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  display: flex;
  height: 100vh;
  color: var(--text);
  overflow: hidden;
}

nav {
  width: 220px; /* Slimmed down from 300px */
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 2rem 1rem;
  flex-shrink: 0; /* Prevents sidebar from collapsing */
}

nav h2 {
  padding: 0 1rem;
  color: var(--accent);
  margin-bottom: 2rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

nav ul {
  list-style: none;
  padding: 0;
}

nav li {
  padding: 12px 20px;
  margin-bottom: 8px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  color: #636e72;
}

nav li:hover {
  background: #e9ecef;
}

/* Changed from :active to .active for persistent highlighting */
nav li.active {
  background: var(--accent);
  color: white;
  font-weight: 600;
}

main {
  flex: 1;
  overflow-y: auto;
  padding: 4rem;
}

.content-section {
  max-width: 800px; /* Adjusted for the slimmer sidebar */
  margin: 0 auto;
  animation: fadeIn 0.4s ease;
}

pre {
  background: var(--code-bg);
  color: #dcdcdc;
  padding: 1.5rem;
  border-radius: 10px;
  font-family: "Fira Code", monospace;
  overflow-x: auto;
  border-left: 5px solid var(--secondary);
  line-height: 1.5;
}

.btn {
  background: var(--accent);
  color: white;
  padding: 14px 28px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 2rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}