/* docs.css */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

body.docs-body {
    background-color: #ffffff;
    margin: 0;
    padding: 0;
    display: flex;
    font-family: 'Inter', sans-serif;
    color: #111;
    min-height: 100vh;
    scroll-behavior: smooth;
}

.docs-sidebar {
    width: 240px;
    background-color: #fcfcfc;
    border-right: 1px solid #eaeaea;
    display: flex;
    flex-direction: column;
    padding-top: 40px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 10;
}

.sidebar-logo {
    padding: 0 40px 40px;
}

.sidebar-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #111;
}

.sidebar-logo .logo-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-bottom: 40px;
}

.nav-group {
    display: flex;
    flex-direction: column;
}

.nav-group-title {
    font-size: 11px;
    font-family: 'Space Mono', monospace;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 40px;
    margin-bottom: 12px;
}

.nav-link {
    text-decoration: none;
    color: #555;
    font-size: 12px;
    font-family: 'Space Mono', monospace;
    padding: 10px 40px;
    transition: all 0.2s;
    border-left: 2px solid transparent;
}

.nav-link:hover {
    color: #111;
    background-color: #f5f5f5;
}

.nav-link.active {
    color: #111;
    background-color: #e8e8e8;
    border-left: 2px solid #111;
}

.docs-content {
    flex: 1;
    margin-left: 240px;
    padding: 60px 80px 100px;
    max-width: 900px;
    background-color: #ffffff;
}


.docs-main-title {
    font-size: 40px;
    font-weight: 400;
    letter-spacing: -1.2px;
    margin-bottom: 12px;
    color: #111;
}

.docs-version {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.docs-divider {
    border: none;
    border-top: 1px solid #eaeaea;
    margin: 40px 0;
}

.docs-section {
    margin-bottom: 64px;
}

.docs-section h2 {
    font-size: 26px;
    font-weight: 400;
    letter-spacing: -0.5px;
    color: #111;
    margin-bottom: 24px;
    border-bottom: 1px dashed #eaeaea;
    padding-bottom: 16px;
}

.docs-section h3 {
    font-size: 18px;
    font-weight: 500;
    color: #222;
    margin-top: 40px;
    margin-bottom: 16px;
}

.docs-section p {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 20px;
}

.docs-section ul,
.docs-section ol {
    margin-bottom: 24px;
    padding-left: 24px;
    color: #444;
}

.docs-section li {
    font-size: 15px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.critical-notice {
    background-color: #fffbf0;
    border-left: 2px solid #f5c518;
    padding: 20px 24px;
    margin: 32px 0;
}

.critical-notice-title {
    font-size: 10px;
    font-weight: 600;
    color: #b08d00;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-family: 'Space Mono', monospace;
}

.critical-notice p {
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.code-block {
    background-color: #f8f9fa;
    border: 1px solid #eaeaea;
    color: #2e2e2e;
    padding: 24px;
    border-radius: 6px;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
    line-height: 1.6;
    overflow-x: auto;
    margin: 24px 0;
    white-space: pre;
}

.code-inline {
    background-color: #f0f0f0;
    color: #111;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Space Mono', monospace;
    font-size: 12px;
}

.method-doc {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.method-name {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    font-weight: 700;
    color: #111;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eaeaea;
}

.method-section {
    margin-top: 16px;
}

.method-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.docs-table th,
.docs-table td {
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid #eaeaea;
    font-size: 14px;
    line-height: 1.6;
    color: #444;
    vertical-align: top;
}

.docs-table th {
    background: #f8f9fa;
    font-family: 'Space Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #666;
}

.docs-table tbody tr:last-child td {
    border-bottom: none;
}

.architecture-diagram {
    background: #fdfdfd;
    border: 1px solid #eaeaea;
    padding: 32px;
    border-radius: 8px;
    text-align: center;
    margin: 32px 0;
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    color: #555;
}

.architecture-flow {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.arch-box {
    padding: 12px 24px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #111;
    font-weight: bold;
}

.arch-arrow {
    color: #aaa;
}

/* Mobile Menu Toggle - hidden on desktop */
.mobile-menu-toggle {
    display: none;
}

/* Sidebar Overlay - hidden on desktop */
.sidebar-overlay {
    display: none;
}

/* Mobile Responsiveness for Docs */
@media (max-width: 768px) {

    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .docs-layout {
        width: 100%;
        overflow-x: hidden;
    }

    /* Hamburger menu button */
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 100;
        width: 44px;
        height: 44px;
        background: #ffffff;
        border: 1px solid #eaeaea;
        border-radius: 10px;
        cursor: pointer;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        padding: 0;
        transition: background-color 0.2s;
    }

    .mobile-menu-toggle:hover {
        background: #f5f5f5;
    }

    .hamburger-line {
        display: block;
        width: 18px;
        height: 2px;
        background: #111;
        border-radius: 1px;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    /* Hamburger → X animation */
    .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Sidebar overlay */
    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 9;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Sidebar: off-screen by default, slides in */
    .docs-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 50;
        width: 260px;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
    }

    .docs-sidebar.open {
        transform: translateX(0);
    }

    /* Main content: full width */
    .docs-content {
        margin-left: 0;
        width: 100%;
        box-sizing: border-box;
        padding: 24px 20px 60px;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Docs header */
    .docs-main-title {
        font-size: 28px;
        letter-spacing: -0.8px;
        margin-top: 48px;
        /* space for hamburger button */
    }

    .docs-version {
        font-size: 9px;
        letter-spacing: 1px;
    }

    .docs-divider {
        margin: 24px 0;
    }

    /* Sections */
    .docs-section {
        margin-bottom: 40px;
    }

    .docs-section h2 {
        font-size: 22px;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .docs-section h3 {
        font-size: 16px;
        margin-top: 28px;
        margin-bottom: 12px;
    }

    .docs-section p {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 16px;
    }

    .docs-section li {
        font-size: 14px;
        margin-bottom: 10px;
        line-height: 1.5;
    }

    .docs-section ul,
    .docs-section ol {
        padding-left: 20px;
        margin-bottom: 20px;
    }

    /* Critical notice */
    .critical-notice {
        padding: 16px 18px;
        margin: 24px 0;
    }

    .critical-notice p {
        font-size: 13px;
    }

    /* Code blocks: horizontal scroll */
    .code-block {
        padding: 16px;
        font-size: 11px;
        line-height: 1.5;
        margin: 16px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .code-inline {
        font-size: 11px;
        word-break: break-word;
    }

    .docs-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 16px 0;
    }

    .docs-table th,
    .docs-table td {
        min-width: 140px;
        font-size: 13px;
        padding: 12px;
    }

    /* Architecture diagram */
    .architecture-diagram {
        padding: 20px 16px;
        margin: 20px 0;
        font-size: 12px;
    }

    .architecture-flow {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 16px;
        justify-content: center;
    }

    .arch-box {
        padding: 10px 16px;
        font-size: 12px;
    }

    /* Method documentation */
    .method-doc {
        padding: 18px 16px;
        margin-bottom: 20px;
    }

    .method-name {
        font-size: 12px;
        margin-bottom: 12px;
        padding-bottom: 10px;
        word-break: break-all;
    }

    .method-section {
        margin-top: 12px;
    }

    .method-section-title {
        font-size: 10px;
        margin-bottom: 6px;
    }
}
