/* 主容器样式 */
.profile-container {
    display: flex;
    margin: 20px auto;
    max-width: 1200px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: calc(100vh - 40px);
    overflow: hidden;
}

/* 编辑模式下的容器样式 */
.profile-container.editing {
    margin: 0;
    max-width: 100%;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
}

/* 左侧菜单样式 */
.profile-menu {
    width: 240px;
    background: #f8f9fa;
    padding: 30px 0;
    border-right: 1px solid #eee;
}

.menu-item {
    padding: 15px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    color: #666;
}

.menu-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.menu-item:hover {
    background: #f0f2f5;
    color: #1890ff;
}

.menu-item.active {
    background: #e6f7ff;
    color: #1890ff;
    border-right: 3px solid #1890ff;
}

/* 右侧内容区样式 */
.profile-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    height: 100%;
    background: #fff;
}

/* 面板样式 */
.profile-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.profile-panel.active {
    display: block;
}

.profile-panel h2 {
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
    font-weight: 500;
}

/* 表单样式 */
.profile-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    position: relative;
}

.form-group label {
    width: 50px;
    padding-top: 10px;
    margin-right: 10px;
    color: #666;
    font-weight: 500;
    text-align: right;
    flex-shrink: 0;
    position: absolute;
    left: 0;
}

.form-group .form-control-wrapper {
    flex: 1;
    padding-left: 70px;
    max-width: 300px;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    text-indent: 5px;
}

.form-control:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
    outline: none;
}

.form-control[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

/* 头像上传区域样式 */
.avatar-upload {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    margin-bottom: 20px;
    margin-left: 70px;
}

.avatar-upload img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #eee;
}

.avatar-upload input[type="file"] {
    display: none;
}

.avatar-upload .btn {
    margin-left: 20px;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: #1890ff;
    color: #fff;
}

.btn-primary:hover {
    background: #40a9ff;
}

.btn-secondary {
    background: #f0f2f5;
    color: #666;
}

.btn-secondary:hover {
    background: #e6e8eb;
}

/* 表单操作按钮容器 */
.form-actions {
    margin-top: 30px;
    padding-left: 70px;
}

/* 帖子列表样式 */
.posts-list {
    margin-top: 20px;
}

.post-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.post-item:hover {
    background: #f8f9fa;
}

.post-info {
    flex: 1;
}

.post-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.post-meta {
    color: #999;
    font-size: 13px;
}

.post-meta span {
    margin-right: 15px;
}

.post-actions {
    display: flex;
    gap: 10px;
}

.post-actions .btn {
    padding: 6px 12px;
    font-size: 13px;
}

/* 编辑帖子弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 50px auto;
    padding: 0;
    width: 80%;
    max-width: 800px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-body {
    padding: 20px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e5e5e5;
    text-align: right;
}

.close {
    font-size: 24px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 编辑器容器样式 */
#editContent {
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 应式设计 */
@media (max-width: 768px) {
    .profile-container {
        flex-direction: column;
        margin: 0;
        border-radius: 0;
    }

    .profile-menu {
        width: 100%;
        padding: 15px 0;
    }

    .profile-content {
        padding: 20px;
    }

    .form-group {
        flex-direction: column;
    }

    .form-group label {
        width: 100%;
        text-align: left;
        margin-bottom: 8px;
        padding-top: 0;
    }

    .form-actions {
        padding-left: 0;
    }

    .avatar-upload {
        flex-direction: column;
        align-items: flex-start;
    }

    .avatar-upload .btn {
        margin-left: 0;
        margin-top: 10px;
    }

    .post-item {
        flex-direction: column;
        gap: 15px;
    }

    .post-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* 提示框样式 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 1000;
    animation: fadeInOut 3s ease;
    min-width: 200px;
    text-align: center;
}

