/* 텍스트 비교(Diff) 도구 스타일 - mockup-generator 디자인 언어 차용 (orange/pink 테마) */
.diff-tool {
    --tool-primary: #ea580c;
    --tool-bg: #fff7ed;
    --tool-gradient: linear-gradient(135deg, #ea580c 0%, #db2777 100%);
}

/* 히어로 */
.diff-hero {
    background: var(--tool-gradient);
    border-radius: 16px;
    padding: 36px 32px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
}
.diff-hero::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}
.diff-hero::after {
    content: '';
    position: absolute;
    bottom: -120px;
    left: -60px;
    width: 260px;
    height: 260px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}
.diff-hero h1 {
    font-size: 28px;
    font-weight: 800;
    position: relative;
    z-index: 1;
    margin: 10px 0 6px;
}
.diff-hero p {
    opacity: 0.85;
    position: relative;
    z-index: 1;
    margin-bottom: 0;
}

/* 에디터 카드 */
.editor-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.editor-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f5;
}
.editor-title {
    font-weight: 700;
    font-size: 14px;
    color: #343a40;
}
.editor-title i {
    color: var(--tool-primary);
}
.size-badge {
    font-size: 12px;
    font-weight: 600;
    color: #868e96;
    background: #f1f3f5;
    padding: 3px 10px;
    border-radius: 20px;
}
.editor-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.editor-textarea {
    width: 100%;
    height: 360px;
    resize: none;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #f8f9fb;
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.6;
    color: #212529;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    tab-size: 4;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
}
.editor-textarea:focus {
    border-color: var(--tool-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
}

/* 옵션/액션 툴바 */
.diff-toolbar {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 12px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* 액션 버튼 */
.btn-action {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 9px;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #495057;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.btn-action:hover {
    border-color: var(--tool-primary);
    color: var(--tool-primary);
    background: var(--tool-bg);
}
.btn-action-primary {
    background: var(--tool-gradient);
    border: none;
    color: #fff;
}
/* CRITICAL: primary 버튼은 hover 시에도 그라데이션/흰 글씨 유지 (회색으로 죽지 않도록) */
.btn-action-primary:hover {
    background: var(--tool-gradient);
    border: none;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(234, 88, 12, 0.3);
}

/* 통계 카드 */
.stat-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 16px 12px;
}

/* 서포트 카드 */
.support-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    overflow: hidden;
}
.support-card .card-hd {
    padding: 14px 18px;
    font-weight: 700;
    font-size: 15px;
    border-bottom: 1px solid #f1f3f5;
}
.support-card .card-bd {
    padding: 18px;
}
.support-subtitle {
    font-size: 15px;
    font-weight: 700;
    color: #343a40;
    margin: 18px 0 10px;
}

/* 아코디언 */
.diff-tool .accordion-button:not(.collapsed) {
    background-color: var(--tool-bg);
    color: var(--tool-primary);
    box-shadow: none;
}
.diff-tool .accordion-button:focus {
    box-shadow: none;
}

/* ===== Diff 결과 (기능 규칙 - 추가/삭제 색상은 녹색/적색 시맨틱 유지) ===== */
.diff-output-wrap {
    background-color: #fafbfc;
    border: 1px solid #e1e4e8;
}

.diff-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.82rem;
    line-height: 1.5;
}

.diff-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.diff-table td {
    padding: 1px 8px;
    vertical-align: top;
    white-space: pre-wrap;
    word-break: break-all;
}

/* 줄 번호 */
.diff-line-num {
    width: 45px;
    min-width: 45px;
    text-align: right;
    color: #8b949e;
    background-color: #f6f8fa;
    user-select: none;
    font-size: 0.75rem;
    border-right: 1px solid #e1e4e8;
}

/* +/- 마커 */
.diff-marker {
    width: 20px;
    min-width: 20px;
    text-align: center;
    font-weight: bold;
    user-select: none;
}

/* 내용 */
.diff-content {
    width: 100%;
}
.diff-content code {
    font-family: inherit;
    font-size: inherit;
    background: none;
    padding: 0;
    color: inherit;
}

/* 행 색상 - 변경 없음 */
.diff-row-equal {
    background-color: #ffffff;
}

/* 행 색상 - 삭제 (적색 시맨틱 유지) */
.diff-row-removed {
    background-color: #ffeef0;
}
.diff-row-removed .diff-line-num {
    background-color: #ffdce0;
    color: #86181d;
}
.diff-row-removed .diff-marker {
    color: #cb2431;
}

/* 행 색상 - 추가 (녹색 시맨틱 유지) */
.diff-row-added {
    background-color: #e6ffec;
}
.diff-row-added .diff-line-num {
    background-color: #cdffd8;
    color: #165c26;
}
.diff-row-added .diff-marker {
    color: #22863a;
}

/* 문자 단위 인라인 diff 하이라이트 */
.diff-char-removed {
    background-color: #fdb8c0;
    border-radius: 2px;
    padding: 0 1px;
}
.diff-char-added {
    background-color: #acf2bd;
    border-radius: 2px;
    padding: 0 1px;
}

/* 반응형 */
@media (max-width: 768px) {
    .diff-hero { padding: 28px 20px; border-radius: 12px; }
    .diff-hero h1 { font-size: 22px; }
    .editor-textarea { height: 240px; }
}
