: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;
    transition: none;
    z-index: 999;
}

.search-container {
    padding: 1rem;
    border-bottom: 1px solid var(--ifm-border-color);
    position: relative; /* Add this */
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--ifm-background-color);
    border: 1px solid var(--ifm-border-color);
    border-radius: 6px;
    padding: 0.5rem;
}

.search-box i {
    color: var(--ifm-color-content-secondary);
    font-size: 0.9rem;
}

.search-box .fa-search {
    margin-right: 0.5rem;
}

.search-box .fa-times {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    margin-left: 0;
}

.search-box .fa-times:hover {
    opacity: 1;
}

.search-box input {
    background: none;
    border: none;
    color: var(--ifm-color-content);
    font-size: 0.9rem;
    width: 100%;
    outline: none;
}

.search-box input::placeholder {
    color: var(--ifm-color-content-secondary);
    opacity: 0.6;
}

#search-results {
    position: absolute;
    top: calc(var(--title-bar-height) + 3.5rem); /* Change this */
    left: 0;  /* Change this */
    right: 0; /* Change this */
    background: var(--ifm-background-surface-color);
    border: 1px solid var(--ifm-border-color);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1001; /* Increase z-index */
    max-height: calc(100vh - var(--title-bar-height) - 4rem);
    overflow-y: auto;
    margin: 0 1rem; /* Add margins */
    display: none;
}

.search-result {
    border-bottom: 1px solid var(--ifm-border-color);
}

search-result:last-child {
    border-bottom: none;
}

.search-result a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--ifm-color-content);
    text-decoration: none;
    gap: 0.75rem;
}

.search-result a:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-result i {
    color: var(--ifm-color-content-secondary);
    font-size: 0.9rem;
    width: 16px;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.search-result-path {
    font-size: 0.8rem;
    color: var(--ifm-color-content-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.right-sidebar {
    position: fixed;
    top: var(--title-bar-height);
    right: 0;
    bottom: 0;
    width: var(--doc-outline-width);
    background: var(--ifm-background-color);
    overflow-y: auto;
    border-left: none;
}

.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;
    }

    .left-sidebar {
        left: -100%;
        width: min(var(--doc-sidebar-width), 80vw);
        transition: left 0.3s ease;
        box-shadow: none;
    }

    .left-sidebar.show {
        left: 0;
        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;
    }
}

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

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

.menu-button {
    display: none;
    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.4rem 0.8rem;
    font-size: 0.875rem;
}

#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);
    padding-right: 0;
}

.folder-header {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.875rem;
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

.folder-icons {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--ifm-color-content-secondary);
    min-width: 1.5em;
    margin-right: 0.25rem;
    order: 1;
}

.folder-header span {
    order: 2;
    margin-right: auto;
}

.folder-link {
    display: flex;
    align-items: center;
    color: var(--ifm-color-content-secondary);
    opacity: 0.6;
    font-size: 0.8em;
    padding: 2px 8px;
    border-radius: 3px;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.folder-header:hover .folder-link {
    opacity: 0.8;
}

.folder-link:hover {
    opacity: 1 !important;
    color: var(--ifm-color-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

.folder-content {
    display: none;
    padding-left: 0.6rem;
}

.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;
    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;
    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;
    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;
}

.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);
    font-weight: 600;
    border: none;
    border-bottom: 1px solid var(--ifm-border-color);
    text-align: left;
    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);
}

.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;
}

::-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;
}

::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

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

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

@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 {
    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);
}

.clickable-header {
    cursor: pointer;
    position: relative;
}
.clickable-header:hover {
    color: #3498db;
}
.clickable-header.highlight {
    animation: highlight-fade 1.5s;
}
@keyframes highlight-fade {
    0% { background-color: rgba(52, 152, 219, 0.2); }
    100% { background-color: transparent; }
}

/* Add a skip link for keyboard navigation */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    padding: 8px;
    z-index: 2000;
    background: var(--ifm-color-primary);
    color: white;
    font-weight: bold;
    transition: top 0.2s;
}

