body {
    margin: 0;
    padding: 20px;
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
}

#overview {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 章节样式 */
.chapter {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.chapter-header {
    padding: 12px 20px;
    background: #f0f2f5;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: #333;
    transition: background-color 0.2s ease;
    user-select: none;
}

.chapter-header:hover {
    background: #e6e9ed;
}

.chapter-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    background: #fff;
    padding: 15px;
    padding-top: 0;
    padding-bottom: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: max-height, opacity, padding;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chapter-content.active {
    max-height: 800px;
    opacity: 1;
    padding-top: 15px;
    padding-bottom: 15px;
}

/* 知识点按钮样式 */
.knowledge-item {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    color: #444;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 2px;
    white-space: nowrap;
    height: 22px;
    will-change: transform;
    transform-origin: center center;
}

/* GESP等级颜色 */
.level-1 { background-color: #ffff00; }  /* 黄色 */
.level-2 { background-color: #90EE90; }  /* 浅绿色 */
.level-3 { background-color: #228B22; color: white; }  /* 深绿色 */
.level-4 { background-color: #1E90FF; color: white; }  /* 蓝色 */
.level-5 { background-color: #4B0082; color: white; }  /* 靛色 */
.level-6 { background-color: #FFA500; }  /* 橙色 */
.level-7 { background-color: #FF0000; color: white; }  /* 红色 */
.level-8 { background-color: #000000; color: white; }  /* 黑色 */

.knowledge-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    opacity: 0.9;
}

/* 折叠图标 */
.chapter-header .toggle-icon {
    font-size: 12px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #666;
    will-change: transform;
}

.chapter-header.active .toggle-icon {
    transform: rotate(180deg);
}

/* 侧边栏样式 */
#side-panel {
    position: fixed;
    top: 0;
    right: -50%;
    width: 60%;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    transition: all 0.3s ease-in-out;
    z-index: 1000;
}

#collapse-btn {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translateY(-50%);
    height: 100%;
    width: 30px;
    background: #999;
    color: white;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    z-index: 1001;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-lr;
    text-orientation: upright;
    opacity: 0.9;
}

#collapse-btn:hover {
    background: #555;
    opacity: 1;
}

#side-panel.hidden {
    right: -60%;
}

#side-panel.hidden #collapse-btn {
    left: 100%;
}

#side-panel:not(.hidden) {
    right: 0;
}

#side-panel:not(.hidden) #collapse-btn {
    left: 40%;
}

#content {
    padding: 20px;
    line-height: 1.6;
    position: relative;
    z-index: 1000;
    margin-left: 20px;
}

/* Markdown 内容样式 */
#content h1 {
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 0;
}

#content p {
    color: #34495e;
}

#content code {
    font-family: Consolas, Monaco, 'Courier New', monospace;
}

#content pre {
    background: #1E1E1E;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
    overflow-x: auto;
}

#content pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* 代码块滚动条样式 */
#content pre::-webkit-scrollbar {
    height: 8px;
}

#content pre::-webkit-scrollbar-track {
    background: #2D2D2D;
    border-radius: 4px;
}

#content pre::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

#content pre::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* 删除旧的关闭按钮样式 */
#close-btn {
    display: none;
} 