.tool-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 80vh;
    min-height: 600px;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.left-actions, .right-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn-primary, .btn-secondary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.btn-icon {
    background: none;
    border: 1px solid #e5e7eb;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.select-control {
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #4b5563;
    background-color: white;
    cursor: pointer;
}

.editor-container {
    flex: 1;
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
}

.line-numbers {
    width: 40px;
    background-color: #f8fafc;
    border-right: 1px solid #e5e7eb;
    padding: 10px 0;
    text-align: right;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: #9ca3af;
    user-select: none;
    overflow: hidden;
}

.line-numbers span {
    display: block;
    padding-right: 8px;
}

textarea, pre {
    margin: 0;
    padding: 10px;
    border: none;
    width: 100%;
    height: 100%;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    tab-size: 4;
    white-space: pre;
    overflow: auto;
    box-sizing: border-box;
}

textarea {
    position: absolute;
    top: 0;
    left: 40px; /* Offset by line numbers width */
    width: calc(100% - 40px);
    background: transparent;
    color: transparent;
    caret-color: #000;
    z-index: 2;
    resize: none;
}

textarea:focus {
    outline: none;
}

pre {
    position: absolute;
    top: 0;
    left: 40px;
    width: calc(100% - 40px);
    z-index: 1;
    pointer-events: none;
    color: #1f2937;
}

/* Syntax Highlighting */
.json-key { color: #7c3aed; } /* Purple */
.json-string { color: #059669; } /* Green */
.json-number { color: #d97706; } /* Orange */
.json-boolean { color: #2563eb; } /* Blue */
.json-null { color: #dc2626; } /* Red */

.status-bar {
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #6b7280;
}

.error-msg {
    color: #dc2626;
}

@media (max-width: 640px) {
    .tool-container {
        height: auto;
        min-height: 500px;
        padding: 1rem;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .left-actions {
        flex-wrap: wrap;
    }
    
    .right-actions {
        justify-content: flex-end;
    }
}