/* =========================================================
   diff.css  –  Text Diff Checker 페이지 전용 스타일
   공통 스타일은 common.css 참조
   ========================================================= */

/* ── 입력 패널 ───────────────────────────────────────────── */
.input-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.text-panel { display: flex; flex-direction: column; }

.panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-align: center;
    color: white;
    padding: 12px 20px;
    border-radius: 10px 10px 0 0;
    font-weight: bold;
    font-size: 1.1em;
}

textarea {
    width: 100%;
    height: 300px;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 10px 10px;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s;
}
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* ── 버튼 그룹 ───────────────────────────────────────────── */
.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 1.5rem 0;
}

.button-group button {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-compare {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}
.btn-compare:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
.btn-clear { background: #f0f0f0; color: #333; }
.btn-clear:hover { background: #e0e0e0; }
.btn-swap  { background: #ff6b6b; color: white; }
.btn-swap:hover { background: #ff5252; transform: translateY(-2px); }

/* ── 결과 헤더 ───────────────────────────────────────────── */
.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}
.result-title { font-size: 1.2em; font-weight: bold; color: #333; }

.stats { display: flex; gap: 20px; font-size: 0.9em; }
.stat-item { display: flex; align-items: center; gap: 5px; }
.stat-added   { color: #2ecc71; font-weight: bold; }
.stat-removed { color: #e74c3c; font-weight: bold; }

/* ── Diff 결과 패널 ──────────────────────────────────────── */
#diffResult {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 14px;
}

.diff-panel {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}
.diff-panel-header {
    padding: 10px 15px;
    font-weight: bold;
    color: white;
    text-align: center;
}
.diff-panel-left  .diff-panel-header { background: #e74c3c; }
.diff-panel-right .diff-panel-header { background: #2ecc71; }

.diff-panel-content { max-height: 600px; overflow-y: auto; }

.diff-line {
    padding: 6px 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    min-height: 30px;
    border-bottom: 1px solid #f0f0f0;
}
.diff-line-number {
    display: inline-block;
    width: 40px;
    color: #999;
    user-select: none;
    margin-right: 10px;
}
.diff-removed { background-color: #ffe6e6; }
.diff-added   { background-color: #e6ffe6; }
.diff-equal   { background-color: white; color: #666; }
.diff-empty   { background-color: #f5f5f5; color: #ccc; }

/* ── 빈 상태 ─────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    color: #999;
    padding: 60px 20px;
    font-size: 1.1em;
}
.empty-state-icon { font-size: 3em; margin-bottom: 10px; }

/* ── 반응형 ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .input-section  { grid-template-columns: 1fr; }
    .button-group   { flex-direction: column; }
    .button-group button { width: 100%; }
    #diffResult     { grid-template-columns: 1fr; gap: 20px; }
    .diff-panel-content { max-height: 400px; }
}