:root {
  --bg: #0d1117;
  --panel: #161b22;
  --panel-2: #1c232b;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #f78166;
  --accent-2: #58a6ff;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

.app {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

header h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  margin-left: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #0d1117;
  vertical-align: middle;
}
.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 32px;
}
.subtitle code {
  background: var(--panel-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

textarea, input, button {
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}
textarea {
  resize: vertical;
  min-height: 60px;
}
textarea:focus, input:focus {
  border-color: var(--accent-2);
}

.controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

button {
  background: var(--accent);
  color: #0d1117;
  border: 0;
  font-weight: 600;
  cursor: pointer;
  padding: 12px 16px;
  transition: opacity 0.15s ease;
}
button:hover:not(:disabled) { opacity: 0.9; }
button:disabled {
  background: var(--panel-2);
  color: var(--muted);
  cursor: not-allowed;
}

#output {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 200px;
  margin: 0;
  color: var(--text);
}

.status {
  font-size: 12.5px;
  color: var(--muted);
}
.perf {
  font-size: 12px;
  color: var(--accent-2);
  font-family: ui-monospace, monospace;
}

footer {
  margin-top: 32px;
  font-size: 12.5px;
  color: var(--muted);
}
footer a { color: var(--accent-2); text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer p { margin: 6px 0; }
