/* Language Switcher */
.language-switcher {
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 1px solid #444;
    padding-bottom: 15px;
}

.lang-btn {
    background-color: #3a3f4b;
    color: #abb2bf;
    border: 1px solid #444;
    padding: 8px 16px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background-color: #4a4f5c;
    color: #fff;
}

.lang-btn.active {
    background-color: #61afef;
    color: #1f232a;
    font-weight: 700;
    border-color: #61afef;
}

/* Smooth transitions for language switching */
.content {
    transition: opacity 0.3s ease;
}

.content.switching {
    opacity: 0.5;
}

/* Responsive adjustments for language switcher */
@media (max-width: 768px) {
    .language-switcher {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .lang-btn {
        padding: 6px 12px;
        font-size: 0.9em;
    }
}

/* Basic Reset & Body */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #ddd; /* Light grey text */
    background-color: #282c34; /* Dark background */
    margin: 0;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    flex: 0 0 220px; /* Fixed width */
    background-color: #1f232a; /* Slightly darker sidebar */
    padding: 20px 15px;
    border-right: 1px solid #444;
    height: 100vh; /* Full height */
    position: sticky; /* Stick to the top */
    top: 0;
    overflow-y: auto; /* Allow scrolling if content overflows */
}

.sidebar h2 {
    color: #61afef; /* Blue heading */
    margin-bottom: 15px;
    font-size: 1.4em;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li a {
    display: block;
    color: #abb2bf; /* Lighter grey links */
    text-decoration: none;
    padding: 8px 0;
    margin-bottom: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 4px;
    padding-left: 10px;
    font-weight: 300;
}

.sidebar ul li a:hover {
    background-color: #3a3f4b;
    color: #fff;
}

.sidebar ul li a.active {
    background-color: #61afef; /* Blue for active link */
    color: #1f232a; /* Dark text on active */
    font-weight: 700;
}

/* Content Area */
.content {
    flex: 1; /* Takes remaining space */
    padding: 30px 40px;
    background-color: #282c34;
    overflow-y: auto; /* Allow content scrolling */
}

.content h1 {
    color: #e06c75; /* Red main heading */
    margin-bottom: 30px;
    border-bottom: 2px solid #444;
    padding-bottom: 15px;
    font-size: 2.5em;
}

.content h2 {
    color: #98c379; /* Green section headings */
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.8em;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}
.content h2:first-child {
    margin-top: 0;
}


.content h3 {
    color: #e5c07b; /* Yellow sub-headings */
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.content p {
    margin-bottom: 15px;
    font-weight: 300;
}

.content ul, .content ol {
    margin-left: 20px;
    margin-bottom: 15px;
    font-weight: 300;
}

.content ul li, .content ol li {
     margin-bottom: 8px;
}

.content ul ul, .content ol ol {
    margin-top: 8px;
    margin-bottom: 8px;
}

/* Images */
.screenshot {
    max-width: 100%;
    height: auto;
    /* border: 1px solid #444; */
    margin: 20px 0;
    display: block; /* Center block images */
    margin-left: 0;
    margin-right: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /* border-radius: 4px; */
}

figure {
    margin: 20px 0;
    text-align: left;
}

figcaption {
    font-size: 0.9em;
    color: #abb2bf;
    margin-top: 5px;
    font-style: italic;
}

/* Code/Shortcuts */
code {
    background-color: #3a3f4b;
    color: #d19a66; /* Orange code text */
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95em;
}

/* Links in content */
.content a {
    color: #61afef;
    text-decoration: none;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        flex: 0 0 auto; /* Reset flex */
        width: 100%;
        height: auto; /* Auto height */
        position: static; /* Reset sticky */
        border-right: none;
        border-bottom: 1px solid #444;
        padding: 15px;
    }
    .sidebar h2 {
        font-size: 1.2em;
    }

    .content {
        padding: 20px;
    }

    .content h1 {
        font-size: 2em;
    }
    .content h2 {
        font-size: 1.5em;
    }
    .content h3 {
        font-size: 1.3em;
    }
}