@keyframes fadeInOut {
    0% { 
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    10% { 
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    90% { 
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% { 
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
} 

/* 编辑表单样式 */
.edit-form {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    width: 100%;
}

.edit-form .form-group {
    margin-bottom: 20px;
}

.edit-form .form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.edit-form .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.edit-form select.form-control {
    height: 40px;
}

.edit-form .editormd {
    width: 100% !important;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.edit-form .form-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.edit-form .btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-form .btn-primary {
    background: #007bff;
    color: #fff;
    border: none;
}

.edit-form .btn-primary:hover {
    background: #0056b3;
}

.edit-form .btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.edit-form .btn-secondary:hover {
    background: #e2e6ea;
} 

/* 调整编辑器容器的宽度 */
.post-item.editing {
    width: 100%;
    padding: 20px 0;
}

/* 确保编辑器工具栏完整显示 */
.editormd-toolbar {
    width: 100% !important;
}

.editormd-container {
    width: 100% !important;
} 

/* 编辑容器样式 */
.edit-container {
    width: 100%;
    height: 100vh;
    background: #fff;
    position: relative;
}

.edit-form {
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: none !important;
    width: 100% !important;
}

.edit-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    width: 100%;
}

/* 标题和分类在同一行 */
.title-category-row {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}

/* 标题输入框样式 */
.title-input {
    flex: 1;
    font-size: 20px !important;
    padding: 15px !important;
    border: none !important;
    border-bottom: 1px solid #eee !important;
    border-radius: 0 !important;
    margin-bottom: 0 !important;
    box-shadow: none !important;
    width: auto !important;
}

.title-input:focus {
    border-color: #1890ff !important;
    box-shadow: none !important;
}

/* 分类选择框样式 */
.category-select {
    width: 200px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    margin-bottom: 0 !important;
    flex-shrink: 0;
}

/* 编辑器容器样式 */
.editor-container {
    margin-top: 20px;
    width: 100%;
    flex: 1;
    min-height: 500px;
}

.edit-footer {
    padding: 15px 20px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    position: sticky;
    bottom: 0;
    z-index: 100;
}

/* 编辑器样式优化 */
.editormd {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    margin-bottom: 0 !important;
}

.editormd-toolbar {
    border: none !important;
    background: #fff !important;
}

.editormd-preview {
    padding: 0 20px !important;
    background: #fff !important;
    margin-top: -40px !important;
}

/* 按钮样式 */
.edit-footer .btn {
    padding: 8px 24px;
    font-size: 14px;
    border-radius: 4px;
}

.edit-footer .btn-secondary {
    background: #f0f2f5;
    color: #666;
    border: 1px solid #ddd;
}

.edit-footer .btn-secondary:hover {
    background: #e6e8eb;
}

.edit-footer .btn-primary {
    background: #1890ff;
    color: #fff;
    border: none;
}

.edit-footer .btn-primary:hover {
    background: #40a9ff;
} 

/* 编辑器相关样式 */
.editor-container {
    margin-top: 20px;
    width: 100%;
    flex: 1;
    min-height: 500px;
}

.editormd {
    border: 1px solid #ddd !important;
    border-radius: 4px;
}

/* 编辑器全屏模式样式 */
.editormd.fullscreen {
    z-index: 99999 !important;
    margin-top: 60px !important;
    height: calc(100vh - 60px) !important;
}

/* 编辑器工具栏样式 */
.editormd-toolbar {
    border-radius: 4px 4px 0 0 !important;
    border: none !important;
    border-bottom: 1px solid #ddd !important;
}

/* 编辑器内容区域样式 */
.editormd-editor-md {
    padding: 20px !important;
}

/* 预览区域样式 */
.editormd-preview {
    padding: 20px !important;
    background: #fff !important;
}

/* 标题和分类在同一行 */
.title-category-row {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}

/* 标题输入框样式 */
.title-input {
    flex: 1;
    font-size: 20px !important;
    padding: 8px 0 !important;
    border: none !important;
    border-bottom: 1px solid #eee !important;
    border-radius: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.title-input:focus {
    border-color: #1890ff !important;
    box-shadow: none !important;
}

/* 分类选择框样式 */
.category-select {
    width: 200px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    margin: 0 !important;
}

/* 编辑表单样式 */
.edit-form {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: 20px;
}

.edit-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 底部按钮区域样式 */
.edit-footer {
    padding: 15px 0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
} 