/* Base styling */
html {
    position: relative;
    min-height: 100%;
}

body {
    padding-bottom: 60px; /* Space for footer */
}

/* Sidebar styling */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    overflow-y: auto;
    height: 100vh;
}

    .sidebar .nav-link {
        font-weight: 500;
        color: #333;
    }

        .sidebar .nav-link.active {
            color: #007bff;
        }

/* File tree styling */
.nested {
    display: none;
}

    .nested.show {
        display: block;
    }

.folder-item {
    margin-bottom: 2px;
}

.file-item.active {
    background-color: #212529;
    border-color: #212529;
    color: #fff;
    font-weight: 500;
}

    .file-item.active i {
        color: #fff;
    }

/* Markdown content styling */
.markdown-content {
    line-height: 1.6;
}

    .markdown-content h1,
    .markdown-content h2,
    .markdown-content h3 {
        margin-top: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .markdown-content pre {
        background-color: #f8f9fa;
        padding: 1rem;
        border-radius: 0.25rem;
        border: 1px solid #dee2e6;
        overflow-x: auto;
    }

    .markdown-content img {
        max-width: 100%;
        height: auto;
    }

    .markdown-content table {
        width: 100%;
        margin-bottom: 1rem;
        border-collapse: collapse;
    }

        .markdown-content table th,
        .markdown-content table td {
            padding: 0.5rem;
            border: 1px solid #dee2e6;
        }

        .markdown-content table th {
            background-color: #f8f9fa;
        }
    .markdown-content .highlight-item {
        background-color: #fff3cd;
        border-radius: 0.25rem;
        padding: 0.5rem;
        margin: -0.5rem;
    }

    .markdown-content code, .markdown-body tt {
        padding: .2em .4em;
        margin: 0;
        font-size: 85%;
        white-space: break-spaces;
        background-color: #818b981f;
        border-radius: 6px;
        color: #000;
    }

/* Footer styling */
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
    background-color: #f8f9fa;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        height: auto;
        padding-top: 1.5rem;
    }
}
