/* JSON格式化工具专用样式 */
.json-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
    width: 80%;
    margin: auto;
}

.json-editor-panel {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.json-controls {
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.json-controls label {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.json-controls select, .json-controls input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
}

.indent-input {
    width: 60px;
    text-align: center;
}

.json-editor {
    flex: 1;
    padding: 15px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    border: none;
    resize: none;
    outline: none;
    background: #282c34;
    color: #abb2bf;
    min-height: 300px;
    line-height: 1.5;
    tab-size: 4;
}

.json-result-panel {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.json-result {
    flex: 1;
    padding: 20px;
    overflow: auto;
    background: #f9f9f9;
    min-height: 300px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.json-error {
    color: #e74c3c;
    background: #fdecea;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.json-stats {
    background: #f5f5f5;
    padding: 10px 15px;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
    color: #7f8c8d;
    display: flex;
    justify-content: space-between;
}

.json-examples {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.examples-content {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.example-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e9ecef;
}

.example-card:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.example-card h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1rem;
}

.example-card pre {
    margin: 0;
    font-size: 0.8rem;
    color: #6c757d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* JSON语法高亮 */
.json-key {
    color: #e06c75;
}

.json-string {
    color: #98c379;
}

.json-number {
    color: #d19a66;
}

.json-boolean {
    color: #56b6c2;
}

.json-null {
    color: #56b6c2;
}

.json-punctuation {
    color: #abb2bf;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .json-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .examples-content {
        grid-template-columns: 1fr;
    }
    
    .json-stats {
        flex-direction: column;
        gap: 5px;
    }
}