* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
}

body:has(.menu-bar) {
    background-color: #f0f2f5;
    line-height: 1.7;
}

html {
    scroll-behavior: smooth;
}

.menu-bar {
    background-color: #243342;
    padding: 10px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.menu-bar a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 6px 14px;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.menu-bar a:hover {
    background-color: #e74c3c;
}

.menu-bar a.active {
    background-color: #e74c3c;
    font-weight: bold;
}

.slide {
    max-width: 1200px;
    margin: 30px auto;
    background: #f9f9f9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background-color: #364d63;
    color: white;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.slide-number {
    background-color: #e74c3c;
    padding: 4px 14px;
    font-weight: bold;
    font-size: 0.95em;
    white-space: nowrap;
}

.slide-title {
    font-size: 1.15em;
    font-weight: 600;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 4px;
}

.slide .content {
    display: flex;
    flex-wrap: wrap;
    padding: 24px;
    gap: 24px;
}

.text {
    flex: 3;
    min-width: 300px;
    max-width: 100%;
}

.illustration {
    flex: 2;
    min-width: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.illustration img {
    max-width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    max-width: 400px;
}

h3 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 1.15em;
}

p {
    margin-bottom: 10px;
    text-align: justify;
}

ul, ol {
    margin: 10px 0 10px 20px;
}

li {
    margin-bottom: 6px;
}

pre.cli {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 16px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.92em;
    line-height: 1.6;
    margin: 12px 0;
    border-left: 5px solid #e74c3c;
}

.cmd {
    color: #569cd6;
}

.def {
    color: #dcdcaa;
}

.str {
    color: #ce9178;
}

.comment {
    color: #6a9955;
    font-style: italic;
}

.num {
    color: #b5cea8;
}

.attr {
    color: #9cdcfe;
}

.note {
    background-color: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 15px;
    margin: 12px 0;
}

.important-box {
    background-color: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 15px;
    margin: 12px 0;
}

code {
    color: #ee0000;
    font-weight: normal;
    background-color: #fce4e4;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.9em;
}

pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    color: inherit;
    font-weight: inherit;
}

strong, b {
    color: #2c3e50;
}

.extended {
    background-color: #eef5fa;
    padding: 24px 24px; 
    padding-right: 20%;
    border-top: 2px solid #2c3e50;
    display: none;
}

.extended p {
    margin-bottom: 8px;
    font-size: 0.95em;
}

.extended.hidden {
    display: block;
}

.ext-btn {
    margin-left: auto;
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 0.9em;
}

.illustration-placeholder {
    background: #e8eef3;
    border: 2px dashed #2c3e50;
    padding: 40px 20px;
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    font-size: 0.95em;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

table th {
    background-color: #2c3e50;
    color: white;
    padding: 8px;
    border: 1px solid #ddd;
    font-size: 0.9em;
}

table td {
    padding: 8px;
    border: 1px solid #ddd;
    font-size: 0.88em;
}

table tr:nth-child(even) {
    background-color: #f0f2f5;
}

code {
    color: #ee0000;
}

pre {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 16px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.92em;
    line-height: 1.6;
    margin: 12px 0;
    border-left: 5px solid #e74c3c;
}

pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    color: inherit;
    font-weight: inherit;
}

@media (max-width: 768px) {
    .slide .content {
        flex-direction: column;
    }
    .slide .illustration {
        order: -1;
    }
}

/* ===== SIDEBAR LAYOUT (index) ===== */

body.sidebar-layout {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 400px;
    background-color: #1a1a2e;
    color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    top: 0;
    left: 0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
}

.sidebar h1 {
    font-size: 20px;
    margin-bottom: 10px;
    text-align: center;
    border-bottom: 1px solid #0f3460;
    padding-bottom: 15px;
    color: #e94560;
}

.sidebar .subtitle {
    font-size: 12px;
    text-align: center;
    color: #888;
    margin-bottom: 25px;
}

.sidebar .subtitle.c-accent-mt {
    margin-top: 20px;
    color: #e94560;
}

.sidebar .menu {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.sidebar .menu li {
    margin-bottom: 8px;
}

.sidebar .menu a {
    display: block;
    padding: 12px 15px;
    color: #ecf0f1;
    text-decoration: none;
    background-color: #0f3460;
    transition: background-color 0.3s;
    font-size: 0.9em;
}

.sidebar .menu a:hover {
    background-color: #e94560;
}

.sidebar .menu .num {
    font-weight: bold;
    color: #e94560;
    margin-right: 6px;
}

.sidebar .menu a:hover .num {
    color: #fff;
}

.sidebar .menu .active {
    background-color: #e94560;
    font-weight: bold;
}

body.index-layout .content {
    margin-left: 400px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    min-height: 100vh;
}

body.index-layout .welcome-box {
    background-color: white;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
}

body.index-layout .welcome-box h2 {
    color: #1a1a2e;
    margin-bottom: 8px;
}

body.index-layout .welcome-box h3 {
    color: #0f3460;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: normal;
    border-bottom: 2px solid #e94560;
    padding-bottom: 10px;
    font-size: 1.15em;
}

body.index-layout .welcome-box p {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 14px;
    text-align: justify;
}

.sidebar .footer {
    margin-top: auto;
    text-align: center;
    padding-top: 20px;
    font-size: 0.85em;
    color: #7f8c8d;
    border-top: 1px solid #0f3460;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.sidebar .footer a {
    color: #7f8c8d;
    text-decoration: none;
}

@media (max-width: 800px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    body.index-layout .content {
        margin-left: 0;
        padding: 20px;
    }
    body.index-layout .welcome-box {
        padding: 20px;
    }
}
