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

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.main-content {
    gap: 20px;
    margin-bottom: 20px;
    flex: 1;
    min-height: 0;
}

.input-section, .output-section, .status-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.code-editor {
    flex: 1;
    min-height: 300px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    overflow: hidden;
}

/* CodeMirror特定样式 */
.CodeMirror {
    height: 100% !important;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

textarea, .json-output {
    width: 100%;
    flex: 1;
    padding: 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    resize: vertical;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

textarea {
    min-height: 300px;
    background-color: #f8f9fa;
    flex: 1;
    min-height: 0;
}

.json-output {
    background-color: #2d3748;
    color: #e2e8f0;
    overflow: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    min-height: 300px;
}

/* JSON语法高亮样式 */
.json-string {
    color: #9ece6a;
}

.json-key {
    color: #7aa2f7;
}

.json-number {
    color: #ff9e64;
}

.json-boolean {
    color: #ff758d;
}

.json-brace, .json-bracket {
    color: #bb9af7;
    font-weight: bold;
}

/* 信息面板样式 */
.info-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.json-info {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #007bff;
}

.json-info ul {
    margin-top: 10px;
    margin-left: 20px;
}

.json-info li {
    margin-bottom: 5px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.status-indicator {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    background-color: #e9ecef;
    color: #6c757d;
}

.error-display {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin-top: 20px;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
}

.hidden {
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .toolbar {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}