:root {
    --doc-sidebar-width: 300px;
    --doc-outline-width: 240px;
    --ifm-color-primary: #2196f3;
    --ifm-color-primary-dark: #1976d2;
    --ifm-background-color: #1a1a1a;
    --ifm-background-surface-color: #252526;
    --ifm-color-content: #e0e0e0;
    --ifm-color-content-secondary: #a0a0a0;
    --ifm-link-color: #2196f3;
    --ifm-border-color: #404040;
    --title-bar-height: 48px;
    --sidebar-transition: transform 0.3s ease;
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
    background: var(--ifm-background-color);
    color: var(--ifm-color-content);
}

.container {
    display: flex;
    flex-direction: column;
}

.title-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--title-bar-height);
    background-color: var(--ifm-background-surface-color);
    border-bottom: 1px solid var(--ifm-border-color);
    display: flex;
    align-items: center;
    padding: 0 1rem;
}

.content-container {
    margin-top: var(--title-bar-height);
    display: flex;
    min-height: calc(100vh - var(--title-bar-height));
}

.left-sidebar {
    position: fixed;
    top: var(--title-bar-height);
    left: 0;
    bottom: 0;
    width: var(--doc-sidebar-width);
    background: var(--ifm-background-surface-color);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--ifm-border-color);
    transform: none; /* Remove initial transform */
    transition: none; /* Remove initial transition */
    z-index: 999;
}

.right-sidebar {
    position: fixed;
    top: var(--title-bar-height);
    right: 0;
    bottom: 0;
    width: var(--doc-outline-width);
    background: var(--ifm-background-color);  /* Change to match main content */
    overflow-y: auto;
    border-left: none;  /* Explicitly remove border */
}

.content {
    margin-left: var(--doc-sidebar-width);
    margin-right: var(--doc-outline-width);
    padding: 2rem 3rem;
    min-height: calc(100vh - var(--title-bar-height));
}

#file-index {
    flex: 1;
    overflow-y: auto;
    padding-top: 20px;
}

@media (max-width: 1000px) {
    .menu-button {
        display: flex !important;  /* Force display on mobile */
    }

    .left-sidebar {
        left: -100%;
        width: min(var(--doc-sidebar-width), 80vw);  /* Limit width on mobile */
        transition: left 0.3s ease; /* Change to left transition */
        box-shadow: none;
    }

    .left-sidebar.show {
        left: 0; /* Change to left positioning */
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
    }

    .right-sidebar {
        display: none;
    }

    .content {
        margin-left: 0;
        margin-right: 0;
        padding: 1rem;
    }

    .markdown-content {
        padding: 0 0.5rem;
    }

    #file-index {
        padding-top: 0.75rem;  /* Add top padding to menu */
    }
}

@media (max-width: 480px) {
    .content {
        padding: 0.75rem 0.5rem;
    }

    .markdown-content {
        padding: 0 0.25rem;
    }
}

.menu-button {
    display: none;  /* Initially hidden */
    background: none;
    border: none;
    color: var(--ifm-color-content);
    padding: 8px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.menu-button i {
    font-size: 1.4rem;
}

.menu-button:hover {
    color: var(--ifm-color-primary);
}

.sidebar {
    color: var(--ifm-color-content);
    overflow-y: auto;
    border-color: var(--ifm-border-color);
    height: calc(100vh - var(--title-bar-height));
}

#file-index a {
    color: var(--ifm-color-content);
    text-decoration: none;
    display: block;
    padding: 0.6rem 1.2rem;  /* Increased vertical padding */
    font-size: 0.875rem;
    border-left: 2px solid transparent;
}

#file-index a:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--ifm-color-primary);
    border-left: 2px solid var(--ifm-color-primary);
}

#file-index a.active {
    color: var(--ifm-color-primary);
    background-color: rgba(33, 150, 243, 0.1);
    border-left: 2px solid var(--ifm-color-primary);
}

.folder {
    color: var(--ifm-color-content);
}

.folder-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.2rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.875rem;
}

.folder-header:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.folder-icon {
    width: 1.2em;
    color: var(--ifm-color-content-secondary);
}

.folder-content {
    display: none;
}

.folder.open > .folder-content {
    display: block;
}

.folder .folder-header:hover .folder-icon {
    color: var(--ifm-color-primary);
}

.social-links {
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--ifm-background-surface-color);
}

.social-links a {
    color: var(--ifm-color-content-secondary);
    font-size: 1.2rem;
    transition: color 0.2s;
}

social-links a:hover {
    color: var(--ifm-color-primary);
}

.subtitle {
    margin-top: auto;  /* Push to bottom of flex container */
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    color: var(--ifm-color-content-secondary);
    background: var(--ifm-background-surface-color);
}

