.sidebar {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 20px;
    position: sticky;
    top: 10px;
    overflow-y:auto;
    height: 100vh;
    /*height: fit-content;*/
}
.sidebar-title {
    color: var(--secondary-color);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    /*margin-bottom: 20px;*/
}
.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-list li {
    margin-bottom: 2px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.sidebar-list a {
    color: #555;
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s;
}
/*.sidebar-list a.active {
    background-color: var(--primary-color);
    color: white;
}
.sidebar-list a:hover{
    background-color: #ddd;
    padding-left: 25px;
}*/
.sidebar-list a:hover
{
    background-color: #e9ecef;
    color: #2c3e50;
    padding-left: 25px;
}
.sidebar-list a.active{
    background-color: #e9ecef;
    color: #2c3e50;
}
.sidebar-list a.active {
    font-weight: 600;
    border-left: 4px solid #2c3e50;
}
.content-section {
    background-color: white;
    border-radius: 8px;
    /*box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);*/
    padding: 5px 9px;
}
.content-page{
    padding: 5px 6px 10px;
    background-color: white;
}
.content-title {
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.content-subtitle {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 25px;
    margin-bottom: 15px;
}
.code-example {
    background-color: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
    font-family: 'Courier New', monospace;
}
.note-box {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
}
.online-editor {
    background-color: var(--light-bg);
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}
.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.editor-title {
    color: var(--secondary-color);
    font-weight: 600;
    margin: 0;
}
.editor-toolbar {
    background-color: #e9ecef;
    padding: 10px;
    border-radius: 4px 4px 0 0;
}
.editor-content {
    background-color: #2d2d2d;
    color: #f8f9fa;
    padding: 15px;
    border-radius: 0 0 4px 4px;
    font-family: 'Courier New', monospace;
    min-height: 200px;
}
.btn-run {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s;
}
.btn-run:hover {
    background-color: #2980b9;
}
.search-box {
    position: relative;
    /*margin-top: 15px;*/
    margin-bottom: 10px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    /*border: none;*/
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    /*color: white;*/
    outline: none;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    /*color: rgba(255, 255, 255, 0.7);*/
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

span.color_h1 {
    color: #8AC007;
}
p.intro {
    font-size: 106%;
    color: #404040;
    background-color: transparent;
    margin-top: 10px;
}

.chapter-title {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 6px;
}

.content-section {
    /*margin-bottom: 40px;*/
}

.example-container {
    background-color: #f5f5f5;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
}

.code-container {
    position: relative;
    margin: 15px 0;
}

.run-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10;
}

.result-container {
    background-color: white;
    border: 1px solid #ddd;
    padding: 15px;
    margin-top: 15px;
    border-radius: 4px;
    display: none;
}

.footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 30px 0;
    margin-top: 40px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #038857;
    border-color: #038857;
}

.intro {
    font-style: italic;
    color: #555;
}

.example h2 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
}
/* 移动端侧边栏样式 */
.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #2c3e50;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}
/* 响应式设计 */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: -300px;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        z-index: 1000;
        border-radius: 0;
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .sidebar.show {
        left: 0;
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .overlay.show {
        display: block;
    }

    .col-lg-3 {
        margin-bottom: 0;
        padding: 0;
    }
}
.content-left{
    padding-left: 0;
}
