:root,
[data-theme="dark"] {
    --text-sidebar-hover: #ffffff;
}
#sidebar,
.components a {
    color: var(--text-sidebar);
    transition: 0.3s;
}
.components a.active,
.components a:hover {
    color: var(--text-sidebar-hover);
    background: rgba(255, 255, 255, 0.05);
}
#content,
.wrapper {
    width: 100%;
    display: flex;
}
h2,
p {
    margin-bottom: 15px;
}
h2,
p.note {
    background-color: #c4cf82;
}
h2,
h3 {
    color: var(--text-heading);
}
.toc-list,
article.main-text,
div.main-text,
p {
    line-height: 1.6;
}
.menu,
ul {
    list-style: none;
}
.menu li,
pre,
ul li {
    position: relative;
}
/* #007bff 
   #4da3ff
*/
:root {
    --primary-color: #fa377b;
    --accent-color: #00bcd4;
    --bg-body: #f4f6f9;
    --bg-sidebar: #343a40;
    --bg-navbar: #ffffff;
    --text-main: #333333;
    --text-sidebar: #cfd8dc;
    --text-heading: #2c3e50;
    --border-color: #dee2e6;
    --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    --text-color: #222222;
    --table-header-bg: rgba(128, 128, 128, 0.08);
    --table-hover-bg: rgba(128, 128, 128, 0.06);
}
[data-theme="dark"] {
    --primary-color: #ed1f67;
    --accent-color: #00e5ff;
    --bg-body: #121212;
    --bg-sidebar: #1e1e1e;
    --bg-navbar: #1e1e1e;
    --text-main: #e0e0e0;
    --text-sidebar: #b0b0b0;
    --text-heading: #ffffff;
    --border-color: #333333;
    --shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    --card-bg: #1b1b1b;
    --text-color: #e0e0e0;
    --table-header-bg: rgba(255, 255, 255, 0.06);
    --table-hover-bg: rgba(255, 255, 255, 0.04);
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    transition:
        background-color 0.3s,
        color 0.3s;
    overflow-x: hidden;
}
.wrapper {
    min-height: 100vh;
}
#sidebar {
    min-width: 250px;
    max-width: 250px;
    background: var(--bg-sidebar);
    position: fixed;
    height: 100vh;
    z-index: 999;
    overflow-y: auto;
}
.sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-sidebar-hover);
}
.footer-top a,
.nav-btn {
    font-weight: 500;
    text-decoration: none;
}
.components {
    padding: 20px 0;
}
.components a {
    padding: 15px 20px;
    display: block;
    text-decoration: none;
    border-left: 3px solid transparent;
}
.footer-top a,
button,
h1 {
    color: var(--primary-color);
}
.components a.active {
    border-left: 3px solid var(--accent-color);
}
#content {
    margin-left: 250px;
    transition: 0.3s;
    flex-direction: column;
}
.top-navbar {
    height: 60px;
    background: var(--bg-navbar);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 900;
    transition: background 0.3s;
}
.top-navbar .nav-spacer-image {
    flex-grow: 1;
    height: 100%;
    margin: 0 20px;
    background-image: url("images/garden.jpeg");
    background-size: 100% 100%;
    background-position: top center;
    background-repeat: no-repeat;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}
.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
.nav-logo {
    height: 40px;
    width: auto;
}
button {
    background: 0 0;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px 10px;
    border-radius: 4px;
    transition: 0.2s;
}
button:hover {
    background: rgba(0, 0, 0, 0.05);
}
.main-text {
    padding: 40px;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}
