/* JSON工具样式 */
.json-tools {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tool-section {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    padding: 2rem;
    transition: all 0.3s;
}

.tool-section:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    transform: translateY(-5px);
}

.tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.tool-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin: 0;
}

.tool-actions {
    display: flex;
    gap: 10px;
}

.tab-container {
    margin-bottom: 20px;
}

.tab-buttons {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.tab-button {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
}

.tab-button:hover {
    color: #333;
}

.tab-button.active {
    color: #6a11cb;
    border-bottom-color: #6a11cb;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.editor-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.editor-wrapper {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f8f9fa;
}

.editor {
    width: 100%;
    height: 300px;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.6;
    padding: 15px;
    border: none;
    resize: vertical;
    background-color: transparent;
}

.editor:focus {
    outline: none;
}

.line-numbers {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background-color: #f0f0f0;
    border-right: 1px solid #ddd;
    padding: 15px 5px;
    text-align: right;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #999;
    user-select: none;
    overflow: hidden;
}

.editor-with-line-numbers {
    padding-left: 50px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

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

.btn-primary {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #f0f2f5;
    color: #666;
}

.btn-secondary:hover {
    background-color: #e0e2e5;
    color: #333;
}

.result-container {
    margin-top: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: #f8f9fa;
    max-height: 300px;
    overflow: auto;
}

.result-container pre {
    margin: 0;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.6;
}

.error-message {
    color: #e74c3c;
    padding: 10px;
    background-color: #fadbd8;
    border-radius: 5px;
    margin-top: 10px;
}

.success-message {
    color: #27ae60;
    padding: 10px;
    background-color: #d4efdf;
    border-radius: 5px;
    margin-top: 10px;
}

.options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-label {
    font-size: 14px;
    color: #666;
}

.option-input {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.option-select {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    color: #333;
    min-width: 120px;
}

.option-checkbox {
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tool-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .tab-buttons {
        flex-wrap: wrap;
    }
    
    .tab-button {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .options-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tool-section {
        padding: 1.5rem;
    }
    
    .editor {
        height: 250px;
    }
} 