:root {
  --gleif-green: #51dac5;
  --gleif-green-light: #73e6d1;
  --gleif-green-dark: #3db5a2;
  --gleif-green-darker: #2a8b82;
  --gleif-gray-dark: #2d3436;
  --gleif-gray: #636e72;
  --gleif-gray-medium: #b2bec3;
  --gleif-gray-light: #ddd;
  --gleif-gray-lighter: #f1f2f6;
  --gleif-white: #ffffff;
  --gleif-black: #2d3436;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--gleif-gray-dark);
  background-color: var(--gleif-gray-lighter);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  min-height: 100vh;
}

/* Top Navigation Bar */
.navbar {
  background-color: var(--gleif-white);
  padding: 1.5rem 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  width: 100%;
  border: 1px solid var(--gleif-gray-light);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.navbar ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.navbar li {
  margin-bottom: 0;
}

.navbar a {
  color: var(--gleif-gray);
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  display: inline-block;
  border-radius: 12px;
  transition: all 0.3s ease;
  font-size: 0.8rem;
  white-space: nowrap;
  border: 1px solid var(--gleif-gray-light);
}

.navbar a:hover {
  background-color: var(--gleif-green);
  color: var(--gleif-white);
  border-color: var(--gleif-green);
}

.navbar a:active,
.navbar a.active {
  background-color: var(--gleif-green-dark);
  color: var(--gleif-white);
  border-color: var(--gleif-green-dark);
}

/* Main content */
.content {
  background-color: var(--gleif-white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  width: 100%;
  flex: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--gleif-gray-dark);
  margin-bottom: 1rem;
  margin-top: 2rem;
}

h1:first-child, h2:first-child, h3:first-child {
  margin-top: 0;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

/* Links */
a {
  color: var(--gleif-green-dark);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--gleif-green);
}

/* Code blocks */
pre {
  background-color: var(--gleif-gray-lighter);
  padding: 1rem;
  border-radius: 4px;
  border-left: 4px solid var(--gleif-green);
  overflow-x: auto;
  margin: 1rem 0;
}

code {
  background-color: var(--gleif-gray-lighter);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 0.9em;
  color: var(--gleif-gray-dark);
}

pre code {
  background: none;
  padding: 0;
}

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

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

th {
  background-color: var(--gleif-gray-lighter);
  color: var(--gleif-gray-dark);
  font-weight: 600;
}

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

li {
  margin-bottom: 0.25rem;
}

/* Blockquotes */
blockquote {
  border-left: 4px solid var(--gleif-green);
  padding-left: 1rem;
  margin: 1rem 0;
  font-style: italic;
  color: var(--gleif-gray);
  background-color: var(--gleif-gray-lighter);
  padding: 1rem;
  border-radius: 4px;
}

/* Mermaid diagrams */
.mermaid {
  background-color: var(--gleif-white);
  border: 1px solid var(--gleif-gray-light);
  border-radius: 6px;
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
  width: 100%;
  min-height: 500px;
  overflow-x: auto;
  cursor: zoom-in;
  transition: all 0.3s ease;
  position: relative;
}

/* Zoomed state */
.mermaid.zoomed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  background-color: var(--gleif-white);
  cursor: default;
  overflow: auto;
  margin: 0;
  padding: 2rem;
  transform: none;
}

.mermaid.zoomed svg {
  cursor: grab;
}

.mermaid.zoomed svg:active {
  cursor: grabbing;
}


/* Close button for zoomed diagrams */
.mermaid.zoomed::after {
  content: '×';
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 30px;
  height: 30px;
  background: var(--gleif-gray-dark);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  z-index: 1001;
}


.mermaid svg {
  max-width: 100%;
  width: auto;
  height: auto;
}


/* Loading state */
.loading {
  text-align: center;
  padding: 2rem;
  color: var(--gleif-gray);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .navbar {
    padding: 1rem;
  }
  
  .navbar ul {
    flex-direction: column;
    align-items: center;
  }
  
  .navbar a {
    display: block;
    text-align: center;
    margin-bottom: 0.5rem;
  }
  
  
  .mermaid {
    min-height: 300px;
  }
  
  .mermaid svg {
    min-width: 600px;
    font-size: 14px !important;
  }
  
  .mermaid .node text,
  .mermaid .edgeLabel text {
    font-size: 14px !important;
  }
}