.tool-workspace {
    display: flex;
    justify-content: center;
    align-items: stretch;
    min-height: 75vh;
    padding-bottom: 2rem;
}

.tool-panel {
    width: 100%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.split-pane {
    display: flex;
    gap: 1rem;
    flex: 1;
}

.split-pane.hidden {
    display: none;
}

.pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

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

.pane-header label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.btn-icon:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
}

textarea, .diff-view {
    flex: 1;
    width: 100%;
    height: 600px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    color: var(--text-main);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

textarea {
    resize: none;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.3);
}

.action-bar {
    display: flex;
    justify-content: center;
    padding: 0.5rem 0;
}

.action-bar.hidden {
    display: none;
}

/* Diff Styling */
.diff-view {
    background: rgba(0, 0, 0, 0.3);
    padding: 0;
}

.diff-line {
    display: flex;
    min-height: 1.5em; /* Ensure empty lines still have height */
}

.line-num {
    display: inline-block;
    width: 3rem;
    min-width: 3rem;
    padding-right: 0.5rem;
    text-align: right;
    color: rgba(255, 255, 255, 0.3);
    user-select: none;
    border-right: 1px solid var(--glass-border);
    margin-right: 1rem;
    background: rgba(0,0,0,0.2);
}

.line-text {
    flex: 1;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Red for removed */
.diff-removed {
    background-color: rgba(239, 68, 68, 0.2); /* Red tint */
    color: #fca5a5;
    border-left: 2px solid #ef4444;
}

/* Green for added */
.diff-added {
    background-color: rgba(34, 197, 94, 0.2); /* Green tint */
    color: #86efac;
    border-left: 2px solid #22c55e;
}

/* Unchanged */
.diff-unchanged {
    color: var(--text-muted);
    border-left: 2px solid transparent;
}

/* Empty Placeholder Line */
.diff-empty {
    background-color: rgba(0, 0, 0, 0.1);
    border-left: 2px solid transparent;
}

@media (max-width: 768px) {
    .split-pane {
        flex-direction: column;
    }
}
