:root {
  --bg: #0e0f12;
  --panel: #16181d;
  --border: #272a31;
  --text: #e7e9ee;
  --muted: #8a8f9a;
  --accent: #6c8cff;
  --error: #ff6b6b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  display: flex;
  justify-content: center;
  padding: 48px 20px;
}

main {
  width: 100%;
  max-width: 560px;
}

h1 {
  margin: 0 0 4px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.paste-zone {
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  background: var(--panel);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: text;
  padding: 16px;
  outline: none;
  transition: border-color 0.15s ease;
}

.paste-zone:focus { border-color: var(--accent); }

.hint {
  color: var(--muted);
  font-size: 14px;
}

#preview {
  display: none;
  max-width: 100%;
  max-height: 360px;
  border-radius: 8px;
}

.controls {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}

select {
  flex: 1;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.status {
  font-size: 13px;
  color: var(--muted);
  min-height: 18px;
  margin-bottom: 12px;
}

.status.error { color: var(--error); }

.output-wrap {
  position: relative;
}

textarea {
  width: 100%;
  min-height: 160px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  font-family: ui-monospace, monospace;
}

#copy {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 12px;
  font-size: 12px;
  background: var(--border);
}