.subtitle .name {
    color: var(--ifm-color-content);
    font-weight: 500;
}

.subtitle .role {
    display: block;
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

.content {
    flex: 1;
    background-color: var(--ifm-background-color);
    min-width: 0;  /* Fix flexbox content overflow */
    color: var(--ifm-color-content);
    height: 100%;
    padding-bottom: calc(2rem + env(safe-area-inset-bottom));
}

#file-index a, #document-outline a {
    color: var(--ifm-color-content);
    text-decoration: none;
    display: block;
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

#file-index a:hover, #document-outline a:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--ifm-color-primary);
}

#document-outline {
    padding: 1rem;
}

#document-outline a {
    color: var(--ifm-color-content-secondary);
    border-left: 2px solid transparent;
    margin: 2px 0;
    padding: 0.25em 1rem;  /* Adjust padding to match */
    transition: all 0.2s ease;
}

#document-outline a.active {
    color: var(--ifm-color-primary);
    border-left-color: var(--ifm-color-primary);
    background: rgba(33, 150, 243, 0.1);
}

.markdown-content {
    line-height: 1.7;
    font-size: 1rem;
    max-width: 130ch;
    margin: 0 auto;
}

.markdown-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: left;  /* Explicitly set left alignment */
}

.markdown-content h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    text-align: left;
}

.markdown-content h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    font-weight: 600;
    text-align: left;
}

.markdown-content a {
    color: var(--ifm-link-color);
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

.markdown-content p {
    margin: 1rem 0;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.markdown-content table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin: 1em 0;
    font-size: 0.9rem;
}

.markdown-content th {
    background-color: rgba(255, 255, 255, 0.15);  /* Change header background to 15% white */
    font-weight: 600;
    border: none;
    border-bottom: 1px solid var(--ifm-border-color);
    text-align: left;  /* Add this line to left-align table headers */
    padding: 0.75rem;
}

.markdown-content th:first-child {
    border-top-left-radius: 10px;
}

.markdown-content th:last-child {
    border-top-right-radius: 10px;
}

.markdown-content td {
    border: none;
    border-bottom: 1px solid var(--ifm-border-color);
    padding: 0.75rem;
    background-color: rgba(255, 255, 255, 0.03);  /* Lighter background for cells */
}

.markdown-content tr:last-child td {
    border-bottom: none;
}

.markdown-content tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

.markdown-content tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

.markdown-content code:not([class*="language-"]) {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.2em 0.4em;
    border-radius: 1px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.markdown-content blockquote {
    border-left: 4px solid var(--ifm-color-primary);
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    background-color: var(--ifm-background-surface-color);
    border-radius: 4px;
    color: var(--ifm-color-content-secondary);
}

.markdown-content video {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 1;
}

.markdown-content hr {
    margin: 3rem 0;
    border: none;
    border-bottom: 1px solid var(--ifm-border-color);
}

.markdown-content pre {
    background-color: var(--ifm-background-surface-color);
    border: 1px solid var(--ifm-border-color);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.markdown-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: inherit;
}

/* Keep existing scrollbar styles, animations, and other used styles */
/* ...existing code... */

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: var(--ifm-background-color);
}

::-webkit-scrollbar-thumb {
    background-color: #505050;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #606060;
}

/* Completely remove scrollbar buttons */
::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

::-webkit-scrollbar-corner {
    background-color: transparent;
}

/* Firefox scrollbar - hide buttons */
* {
    scrollbar-width: thin;
    scrollbar-color: #505050 var(--ifm-background-color);
}

/* Highlight animation */
@keyframes highlight {
    0% { background-color: rgba(33, 150, 243, 0.2); }
    100% { background-color: transparent; }
}

.markdown-content h1.highlight,
.markdown-content h2.highlight,
.markdown-content h3.highlight,
.markdown-content h4.highlight,
.markdown-content h5.highlight,
.markdown-content h6.highlight {
    animation: highlight 2s ease-out;
}

.title-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-logo {
    height: 24px;
    width: auto;
    display: block;
}

.title-text .divider {
    padding: 0 0 0 10px;
}

.title-text .divider,
.title-text .page-title {
    font-size: 0.9rem;
}

#document-outline a.active {
    /* Remove any forced padding-left: 0; here */
    color: var(--ifm-color-primary);
    border-left-color: var(--ifm-color-primary);
    background: rgba(33, 150, 243, 0.1);
}

.github-link {
    padding: 1rem;
    text-align: center;
    font-size: 0.875rem;
    background: var(--ifm-background-surface-color);
    border-top: 1px solid var(--ifm-border-color);
}

.github-link a {
    color: var(--ifm-color-content-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.github-link a:hover {
    color: var(--ifm-color-primary);
}
