.content-collapse-container {
    margin: 20px 0;
    width: 100%;
    position: relative;
}

/* 基础按钮样式 */
.content-collapse-button {
    display: inline-block;
    background-color: #1a1a1a;
    padding: 10px 15px;
    margin-top: 50px;
    border: none;
    border-radius: 1px;
    color: white;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 强制按钮对齐 - 使用父容器来控制对齐 */
.button-wrapper {
    width: 100%;
    display: flex !important;
    margin-bottom: 15px;
}

/* 左对齐按钮 */
.button-wrapper.align-left {
    justify-content: flex-start !important;
}
.button-wrapper.align-left .content-collapse-button {
    margin-right: auto !important;
    margin-left: 0 !important;
}

/* 居中按钮 */
.button-wrapper.align-center {
    justify-content: center !important;
}
.button-wrapper.align-center .content-collapse-button {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 右对齐按钮 */
.button-wrapper.align-right {
    justify-content: flex-end !important;
}
.button-wrapper.align-right .content-collapse-button {
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* 编辑器预览用的样式保持不变 */
.content-collapse-preview-button.align-left {
    text-align: left;
    margin-right: auto;
}

.content-collapse-preview-button.align-center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.content-collapse-preview-button.align-right {
    text-align: right;
    margin-left: auto;
    display: block;
}

.content-collapse-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.content-collapse-button.active {
    opacity: 0.8;
}

.content-collapse-content {
    margin-top: 15px;
    padding: 15px 0;
    border-radius: 4px;
    animation: fadeIn 0.5s ease-in-out;
    clear: both; /* 确保内容显示在按钮下方，不受float影响 */
}

/* 底部按钮样式 */
.content-collapse-button.bottom-button {
    margin-top: 20px;
}

/* 底部按钮容器 */
.bottom-button-wrapper {
    width: 100%;
    display: flex !important;
    margin-top: 20px;
}

/* 底部按钮对齐样式 */
.bottom-button-wrapper.align-left {
    justify-content: flex-start !important;
}
.bottom-button-wrapper.align-left .content-collapse-button {
    margin-right: auto !important;
    margin-left: 0 !important;
}

.bottom-button-wrapper.align-center {
    justify-content: center !important;
}
.bottom-button-wrapper.align-center .content-collapse-button {
    margin-left: auto !important;
    margin-right: auto !important;
}

.bottom-button-wrapper.align-right {
    justify-content: flex-end !important;
}
.bottom-button-wrapper.align-right .content-collapse-button {
    margin-left: auto !important;
    margin-right: 0 !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 确保隐藏时真正隐藏 */
.top-button-wrapper[style*="display: none"],
.bottom-button-wrapper[style*="display: none"] {
    display: none !important;
}

/* 确保展开时清晰可见 */
.content-collapse-content[style*="display: block"] {
    display: block !important;
}
