/* Assassins — hand-written, mobile-first, no build step. */

:root {
  --bg: #0f1115;
  --surface: #171a21;
  --surface-2: #1f232c;
  --border: #2a2f3a;
  --text: #eef0f4;
  --text-muted: #9aa1af;
  --accent: #e14b4b;
  --accent-hover: #c73f3f;
  --success: #3fae6a;
  --success-bg: #16281f;
  --error: #e14b4b;
  --error-bg: #2a1717;
  --warn-bg: #2a2311;
  --radius: 10px;
  --max-width: 600px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 72px; /* leaves room for the bottom nav */
}

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

a:hover {
  text-decoration: underline;
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 0.75rem;
}

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

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
}

.empty {
  color: var(--text-muted);
  font-style: italic;
}

.error {
  color: var(--error);
  font-weight: 600;
}

.error-list {
  color: var(--error);
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
}

/* Layout */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
}

.footer-link {
  text-align: center;
  margin-top: 1rem;
}

/* Flash messages */

.flash {
  max-width: var(--max-width);
  margin: 0.75rem auto 0;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.flash-success {
  background: var(--success-bg);
  color: var(--success);
}

.flash-error {
  background: var(--error-bg);
  color: var(--error);
}

/* Cards */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  margin-bottom: 1rem;
}

.target-card {
  text-align: center;
}

.target-card h1 {
  font-size: 2rem;
  margin: 0.25rem 0 0.75rem;
}

.notes {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.card.winner {
  text-align: center;
  border-color: var(--success);
}

.card.eliminated {
  border-color: var(--error);
}

.code-card {
  text-align: center;
}

.code-card.warn {
  border-color: var(--accent);
  background: var(--warn-bg);
}

.code-display {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 2rem;
  letter-spacing: 0.15em;
  margin: 0;
}

/* Stats */

.stat-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Forms */

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

input[type="text"],
input[type="password"],
select,
textarea {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 0.6rem 0.7rem;
  font-size: 1rem;
  font-family: inherit;
}

textarea {
  resize: vertical;
}

.code-input {
  text-align: center;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 1.4rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.code-input.big {
  font-size: 1.8rem;
  padding: 1rem;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.btn-primary,
button[type="submit"] {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.btn-primary:hover,
button[type="submit"]:hover {
  background: var(--accent-hover);
}

.btn-primary.big {
  display: block;
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  text-align: center;
}

.btn-danger {
  background: var(--error);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-weight: 600;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  padding: 0;
  font-size: 0.85rem;
}

.link-btn:hover {
  text-decoration: underline;
}

.link-btn.danger {
  color: var(--error);
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.15rem 0;
}

.inline-form input[type="text"],
.inline-form select {
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
}

.row-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
}

/* Tables */

table.board,
table.print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table.board th,
table.board td,
table.print-table th,
table.print-table td {
  text-align: left;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--border);
}

.dead-row {
  color: var(--text-muted);
}

.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  letter-spacing: 0.08em;
}

/* Feed / ring lists */

.feed-list,
.ring-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feed-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.ring-list {
  list-style: decimal;
  padding-left: 1.25rem;
}

.ring-list li {
  padding: 0.25rem 0;
}

.prose {
  white-space: pre-wrap;
}

/* Bottom nav */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 0.5rem 0;
}

.bottom-nav a {
  flex: 1;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.4rem 0;
}

.bottom-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

/* Admin nav */

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
}

.admin-nav a {
  color: var(--text-muted);
}

.admin-nav a:hover {
  color: var(--text);
}

/* Print (codes sheet) */

@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    padding-bottom: 0;
  }

  .content {
    max-width: none;
    padding: 0;
  }

  table.print-table {
    font-size: 12pt;
  }

  table.print-table th,
  table.print-table td {
    border-bottom: 1px solid #000;
    color: #000;
  }

  table.print-table tr {
    page-break-inside: avoid;
  }
}

@media (min-width: 700px) {
  .content {
    padding: 2rem 1rem;
  }
}
