/* TOML编辑器专用样式 */
.editor-container {
    max-width: 1400px;
    margin: 20px auto 20px;
    padding: 0 20px;
    position: relative;
}

.editor-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #00c48c;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* TOML编辑器容器 */
.toml-editor {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.editor-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    min-height: 500px;
    overflow: hidden;
}

.editor-section {
    padding: 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.editor-section h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 16px;
    color: #495057;
    font-weight: 500;
}

.editor-area {
    width: 100%;
    height: 500px;
    min-height: 400px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    font-size: 14px;
    line-height: 1.6;
    font-family: 'Courier New', Courier, monospace;
    resize: vertical;
    outline: none;
    transition: all 0.3s ease;
    background-color: #fff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
}

.editor-area:focus {
    border-color: #00c48c;
    box-shadow: 0 0 0 3px rgba(0, 196, 140, 0.2);
    background-color: #fafafa;
}

/* TOML语法高亮样式 */
.toml-key {
    color: #0066cc;
    font-weight: bold;
}

.toml-string {
    color: #009900;
}

.toml-number {
    color: #cc6600;
}

.toml-boolean {
    color: #cc00cc;
}

.toml-comment {
    color: #999;
    font-style: italic;
}

.toml-section {
    color: #0066cc;
    font-weight: bold;
}

/* JSON预览样式 */
.preview-section {
    background-color: #f8f9fa;
}

.preview-with-toc {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-area {
    width: 100%;
    height: 500px;
    min-height: 400px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* JSON语法高亮 */
.json-key {
    color: #0066cc;
    font-weight: bold;
}

.json-string {
    color: #009900;
}

.json-number {
    color: #cc6600;
}

.json-boolean {
    color: #cc00cc;
}

.json-null {
    color: #999;
    font-style: italic;
}

/* 编辑器工具栏 */
.editor-toolbar {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 10px 15px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.toolbar-btn {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    color: #495057;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.toolbar-btn:hover {
    background-color: #00c48c;
    color: #fff;
    border-color: #00c48c;
    box-shadow: 0 4px 12px rgba(0, 196, 140, 0.3);
}

.toolbar-btn:active {
    background-color: #00a074;
    transform: translateY(0);
}

/* 状态信息 */
.status-section {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
}

.status-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 文件输入 */
.file-input {
    display: none;
}

/* TOML语法说明 */
.info-section {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

.info-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 16px;
}

.info-section pre {
    margin: 0;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

.info-section ul {
    margin: 0;
    padding-left: 20px;
}

.info-section li {
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .editor-container {
        padding: 0 16px;
    }
    
    .editor-main {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 400px;
    }
    
    .editor-section {
        margin-bottom: 0;
    }
    
    .editor-area {
        height: 350px;
    }
    
    .preview-area {
        height: 350px;
    }
    
    .editor-toolbar {
        padding: 8px;
    }
    
    .toolbar-btn {
        padding: 5px 8px;
        font-size: 13px;
    }
}
