*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: ui-monospace, "Cascadia Code", "Fira Code", monospace;
  background: #0f0f0f;
  color: #e4e4e4;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.app {
  width: 100%;
  max-width: 580px;
}
h1 {
  font-size: 1.25rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 0.35rem;
}
p.sub {
  font-size: 0.8rem;
  color: #555;
  margin-bottom: 2rem;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 1.5rem;
}
.tab {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1px solid #333;
  cursor: pointer;
  background: transparent;
  color: #666;
  font-family: inherit;
}
.tab.active {
  border-color: #555;
  color: #fff;
}

.panel {
  background: #181818;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}
label {
  display: block;
  font-size: 0.7rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.option-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.small-input {
  width: 90px;
  min-width: 70px;
  max-width: 120px;
  padding-right: 10px;
}
.inline-label {
  display: inline;
  margin-right: 8px;
  margin-bottom: 0;
  font-size: 0.75rem;
  color: #888;
  text-transform: none;
  letter-spacing: normal;
}
textarea,
input[type="text"],
input[type="number"],
select {
  width: 100%;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 9px 11px;
  font-family: inherit;
  font-size: 0.85rem;
  color: #e4e4e4;
  outline: none;
  resize: vertical;
}
textarea {
  min-height: 100px;
}
textarea:focus,
input:focus,
select:focus {
  border-color: #444;
}

.row {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.options-row {
  align-items: flex-end;
  gap: 16px;
}
button {
  border: 1px solid #333;
  border-radius: 6px;
  padding: 7px 15px;
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  background: #1e1e1e;
  color: #ccc;
}
button.primary {
  background: #fff;
  color: #000;
  border-color: transparent;
}
button:hover {
  opacity: 0.8;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}

.link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 8px 11px;
  margin-top: 10px;
}
.link-text {
  font-size: 0.75rem;
  color: #6ab0f5;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.result {
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.7;
  white-space: pre-wrap;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 10px 12px;
}
.note {
  font-size: 0.75rem;
  color: #555;
  margin-top: 8px;
}
.ok {
  color: #86efac;
}
.err {
  color: #f87171;
}
