/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: black;
    color: white;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Header */
.header {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 40px;
    text-align: center;
}

/* Main Container */
.container {
    display: flex;
    width: 90%;
    /* FIX: Reduced max-width to make the content column narrower. */
    max-width: 1000px; 
    height: 70vh;
    position: relative;
}

/* Menu Section */
.menu {
    flex: 0 0 300px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Menu Search */
.menu-search {
    margin-bottom: 20px;
}

#menu-search-input {
    width: 100%;
    padding: 8px 12px;
    background-color: #222;
    color: white;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 14px;
}

#menu-search-input:focus {
    outline: none;
    border-color: #666;
}

/* Menu Navigation */
.menu-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 10px;
}

/* Custom Scrollbar for Menu */
.menu-nav::-webkit-scrollbar {
    width: 6px;
}

.menu-nav::-webkit-scrollbar-track {
    background: #111;
}

.menu-nav::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.menu-nav::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Menu Items */
.menu-item {
    margin: 2px 0;
    line-height: 1.6;
}

.menu-item a {
    color: white;
    text-decoration: none;
    display: inline-block;
    padding: 4px 8px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.menu-item a:hover {
    background-color: #333;
    text-decoration: underline;
}

.menu-item.active > a,
.menu-item.active > .menu-toggle a {
    background-color: #444;
    font-weight: bold;
}

/* Nested Menu Levels */
.menu-item.depth-1 {
    margin-left: 20px;
}

.menu-item.depth-2 {
    margin-left: 40px;
}

.menu-item.depth-3 {
    margin-left: 60px;
}

.menu-item.depth-4 {
    margin-left: 80px;
}

/* Menu Toggle for Accordion */
.menu-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.toggle-icon {
    display: inline-block;
    width: 20px;
    font-size: 12px;
    transition: transform 0.2s;
    user-select: none;
}

.menu-toggle.expanded .toggle-icon {
    transform: rotate(90deg);
}

/* Menu Children Container */
.menu-children {
    display: none;
    margin-top: 2px;
}

.menu-children.show {
    display: block;
}

/* Hidden class for search filtering */
.menu-item.hidden {
    display: none !important;
}

/* Divider */
.divider {
    width: 1px;
    background-color: white;
    margin: 0 20px;
}

/* Content Section */
.content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Content Scrollbar */
.content::-webkit-scrollbar {
    width: 8px;
}

.content::-webkit-scrollbar-track {
    background: #111;
}

.content::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.content::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Content Typography */
.content h1 {
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 2em;
}

.content h2 {
    font-weight: bold;
    margin: 30px 0 15px 0;
    font-size: 1.5em;
}

.content h3 {
    font-weight: bold;
    margin: 25px 0 10px 0;
    font-size: 1.2em;
}

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

.content ul, .content ol {
    margin-left: 30px;
    margin-bottom: 15px;
}

.content li {
    line-height: 1.6;
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
        width: 95%;
    }
    
    .menu {
        flex: 0 0 200px;
        border-bottom: 1px solid white;
        margin-bottom: 20px;
    }
    
    .divider {
        display: none;
    }
    
    .content {
        flex: 1;
        min-height: 400px;
    }
}