:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --border-color: #e9ecef;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-tertiary: #6c757d;
    --accent-color: #2387F7;
    --accent-hover: #0052a3;
    --code-bg: #f8f9fa;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}
[data-theme="dark"] {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --border-color: #30363d;
    --text-primary: #e6edf3;
    --text-secondary: #c9d1d9;
    --text-tertiary: #8b949e;
    --accent-color: #58a6ff;
    --accent-hover: #79c0ff;
    --code-bg: #161b22;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    background-color: #ffffff;
}
html[data-theme="dark"] {
    background-color: #0d1117;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}
a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}
.header {
    width: 100%;
    padding: 12px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
    position: fixed;
    top: 0;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}
.header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}
.header-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
}
.header button {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.header button:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-color);
    color: var(--text-primary);
}
.header .sidebar-toggle {
    display: none;
}
.sidebar-toggle-btn {
    position: absolute;
    top: 50%;
    right: -15px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(var(--accent-color-rgb, 35, 135, 247), 0.4);
    font-size: 16px;
    font-weight: 800;
    color: var(--accent-color);
    visibility: visible;
    opacity: 1;
    overflow: hidden;
}
.sidebar-toggle-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--accent-color);
    opacity: 0.1;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}
.sidebar-toggle-btn:hover {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    border-color: var(--accent-hover);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(var(--accent-color-rgb, 35, 135, 247), 0.1);
    transform: translateY(-50%) scale(1.1);
    color: #ffffff;
}
.sidebar-toggle-btn:hover::before {
    width: 100%;
    height: 100%;
}
.sidebar .sidebar-toggle-btn {
    visibility: visible !important;
    opacity: 1 !important;
    display: flex !important;
}
.sidebar-toggle-btn .sidebar-icon {
    position: absolute;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1;
    z-index: 1;
}
.sidebar-toggle-btn .sidebar-icon-close {
    opacity: 1;
    transform: translateX(0) scale(1);
    visibility: visible;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.sidebar-toggle-btn .sidebar-icon-open {
    opacity: 0;
    transform: translateX(-8px) scale(0.8) rotate(-180deg);
    visibility: hidden;
}
.app.sidebar-collapsed .sidebar-toggle-btn .sidebar-icon-close {
    opacity: 0;
    transform: translateX(8px) scale(0.8) rotate(180deg);
    visibility: hidden;
}
.app.sidebar-collapsed .sidebar-toggle-btn .sidebar-icon-open {
    opacity: 1;
    transform: translateX(0) scale(1) rotate(0deg);
    visibility: visible;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.search-trigger {
    min-width: 280px;
    justify-content: space-between;
    text-align: left;
    color: var(--text-tertiary);
    font-weight: 400;
}
.search-trigger:hover {
    border-color: var(--accent-color);
}
.search-trigger kbd {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    font-family: monospace;
    color: var(--text-secondary);
}
.theme-toggle {
    padding: 8px 12px;
    min-width: auto;
}
.app {
    display: block;
    margin-top: 64px;
    min-height: calc(100vh - 64px);
    position: relative;
    width: 100%;
}
.app.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
}
.app.sidebar-collapsed .sidebar-toggle-btn {
    position: fixed !important;
    left: 24px !important;
    top: 50% !important;
    right: auto !important;
    transform: translateY(-50%) !important;
    z-index: 1001 !important;
    background: var(--bg-primary) !important;
    box-shadow: var(--shadow-md) !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: flex !important;
    pointer-events: auto !important;
}
.app.sidebar-collapsed .sidebar-toggle-btn:hover {
    transform: translateY(-50%) scale(1.05) !important;
    background: var(--bg-tertiary) !important;
    border-color: var(--accent-color) !important;
}
body > .sidebar-toggle-btn {
    position: fixed !important;
    left: -10px !important;           
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 1001 !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: flex !important;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%) !important;
    border: 2px solid var(--accent-color) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(var(--accent-color-rgb, 35, 135, 247), 0.4) !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    color: var(--accent-color) !important;
    font-size: 16px !important;
    font-weight: 800 !important;
}
body > .sidebar-toggle-btn:hover {
    transform: translateY(-50%) scale(1.1) !important;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%) !important;
    border-color: var(--accent-hover) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(var(--accent-color-rgb, 35, 135, 247), 0.1) !important;
    color: #ffffff !important;
}
body > .sidebar-toggle-btn .sidebar-icon-open {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) scale(1) rotate(0deg) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}
body > .sidebar-toggle-btn .sidebar-icon-close {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateX(8px) scale(0.8) rotate(180deg) !important;
}
.sidebar {
    position: fixed;
    left: 0;
    top: 64px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 24px 20px;
    height: calc(100vh - 64px);
    width: 280px;
    overflow: visible;
    transition: transform 0.3s ease;
    z-index: 100;
    flex-shrink: 0;
}
.sidebar-nav {
    height: calc(100vh - 112px);
    overflow-y: auto;
    padding-right: 8px;
}
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.menu {
    list-style: none;
}
.menu-item {
    margin-bottom: 0px;
}
.menu-btn {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-secondary);
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.menu-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
.arrow {
    font-size: 12px;
    transition: transform 0.25s ease;
    color: var(--text-tertiary);
    width: 16px;
    display: inline-block;
}
.menu-item.active .arrow {
    transform: rotate(90deg);
    color: var(--accent-color);
}
.menu-item.active .menu-btn {
    color: var(--accent-color);
    font-weight: 600;
}
.submenu {
    list-style: none;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s ease,
                transform 0.2s ease;
    padding-left: 20px;
    margin-top: 4px;
}
.menu-item.active .submenu {
    max-height: 1000px;
    opacity: 1;
    transform: translateY(0);
}
.submenu li {
    margin: 2px 0;
}
.submenu a {
    display: block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}
