
.diff-input-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.diff-input-panel {
    min-width: 0;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line, #e4e9f1);
    border-radius: 12px;
}

.diff-panel-heading,
.diff-input-footer,
.diff-result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.diff-panel-heading {
    margin-bottom: 12px;
}

.diff-panel-heading label {
    font-weight: 600;
    color: var(--ink, #172033);
}

.diff-textarea {
    display: block;
    width: 100%;
    min-height: 260px;
    padding: 14px;
    resize: vertical;
    border: 1px solid var(--line, #e4e9f1);
    border-radius: 9px;
    background: #fbfcfe;
    color: var(--ink, #172033);
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.65;
    outline: none;
    tab-size: 4;
}

.diff-textarea:focus {
    border-color: var(--blue, #315ee8);
    box-shadow: 0 0 0 3px rgba(49, 94, 232, 0.1);
}

.diff-textarea::placeholder {
    color: #9aa5b5;
}

.diff-input-footer {
    margin-top: 10px;
    color: var(--muted, #68758b);
    font-size: 12px;
}

.diff-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin: 18px 0;
}

.diff-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted, #68758b);
    font-size: 13px;
    cursor: pointer;
}

.diff-option input {
    width: 16px;
    height: 16px;
    accent-color: var(--blue, #315ee8);
    cursor: pointer;
}

.diff-result-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line, #e4e9f1);
}

.diff-result-heading {
    align-items: flex-start;
    margin-bottom: 18px;
}

.diff-result-heading h2 {
    margin: 0 0 6px;
}

.diff-result-heading p {
    margin: 0;
    color: var(--muted, #68758b);
    font-size: 13px;
}

.diff-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 14px;
}

.diff-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted, #68758b);
    font-size: 12px;
}

.diff-legend-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 5px;
    font-weight: 700;
}

.diff-added .diff-legend-mark {
    background: #e4f7ec;
    color: #13845b;
}

.diff-removed .diff-legend-mark {
    background: #fdeaea;
    color: #c43d45;
}

.diff-unchanged .diff-legend-mark {
    background: #eef1f6;
    color: #68758b;
}

.diff-output {
    overflow-x: auto;
    border: 1px solid var(--line, #e4e9f1);
    border-radius: 10px;
    background: #fff;
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.7;
}

.diff-line {
    display: grid;
    grid-template-columns: 42px 42px minmax(0, 1fr);
    min-width: max-content;
    border-bottom: 1px solid #f0f2f6;
}

.diff-line:last-child {
    border-bottom: 0;
}

.diff-line-number {
    padding: 5px 8px;
    color: #9aa5b5;
    text-align: right;
    user-select: none;
    background: #f8f9fc;
}

.diff-line-sign {
    padding: 5px 8px;
    text-align: center;
    font-weight: 700;
    user-select: none;
}

.diff-line-content {
    padding: 5px 12px;
    white-space: pre;
}

.diff-line.added {
    background: #effaf3;
}

.diff-line.added .diff-line-sign {
    color: #13845b;
}

.diff-line.removed {
    background: #fff1f1;
}

.diff-line.removed .diff-line-sign {
    color: #c43d45;
}

.diff-line.unchanged {
    background: #fff;
}

.diff-empty {
    padding: 28px 16px;
    color: var(--muted, #68758b);
    text-align: center;
}

@media (max-width: 700px) {
    .diff-input-grid {
        grid-template-columns: 1fr;
    }

    .diff-textarea {
        min-height: 210px;
    }

    .diff-result-heading {
        flex-direction: column;
    }

    .diff-options {
        gap: 12px;
    }
}
