:root {
  --bg: #0b0f17;
  --card: #121a26;
  --text: #e7eefc;
  --muted: #a8b3c7;
  --border: #243042;
  --accent: #5aa7ff;
  --danger: #ff5a72;
  --input: #0b121e;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
}

.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
}

.footer a {
  color: var(--muted);
  text-decoration: none;
  pointer-events: auto;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-spacer { flex: 1; }

.footer-version {
  margin-left: 10px;
  color: var(--muted);
  pointer-events: none;
}

.footer-button {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  pointer-events: auto;
}

.footer-button:hover {
  text-decoration: underline;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
}

.modal-panel {
  width: min(720px, 100%);
  max-height: min(78vh, 820px);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.modal-close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  border-color: rgba(90, 167, 255, 0.55);
}

.modal-body p {
  margin: 10px 0;
  color: var(--text);
}

.h3 {
  margin: 14px 0 6px;
  font-size: 14px;
}

.list {
  margin: 8px 0 12px 18px;
  padding: 0;
  color: var(--text);
}

.modal-body a {
  color: var(--accent);
  text-decoration: none;
}

.modal-body a:hover {
  text-decoration: underline;
}

.container {
  max-width: 860px;
  margin: 48px auto;
  padding: 0 16px;
}

.header h1 {
  margin: 0 0 8px 0;
  font-size: 36px;
}

.muted { color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  margin: 16px 0;
}

.error {
  border-color: rgba(255, 90, 114, 0.45);
  background: rgba(255, 90, 114, 0.08);
}

.hidden { display: none; }

.form { display: block; }
.label { display: block; margin: 10px 0 6px; font-weight: 600; }

.textarea, .input, .select {
  width: 100%;
  color: var(--text);
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}

.textarea { resize: vertical; min-height: 140px; }
.mono { font-family: var(--mono); }

.row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.field { flex: 1; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #07121f;
  font-weight: 700;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.button:disabled { opacity: 0.6; cursor: not-allowed; }

#createBtn {
  margin-top: 12px;
}

.h2 { margin: 0 0 10px 0; font-size: 18px; }

.note {
  margin: 0;
  padding: 12px;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 10px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--mono);
  line-height: 1.4;
}

.actions {
  margin-top: 12px;
}

@media (max-width: 700px) {
  .row { flex-direction: column; align-items: stretch; }
}
