body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: #e9e9e9; 
    color: #333333; 
    display: flex;
    height: 100vh;
    overflow: hidden; 
}

.container {
    display: flex;
    width: 100%;
    height: 100%;
    padding: 20px; 
    box-sizing: border-box;
}

.sidebar {
    width: 300px;
    background: rgba(255, 255, 255, 0.6); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); 
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    padding: 25px;
    margin-right: 20px;
    overflow-y: auto;
    color: #333;
}

.sidebar-header h2 {
    color: #111;
    margin-top: 0;
    font-size: 1.6em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 15px;
}

#docs-nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#docs-nav li {
    margin: 8px 0;
}

#docs-nav a {
    text-decoration: none;
    color: #2c3e50; 
    display: block;
    padding: 8px 15px; /* Reduced padding slightly */
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-weight: 500;
    font-size: 0.9em; /* Reduced font size */
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden; /* Hide overflow */
    text-overflow: ellipsis; /* Add ellipsis for overflowed text */
    max-width: 100%; /* Ensure it doesn't overflow its container if there are layout issues */
}

#docs-nav a:hover, 
#docs-nav a.active {
    background-color: rgba(0, 123, 255, 0.1); 
    color: #0056b3; 
}

#docs-nav ul ul {
    padding-left: 20px;
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    margin-left: 10px;
    margin-top: 5px;
}

#docs-nav .module > a {
    font-weight: 600; 
    color: #0056b3;
}

#docs-nav .class > a {
    color: #16a085; 
}
#docs-nav .function > a {
    color: #8e44ad; 
}


.content {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.65); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); 
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.12);
    padding: 30px;
    overflow-y: auto;
    color: #333;
}

.content h1, .content h2, .content h3 {
    color: #111; 
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 10px;
    margin-top: 0;
}

.content h1 { font-size: 2em; }
.content h2 { font-size: 1.6em; }
.content h3 { font-size: 1.3em; color: #2980b9; } 

.content p {
    line-height: 1.7;
    margin-bottom: 15px;
}

.content pre {
    background-color: rgba(240, 240, 240, 0.8); 
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #2c3e50; 
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.05);
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.9em;
}

.doc-section {
    margin-bottom: 30px;
    padding: 25px;
    background-color: rgba(255, 255, 255, 0.5); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.doc-section h2 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #0056b3;
}

.doc-section h3 {
    font-size: 1.25em;
    color: #16a085;
    margin-top: 20px;
    margin-bottom: 8px;
}

.doc-section p:first-of-type {
    margin-top: 0;
}


::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.3);
}



@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 10px; 
    }
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 45vh; 
        margin-right: 0;
        margin-bottom: 15px; 
        border-right: none;
    }
    .content {
        flex-grow: 1;
    }
}
