
/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    line-height: 1.8;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
}

/* 侧边导航栏 */
.sidebar {
    width: 280px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    height: calc(100vh - 40px);
    position: sticky;
    top: 20px;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.sidebar h2 {
    color: #667eea;
    font-size: 1.3em;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-section h3 {
    color: #764ba2;
    font-size: 1em;
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-section h3:hover {
    color: #667eea;
}

.sidebar-section ul {
    list-style: none;
    padding-left: 10px;
}

.sidebar-section li {
    margin-bottom: 5px;
}

.sidebar-section a {
    color: #555;
    text-decoration: none;
    display: block;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.sidebar-section a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(5px);
}

/* 主内容区域 */
.main-content {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    height: calc(100vh - 40px);
    overflow-y: auto;
}

/* man页面样式 */
.man-page {
    max-width: 900px;
    margin: 0 auto;
}

.man-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.man-header h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

.man-header .man-section {
    font-size: 1.1em;
    opacity: 0.9;
}

.man-header .man-date {
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 10px;
}

/* 目录 */
.toc {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.toc h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.toc ul {
    list-style: none;
    padding-left: 0;
}

.toc li {
    margin-bottom: 8px;
}

.toc a {
    color: #555;
    text-decoration: none;
    padding: 5px 10px;
    display: block;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.toc a:hover {
    background: #667eea;
    color: white;
    transform: translateX(5px);
}

/* man页面内容样式 */
.man-content h2 {
    color: #667eea;
    font-size: 1.5em;
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.man-content h3 {
    color: #764ba2;
    font-size: 1.2em;
    margin: 20px 0 10px 0;
}

.man-content p {
    margin-bottom: 15px;
    text-align: justify;
}

.man-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.6;
}

.man-content code {
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: #e74c3c;
}

.man-content ul, .man-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.man-content li {
    margin-bottom: 8px;
}

.man-content dt {
    font-weight: bold;
    color: #667eea;
    margin-top: 15px;
}

.man-content dd {
    margin-left: 20px;
    margin-bottom: 10px;
}

/* 选项说明样式 */
.option-list {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.option-list dt {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #e74c3c;
    font-size: 1.1em;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 24px;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
    }
    
    .main-content {
        height: auto;
        padding: 20px;
    }
    
    body {
        padding: 10px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}
