.tool-text-diff {
    background: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
}

.tool-text-diff .diff-card {
    border: none;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    border-left: 4px solid #3B82F6;
}

.tool-text-diff .diff-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3B82F6 0%, #1F2937 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.tool-text-diff .form-control {
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
}

.tool-text-diff .form-control:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.tool-text-diff .btn-diff-go {
    background: #3B82F6;
    color: #fff !important;
    border: none;
    font-weight: 600;
    border-radius: 0.5rem;
}

.tool-text-diff .btn-diff-go:hover,
.tool-text-diff .btn-diff-go:focus {
    background: #2563eb;
    color: #fff !important;
}

.diff-legend {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.diff-chip {
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
}

.diff-chip-del {
    background: #fee2e2;
    color: #991b1b;
}

.diff-chip-add {
    background: #dcfce7;
    color: #166534;
}

.diff-view {
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #f8fafc;
    padding: 0.85rem 1rem;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92rem;
    line-height: 1.55;
}

.diff-line {
    min-height: 1.4em;
}

.diff-del {
    background: #fecaca;
    color: #7f1d1d;
    text-decoration: line-through;
}

.diff-add {
    background: #bbf7d0;
    color: #14532d;
}

@media (max-width: 575.98px) {
    .tool-text-diff .d-flex.gap-2 .btn {
        width: 100%;
    }
}
