:root {
  --zt-bg: #eef1f6;
  --zt-surface: #ffffff;
  --zt-surface-muted: #f7f8fa;
  --zt-border: #e1e5eb;
  --zt-text: #1c2433;
  --zt-text-muted: #5c6578;
  --zt-accent: #22c55e;
  --zt-accent-hover: #16a34a;
  --zt-focus-ring: rgba(34, 197, 94, 0.28);
  --zt-radius: 8px;
  --zt-radius-sm: 6px;
  --zt-shadow: 0 1px 3px rgba(28, 36, 51, 0.06);
}

* {
  box-sizing: border-box;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Monaco", "Consolas", monospace, sans-serif;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  min-height: 100%;
  overflow: hidden;
  background: var(--zt-bg);
  color: var(--zt-text);
  -webkit-font-smoothing: antialiased;
}

.ztools-format-outer {
  width: 100%;
  min-height: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.ztools-page-header {
  background: linear-gradient(180deg, #ffffff 0%, #f0f2f7 100%);
  color: var(--zt-text);
  height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e6ef;
  flex: none;
}

.ztools-page-header__title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 0 20px;
  color: var(--zt-text);
}

.ztools-page-header__actions {
  margin-right: 20px;
}

.zbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #4ade80 0%, var(--zt-accent) 100%);
  padding: 8px 18px;
  color: #fff;
  border-radius: var(--zt-radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: none;
  box-shadow: var(--zt-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease, filter 0.15s ease;
}

.zbtn:hover {
  background: linear-gradient(180deg, #86efac 0%, #16a34a 100%);
  filter: brightness(1.02);
}

.zbtn:active {
  background: #15803d;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.12);
  transform: translateY(1px);
}

.zbtn:focus-visible {
  outline: none;
  box-shadow: var(--zt-shadow), 0 0 0 3px var(--zt-focus-ring);
}

.content_outer {
  width: 100%;
  height: 0;
  flex: 1;
  display: flex;
  min-height: 0;
}

.left {
  width: 30%;
  min-width: 240px;
  flex: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--zt-border);
  background: var(--zt-surface-muted);
  padding: 10px 10px 10px 12px;
}

.right {
  display: flex;
  flex-direction: column;
  width: 0;
  flex: auto;
  min-height: 0;
  background: var(--zt-bg);
}

.panel_title {
  font-size: 12px;
  font-weight: 600;
  color: var(--zt-text-muted);
  letter-spacing: 0.04em;
}

.top_input {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 2px;
}

#RawJson {
  width: 100%;
  flex: auto;
  min-height: 0;
  border: 1px solid var(--zt-border);
  border-radius: var(--zt-radius);
  outline: none;
  resize: none;
  padding: 12px;
  background: var(--zt-surface);
  color: var(--zt-text);
  font-size: 12px;
  line-height: 1.5;
  box-shadow: inset 0 1px 2px rgba(28, 36, 51, 0.04);
}

#RawJson:focus {
  border-color: var(--zt-accent);
  box-shadow: inset 0 1px 2px rgba(28, 36, 51, 0.04), 0 0 0 3px var(--zt-focus-ring);
}

.ControlsRow {
  min-height: 42px;
  line-height: 1.4;
  flex: none;
  background: var(--zt-surface);
  border-bottom: 1px solid var(--zt-border);
  display: flex;
  align-items: center;
  padding: 4px 0 4px 12px;
}

.right_content {
  height: 0;
  flex: auto;
  background-color: var(--zt-surface);
  overflow: auto;
}

div.Canvas {
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.45;
  color: var(--zt-text);
}

.right_content pre {
  margin: 0;
  padding: 12px 14px 16px;
}

pre.prettyprint {
  border: none !important;
  background: transparent !important;
}

.right_content code {
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--zt-text);
}

@media (max-width: 900px) {
  .json_format {
    flex-direction: column;
  }

  .left {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid var(--zt-border);
    min-height: 40%;
  }

  .right {
    width: 100%;
    min-height: 0;
  }
}