:root {
  color-scheme: dark;
  --bg: #060b18;
  --panel: #101b33;
  --panel-soft: #0c1528;
  --text: #e8eeff;
  --muted: #9aaed2;
  --accent: #60a5fa;
  --danger: #f87171;
  --ok: #34d399;
  --border: #294268;
  --border-soft: #213653;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background:
    radial-gradient(1000px 460px at 50% -10%, rgba(96, 165, 250, .22), transparent 70%),
    radial-gradient(900px 500px at 100% 100%, rgba(167, 139, 250, .13), transparent 65%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.app {
  max-width: 1500px;
  margin: 24px auto;
  padding: 24px 16px 32px;
}

.app-header h1 {
  margin: 0;
  font-size: 1.8rem;
}

.app-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.app-header {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(16, 28, 52, .95), rgba(10, 18, 35, .98));
  padding: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .32);
}

button,
.file-label {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #22385d, #192947);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}

button:hover,
.file-label:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  background: linear-gradient(180deg, #294470, #1c3154);
}

#formatBtn,
#validateBtn {
  border-color: #1d4ed8;
}


.split-wrap {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: start;
}

.pane {
  min-width: 0;
}

.pane-header h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--muted);
}

.pane-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.compare-center {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  align-self: center;
}

#compareBtn {
  border-color: #2563eb;
}

#swapBtn {
  border-color: #0f766e;
}

#fileInput,
#fileLeftInput,
#fileRightInput {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.editor-container {
  min-height: 450px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: linear-gradient(170deg, var(--panel), var(--panel-soft));
  overflow: hidden;
}

#leftEditor,
#rightEditor {
  width: 100%;
  height: 450px;
  min-height: 450px;
}

.monaco-editor,
.monaco-editor .margin,
.monaco-editor .monaco-editor-background {
  background-color: var(--panel) !important;
}

.editor-error-line {
  background: rgba(220, 38, 38, 0.12);
}

.editor-compare-line-left {
  background: rgba(37, 99, 235, 0.14);
}

.editor-compare-line-right {
  background: rgba(15, 118, 110, 0.14);
}

.diff-wrap {
  margin-top: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: linear-gradient(170deg, #101b32, #0b1426);
  overflow: hidden;
}

.diff-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.diff-header p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.diff-result-container {
  min-height: 280px;
}

#diffEditor {
  width: 100%;
  height: 280px;
  min-height: 280px;
}

.monaco-editor .margin-view-overlays .editor-error-glyph-margin {
  border-left: 3px solid #dc2626;
}

.status-panel {
  margin-top: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(170deg, #101b32, #0b1426);
}

.status {
  margin: 0;
  font-weight: 600;
}

.status.ok {
  color: var(--ok);
}

.status.error {
  color: var(--danger);
}

.meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.tree-wrap {
  margin-top: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: linear-gradient(170deg, #101b32, #0b1426);
  overflow: hidden;
}

.tree-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.tree-header p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.tree-actions {
  display: flex;
  gap: 8px;
}

.tree-view {
  padding: 12px;
  max-height: 320px;
  overflow: auto;
  font-size: 0.95rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.tree-root,
.tree-root ul {
  margin: 0;
  padding-left: 18px;
  list-style: none;
}

.tree-root {
  padding-left: 0;
}

.tree-item {
  margin: 2px 0;
}

.tree-details > summary {
  cursor: pointer;
  color: var(--text);
}

.tree-key {
  color: #93c5fd;
}

.tree-type {
  color: var(--muted);
}

.tree-value-string {
  color: #f9a8d4;
}

.tree-value-number {
  color: #86efac;
}

.tree-value-boolean {
  color: #fcd34d;
}

.tree-value-null {
  color: #c4b5fd;
}

@media (max-width: 640px) {
  .app {
    padding-top: 16px;
  }

  .split-wrap {
    grid-template-columns: 1fr;
  }

  .compare-center {
    flex-direction: row;
    justify-content: flex-start;
  }

  #leftEditor,
  #rightEditor {
    min-height: 320px;
    height: 320px;
  }

  .editor-container {
    min-height: 320px;
  }

  .tree-header {
    flex-direction: column;
    align-items: flex-start;
  }

  #diffEditor {
    height: 240px;
    min-height: 240px;
  }

}

.seo-content{margin-top:14px;padding:12px;border:1px solid #334155;border-radius:10px;background:#0b1220}
.seo-content{margin-top:14px;padding:12px;border:1px solid var(--border-soft);border-radius:12px;background:linear-gradient(170deg,#101b32,#0b1426)}
.seo-content h2{margin:0 0 8px;font-size:1rem;color:#cbd5e1}
.seo-content p{margin:6px 0;color:var(--muted);line-height:1.6}

@import "../base64-tools/styles.css";
