html.docs-body, body.docs-body {
    margin: 0;
    padding: 0;
    height: 100dvh;
    overflow: hidden;
    background-color: var(--bg-main);
    overscroll-behavior: none;
}

.docs-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 100px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.docs-nav-container {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.docs-nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.docs-layout {
    margin-top: 100px;
    height: calc(100dvh - 100px);
    display: flex;
    position: relative;
    width: 100%;
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
}

.docs-body *::-webkit-scrollbar { width: 6px; height: 6px; }
.docs-body *::-webkit-scrollbar-track { background: transparent; }
.docs-body *::-webkit-scrollbar-thumb { background: rgba(156, 163, 175, 0.4); border-radius: 10px; }
.docs-body *::-webkit-scrollbar-thumb:hover { background: rgba(107, 114, 128, 0.7); }

.docs-sidebar {
    width: 300px;
    background-color: #fcfcfc;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    flex-shrink: 0;
    z-index: 90;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.version-selector-wrap { padding: 25px 20px 15px; }
.version-selector-wrap label {
    display: block; font-size: 0.75rem; font-weight: 700; color: #9ca3af;
    margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px;
}

.select-wrapper { position: relative; }
.version-select {
    width: 100%; padding: 10px 35px 10px 15px;
    border: 1px solid var(--border-color); border-radius: 8px;
    background: white; font-family: inherit; font-weight: 600; color: var(--text-main);
    cursor: pointer; outline: none; appearance: none; transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.version-select:focus, .version-select:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.select-icon { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: #9ca3af; pointer-events: none; font-size: 0.8rem; }

.docs-search-wrap { padding: 0 20px 20px; border-bottom: 1px solid var(--border-color); position: relative; }
.search-input-box {
    display: flex; align-items: center; background: white; border: 1px solid var(--border-color);
    border-radius: 8px; padding: 10px 12px; transition: all 0.2s; box-shadow: inset 0 1px 2px rgba(0,0,0,0.02); cursor: text;
}
.search-input-box.focus-ring { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light), inset 0 1px 2px rgba(0,0,0,0.01); }
.search-input-box i { color: #9ca3af; font-size: 0.95rem; margin-right: 10px; flex-shrink: 0;}
.search-input-box input {
    flex: 1; min-width: 0; border: none; outline: none; background: transparent;
    font-family: inherit; font-size: 0.9rem; color: var(--text-main); font-weight: 500;
}
.search-input-box input::placeholder { color: #9ca3af; font-weight: 400;}

.search-shortcut {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 8px;
}
.search-shortcut kbd {
    background: #f3f4f6; border: 1px solid #e5e7eb; border-bottom-width: 2px;
    border-radius: 4px; padding: 2px 5px; font-size: 0.65rem; font-weight: 700; color: #6b7280; font-family: inherit; white-space: nowrap;
}

.search-results {
    position: absolute; top: calc(100% - 10px); left: 20px; right: 20px;
    background: white; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); border: 1px solid var(--border-color);
    max-height: 350px; overflow-y: auto; z-index: 1000; display: none; flex-direction: column;
}
.search-results.active { display: flex; animation: slideDown 0.2s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.search-result-item { padding: 12px 16px; border-bottom: 1px solid var(--bg-light); text-decoration: none; display: flex; flex-direction: column; gap: 4px; transition: background 0.2s; }
.search-result-item:hover { background: #f8fafc; }
.search-result-title { font-weight: 600; font-size: 0.9rem; color: var(--primary); }
.search-result-category { font-size: 0.65rem; color: #6b7280; text-transform: uppercase; font-weight: 800; letter-spacing: 0.5px; }

.docs-nav { padding: 10px 15px 30px; overflow-y: auto; flex: 1; }
.docs-category { font-size: 0.75rem; font-weight: 800; color: #9ca3af; margin: 25px 10px 10px; text-transform: uppercase; letter-spacing: 1px; }
.docs-nav-link {
    display: block; padding: 10px 12px 10px 15px; margin-bottom: 2px; color: #4b5563;
    text-decoration: none; border-radius: 8px; font-size: 0.95rem; font-weight: 500; transition: all 0.2s;
    border-left: 3px solid transparent;
}
.docs-nav-link:hover { background: rgba(59, 133, 38, 0.04); color: var(--text-main); transform: translateX(2px);}
.docs-nav-link.active { background: linear-gradient(90deg, var(--primary-light) 0%, transparent 100%); color: var(--primary-hover); font-weight: 600; border-left-color: var(--primary); }

.docs-main {
    flex: 1; 
    height: 100%; 
    overflow-y: auto;
    padding: 50px 80px; 
    background: white; 
    position: relative; 
    scroll-behavior: smooth;
}
.docs-content-wrapper { animation: fadeInContent 0.3s ease-out; }
@keyframes fadeInContent { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.docs-breadcrumbs { font-size: 0.85rem; color: #6b7280; margin-bottom: 40px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 500; }
.docs-breadcrumbs i { font-size: 0.85rem; color: #9ca3af;}
.docs-breadcrumbs .bc-active { color: var(--primary); font-weight: 600; background: var(--primary-light); padding: 4px 12px; border-radius: 20px; }

.docs-footer-nav { display: flex; justify-content: space-between; margin-top: 80px; padding-top: 30px; border-top: 1px solid var(--border-color); padding-bottom: 40px; gap: 20px;}
.docs-nav-btn { min-width: 140px; }

.loading-spinner { text-align: center; padding: 100px 0; color: var(--text-gray); font-size: 1.1rem; display: flex; flex-direction: column; gap: 15px; align-items: center;}
.loading-spinner i { font-size: 2.5rem; color: var(--primary-light); }

.docs-content-formatted { max-width: 850px; line-height: 1.8; color: #374151; font-size: 1.05rem; }
.docs-content-formatted h1 { font-size: 2.6rem; font-weight: 800; color: #111827; margin-bottom: 25px; letter-spacing: -0.5px; line-height: 1.2;}
.docs-content-formatted h2 { font-size: 1.8rem; font-weight: 700; color: #1f2937; margin-top: 55px; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 10px; }
.docs-content-formatted h3 { font-size: 1.35rem; font-weight: 600; color: #111827; margin-top: 40px; margin-bottom: 15px; }
.docs-content-formatted h4 { font-size: 1.15rem; font-weight: 700; color: #4b5563; margin-top: 30px; margin-bottom: 10px; }
.docs-content-formatted p { margin-bottom: 22px; }

.docs-content-formatted strong, .docs-content-formatted b { font-weight: 700; color: #111827; }
.docs-content-formatted em, .docs-content-formatted i { font-style: italic; }
.docs-content-formatted a { color: var(--primary); font-weight: 600; text-decoration: none; border-bottom: 2px solid rgba(59, 133, 38, 0.3); transition: all 0.2s; padding-bottom: 1px;}
.docs-content-formatted a:hover { border-bottom-color: var(--primary); background: var(--primary-light); }

.docs-content-formatted ul, .docs-content-formatted ol { margin-bottom: 25px; padding-left: 20px; }
.docs-content-formatted li { margin-bottom: 10px; }
.docs-content-formatted ul li { list-style-type: none; position: relative; padding-left: 18px; }
.docs-content-formatted ul li::before { content: ''; position: absolute; left: 0; top: 12px; width: 6px; height: 6px; background: var(--primary); border-radius: 50%; opacity: 0.8; }
.docs-content-formatted ol li { list-style-type: decimal; color: var(--primary); font-weight: 700;}
.docs-content-formatted ol li span { color: #374151; font-weight: normal; }

.docs-content-formatted .steps { list-style-type: none; padding-left: 0; counter-reset: step-counter; margin-top: 30px;}
.docs-content-formatted .steps li { list-style-type: none; }
.docs-content-formatted .steps > li { position: relative; padding-left: 55px; margin-bottom: 25px; }
.docs-content-formatted .steps > li::before { content: counter(step-counter); counter-increment: step-counter; position: absolute; left: 0; top: -2px; width: 34px; height: 34px; background: white; color: var(--primary); font-weight: 800; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; box-shadow: 0 0 0 2px var(--primary-light), 0 4px 6px rgba(0,0,0,0.05); }

.docs-content-formatted kbd { background-color: #f8fafc; border: 1px solid #cbd5e1; border-bottom-width: 2px; border-radius: 6px; padding: 3px 6px; font-size: 0.85em; font-weight: 600; color: #334155; margin: 0 3px; font-family: 'Inter', sans-serif;}
.docs-content-formatted code { font-family: 'Fira Code', monospace; background-color: #f1f5f9; color: #db2777; padding: 4px 6px; border-radius: 6px; font-size: 0.85em; font-weight: 500; border: 1px solid #e2e8f0;}

.docs-content-formatted pre { background-color: #0f172a; color: #e2e8f0; padding: 25px; border-radius: 12px; overflow-x: auto; margin: 35px 0; box-shadow: 0 10px 25px rgba(0,0,0,0.1); border: 1px solid #1e293b; position: relative; padding-top: 50px;}
.docs-content-formatted pre::before { content: ''; position: absolute; top: 18px; left: 20px; width: 12px; height: 12px; border-radius: 50%; background: #ef4444; box-shadow: 20px 0 0 #f59e0b, 40px 0 0 #10b981; }
.docs-content-formatted pre code { background-color: transparent; color: inherit; padding: 0; border: none; font-size: 0.9rem; line-height: 1.6; }

.docs-content-formatted table { width: 100%; border-collapse: collapse; margin: 35px 0; font-size: 0.95rem; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); box-shadow: 0 4px 6px rgba(0,0,0,0.02);}
.docs-content-formatted th, .docs-content-formatted td { padding: 16px; text-align: left; border-bottom: 1px solid var(--border-color); }
.docs-content-formatted th { background-color: #f8fafc; color: #111827; font-weight: 700; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.5px; }
.docs-content-formatted tr:last-child td { border-bottom: none; }
.docs-content-formatted tr:nth-child(even) { background-color: #fafafa; }
.docs-content-formatted tr:hover td { background-color: #f1f5f9; }

.docs-content-formatted .badge { display: inline-block; padding: 4px 12px; border-radius: 50px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; vertical-align: middle; margin: 0 5px; letter-spacing: 0.5px;}
.docs-content-formatted .badge-blue { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe;}
.docs-content-formatted .badge-green { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0;}

.docs-content-formatted .callout { padding: 22px 25px 22px 65px; border-radius: 12px; margin: 30px 0; position: relative; background: #f8fafc; border-left: 4px solid var(--border-color); font-size: 1rem;}
.docs-content-formatted .callout::before { font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 22px; top: 22px; font-size: 1.5rem; }
.docs-content-formatted .callout p:last-child { margin-bottom: 0; }
.docs-content-formatted .callout-title { font-weight: 800; display: block; margin-bottom: 8px; font-size: 1.1rem; color: #111827; }

.docs-content-formatted .callout-info { background-color: #f0f9ff; border-left-color: #0ea5e9; }
.docs-content-formatted .callout-info::before { content: '\f05a'; color: #0ea5e9; }
.docs-content-formatted .callout-tip { background-color: #f0fdf4; border-left-color: #22c55e; }
.docs-content-formatted .callout-tip::before { content: '\f0eb'; color: #22c55e; }
.docs-content-formatted .callout-warn { background-color: #fffbeb; border-left-color: #f59e0b; }
.docs-content-formatted .callout-warn::before { content: '\f071'; color: #f59e0b; }
.docs-content-formatted .callout-danger { background-color: #fef2f2; border-left-color: #ef4444; }
.docs-content-formatted .callout-danger::before { content: '\f057'; color: #ef4444; }

.docs-content-formatted img { max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border-color); box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); margin: 35px 0; display: block; transition: transform 0.3s ease;}
.docs-content-formatted img:hover { transform: scale(1.01); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);}

.docs-content-formatted details { background: white; border: 1px solid var(--border-color); border-radius: 10px; margin: 25px 0; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.02);}
.docs-content-formatted summary { padding: 18px 20px; font-weight: 600; color: #1f2937; background: #f8fafc; cursor: pointer; display: flex; align-items: center; justify-content: space-between; user-select: none; list-style: none;}
.docs-content-formatted summary::-webkit-details-marker { display: none; }
.docs-content-formatted summary::after { content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900; transition: transform 0.3s; color: var(--text-gray); }
.docs-content-formatted details[open] summary { border-bottom: 1px solid var(--border-color); background: white;}
.docs-content-formatted details[open] summary::after { transform: rotate(180deg); }
.docs-content-formatted details > div { padding: 20px; }

.docs-content-formatted pre.file-tree {
    background-color: #f8fafc; border: 1px solid var(--border-color); box-shadow: none; color: #334155; padding: 25px; line-height: 1.8;
}
.docs-content-formatted pre.file-tree::before { display: none; }
.docs-content-formatted pre.file-tree code { color: #475569; font-size: 0.95rem; }
.docs-content-formatted pre.file-tree span.tree-branch { color: #cbd5e1; user-select: none; }
.docs-content-formatted pre.file-tree span.folder { color: #3b82f6; font-weight: 600; }
.docs-content-formatted pre.file-tree span.folder::before { content: '\f07b'; font-family: 'Font Awesome 6 Free'; font-weight: 900; margin-right: 8px; color: #60a5fa; }
.docs-content-formatted pre.file-tree span.folder-open { color: #3b82f6; font-weight: 600; }
.docs-content-formatted pre.file-tree span.folder-open::before { content: '\f07c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; margin-right: 8px; color: #60a5fa; }
.docs-content-formatted pre.file-tree span.file { color: #334155; }
.docs-content-formatted pre.file-tree span.file::before { content: '\f15b'; font-family: 'Font Awesome 6 Free'; font-weight: 400; margin-right: 8px; color: #94a3b8; }

.docs-content-formatted pre.file-tree span.file-json::before { content: '\f1c9'; color: #f59e0b; font-weight: 900;} 
.docs-content-formatted pre.file-tree span.file-image::before { content: '\f1c5'; color: #10b981; font-weight: 900;} 
.docs-content-formatted pre.file-tree span.file-archive::before { content: '\f1c6'; color: #ef4444; font-weight: 900;} 

.docs-hamburger { display: none; background: transparent; border: 1px solid var(--border-color); font-size: 1.1rem; color: var(--text-main); cursor: pointer; padding: 8px 14px; border-radius: 8px; font-family: inherit; font-weight: 600; align-items: center; gap: 8px; transition: background 0.2s;}
.docs-hamburger:hover { background: #f3f4f6; }
.docs-mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 80; backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.3s ease; }

@media (max-width: 1024px) {
    .docs-nav-container { padding: 0 20px; }
    .docs-main { padding: 40px 40px; }
}

@media (max-width: 900px) {
    .docs-hamburger { display: flex; }
    .docs-nav-right .btn { display: none; }
    
    .docs-sidebar { 
        position: absolute;
        top: 0; left: -320px; 
        width: 300px; height: 100%; 
        z-index: 90; 
        box-shadow: 4px 0 25px rgba(0,0,0,0.15); 
    }
    
    .docs-sidebar.active { transform: translateX(320px); }
    .docs-mobile-overlay.active { display: block; opacity: 1; top: 100px; }

    .docs-main { padding: 30px 20px; }
    .docs-content-formatted h1 { font-size: 2.1rem; }
    .docs-content-formatted h2 { font-size: 1.6rem; }
    
    .docs-footer-nav { flex-direction: column; gap: 15px; }
    .docs-nav-btn { width: 100%; justify-content: center; }
    #btn-next { order: -1; }
}