h1 {
    margin-bottom: 20px;
}
h2 {
    margin-top: 30px;
    font-size: 1.3rem;
}
pre {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 20px !important;
}
div.code-toolbar > .toolbar {
    opacity: 1 !important;
    top: 5px;
    right: 5px;
}
.wrapper.sidebar-hidden #sidebar {
    margin-left: -250px;
}
.wrapper.sidebar-hidden #content {
    margin-left: 0;
}
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 6px;
    transition:
        background 0.3s,
        transform 0.2s;
}
.nav-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    color: #fff;
}
.nav-btn.prev::before {
    content: "←";
    margin-right: 8px;
}
.nav-btn.next::after {
    content: "→";
    margin-left: 8px;
}
.footer-line {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 40px 0 20px;
    width: 100%;
}
[data-theme="dark"] .footer-line {
    background-image: linear-gradient(
        to right,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0.2),
        rgba(255, 255, 255, 0)
    );
}
.site-footer {
    padding: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    background: 0 0;
}
[data-theme="dark"] .site-footer {
    color: #888;
}
.footer-top {
    margin-bottom: 15px;
}
.footer-top .separator {
    margin: 0 10px;
    color: var(--border-color);
}
.menu {
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}
.menu li {
    white-space: nowrap;
}
.menu li:not(:last-child)::after {
    content: "|";
    margin-left: 15px;
    color: var(--border-color);
    opacity: 0.5;
}
.menu a {
    color: inherit;
    text-decoration: none;
}
.menu a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}
.menu-label {
    padding: 25px 20px 5px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: #888;
    margin: 0;
}
.rectangle-list a:hover,
.toc-list,
[data-theme="dark"] .rectangle-list a:hover {
    color: var(--accent-color);
}
[data-theme="dark"] .menu-label {
    color: #666;
}
.toc-list {
    margin: 20px 0 30px;
    padding-left: 20px;
    font-weight: 500;
}
.rectangle-list li {
    padding-left: 10px;
    margin-bottom: 8px;
}
.rectangle-list a {
    text-decoration: none;
    color: var(--primary-color);
    transition: 0.2s;
    border-bottom: 1px solid transparent;
}
p.note,
p.output {
    border: 1px solid #bfd62f;
}
.rectangle-list a:hover {
    border-bottom: 1px solid var(--accent-color);
}
[data-theme="dark"] .rectangle-list a {
    color: #8ab4f8;
}
p.note {
    color: #610e00;
    text-shadow: 0;
    -moz-border-radius: 6px;
    -webkit-border-radius: 6px;
    border-radius: 6px;
    padding: 14px 20px;
    mc-auto-number-format: "{b}Note: {/b}";
}
h3,
p.output {
    background-color: #940792;
    mc-auto-number-format: "{b}Note: {/b}";
}
p.menubar b,
p.note b,
p.note i,
p.note u {
    color: #000;
}
p.output {
    color: #d2cec8;
    -moz-border-radius: 6px;
    -webkit-border-radius: 6px;
    border-radius: 6px;
    padding: 14px 20px;
}
.menubar,
h2 {
    color: #610e00;
    border: 1px solid #bfd62f;
    padding: 14px 20px;
}
p.output b,
p.output u {
    color: #bdb7c8;
}
@media (max-width: 768px) {
    .overlay,
    .theme-label {
        display: none;
    }
    #sidebar {
        margin-left: -250px;
    }
    #content {
        margin-left: 0;
    }
    .wrapper.mobile-active #sidebar {
        margin-left: 0;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    }
    .overlay {
        position: fixed;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        transition: 0.3s ease-in-out;
        top: 0;
        left: 0;
    }
    .wrapper.mobile-active .overlay {
        display: block;
        opacity: 1;
    }
    .menu {
        flex-direction: column;
        gap: 8px;
    }
    .menu li:not(:last-child)::after {
        content: "";
        margin: 0;
    }
    .footer-top {
        margin-bottom: 20px;
    }
}
[data-theme="dark"] .top-navbar .nav-spacer-image {
    background-image: url("images/space.jpeg");
}
.menubar {
    text-shadow: 0;
    background-color: #e1a1c1;
    -moz-border-radius: 6px;
    -webkit-border-radius: 6px;
    border-radius: 6px;
}
h2 {
    border-radius: 6px;
}
h3 {
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #d2cec8;
    border: 1px solid #bfd62f;
    -moz-border-radius: 6px;
    -webkit-border-radius: 6px;
    border-radius: 6px;
    padding: 14px 20px;
}
code {
    font-size: 1.1em;
}
ol li,
ul li {
    line-height: 1.8;
}
ol,
ul {
    margin-bottom: 16px;
}
h4 {
    margin-top: 20px;
    margin-bottom: 8px;
    font-size: 1rem;
    color: #f5f5f5;
    border-left: 4px solid #bfd62f;
    padding: 8px 14px;
    background-color: #2a2a2a;
    border-radius: 4px;
}
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
    border-radius: 10px;
}
.table-responsive table {
    width: 100%;
    min-width: 700px;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-bg, #fff);
    color: var(--text-color, #222);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.table-responsive td,
.table-responsive th {
    padding: 14px 16px;
    border-right: 1px solid rgba(128, 128, 128, 0.2);
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
    text-align: left;
    vertical-align: top;
    background: 0 0;
}
.table-responsive th {
    background: var(--table-header-bg);
    font-weight: 600;
}
.table-responsive td:last-child,
.table-responsive th:last-child {
    border-right: none;
}
.table-responsive tr:last-child td {
    border-bottom: none;
}
.table-responsive tr:hover {
    background: var(--table-hover-bg);
}
ul:not(.menu) {
    list-style: none;
    padding-left: 0;
}
ul:not(.menu) li {
    position: relative;
    padding-left: 1.8em;
}
ul:not(.menu) li::before {
    content: "🌈";
    position: absolute;
    left: 0;
}
[data-theme="dark"] ul:not(.menu) li::before {
    content: "⭐";
}
