:root {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --danger: #f87171;
  --border: #334155;
}

* {
  box-sizing: border-box;
}

html {
  /* Render native controls (number spinners, checkboxes, scrollbars) dark. */
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.card {
  width: 100%;
  max-width: 560px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.logo {
  display: block;
  margin: 0 auto 1.25rem;
  width: 200px;
  max-width: 70%;
  height: auto;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
  text-align: center;
}

.lede {
  color: var(--muted);
  line-height: 1.5;
  margin-top: 0;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

textarea,
input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0f172a;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}

textarea:focus,
input:focus,
select:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

.row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
}

.row label {
  margin: 0;
  white-space: nowrap;
}

.row select {
  width: auto;
  flex: 1;
}

button {
  width: 100%;
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

button:hover:not(:disabled) {
  background: var(--accent-hover);
}

button:disabled {
  opacity: 0.6;
  cursor: progress;
}

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

.link-row {
  display: flex;
  gap: 0.5rem;
}

.link-row input {
  flex: 1;
}

.link-row button {
  width: auto;
  margin-top: 0;
  white-space: nowrap;
}

.generator {
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  background: rgba(99, 102, 241, 0.06);
}

.generator summary {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  user-select: none;
}

.gen-controls {
  margin-top: 0.75rem;
}

.gen-controls .row {
  margin: 0.5rem 0;
}

.gen-controls input[type="number"] {
  width: 6rem;
  flex: none;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.75rem 0;
}

/* Pill-style checkboxes that match the card's inputs and accent color. */
.checks label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0f172a;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.checks label:hover {
  border-color: var(--accent);
}

.checks input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.gen-controls button {
  margin-top: 0.25rem;
}

.result {
  margin-top: 1.5rem;
}

.warning {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: 10px;
  padding: 0.75rem;
}

code {
  background: #0f172a;
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
  font-size: 0.85em;
}

.error {
  margin-top: 1rem;
  color: var(--danger);
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 10px;
  padding: 0.75rem;
}

.footer {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
}

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

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

.stat {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.stat strong {
  color: var(--text);
}

.copyright {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.hidden {
  display: none;
}
