/* doc.html 特有样式 */
body {
    overflow-y: scroll;
}

.container {
    min-height: 100vh;
}

.title-container {
    margin: 20px 0;
}

h1 {
    font-size: 2rem;
}

.search-section {
    text-align: center;
    margin: 20px 0 40px 0;
}

.search-box {
    width: 100%;
    max-width: 600px;
    padding: 12px 20px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    transition: border-color 0.3s;
}

.search-box:focus {
    border-color: #000000;
}

.main-content {
    display: flex;
    width: 100%;
    gap: 30px;
    margin-top: 20px;
}

.sidebar {
    width: 250px;
    background: linear-gradient(#145deg, #ffffff, #f5f5f5);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
    height: fit-content;
    backdrop-filter: blur(10px);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    flex-shrink: 0;
    border: 1px solid #e0e0e0;
}

.sidebar h3 {
    margin-bottom: 15px;
    color: #000000;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
    font-weight: 700;
}

.sidebar ul {
    list-style: none;
    width: 100%;
    margin: 0;
    padding-left: 0;
}

.sidebar li {
    margin-bottom: 8px;
}

.sidebar a {
    text-decoration: none;
    color: #555;
    font-size: 14px;
    padding: 5px 8px;
    display: block;
    border-radius: 4px;
    transition: all 0.2s;
    word-break: break-word;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar a:hover {
    background-color: #f0f0f0;
    color: #000000;
}

.sidebar a.active {
    background: linear-gradient(145deg, #000000, #333333);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 目录展开/折叠图标样式 */
.expand-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    text-align: center;
    line-height: 16px;
    margin-right: 5px;
    cursor: pointer;
    vertical-align: middle;
    font-family: monospace;
}

.directory-item {
    display: flex;
    align-items: center;
}

.directory-title {
    flex: 1;
}

/* 外部链接图标样式 */
.external-link-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 6px;
    vertical-align: middle;
    color: #888;
    margin-top: -13px;
}

.content-area {
    flex: 1;
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    min-width: 0;
    border: 1px solid #e0e0e0;
}

.markdown-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: #333;
    background: unset;
    line-height: 1.8;
}

.markdown-body table {
    display: table;
    width: 100%;
}

.markdown-body thead tr {
    background-color: transparent;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
    border-top: unset;
}

.markdown-body tbody tr {
    border-bottom: 1px solid #f0f0f0;
    background: unset !important;
}

.markdown-body td, .markdown-body th {
    padding: 12px 16px;
    vertical-align: top;
    border: unset !important;
}

.markdown-body td {
    max-width: 20vw;
}

.markdown-body ul {
    padding-left: 1.3em;
}

.markdown-body ol {
    padding-left: 1em;
}

/* 优化高亮代码块 */
.markdown-body pre[class*="language-"] {
    background-color: #f0f0f0;
    border-radius: 8px;
    padding: 0;
    overflow-x: auto;
}

.markdown-body pre {
    background-color: #f0f0f0;
    border-radius: 8px;
    padding: 0;
    overflow-x: auto;
}

.markdown-body img {
    border: 1px solid #eaeaea;
    border-radius: 8px;
}

/* 美化引用块 */
.markdown-body blockquote {
    margin: 20px 0;
    padding: 6px 20px 6px 16px;
    background-color: #f0f0f0;
    border-left: 4px solid #2b2b2b;
    border-radius: 0 8px 8px 0;
    position: relative;
    overflow: hidden;
    font-size: 0.95em;
    color: #555;
}

/*.markdown-body blockquote::before {*/
/*    content: "\201C";*/
/*    font-family: Georgia, serif;*/
/*    font-size: 3em;*/
/*    position: absolute;*/
/*    left: 10px;*/
/*    top: -10px;*/
/*    color: #000000;*/
/*    opacity: 0.3;*/
/*}*/

.markdown-body blockquote p {
    margin: 0;
    line-height: 1.7;
}

.markdown-body blockquote p:first-child {
    margin-top: 0;
}

.markdown-body blockquote p:last-child {
    margin-bottom: 0;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error {
    color: #e74c3c;
    padding: 20px;
    text-align: center;
}

/* 更新日志页面样式 */
.releases-container {
    max-width: 980px;
    margin: 0 auto;
}

.release-item {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaecef;
}

.release-item:last-child {
    border-bottom: none;
}

.release-title {
    font-size: 1.5em;
    color: #111;
    margin-bottom: 8px;
}

.release-meta {
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9em;
}

.prerelease-badge, .draft-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    font-size: 0.8em;
}

.prerelease-badge {
    background-color: #333333;
    color: #ffffff;
}

.draft-badge {
    background-color: #666666;
    color: #ffffff;
}

.release-body {
    line-height: 1.7;
}

.release-divider {
    border: 0;
    height: 1px;
    background: #e0e0e0;
    margin: 25px 0;
}

footer {
    text-align: center;
    padding: 30px 0;
    color: #888;
    font-size: 0.9rem;
    border-top: 1px solid #e0e0e0;
    margin-top: 60px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-height: 200px;
    }

    .main-content {
        flex-direction: column;
    }

    .releases-container {
        padding: 20px;
    }

    .release-body {
        padding: 20px;
    }
}
