@font-face {
  font-family: 'Minecraftia';
  src: url('/fonts/Minecraftia-Regular.ttf') format('truetype');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #0b0b0c;
  --blue: #18a0f0;
  --blue-dark: #0e73b0;
  --paper: #f5f7f9;
  --dot: #e7ecf0;
  --line: #cdd5dc;
  --muted: #787878;
  --placeholder: #9aa5b1;
  --red: #e03b36;
  --green: #2fae4a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
}

input, textarea, select, button {
  font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
}
textarea { resize: vertical; }
::placeholder { color: var(--placeholder); }

.page {
  min-height: 100vh;
  background: var(--paper);
  background-image: radial-gradient(var(--dot) 1.4px, transparent 1.4px);
  background-size: 22px 22px;
  padding: 32px 20px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Masthead */
.masthead {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 28px;
}
.logo {
  width: 56px;
  height: 56px;
  image-rendering: pixelated;
  filter: drop-shadow(3px 3px 0 var(--ink));
}
.wordmark {
  font-family: 'Minecraftia', monospace;
  font-size: 22px;
  color: var(--blue);
  -webkit-text-stroke: 1.5px var(--ink);
  paint-order: stroke fill;
  letter-spacing: 0.02em;
  line-height: 1;
}
.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-dark);
  margin-top: 6px;
}

/* Cards */
.card {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 6px;
  box-shadow: 6px 6px 0 var(--ink);
}
.form-card { overflow: hidden; }

.form-head {
  padding: 20px 28px;
  border-bottom: 3px solid var(--ink);
  background: #0e1116;
}
.form-head h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: #fff;
  letter-spacing: -0.01em;
}
.form-head p {
  font-size: 14px;
  margin: 6px 0 0;
  color: var(--placeholder);
  line-height: 1.5;
}

.form-body { padding: 28px; }

.label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-dark);
  margin: 0 0 8px;
}

/* Type chips */
.chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  border-radius: 6px;
  border: 3px solid var(--line);
  background: #fff;
  color: #565c63;
  transition: all 120ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chip:hover { border-color: #a9b4bd; }
.chip.is-active {
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transform: translate(-1px, -1px);
}
.chip[data-type='bug'].is-active { background: #fdeceb; color: var(--red); }
.chip[data-type='feature'].is-active { background: #e9f7ec; color: var(--green); }
.chip[data-type='question'].is-active { background: #e3f3fe; color: var(--blue); }

/* Inputs */
input[type='text'],
textarea,
select {
  width: 100%;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #e3f3fe;
}
textarea { line-height: 1.55; }

.select-wrap { position: relative; margin-bottom: 22px; }
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
}
.chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

#title, #name { margin-bottom: 6px; }
#desc { margin-bottom: 22px; }

.field-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 22px;
  min-height: 16px;
}
.field-meta.single { justify-content: flex-start; margin-bottom: 24px; }
.count { font-size: 13px; color: var(--placeholder); }
.err { font-size: 13px; color: var(--red); font-weight: 600; }
.form-err { margin: 12px 0 0; text-align: center; }

/* Labels preview */
.labels-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--dot);
  border-radius: 6px;
  margin-bottom: 24px;
}
.labels-preview .muted { font-size: 13px; color: var(--muted); font-weight: 600; }
#labels { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  padding: 3px 12px;
  border: 1px solid;
}

/* Buttons */
.btn {
  cursor: pointer;
  font-weight: 700;
  border: 3px solid var(--ink);
  border-radius: 6px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 120ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 120ms, background 120ms;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn:disabled { opacity: 0.55; cursor: progress; transform: none; box-shadow: 4px 4px 0 var(--ink); }

.btn-submit {
  width: 100%;
  font-size: 18px;
  color: #fff;
  background: var(--blue);
  padding: 15px;
  letter-spacing: 0.01em;
}
.btn-submit:hover { background: #20a8f8; }

.btn-reset {
  font-size: 16px;
  color: var(--ink);
  background: var(--blue);
  padding: 12px 24px;
}

/* Success card */
.done-card {
  padding: 40px 32px;
  text-align: center;
  animation: bbpop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.done-check {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: var(--green);
  border: 3px solid var(--ink);
  border-radius: 6px;
  box-shadow: 4px 4px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bbfloat 3s ease-in-out infinite;
}
.done-title { font-size: 30px; font-weight: 700; margin: 0 0 10px; letter-spacing: -0.01em; }
.done-msg { font-size: 17px; line-height: 1.55; color: #3d4248; margin: 0 auto 8px; max-width: 380px; }
.done-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 28px;
  padding: 8px 14px;
  background: var(--paper);
  border: 1px solid var(--dot);
  border-radius: 6px;
  font-size: 15px;
  color: #3d4248;
}
.done-chip .muted { color: var(--muted); }
.done-chip code {
  font-family: ui-monospace, Menlo, monospace;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 3px 8px;
  color: var(--ink);
  font-weight: 600;
}
.done-chip code a { color: inherit; text-decoration: none; }
.done-chip code a:hover { color: var(--blue); }

.foot {
  font-size: 13px;
  color: var(--placeholder);
  margin: 22px 0 0;
  text-align: center;
  max-width: 460px;
  line-height: 1.5;
}

@keyframes bbpop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes bbfloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
