/* Base layout hook */
.ha-body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top, #101522 0%, #05060a 40%, #030308 100%);
  color: #f9fafb;
}

/* Shell and header alignment */
.ha-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.ha-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: radial-gradient(circle at top left, rgba(96, 165, 250, 0.12), transparent 55%);
  backdrop-filter: blur(12px);
}

.ha-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}



.ha-nav {
  display: flex;
  gap: 14px;
}

.ha-nav-link {
  font-size: 0.92rem;
  color: #cbd5f5;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.ha-nav-link:hover {
  border-color: rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.7);
}

/* Footer */
.ha-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin-top: 40px;
  padding: 16px 0 22px;
  font-size: 0.85rem;
  color: #9ca3af;
  background: radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.14), transparent 55%);
}

.ha-footer-inner {
  text-align: center;
}

.ha-footer a {
  color: #e5e7eb;
  text-decoration: none;
}

.ha-footer a:hover {
  text-decoration: underline;
}

/* Diff Checker layout */

.dc-shell {
  padding-top: 28px;
  padding-bottom: 40px;
}

.dc-header {
  margin-bottom: 22px;
}

.dc-title {
  font-family: "Playfair Display", "Times New Roman", serif;
  font-size: 2rem;
  margin: 0 0 6px;
}

.dc-subtitle {
  margin: 0;
  font-size: 0.96rem;
  color: #9ca3af;
}

.dc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: flex-start;
}

.dc-column {
  min-width: 0;
}

.dc-card {
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.92));
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.75),
    0 0 0 1px rgba(15, 23, 42, 0.7);
  padding: 16px 18px 18px;
}

.dc-card-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: 600;
}

.dc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dc-card-actions {
  flex-shrink: 0;
}

.dc-hint {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: #9ca3af;
}

/* Inputs */

.dc-input-group {
  margin-bottom: 12px;
}

.dc-label {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 4px;
  color: #e5e7eb;
}

.dc-textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.85rem;
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.8);
  color: #f9fafb;
  outline: none;
}

.dc-textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.7);
}

/* Buttons */

.dc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 4px;
}

.dc-btn {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 0.82rem;
  padding: 7px 12px;
  background: transparent;
  color: #e5e7eb;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.16s ease;
}

.dc-btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  border-color: transparent;
  color: #0f172a;
  font-weight: 600;
}

.dc-btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.8);
}

.dc-btn-ghost {
  background: rgba(15, 23, 42, 0.7);
}

.dc-btn-ghost:hover {
  background: rgba(15, 23, 42, 1);
}

/* Status */

.dc-status {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: #a5b4fc;
}

/* Summary */

.dc-summary {
  margin-top: 6px;
  margin-bottom: 8px;
  font-size: 0.82rem;
  color: #9ca3af;
}

.dc-summary strong {
  color: #e5e7eb;
}

/* View toggle */

.dc-view-toggle {
  margin: 8px 0 10px;
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.dc-view-btn {
  border: none;
  background: transparent;
  color: #cbd5f5;
  font-size: 0.78rem;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.16s ease;
}

.dc-view-btn-active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(129, 140, 248, 0.26));
  color: #f9fafb;
}

/* Output area */

.dc-output {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.94));
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
  max-height: 440px;
  overflow: auto;
}

/* Side-by-side view */

.dc-output-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
}

.dc-side-column {
  border-right: 1px solid rgba(30, 41, 59, 0.9);
}

.dc-side-column:last-child {
  border-right: none;
}

.dc-side-header {
  padding: 4px 8px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.9);
  color: #9ca3af;
  font-size: 0.78rem;
  background: rgba(15, 23, 42, 0.9);
  position: sticky;
  top: 0;
  z-index: 1;
}

.dc-line {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 6px;
  padding: 1px 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.dc-line-num {
  color: #6b7280;
  text-align: right;
}

/* Unified view */

.dc-output-unified {
  display: block;
}

/* Diff colors */

.dc-line-equal {
  background: transparent;
}

.dc-line-add {
  background: rgba(22, 101, 52, 0.4);
}

.dc-line-del {
  background: rgba(159, 18, 57, 0.45);
}

.dc-line-empty {
  color: rgba(75, 85, 99, 0.9);
}

/* Unified indicators */

.dc-prefix-add {
  color: #4ade80;
}

.dc-prefix-del {
  color: #fb7185;
}

/* Responsive */

@media (max-width: 900px) {
  .dc-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .dc-output {
    max-height: 360px;
  }
}

@media (max-width: 600px) {
  .ha-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
