/* 机制页面整体容器 */
.mechanic-wrap {
    display: flex;
    gap: 30px;
    margin-top: 20px;
    position: relative;
    height: calc(100vh - 92px);
    overflow: hidden;
}

/* 机制左侧独立滚动导航栏 */
.mechanic-left-nav {
    min-width: 180px;
    align-self: flex-start;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
}

/* ========== 滚动条美化核心代码 ========== */
/* 滚动条整体宽度 */
.mechanic-left-nav::-webkit-scrollbar {
    width: 4px;
}

/* 滚动条轨道背景 */
.mechanic-left-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

/* 滚动滑块（紫色主题，贴合页面风格） */
.mechanic-left-nav::-webkit-scrollbar-thumb {
    background: rgba(130, 90, 240, 0.35);
    border-radius: 10px;
}

/* 鼠标悬浮滑块加深 */
.mechanic-left-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(130, 90, 240, 0.55);
}

.mechanic-left-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mechanic-nav-item {
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    color: #b8b8d0;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.mechanic-nav-item:hover {
    background: rgba(130, 90, 240, 0.18);
    color: #e0d0ff;
}

.mechanic-nav-item.active {
    background: linear-gradient(135deg, rgba(110, 70, 220, 0.22), rgba(60, 160, 255, 0.12));
    border: 1px solid rgba(140, 100, 255, 0.4);
    color: #d8c8ff;
    box-shadow: 0 0 8px rgba(120, 80, 240, 0.2);
}

/* 机制右侧内容区，独立滚动 */
.mechanic-content-box {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

/* 右侧内容区同步美化滚动条，保持整体统一 */
.mechanic-content-box::-webkit-scrollbar {
    width: 4px;
}

.mechanic-content-box::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

.mechanic-content-box::-webkit-scrollbar-thumb {
    background: rgba(130, 90, 240, 0.35);
    border-radius: 10px;
}

.mechanic-content-box::-webkit-scrollbar-thumb:hover {
    background: rgba(130, 90, 240, 0.55);
}

.mechanic-content-block {
    display: none;
}

.mechanic-content-block.show {
    display: block;
    max-width: 70%;
    margin: 0 auto;
}

/* 内容标题文字，与说明页统一色系字号 */
.mechanic-content-block h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: rgb(200, 150, 150);
    text-align: center;
    margin: 12px;
}

.mechanic-content-block h4 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #fff;
    margin: 12px;
}

.mechanic-content-block p {
    font-size: 18px;
    line-height: 1.7;
    margin: 0 auto;
    color: #b8b8d0;
    text-indent: 2em;
}

/* 移动端适配，和说明页逻辑完全一致 */
@media screen and (max-width:768px) {
    .mechanic-wrap {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .mechanic-left-nav {
        height: auto;
        overflow: visible;
    }

    .mechanic-left-nav ul {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .mechanic-content-box {
        height: auto;
        overflow: visible;
    }
}