:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --accent-color: #4299e1;
    --border-color: #e2e8f0;
    --code-bg: #e2e8f0;  /* Darker gray for code blocks in light mode */
    --sidebar-width: 280px;
    --link-unvisited: #2d3748;
    --link-visited: #63b3ed;
    --header-gradient: linear-gradient(135deg, #4299e1 0%, #805ad5 100%);
    --header-text: transparent;
}

[data-theme="dark"] {
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --text-primary: #f7fafc;
    --text-secondary: #a0aec0;
    --accent-color: #63b3ed;
    --border-color: #4a5568;
    --code-bg: #2d3748;  /* Keep the dark mode color as is */
    --link-unvisited: #f7fafc;
    --link-visited: #63b3ed;
    --header-gradient: linear-gradient(135deg, #63b3ed 0%, #9f7aea 100%);
    --header-text: transparent;
}


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

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: large;
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease, background-color 0.3s ease;
    z-index: 10;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.menu-toggle {
    display: none; /* Hide the menu toggle completely */
}

nav {
    padding: 1rem;
}

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

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

.nav-items {
    list-style: none;
}

.nav-item {
    margin: 0.25rem 0;
}

.nav-link {
    display: block;
    padding: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0.375rem;
    transition: background-color 0.2s, color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--accent-color);
    color: white;
}

.content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem;
    transition: margin-left 0.3s ease;
    position: relative;
    display: flex;
    justify-content: center; /* Center the content horizontally */
    width: calc(100% - var(--sidebar-width));
}

.content-header {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    padding: 1rem 2rem;
    margin: -2rem -2rem 2rem -2rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.theme-toggle {
    display: flex;
    align-items: center;
}

.theme-toggle button {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
    color: var(--text-primary);
}

.theme-toggle button:hover {
    background-color: var(--bg-secondary);
}


.doc-content {
    max-width: 768px;
    margin: 0 auto;
    width: 100%; /* Ensure it takes full available width */
}

.doc-content h1,
.doc-content h2,
.doc-content h3,
.doc-content h4 {
    background: var(--header-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--header-text);
    display: inline-block;
    font-weight: 700;
    width: 100%;
    margin: 2.5rem 0 1.5rem;
    scroll-margin-top: 100px; /* Ensures header is visible when scrolled to */
}

.doc-content h1 {
    font-size: 2.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.doc-content h2 {
    font-size: 2rem;
}

.doc-content h3 {
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
}

.doc-content h4 {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
}

.doc-content p {
    margin: 0.5rem 0;  /* Reduced from 1.25rem */
    line-height: 1.8;
}

.doc-content code {
    background: var(--code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Fira Code', monospace;
}

.doc-content pre {
    background: var(--code-bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.doc-content pre code {
    background: none;
    padding: 0;
}

.doc-content ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
    list-style-type: none;
}

.doc-content ul li {
    margin: 0.75rem 0;
    position: relative;
    padding-left: 1rem;
}

.doc-content ul li:before {
    content: '•';
    color: var(--accent-color);
    font-weight: bold;
    position: absolute;
    left: -1.5rem;
    font-size: 1.2em;
    background: var(--header-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.doc-content br {
    content: "";
    display: block;
    margin: 0.5rem 0;  /* Reduced from 1rem */
}

/* Add this new style for badge containers */
.doc-content p:has(img[alt="License"], img[alt="Version"], img[alt="Unreleased"]) {
    margin: 0.25rem 0;
    line-height: 1;
    display: inline-block;
}

.doc-content img {
    margin: 2rem 0;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Add this new section for bold text styling */
.doc-content strong {
    background: linear-gradient(135deg, #4299e1 0%, #805ad5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

[data-theme="dark"] .doc-content strong {
    background: linear-gradient(135deg, #63b3ed 0%, #9f7aea 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

a:visited {
    color: var(--link-visited);
}

/* Add these new styles */
.sub-sidebar {
    position: fixed;
    right: 2rem;
    top: 6rem;
    width: 200px;
    height: fit-content;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.sub-sidebar-title {
    font-size: 0.875rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

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

.section-nav li {
    margin: 0.5rem 0;
}

.section-nav a {
    display: block;
    padding: 0.25rem 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.section-nav a:hover,
.section-nav a.active {
    background-color: var(--accent-color);
    color: white;
}

.main-content {
    flex: 1;
    max-width: 768px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%; /* Ensure it takes full width */
}

.doc-content br {
    margin-bottom: 1.5rem;
    display: block;
    content: "";
}

.section-nav-container {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    background: var(--background-secondary);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-height: 80vh;
    overflow-y: auto;
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-primary);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header-controls {
    margin-left: auto;
}

#theme-switch {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#theme-switch:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        padding: 1rem;
        width: 100%;
    }
    
    .content-header {
        padding: 1rem;
    }
}

@media (max-width: 1024px) {
    .sub-sidebar {
        display: none;
    }
}

@media (max-width: 1200px) {
    .section-nav-container {
        display: none;
    }
}

@media (max-width: 1400px) {
    .sub-sidebar {
        display: none;
    }
}

/* Adjust the container layout */
.container {
    display: flex;
    min-height: 100vh;
    position: relative;
}