.submenu a:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
.submenu li.active a {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 500;
}
.content {
    padding: 48px 64px;
    max-width: 900px;
    margin-left: 280px;
    margin-right: 280px;
    width: calc(100% - 560px);
    min-height: calc(100vh - 64px);
    transition: margin-left 0.3s ease, margin-right 0.3s ease, width 0.3s ease;
    box-sizing: border-box;
}
.app.sidebar-collapsed .content {
    margin-left: 0;
    width: calc(100% - 280px);
}
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}
.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}
.intro {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-weight: 400;
}
section {
    margin-top: 48px;
}
section h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    padding-top: 8px;
}
section h3 {
    font-size: 22px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
    color: var(--text-primary);
}
section p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
section ul, section ol {
    margin: 16px 0 16px 24px;
    color: var(--text-secondary);
}
section li {
    margin-bottom: 8px;
    line-height: 1.7;
}
.breadcrumb-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    white-space: nowrap;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}
.breadcrumbs-tag {
    display: block;
    padding: 16px 20px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    border-radius: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.doc-image {
    margin: 32px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-md);
}
.doc-image img {
    width: 100%;
    display: block;
}
.doc-list {
    margin: 20px 0 20px 24px;
    color: var(--text-secondary);
}
.doc-list li {
    margin-bottom: 12px;
    line-height: 1.8;
}
hr {
    margin: 48px 0;
    border: none;
    border-top: 1px solid var(--border-color);
}
.doc-divider {
    margin: 48px 0;
    border: none;
    border-top: 1px solid var(--border-color);
}
.note-box {
    border-left: 4px solid var(--accent-color);
    padding: 16px 20px;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    max-width: 100%;
    margin: 24px 0;
}
.note-box p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}
.table-container {
    width: 100%;
    overflow-x: auto;
    margin: 24px 0;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.custom-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}
