.text-diff-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 0 40px;
}

/* 상단 */

.text-diff-page .utility-top {
  text-align: center;
  padding: 30px 20px 28px;
}

.text-diff-page .utility-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 6px 13px;
  border-radius: 999px;
  background: #ecfeff;
  color: #155e75;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.text-diff-page .utility-title {
  margin: 0;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.text-diff-page .utility-desc {
  max-width: 820px;
  margin: 16px auto 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.8;
}

/* 요약 카드 */

.text-diff-summary-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.text-diff-summary-item {
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.text-diff-summary-item::before {
  content: "";
  display: block;
  width: 34px;
  height: 4px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
}

.text-diff-summary-item strong {
  display: block;
  margin-bottom: 7px;
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
}

.text-diff-summary-item span {
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
}

/* 카드 공통 */

.text-diff-editor-card,
.text-diff-result-card {
  padding: 28px;
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.text-diff-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 24px;
}

.text-diff-card-head h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.text-diff-card-head p {
  margin: 0;
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
}

/* 상단 버튼 */

.text-diff-head-actions {
  display: flex;
  flex-shrink: 0;
  gap: 10px;
  padding-top: 4px;
}

/* 입력 영역 */

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

.text-diff-input-box {
  display: flex;
  flex-direction: column;
}

.text-diff-input-box .utility-field-label {
  margin-bottom: 10px;
  font-weight: 800;
  color: #0f172a;
}

.text-diff-input {
  width: 100%;
  min-height: 420px;
  padding: 22px;
  box-sizing: border-box;
  border: 1px solid #1e293b;
  border-radius: 20px;
  background:
    linear-gradient(
      180deg,
      rgba(15, 23, 42, 0.98),
      rgba(2, 6, 23, 0.98)
    );
  color: #e5e7eb;
  font-family:
    Consolas,
    Monaco,
    "SFMono-Regular",
    "Courier New",
    monospace;
  font-size: 14px;
  line-height: 1.75;
  resize: vertical;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 36px rgba(15, 23, 42, 0.16);
}

.text-diff-input::placeholder {
  color: rgba(203, 213, 225, 0.5);
}

.text-diff-input:focus {
  border-color: #06b6d4;
  box-shadow:
    0 0 0 4px rgba(6, 182, 212, 0.16),
    0 18px 36px rgba(15, 23, 42, 0.18);
}

/* 메타 정보 */

.text-diff-meta-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.text-diff-meta-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* 버튼 */

.text-diff-action-row {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  padding-top: 4px;
  flex-wrap: wrap;
}

.text-diff-page .utility-btn {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
}

.text-diff-page .utility-btn-primary {
  background: linear-gradient(135deg, #0f172a, #164e63);
  color: #ffffff;
  border-color: #0f172a;
}

.text-diff-page .utility-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}

/* 상태 배지 */

.text-diff-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.text-diff-status-badge.is-ready {
  color: #475569;
  background: #f1f5f9;
}

.text-diff-status-badge.is-success {
  color: #047857;
  background: #d1fae5;
}

.text-diff-status-badge.is-error {
  color: #b91c1c;
  background: #fee2e2;
}

/* 결과 요약 */

.text-diff-result-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.text-diff-result-item {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
  background: #ffffff;
}

.text-diff-result-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.text-diff-result-item span {
  font-size: 13px;
  font-weight: 800;
}

.text-diff-result-item.is-added {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.22);
}

.text-diff-result-item.is-added strong,
.text-diff-result-item.is-added span {
  color: #047857;
}

.text-diff-result-item.is-removed {
  background: #fef2f2;
  border-color: rgba(239, 68, 68, 0.22);
}

.text-diff-result-item.is-removed strong,
.text-diff-result-item.is-removed span {
  color: #b91c1c;
}

.text-diff-result-item.is-same {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.22);
}

.text-diff-result-item.is-same strong,
.text-diff-result-item.is-same span {
  color: #475569;
}

.text-diff-result-item.is-total {
  background: #eff6ff;
  border-color: rgba(59, 130, 246, 0.22);
}

.text-diff-result-item.is-total strong,
.text-diff-result-item.is-total span {
  color: #1d4ed8;
}

/* 결과 영역 */

.text-diff-result-box {
  min-height: 260px;
  max-height: 640px;
  margin-top: 18px;
  padding: 22px;
  border-radius: 18px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
  line-height: 1.8;
  font-size: 14px;
  font-family:
    Consolas,
    Monaco,
    "SFMono-Regular",
    "Courier New",
    monospace;
}

.text-diff-result-box.is-ready {
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: #f8fafc;
  color: #64748b;
}

.text-diff-result-box.is-success {
  border: 1px solid rgba(6, 182, 212, 0.28);
  background: #f8fafc;
  color: #0f172a;
}

.text-diff-result-box.is-error {
  border: 1px solid rgba(239, 68, 68, 0.28);
  background: #fef2f2;
  color: #991b1b;
}

/* diff 라인 강조 */

.text-diff-line-added {
  display: block;
  padding: 4px 8px;
  border-radius: 8px;
  color: #047857;
  background: rgba(16, 185, 129, 0.08);
  font-weight: 700;
}

.text-diff-line-removed {
  display: block;
  padding: 4px 8px;
  border-radius: 8px;
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.08);
  font-weight: 700;
}

.text-diff-line-same {
  display: block;
  padding: 4px 8px;
  border-radius: 8px;
  color: #475569;
}

/* 도움말 */

.text-diff-page .help-panel {
  margin-top: 30px;
}

.text-diff-page .help-panel > h2 {
  margin: 0 0 18px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.text-diff-page .help-box {
  border-radius: 22px;
}

/* 모바일 */

@media (max-width: 900px) {
  .text-diff-input-grid,
  .text-diff-result-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .text-diff-page {
    padding: 0 0 28px;
  }

  .text-diff-page .utility-top {
    padding: 24px 14px 22px;
  }

  .text-diff-summary-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .text-diff-editor-card,
  .text-diff-result-card {
    padding: 22px;
    border-radius: 20px;
  }

  .text-diff-card-head {
    flex-direction: column;
    gap: 14px;
  }

  .text-diff-head-actions,
  .text-diff-action-row {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }

  .text-diff-head-actions .utility-btn,
  .text-diff-action-row .utility-btn {
    width: 100%;
  }

  .text-diff-input {
    min-height: 320px;
    font-size: 13px;
  }

  .text-diff-result-box {
    max-height: 420px;
    font-size: 13px;
  }

  .text-diff-page .utility-title {
    font-size: 32px;
  }
}