/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 5vw;
    min-width: 60px;
    background-color: #2c3e50;
    padding: 1rem 0;
}

.tab-item {
    color: #ecf0f1;
    padding: 1rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}

.tab-item:hover {
    background-color: #34495e;
}

.tab-item.active {
    background-color: #34495e;
    border-left-color: #3498db;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    padding: 1rem;
    background-color: #fff;
}

/* 编辑器容器 */
.editor-container {
    display: flex;
    height: calc(100vh - 2rem);
    gap: 1rem;
}

/* 历史记录面板 */
.history-panel {
    width: 250px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.btn-primary {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.history-list {
    margin-top: 1rem;
    overflow-y: auto;
}

.history-item {
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}

.history-item:hover {
    transform: translateX(5px);
}

.history-item .delete-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    color: #e74c3c;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.history-item:hover .delete-btn {
    opacity: 1;
}

/* 编辑器面板 */
.editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.editor-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* SimpleMDE 样式覆盖 */
.editor-wrapper .CodeMirror {
    height: calc(100vh - 8rem) !important;
    border: none;
}

.editor-wrapper .editor-toolbar {
    border: none;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
}

.floating-buttons {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 0.8rem 1.5rem;
    background-color: #2ecc71;
    color: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: none;
    z-index: 1000;
}

/* 编辑器预览区域样式 */
.editor-preview,
.editor-preview-side {
    background: #fff;
    padding: 1rem;
}

/* 确保按钮不会被编辑器遮挡 */
.editor-statusbar {
    margin-bottom: 3rem;
} 