@font-face {
  font-family: "JetBrains Mono Nerd";
  src: url("https://cdn.jsdelivr.net/gh/Nick2bad4u/nerd-fonts-woff2@v1.0.0/fonts/woff2/JetBrainsMono/JetBrainsMonoNerdFont-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono Nerd";
  src: url("https://cdn.jsdelivr.net/gh/Nick2bad4u/nerd-fonts-woff2@v1.0.0/fonts/woff2/JetBrainsMono/JetBrainsMonoNerdFont-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "JetBrains Mono Nerd", "JetBrainsMono Nerd Font", "JetBrainsMono NF", "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --bg:            #000000;
  --surface:       #0a0a0a;
  --surface-2:     #131313;
  --border:        #1d1d1d;
  --border-strong: #2c2c2c;

  --text:    #dcdcdc;
  --text-2:  #9a9a9a;
  --muted:   #6a6a6a;

  --accent:      #ededed;
  --accent-dim:  #cfcfcf;

  --radius:    14px;
  --radius-sm: 11px;
  --radius-pill: 999px;
  --ring: 0 0 0 3px rgba(255, 255, 255, .14);

  --maxw: min(92vw, 980px);
  --speed: .16s;
  --bg-image: url("bg.png");
}

*, *::before, *::after { box-sizing: border-box; }

.side-image {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 20vw;
  height: 45vh;
  background-image: var(--bg-image);
  background-size: contain;
  background-position: bottom left;
  background-repeat: no-repeat;
  opacity: .18;
  pointer-events: none;
  z-index: -1;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#dust {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: -1;
}

h1, h2, p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
::selection { background: rgba(255, 255, 255, .18); }

code {
  font-family: var(--font);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: .1em .45em;
  border-radius: 6px;
  font-size: .85em;
  color: var(--text-2);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
}

.brand__title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text);
}

.brand__by {
  font-size: .75rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: .02em;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  animation: fade .35s ease both;
}

.panel__header {
  margin-bottom: 24px;
}

.panel__header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.panel__header p {
  font-size: .9rem;
  color: var(--text-2);
}

form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.field input,
.field textarea {
  font-family: var(--font);
  font-size: .95rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  outline: none;
  transition: border-color var(--speed), box-shadow var(--speed), background var(--speed);
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder { color: var(--muted); }

.field input:focus,
.field textarea:focus {
  border-color: var(--border-strong);
  background: #0d0d0d;
  box-shadow: var(--ring);
}

.field__hint {
  font-size: .78rem;
  color: var(--muted);
  font-weight: 500;
}

.output-panel {
  margin-top: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
  animation: fade .3s ease both;
}

.output-panel[hidden] {
  display: none;
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: color var(--speed), background var(--speed), border-color var(--speed);
}

.copy-btn:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: #444;
}

.copy-btn svg {
  width: 14px;
  height: 14px;
}

.code-block {
  position: relative;
  margin: 0;
  padding: 22px;
  min-height: 200px;
  font-family: var(--font);
  font-size: .88rem;
  line-height: 1.6;
  color: var(--text);
  background: transparent;
  white-space: pre;
  overflow: auto;
}

.code-block code {
  display: block;
  font-family: inherit;
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
}

.footer {
  max-width: var(--maxw);
  margin: 24px auto 0;
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .82rem;
  border-top: 1px solid var(--border);
}

.footer__hint { color: var(--text-2); }

.footer__legal {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 16px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: color var(--speed), background var(--speed), border-color var(--speed);
}

.footer__legal:hover {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border-strong);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  background: var(--accent);
  color: #000;
  font-size: .85rem;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 100;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.toast.error {
  background: var(--surface-2);
  color: #ff8080;
  border: 1px solid var(--border-strong);
}

@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media (max-width: 520px) {
  .panel { padding: 22px; }
  .topbar__inner { flex-direction: column; align-items: center; gap: 2px; }
  .brand__by { margin-left: 0; }
}
