body {
    margin: 0;
}

.navbar {
    /*height: 50px;*/
    /*background: #222;*/
    /*color: white;*/
    /*position: relative;*/
    font-size: 1.4rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: #222;
    z-index: 9999;
}

/* 中间导航（真正居中） */
.nav-left {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 20px;
}

/* 右侧按钮固定右边 */
.nav-right {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
}

.navbar a {
    color: white;
    text-decoration: none;
}

.nav-left a {
    color: white;
    text-decoration: none;
    padding: 6px 10px;
    position: relative;
    transition: all 0.2s ease;
}

.nav-left a:hover {
    opacity: 0.8;
}

.nav-left a.active {
    border-bottom: 2px solid #fff;
}

.container {
    display: flex;
    height: calc(100vh - 50px);
}

.sidebar {
    position: fixed;
    top: 50px;
    left: 0;
    width: 250px;
    height: calc(100vh - 50px);
    overflow-y: auto;
    border-right: 1px solid #ccc;
    padding: 10px;
}

.content {
    margin-left: 250px;
    flex: 1;
    padding: 30px;
}

.category {
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
}

.article-item {
    margin-left: 20px;
    margin-top: 5px;
    cursor: pointer;
}

/* 分类 */
.category {
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    padding: 8px;
    background: #f3f3f3;
    border-radius: 5px;
    user-select: none;
}

/* 分类悬停 */
.category:hover {
    background: #e6e6e6;
}

/* 分类下面的文章容器 */
.article-list {
    margin-left: 10px;
    overflow: hidden;
}

/* 单个文章 */
.article-item {
    padding: 6px 10px;
    margin-top: 3px;
    cursor: pointer;
    border-radius: 5px;
}

/* 鼠标悬停 */
.article-item:hover {
    background: #f0f0f0;
}

/* 默认隐藏 */
.hidden {
    display: none;
}

.article-view {
    min-height: 500px;
    padding: 20px;
    background: white;
    border-radius: 10px;
}

.article-view img {
    max-width: 100%;
}

#editor-container {
    margin-top: 20px;
}

#editor-container button {
    margin-top: 10px;
    padding: 10px 20px;
    cursor: pointer;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.hidden {
    display: none;
}

.modal-content {
    width: 400px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.editor-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.editor-meta input,
.editor-meta select {
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 14px;
}

.editor-row {
    display: flex;
    gap: 12px;
}

.editor-actions {
    margin-top: 16px;
}

.editor-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    gap: 10px;
}

.form-row label {
    text-align: right;
    color: #333;
    font-size: 14px;
}