.custom-table th {
    background-color: var(--bg-secondary);
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border-color);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.custom-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
    font-size: 14px;
    color: var(--text-secondary);
}
.custom-table tr:hover {
    background-color: var(--bg-secondary);
}
.doc-pagination {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 64px;
    padding-top: 32px;
    border-top: 2px solid var(--border-color);
}
.doc-nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    overflow: hidden;
    cursor: pointer;
    z-index: 1;
    pointer-events: auto;
    -webkit-tap-highlight-color: rgba(35, 135, 247, 0.2);
}
.doc-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(35, 135, 247, 0.10), transparent 55%);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 0;
}
.doc-nav:hover {
    background: linear-gradient(135deg, rgba(35, 135, 247, 0.12), rgba(35, 135, 247, 0.06));
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.doc-nav:hover::before {
    opacity: 1;
}
.doc-nav.prev {
    justify-content: flex-start;
    gap: 16px;
    text-decoration: none;
}
.doc-nav.next {
    justify-content: flex-end;
    gap: 16px;
    text-align: right;
    text-decoration: none;
}
.nav-text small {
    font-size: 11px;
    color: var(--text-tertiary);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}
.nav-text {
    position: relative;
    z-index: 1;
}
.nav-text strong {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}
.nav-arrow {
    position: relative;
    z-index: 1;
    min-width: 32px;
    min-height: 32px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-tertiary);
    background: var(--bg-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.doc-nav.prev:hover .nav-arrow,
.doc-nav.next:hover .nav-arrow {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #ffffff;
}
.doc-nav.prev:hover .nav-arrow {
    transform: translateX(-4px);
}
.doc-nav.next:hover .nav-arrow {
    transform: translateX(4px);
}
.toc {
    position: fixed;
    top: 64px;
    right: 0;
    width: 280px;
    height: calc(100vh - 64px);
    padding: 32px 24px;
    border-left: 1px solid var(--border-color);
    background: var(--bg-secondary);
    overflow-y: auto;
    flex-shrink: 0;
    z-index: 100;
}
.toc h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.toc ul {
    list-style: none;
    margin-bottom: 32px;
}
.toc li {
    font-size: 13px;
    color: var(--text-tertiary);
    padding: 4px 0;
    margin-bottom: 4px;
}
.toc a {
    text-decoration: none;
    color: var(--text-tertiary);
    transition: color 0.2s ease;
    display: block;
    padding: 0px 0px;
    border-radius: 4px;
}
.toc a:hover {
    color: var(--accent-color);
    background: var(--bg-tertiary);
}
.toc a.active {
    color: var(--accent-color);
    font-weight: 600;
    background: var(--bg-tertiary);
}
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
    pointer-events: none;
}
.search-modal.active {
    display: flex;
    pointer-events: auto;
}
.search-modal-content {
    width: 90%;
    max-width: 700px;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.search-input-wrapper {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}
.search-input-wrapper svg {
    color: var(--text-tertiary);
    flex-shrink: 0;
}
.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 18px;
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
}
.search-input::placeholder {
    color: var(--text-tertiary);
}
.search-results {
    max-height: 60vh;
    overflow-y: auto;
    padding: 8px 0;
}
.search-result-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s ease;
}
.search-result-item:hover {
    background: var(--bg-secondary);
}
.search-result-item:last-child {
    border-bottom: none;
}
.search-result-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.search-result-path {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 6px;
}
.search-result-snippet {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.search-result-snippet mark {
    background: var(--accent-color);
    color: #ffffff;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}
.search-no-results {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-tertiary);
}
.search-shortcut {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
}
.search-shortcut kbd {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-family: monospace;
    color: var(--text-secondary);
}
@media (max-width: 1200px) {
    .content {
        margin-right: 0;
        width: calc(100% - 280px);
        padding: 40px 48px;
    }
    .toc {
        display: none;
    }
    .doc-image {
        margin: 24px 0;
    }
}
@media (max-width: 1024px) {
    .content {
        margin-right: 0;
        width: calc(100% - 280px);
        padding: 36px 32px;
        max-width: 100%;
    }
    .page-header h1 {
        font-size: 28px;
    }
    section h2 {
        font-size: 24px;
    }
    section h3 {
        font-size: 20px;
    }
    .intro {
        font-size: 16px;
    }
}
@media (max-width: 768px) {
    .header {
        padding: 12px 16px;
        height: 56px;
    }
    .header h3 {
        font-size: 16px;
    }
    .header-buttons {
        gap: 8px;
    }
    .search-trigger {
        min-width: auto;
        padding: 8px 12px;
        font-size: 13px;
    }
    .search-trigger span:not(.search-icon) {
        display: none;
    }
    .search-trigger kbd {
        display: none;
    }
    .theme-toggle {
        padding: 8px;
        min-width: 36px;
    }
    .app {
        margin-top: 56px;
        min-height: calc(100vh - 56px);
    }
    .sidebar {
        width: 280px;
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
        z-index: 999;
        top: 56px; 
    }
    .app.sidebar-open .sidebar {
        transform: translateX(0);
    }
    .app.sidebar-open {
        position: fixed;
        width: 100%;
        height: 100vh;
        overflow: hidden;
    }
    body.sidebar-open-mobile {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100vh !important;
        touch-action: none;
    }
    .app.sidebar-open .sidebar {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .app.sidebar-open::after {
        content: '';
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        backdrop-filter: blur(2px);
        animation: fadeIn 0.2s ease;
    }
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    .app:not(.sidebar-open)::after {
        display: none;
    }
    .sidebar-toggle-btn {
        width: 40px;
        height: 40px;
        right: 0px;           
        font-size: 18px;
        position: absolute !important;
    }
    .app.sidebar-collapsed .sidebar-toggle-btn {
        position: absolute !important;
        left: auto !important;
        right: 8px !important;   
        width: 40px !important;
        height: 40px !important;
    }
    .app.sidebar-open .sidebar .sidebar-toggle-btn .sidebar-icon-close {
        opacity: 1 !important;
        transform: translateX(0) scale(1) rotate(0deg) !important;
        visibility: visible !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }
    .app.sidebar-open .sidebar .sidebar-toggle-btn .sidebar-icon-open {
        opacity: 0 !important;
        transform: translateX(-8px) scale(0.8) rotate(-180deg) !important;
        visibility: hidden !important;
    }
    .app:not(.sidebar-open) .sidebar .sidebar-toggle-btn .sidebar-icon-open,
    body > .sidebar-toggle-btn .sidebar-icon-open {
        opacity: 1 !important;
        transform: translateX(0) scale(1) rotate(0deg) !important;
        visibility: visible !important;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    }
    .app:not(.sidebar-open) .sidebar .sidebar-toggle-btn .sidebar-icon-close,
    body > .sidebar-toggle-btn .sidebar-icon-close {
        opacity: 0 !important;
        transform: translateX(8px) scale(0.8) rotate(180deg) !important;
        visibility: hidden !important;
    }
    .content {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        padding: 24px 20px;
        max-width: 100%;
    }
    .app.sidebar-collapsed .content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 24px;
        padding-bottom: 20px;
    }
    .page-header h1 {
        font-size: 24px;
        line-height: 1.3;
    }
    .intro {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 24px;
    }
    section {
        margin-top: 32px;
    }
    section h2 {
        font-size: 22px;
        margin-bottom: 12px;
        padding-top: 4px;
    }
    section h3 {
        font-size: 18px;
        margin-top: 24px;
        margin-bottom: 10px;
    }
    section p {
        font-size: 15px;
        line-height: 1.7;
        margin-bottom: 14px;
    }
    section ul, section ol {
        margin: 14px 0 14px 20px;
    }
    section li {
        margin-bottom: 6px;
        line-height: 1.6;
    }
    .doc-image {
        margin: 20px 0;
        border-radius: 6px;
    }
    .doc-image img {
        width: 100%;
        height: auto;
    }
    .table-container {
        margin: 20px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .custom-table {
        min-width: 600px;
    }
    .custom-table th,
    .custom-table td {
        padding: 10px 12px;
        font-size: 13px;
    }
    .note-box {
        padding: 14px 16px;
        margin: 20px 0;
        border-radius: 6px;
    }
    .note-box p {
        font-size: 14px;
        line-height: 1.6;
    }
    .breadcrumb-tag {
        font-size: 11px;
        padding: 2px 6px;
    }
    .doc-pagination {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 48px;
        padding-top: 24px;
    }
    .doc-nav {
        padding: 16px 18px;
        border-radius: 10px;
    }
    .doc-nav.prev,
    .doc-nav.next {
        justify-content: space-between;
        gap: 12px;
    }
    .nav-text {
        flex: 1;
    }
    .nav-text small {
        font-size: 10px;
        margin-bottom: 3px;
    }
    .nav-text strong {
        font-size: 15px;
    }
    .nav-arrow {
        min-width: 36px;
        min-height: 36px;
        font-size: 16px;
        flex-shrink: 0;
    }
    .search-modal {
        padding-top: 5vh;
    }
    .search-modal-content {
        width: 95%;
        max-width: 100%;
        margin: 0 10px;
        border-radius: 12px;
    }
    .search-input-wrapper {
        padding: 16px;
    }
    .search-input {
        font-size: 16px;
    }
    .search-results {
        max-height: 70vh;
    }
    .search-result-item {
        padding: 14px 16px;
    }
    .search-result-title {
        font-size: 15px;
    }
    .search-result-snippet {
        font-size: 13px;
    }
    .search-shortcut {
        display: none;
    }
    .code-block {
        padding: 12px;
        font-size: 13px;
        margin: 14px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .menu-btn {
        padding: 10px 12px;
        font-size: 14px;
        min-height: 44px;
    }
    .submenu a {
        padding: 8px 12px;
        font-size: 13px;
        min-height: 40px;
        display: flex;
        align-items: center;
    }
}
@media (max-width: 480px) {
    .header {
        padding: 10px 12px;
        height: 52px;
    }
    .header h3 {
        font-size: 15px;
    }
    .search-trigger {
        padding: 6px 10px;
        min-width: 36px;
    }
    .app {
        margin-top: 52px;
        min-height: calc(100vh - 52px);
    }
    .sidebar {
        width: 260px;
        padding: 20px 16px;
    }
    .content {
        padding: 20px 16px;
    }
    .page-header h1 {
        font-size: 22px;
    }
    .intro {
        font-size: 15px;
    }
    section h2 {
        font-size: 20px;
    }
    section h3 {
        font-size: 17px;
    }
    section p {
        font-size: 14px;
    }
    .doc-nav {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }
    .doc-nav.next {
        align-items: flex-end !important;
    }
    .nav-text {
        width: 100%;
    }
    .nav-arrow {
        align-self: flex-end;
    }
    .doc-nav.prev .nav-arrow {
        align-self: flex-start;
    }
    .doc-image {
        margin: 16px 0;
    }
    .note-box {
        padding: 12px 14px;
    }
    .search-modal-content {
        width: 98%;
        margin: 0 4px;
    }
    .search-input-wrapper {
        padding: 14px;
    }
}
.highlight {
    background: var(--accent-color);
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
}
.code-block {
    background: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 16px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    overflow-x: auto;
    margin: 16px 0;
}
@media (max-width: 768px) {
    button, a, .menu-btn, .doc-nav {
        -webkit-tap-highlight-color: rgba(35, 135, 247, 0.2);
        tap-highlight-color: rgba(35, 135, 247, 0.2);
    }
    button, .menu-btn {
        -webkit-user-select: none;
        user-select: none;
    }
    html {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    body {
        overflow-x: hidden;
        width: 100%;
    }
    @supports (-webkit-touch-callout: none) {
        .content {
            min-height: -webkit-fill-available;
        }
    }
}
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
