/* Base styles */
body {
  font-family: monospace;
  background-color: #f8f9fa;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

/* Header Banner */
.site-banner {
  background: #002244; /* Darker, sophisticated blue */
  color: #fff;
  padding: 15px 0;
  text-align: center;
}

.site-banner .banner-text h2 {
  margin: 0;
  font-size: 28px;
}

.site-banner .banner-text p {
  margin: 5px 0 0;
  font-size: 16px;
}

/* Hide the placeholder by default */
.json-placeholder {
  display: none;
}

/* When collapsed, hide the content and show the placeholder */
.json-block.collapsed .json-content {
  display: none;
}

.json-block.collapsed .json-placeholder {
  display: block;
}

/* Container */
.container {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  transition: background 0.3s, box-shadow 0.3s;
}

body.dark-mode .container {
  background: #1e1e1e;
  box-shadow: 0 0 10px rgba(255,255,255,0.1);
}

/* Page Title */
h1 {
  text-align: center;
  color: #333;
}

body.dark-mode h1 {
  color: #e0e0e0;
}

/* Textarea */
textarea {
  width: 97%;
  height: 150px;
  font-family: monospace;
  font-size: 14px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: #fff;
  color: #000;
  transition: background 0.3s, color 0.3s;
}

body.dark-mode textarea {
  background: #2e2e2e;
  color: #e0e0e0;
  border: 1px solid #555;
}

/* Buttons */
.buttons {
  text-align: center;
  margin-bottom: 10px;
}

.buttons button {
  background: #007bff;
  color: white;
  border: none;
  padding: 10px 15px;
  margin: 5px;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s;
}

.buttons button:hover {
  background: #0056b3;
}

/* Options */
.options {
  text-align: center;
  margin-bottom: 10px;
  font-size: 14px;
}

label {
  margin-right: 15px;
  vertical-align: middle;
}

/* Error Message */
.error {
  color: red;
  margin-bottom: 10px;
}

body.dark-mode .error {
  color: #ff6b6b;
}

/* JSON Output */
.json-output {
  background: #eee;
  padding: 10px;
  border-radius: 5px;
  text-align: left;
  transition: background 0.3s, color 0.3s;
}

body.dark-mode .json-output {
  background: #2e2e2e;
  color: #e0e0e0;
}

/* JSON Lines & Blocks */
.json-line {
  white-space: pre;
  line-height: 1.5em;
}

.json-block {
  margin-left: 20px;
  border-left: 1px solid rgba(0,0,0,0.15);
  padding-left: 10px;
  transition: border-color 0.3s;
}

body.dark-mode .json-block {
  border-left: 1px solid rgba(255,255,255,0.15);
}

.json-content {
  display: block;
}

.json-placeholder {
  display: none;
  color: #666;
  font-style: italic;
}

body.dark-mode .json-placeholder {
  color: #999;
}

/* Ensure the opening and closing braces align by applying the same left margin */
.opening-brace {
  margin-left: 0px; /* Adjust this value to align with your design */
}

.closing-brace{
  margin-left:20px; /* Adjust this value to align with your design */
}

.line-comma {
  display: inline;
  margin-left: 0px; /* Adjust as needed for perfect alignment */
  font-weight: normal;
}

/* Special class for closing braces/brackets to align them at the left edge */
// .closing-brace {
//  margin-left: 0 !important;
// }

/* Logo (Header Banner) */
.logo {
  display: inline-block;
  text-align: left;  /* Allows individual control of each line */
  font-size: 28px;
  line-height: 1.2;
  margin: 0 auto;
}

.logo-container {
  display: flex;
  align-items: center; /* Ensures everything stays aligned */
  gap: 15px; /* Space between logo and text */
  flex-wrap: wrap; /* Ensures responsiveness */
}

.logo-line {
  display: flex;
  align-items: center;
  gap: 8px; /* Space between text and logo */
  margin-left: 20px;
}

.logo-text {
  font-size: 24px;
  font-weight: bold;
}

.logo-img {
  width: 25px;
  height: 25px;
  object-fit: contain;
}

.slogan {
  font-size: 16px;
  color: #fff; /* Optional: Adjust color for better readability */
  margin: 0;
  white-space: nowrap; /* Prevents breaking onto a new line */
}

.logo-line-2 {
  /* Adjust this margin to align the start of the second line with the 'y' of "{tidy" */
  margin-left: 80px; 
}

/* Toggle Button */
.toggle {
  cursor: pointer;
  user-select: none;
  font-weight: bold;
  color: #007bff;
  margin-right: 5px;
  transition: color 0.3s;
}

body.dark-mode .toggle {
  color: #66aaff;
}

/* Copy Button */
.copy-btn {
  cursor: pointer;
  color: #007bff;
  margin-left: 10px;
  font-size: 0.9em;
  border: 1px solid #007bff;
  border-radius: 3px;
  padding: 0 4px;
  user-select: none;
  transition: color 0.3s, border-color 0.3s;
}

body.dark-mode .copy-btn {
  color: #66aaff;
  border-color: #66aaff;
}

/* Syntax Highlighting */
.json-key {
  color: #007bff;
  transition: color 0.3s;
}

body.dark-mode .json-key {
  color: #66aaff;
}

.json-string {
  color: #28a745;
  transition: color 0.3s;
}

body.dark-mode .json-string {
  color: #7bd88f;
}

.json-number {
  color: #d9534f;
  transition: color 0.3s;
}

body.dark-mode .json-number {
  color: #ff7b7b;
}

.json-boolean {
  color: #e67e22;
  transition: color 0.3s;
}

body.dark-mode .json-boolean {
  color: #ffc107;
}

.json-null {
  color: #6c757d;
  transition: color 0.3s;
}

body.dark-mode .json-null {
  color: #b0b0b0;
}

.brace {
  /* Additional styling if desired */
}

/* Footer */
.site-footer {
  background: #f1f1f1;
  padding: 20px;
  text-align: center;
  margin-top: 20px;
}

body.dark-mode .site-footer {
  background: #1e1e1e;
  color: #e0e0e0;
}

.site-footer .donation h3 {
  margin: 0;
  font-size: 20px;
}

.site-footer .donation p {
  margin: 5px 0;
  font-size: 14px;
}

.site-footer form {
  margin-top: 10px;
}
