* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* 顶部导航栏 */
.header {
    background-color: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.header-content .logo {
    margin-right: 60px;
}

/* 顶部导航 */
.top-nav {
    flex: 1;
}

#top-nav-list {
    display: flex;
    list-style: none;
    gap: 20px;
}

#top-nav-list li {
    position: relative;
}

#top-nav-list a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s;
}

#top-nav-list a:hover {
    color: #1976d2;
    background-color: #f5f5f5;
}

#top-nav-list a.active {
    color: #1976d2;
    background-color: #e3f2fd;
    font-weight: 600;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-color: #1976d2;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo h1 {
    font-size: 20px;
    color: #333;
    font-weight: 600;
    margin: 0;
}

.search-box {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-box input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    width: 250px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.1);
}

.search-box button {
    padding: 8px 16px;
    background-color: #1976d2;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: #1565c0;
}

/* 主内容区域 */
.main-content {
    display: flex;
    height: 100vh;
    padding-top: 70px;
}

/* 侧边栏 */
.sidebar {
    width: 280px;
    background-color: #fff;
    border-right: 1px solid #e0e0e0;
    padding: 20px 0;
    position: fixed;
    left: 0;
    top: 70px;
    bottom: 0;
    overflow-y: auto;
}

.sidebar h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 20px 15px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#category-list {
    list-style: none;
}

#category-list li {
    margin-bottom: 0;
}

#category-list a {
    text-decoration: none;
    color: #333;
    display: block;
    padding: 8px 20px;
    transition: all 0.3s;
    font-size: 14px;
    border-left: 3px solid transparent;
}

#category-list a:hover {
    background-color: #f5f5f5;
    color: #1976d2;
}

#category-list a.active {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: 500;
    border-left: 3px solid #1976d2;
}

#category-list .category-link {
    font-weight: 500;
    background-color: transparent;
}

#category-list .category-link.active {
    background-color: transparent;
    color: #333;
    border-left: 3px solid transparent;
}

#category-list .document-link {
    padding-left: 40px;
    font-size: 13px;
    color: #666;
}

#category-list .document-link:hover {
    color: #1976d2;
}

#category-list .document-link.active {
    color: #1976d2;
    font-weight: 500;
    background-color: #e3f2fd;
    border-left: 3px solid #1976d2;
}

#category-list .document-sublist {
    list-style: none;
    margin: 0;
    padding: 0;
}

#category-list .document-sublist li {
    margin: 0;
}

/* 内容区域 */
.content {
    flex: 1;
    padding: 30px;
    background-color: #fff;
    margin-left: 280px;
    margin-right: 280px;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.content h2 {
    font-size: 24px;
    margin-bottom: 30px;
    color: #333;
    font-weight: 600;
}

.document-content {
    width: 100%;
}

.right-sidebar {
    width: 280px;
    padding: 20px;
    position: fixed;
    right: 0;
    top: 70px;
    bottom: 0;
    overflow-y: auto;
    background-color: #fff;
}

.sidebar-section {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 20px;
    border: none;
}

.sidebar-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

#tag-list {
    list-style: none;
}

#tag-list li {
    margin-bottom: 8px;
}

#tag-list a {
    text-decoration: none;
    color: #666;
    font-size: 14px;
    display: block;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

#tag-list a:hover {
    background-color: #e3f2fd;
    color: #1976d2;
}

/* 文档列表 */
.document-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.document-item {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.3s;
    cursor: pointer;
}

.document-item:hover {
    background-color: #f5f5f5;
}

.document-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.document-item p {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.document-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    gap: 15px;
    align-items: center;
}

.document-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 文档详情 */
.document-detail {
    max-width: 800px;
    margin: 0 auto;
}

.document-detail h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.document-body {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin: 30px 0;
}

.document-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
}

.document-body h2 {
    font-size: 24px;
    margin: 30px 0 20px;
    color: #333;
}

.document-body h3 {
    font-size: 20px;
    margin: 25px 0 15px;
    color: #333;
}

.document-body p {
    margin-bottom: 15px;
}

.document-body ul,
.document-body ol {
    margin: 15px 0;
    padding-left: 20px;
}

.document-body li {
    margin-bottom: 8px;
}

.back-button {
    margin-top: 30px;
    padding: 10px 20px;
    background-color: #f5f5f5;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.back-button:hover {
    background-color: #e0e0e0;
}

/* 页脚 */
.footer {
    background-color: #fff;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .top-nav {
        width: 100%;
        overflow-x: auto;
    }
    
    #top-nav-list {
        flex-wrap: nowrap;
        padding-bottom: 10px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .content {
        padding: 20px;
    }
    
    .document-list {
        grid-template-columns: 1fr;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.document-item {
    animation: fadeIn 0.3s ease-out;
}

/* 滚动条样式 */
.sidebar::-webkit-scrollbar,
.right-sidebar::-webkit-scrollbar,
.content::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.right-sidebar::-webkit-scrollbar-track,
.content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb,
.right-sidebar::-webkit-scrollbar-thumb,
.content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.right-sidebar::-webkit-scrollbar-thumb:hover,
.content::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
