* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.main-content {
    display: flex;
    gap: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 左侧分类面板 */
#left_cat {
    flex: 1;
    padding: 20px;
    border-right: 1px solid #e0e0e0;
}

.category-section {
    margin-bottom: 30px;
}

.category-section h2 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
}

.category-list {
    margin-bottom: 15px;
}

/* 分类标签容器 */
#main-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

/* 分类标签样式 - 矩形圆角设计，上下内边距减小 */
.main-category-tag {
    padding: 4px 16px;
    border-radius: 6px;
    cursor: pointer;
    background-color: white;
    color: black;
    border: 1px solid #a5d6a7;
    transition: all 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
}

.main-category-tag:hover:not(.selected) {
    background-color: #f5f5f5;
    border-color: #4CAF50;
}

.main-category-tag.selected {
    background-color: #2e7d32;
    color: white;
    border: 1px solid #1b5e20;
}

/* 按钮样式 */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.action-buttons button {
    background-color: #e0e0e0;
    color: #333;
}

.action-buttons button:hover {
    background-color: #bdbdbd;
}

.primary-button {
    background-color: #2196F3;
    color: white;
}

.primary-button:hover {
    background-color: #1976D2;
}

/* 右侧编辑面板 */
#right_edit {
    flex: 1;
    padding: 20px;
}

.edit-form {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus {
    outline: none;
    border-color: #2196F3;
}

.save-section {
    text-align: right;
}

/* 模态框样式 */
.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 {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover, .close:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

.modal h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.modal input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.modal button {
    width: 100%;
    padding: 10px;
    background-color: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.modal button:hover {
    background-color: #1976D2;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    #left_cat {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
}