.skip-to-content:focus {
    top: 0;
    outline: 2px solid white;
}

/* Improve focus styles for better keyboard navigation */
/* Remove the conflicting focus style rules */
/* Remove these conflicting rules */
*:focus {
    outline: none !important;
}

*:focus-visible {
    outline: 2px solid var(--ifm-color-primary) !important;
    outline-offset: 2px !important;
}

a:focus,
button:focus,
input:focus,
.folder-header:focus,
.clickable-header:focus {
    outline: none !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
.folder-header:focus-visible,
.clickable-header:focus-visible {
    outline: none !important;
}

/* Add clean focus style rules */
/* This allows keyboard focus to be visible but hides it for mouse clicks */
:focus {
    outline: none !important;
}

/* Only show focus styles for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--ifm-color-primary) !important;
    outline-offset: 2px !important;
}

/* Force focus visible off for mouse interaction */
:focus:not(:focus-visible) {
    outline: none !important;
}

/* Ensure contrast for links and interactive elements */
.folder-header:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Keep the skip link visible when it gets focus */
.skip-to-content:focus {
    top: 0;
    outline: 2px solid white !important;
}

/* Don't hide keyboard focus styles on mobile */
@media (max-width: 1000px) {
    :focus-visible {
        outline: 2px solid var(--ifm-color-primary) !important;
    }
    
    .menu-button {
        display: flex !important;
    }

    .left-sidebar {
        left: -100%;
        width: min(var(--doc-sidebar-width), 80vw);
        transition: left 0.3s ease;
        box-shadow: none;
    }

    .left-sidebar.show {
        left: 0;
        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;
    }
}

/* Make sure aria-hidden elements aren't focusable */
[aria-hidden="true"] {
    pointer-events: none;
}

/* Don't hide focus-visible on mobile */
@media (max-width: 1000px) {
    *:focus-visible {
        outline: 2px solid var(--ifm-color-primary) !important;
    }
    
    .menu-button {
        display: flex !important;
    }

    .left-sidebar {
        left: -100%;
        width: min(var(--doc-sidebar-width), 80vw);
        transition: left 0.3s ease;
        box-shadow: none;
    }

    .left-sidebar.show {
        left: 0;
        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;
    }
}

/* Style the keyboard shortcut indicator */
.keyboard-shortcut {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1px solid var(--ifm-color-content-secondary);
    border-radius: 3px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
    color: var(--ifm-color-content-secondary);
    opacity: 0.7;
    user-select: none;
}

/* Style the Alt+S keyboard shortcut */
.keyboard-shortcut-alt {
    width: auto;
    padding: 0 4px;
    font-size: 0.7rem;
}

/* Hide keyboard shortcut on mobile */
@media (max-width: 768px) {
    .keyboard-shortcut {
        display: none;
    }
}

/* Print styles... */
@media print {
    .title-bar,
    .left-sidebar,
    .right-sidebar,
    .menu-button,
    .social-links,
    .github-link,
    .subtitle {
        display: none !important;
    }

    .content {
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
    }

    .content-container {
        margin: 0 !important;
    }

    body {
        background: white !important;
        color: black !important;
        font-size: 12pt !important;
        line-height: 1.5 !important;
        margin: 0.25in !important; /* Reduced margins */
    }

    /* Remove the logo and redundant breadcrumb display */
    .content-container::before,
    .content-container::after {
        display: none !important;
    }
    
    /* Simple print header */
    .print-header {
        display: block !important;
        margin-bottom: 15pt;
        border-bottom: 1pt solid #ddd;
        padding-bottom: 8pt;
    }
    
    .print-header .site-name {
        font-weight: bold;
        font-size: 14pt;
    }
    
    .print-header .page-title {
        font-size: 12pt;
        color: #555;
    }

    .markdown-content {
        padding: 0 !important;
        font-size: 11pt !important;
        line-height: 1.4 !important;
        max-width: none !important;
    }

    .markdown-content a {
        color: #000 !important;
        text-decoration: underline !important;
        word-wrap: break-word !important;
    }

    .markdown-content a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #555;
    }

    .markdown-content pre,
    .markdown-content code {
        white-space: pre-wrap !important;
        border: 1px solid #ddd !important;
        page-break-inside: avoid !important;
        background-color: #f5f5f5 !important;
        color: #000 !important;
    }

    .markdown-content img {
        max-width: 100% !important;
        page-break-inside: avoid !important;
        border: none !important;
        box-shadow: none !important;
    }

    .markdown-content h1,
    .markdown-content h2,
    .markdown-content h3,
    .markdown-content h4,
    .markdown-content h5,
    .markdown-content h6 {
        page-break-after: avoid !important;
        break-after: avoid !important;
        color: #000 !important;
    }

    .markdown-content p,
    .markdown-content ul,
    .markdown-content ol,
    .markdown-content table {
        page-break-inside: avoid !important;
    }

    .markdown-content h1 {
        font-size: 20pt !important;
        margin: 20pt 0 15pt 0 !important;
    }

    .markdown-content h2 {
        font-size: 16pt !important;
        margin: 16pt 0 10pt 0 !important;
    }

    .markdown-content h3 {
        font-size: 14pt !important;
        margin: 14pt 0 8pt 0 !important;
    }

    .markdown-content p,
    .markdown-content ul,
    .markdown-content ol {
        margin: 6pt 0 !important;
    }

    .markdown-content pre,
    .markdown-content blockquote {
        margin: 10pt 0 !important;
        padding: 8pt 10pt !important;
        border-left: 4pt solid #ddd !important;
        background-color: #f8f8f8 !important;
    }

    .markdown-content table {
        margin: 10pt 0 !important;
        font-size: 10pt !important;
        border-collapse: collapse !important;
        width: 100% !important;
        border: 1px solid #ddd !important;
    }

    .markdown-content td,
    .markdown-content th {
        padding: 6pt 8pt !important;
        border: 1px solid #ddd !important;
        background-color: #fff !important;
    }
    
    .markdown-content th {
        background-color: #f0f0f0 !important;
        font-weight: bold !important;
    }
    
    /* Fix clickable header styles for print */
    .clickable-header:hover {
        color: inherit !important;
    }
    
    /* Add page breaks before major sections */
    .markdown-content h1 {
        page-break-before: always !important;
    }
    
    /* First h1 shouldn't have a page break before it */
    .markdown-content h1:first-child {
        page-break-before: avoid !important;
    }
    
    /* Hide interactive elements */
    .markdown-content video,
    .markdown-content .header-anchor,
    .markdown-content svg {
        display: none !important;
    }
    
    /* Make URLs for links visible */
    @page {
        margin: 0.5in !important;
    }

    /* Simple print header with logo */
    .print-header {
        display: flex !important;
        align-items: center;
        margin-bottom: 15pt;
        border-bottom: 1pt solid #ddd;
        padding-bottom: 8pt;
    }
    
    /* Style the logo in print mode */
    .print-header .brand-logo {
        height: 30px;
        width: auto;
        display: block;
        filter: brightness(0); /* Make logo black */
        border-radius: 0 !important; /* Remove any border radius */
    }
    
    /* Style the title text section */
    .print-header .print-title-text {
        display: flex;
        align-items: center;
    }
    
    .print-header .divider {
        padding: 0 5px;
        font-size: 14pt;
        color: #555;
    }
    
    .print-header .page-title {
        font-size: 14pt;
        color: #333;
    }
    
    /* Remove the old print title elements */
    .print-title, 
    .content-container::before,
    .content-container::after {
        display: none !important;
    }
}

/* Add this rule to specifically remove the outline from the document content area when clicked */
#document-content:focus {
    outline: none !important;
}

/* But keep it for keyboard navigation */
#document-content:focus-visible {
    outline: 2px solid var(--ifm-color-primary) !important;
    outline-offset: 2px !important;
}

/* Also make sure any other clickable elements in the document content don't get outlines */
#document-content *:focus:not(:focus-visible) {
    outline: none !important;
}