* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    color: #333;
}

/* 显示目录按钮 */
.show-sidebar-btn {
    position: fixed;
    top: 22px;
    left: 22px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    z-index: 1000;
    display: none;
}

.show-sidebar-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.show-sidebar-btn.visible {
    display: block;
}

/* 侧边栏标题区域 */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.sidebar-header h2 {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
}

/* 箭头按钮样式 */
.toggle-arrow {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.toggle-arrow:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.sidebar {
    width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
}

.sidebar.hidden {
    transform: translateX(-100%);
    opacity: 0;
}

.sidebar h2 {
    margin: 0 0 20px 0;
    color: #4a5568;
    font-size: 1.5rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
}

.sidebar li {
    margin-bottom: 8px;
}

.sidebar a {
    text-decoration: none;
    color: #4a5568;
    display: block;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.sidebar a:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 按钮样式 */
.sidebar button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.sidebar button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.sidebar button:active {
    transform: translateY(0);
}

.content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    margin: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-left: 340px; /* 为侧边栏留出空间 */
}

.content.full-width {
    margin: 20px;
    width: calc(100% - 40px);
    margin-left: 20px;
}

.content h1 {
    margin: 0 0 30px 0;
    color: #2d3748;
    font-size: 2.5rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content h2 {
    color: #4a5568;
    margin: 30px 0 15px 0;
    padding: 10px 0;
    border-left: 4px solid #667eea;
    padding-left: 15px;
    font-size: 1.5rem;
}

.content h3 {
    color: #2d3748;
    margin: 20px 0 10px 0;
    font-size: 1.2rem;
}

.content p {
    line-height: 1.6;
    margin-bottom: 15px;
    color: #4a5568;
}

pre {
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow-x: auto;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
}



code {
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    color: #2d3748;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: fixed;
        z-index: 1000;
    }
    
    .content {
        margin: 0;
        border-radius: 0;
        margin-left: 0;
    }
    
    .content.full-width {
        margin: 0;
    }
}