.json-formatter-page {
  max-width: 800px;
  margin: auto;
  padding: 40px 20px;
  color: var(--text);
}

.json-formatter-page h1 {
  font-size: 28px;
  text-align: center;
  margin-bottom: 10px;
}

.json-formatter-page .description {
  text-align: center;
  font-size: 14px;
  color: #999;
  margin-bottom: 30px;
}

textarea {
  width: 100%;
  min-height: 180px;
  background: #181818;
  color: #eee;
  font-family: monospace;
  border: 1px solid #444;
  border-radius: 6px;
  padding: 12px;
  resize: vertical;
  margin-bottom: 20px;
  font-size: 14px;
}

.tool-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

button {
  padding: 10px 16px;
  font-size: 14px;
  background-color: #222;
  color: var(--text);
  border: 1px solid #444;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  color: var(--link);
  border-color: var(--link);
}

.live-toggle {
  margin: 15px 0 25px;
  display: flex;
  justify-content: center;
  font-size: 14px;
  color: #ccc;
}

.json-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 15px;
  background-color: #1a1a1a;
  padding: 20px;
  border-radius: 6px;
  border: 1px solid #333;
  font-size: 14px;
  color: #ccc;
  margin-top: 30px;
}

.json-info div {
  display: flex;
  justify-content: space-between;
}

.json-info strong {
  color: var(--link);
  font-weight: 600;
  margin-right: 6px;
}

.how-to-use {
  margin-top: 40px;
  background: #1c1c1c;
  border: 1px solid #333;
  border-radius: 6px;
  padding: 20px;
  color: var(--text);
}

.how-to-use h2 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--link);
}

.how-to-use ol {
  padding-left: 20px;
  line-height: 1.6;
  font-size: 14px;
}

.how-to-use li {
  margin-bottom: 6px;
}

.tree-viewer-container {
  margin-top: 40px;
  background: #1a1a1a;
  padding: 20px;
  border-radius: 6px;
  border: 1px solid #333;
  color: var(--text);
}

.tree-viewer-container h2 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--link);
}

.tree-viewer {
  font-family: monospace;
  font-size: 14px;
  line-height: 1.6;
  color: #eee;
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: scroll;
}

.tree-line {
  display: flex;
  align-items: center;
  padding: 2px 0;
}

.tree-toggle {
  width: 20px;
  display: inline-block;
  color: #888;
  user-select: none;
}

.key {
  color: #66f;
}

.type-string {
  color: #8f8;
}

.type-number {
  color: #fc8;
}

.type-boolean {
  color: #f88;
}

.type-null {
  color: #aaa;
}

.type-object,
.type-array {
  color: #ccc;
}

.tree-indent {
  margin-left: 16px;
  border-left: 1px dashed #444;
  padding-left: 8px;
}






.json-colored-output {
  background: #181818;
  color: #eee;
  padding: 16px;
  border: 1px solid #444;
  border-radius: 6px;
  font-family: monospace;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 14px;
  overflow-x: auto;
  max-height: 400px;
}

.json-colored-output .key {
  color: #66f;
}
.json-colored-output .string {
  color: #8f8;
}
.json-colored-output .number {
  color: #fc8;
}
.json-colored-output .boolean {
  color: #f88;
}
.json-colored-output .null {
  color: #aaa;
}
