* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #e4e4e7;
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

.back {
  display: inline-block;
  color: #818cf8;
  text-decoration: none;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.back:hover {
  text-decoration: underline;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.subtitle {
  color: #a1a1aa;
  font-size: 1rem;
}

main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.input-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #d4d4d8;
}

textarea {
  width: 100%;
  padding: 1rem;
  font-size: 0.9rem;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #fff;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
}

.button-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.primary-btn, .secondary-btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.primary-btn {
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  color: #fff;
  flex: 1;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #d4d4d8;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.primary-btn:hover, .secondary-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:hover {
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.status {
  padding: 0.875rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
}

.status.hidden {
  display: none;
}

.status.success {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status.error {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.output-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.stats {
  font-size: 0.8rem;
  color: #71717a;
}

.output {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 1rem;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 0.85rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 100px;
  max-height: 400px;
  overflow-y: auto;
  color: #d4d4d8;
}

.output .string { color: #a5d6ff; }
.output .number { color: #79c0ff; }
.output .boolean { color: #ff7b72; }
.output .null { color: #8b949e; }
.output .key { color: #7ee787; }

footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #71717a;
  font-size: 0.875rem;
}

footer a {
  color: #818cf8;
  text-decoration: none;
}

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