/*
SPDX-FileCopyrightText: 2025-2026 铟子vinds [https://y.vinds.top]
SPDX-License-Identifier: GPL-3.0-or-later (适用于程序代码部分)
SPDX-License-Identifier: CC-BY-SA-4.0 (适用于文本、图像、表格等文档内容)
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    background-color: #f6f8fa;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.doc-container {
    display: flex;
    height: 100vh;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.doc-sidebar {
    width: 280px;
    background-color: #f9f9f9;
    border-right: 1px solid #eaeef2;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 24px 20px 16px;
    border-bottom: 1px solid #eaeef2;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.search-box input {
    width: 100%;
    padding: 10px 10px 10px 36px;
    border: 1px solid #dde3e9;
    border-radius: 6px;
    font-size: 0.9rem;
    background-color: white;
    transition: border 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: #0080FF;
    box-shadow: 0 0 0 3px rgba(0, 128, 255, 0.1);
}

.doc-nav {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.doc-nav ul {
    list-style: none;
}

.doc-nav li {
    margin-bottom: 6px;
}

.doc-nav a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    color: #334155;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.2s;
    word-break: break-word;
}

.doc-nav a:hover {
    background-color: #e6edf4;
}

.doc-nav a.active {
    background-color: #0080FF;
    color: white;
    font-weight: 500;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid #eaeef2;
}

.sidebar-footer a {
    color: #0080FF;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-footer a:hover {
    text-decoration: underline;
}

.doc-content {
    flex: 1;
    background-color: white;
    overflow-y: auto;
    padding: 40px 48px;
}

#doc-viewer {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.7;
    color: #24292e;
}

#doc-viewer h1 {
    font-size: 2.2rem;
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 600;
    border-bottom: 1px solid #eaeef2;
    padding-bottom: 0.5rem;
}

#doc-viewer h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    border-bottom: 1px solid #eaeef2;
    padding-bottom: 0.3rem;
}

#doc-viewer h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

#doc-viewer p {
    margin-bottom: 1.2rem;
}

#doc-viewer ul,
#doc-viewer ol {
    margin-bottom: 1.2rem;
    padding-left: 2rem;
}

#doc-viewer li {
    margin-bottom: 0.3rem;
}

#doc-viewer a {
    color: #0080FF;
    text-decoration: none;
}

#doc-viewer a:hover {
    text-decoration: underline;
}

#doc-viewer blockquote {
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    border-left: 4px solid #0080FF;
    background-color: #f1f8ff;
    color: #2c3e50;
}

#doc-viewer code {
    background-color: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Consolas', monospace;
    font-size: 0.9rem;
}

#doc-viewer pre {
    background-color: #f6f8fa;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 1.2rem;
}

#doc-viewer pre code {
    background-color: transparent;
    padding: 0;
}

#doc-viewer table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.2rem;
}

#doc-viewer th,
#doc-viewer td {
    border: 1px solid #dde3e9;
    padding: 0.6rem 1rem;
    text-align: left;
}

#doc-viewer th {
    background-color: #f6f8fa;
    font-weight: 600;
}

.welcome h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.welcome ul {
    list-style: none;
    padding-left: 0;
}

.welcome li {
    margin-bottom: 0.8rem;
}

.welcome li a {
    color: #0080FF;
    text-decoration: none;
    font-size: 1.1rem;
}

.welcome li a:hover {
    text-decoration: underline;
}

.error-message {
    color: #d32f2f;
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
    padding: 1rem;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .doc-container {
        flex-direction: column;
    }
    .doc-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #eaeef2;
    }
    .doc-content {
        padding: 20px;
    }
}