/* ZERO HOUR — registration.
   Minecraft's own UI language, kept minimal: flat colour, square corners,
   hard 2px bevels, one accent (green = whitelisted). No gradients or glows.
   Layout: a single narrow column, generous vertical rhythm. */

:root {
  --bg:       #121212;
  --panel:    #1b1b1b;
  --panel-2:  #232323;
  --slot:     #0d0d0d;
  --line:     #303030;
  --line-2:   #3d3d3d;

  --text:     #e8e8e8;
  --muted:    #8d8d8d;
  --dim:      #666;

  --green:    #4ee44e;   /* Minecraft §a */
  --green-dk: #2f8f2f;
  --green-lo: #1d5c1d;
  --red:      #ff5555;   /* Minecraft §c */

  --bevel-hi: rgba(255,255,255,.22);
  --bevel-lo: rgba(0,0,0,.55);

  --pixel: 'Press Start 2P', 'Courier New', monospace;
  --body:  'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; image-rendering: pixelated; }
a { color: inherit; }

.wrap { max-width: 740px; margin: 0 auto; padding-inline: 20px; }

/* ---------------------------------------------------------------- header */
.nav { border-bottom: 2px solid var(--line); }
.nav-in {
  max-width: 740px; margin: 0 auto;
  padding-inline: 20px; padding-block: 18px;
  display: flex; align-items: center; gap: 10px 22px; flex-wrap: wrap;
}
.logo {
  font-family: var(--pixel); font-size: 13px; letter-spacing: 1px;
  text-decoration: none; color: var(--text); margin-right: auto;
}
.logo b { color: var(--green); font-weight: inherit; }
.nav a.link {
  font-size: 14px; color: var(--muted); text-decoration: none;
  padding-bottom: 2px; border-bottom: 2px solid transparent;
}
.nav a.link:hover { color: var(--text); }
.nav a.link[aria-current="page"] { color: var(--text); border-bottom-color: var(--green); }

/* ---------------------------------------------------------------- page head */
.head { padding-block: 52px 10px; }
.eyebrow {
  font-family: var(--pixel); font-size: 9px; letter-spacing: 1.4px;
  color: var(--green); margin: 0 0 16px;
}
.head h1 {
  font-family: var(--pixel);
  font-size: clamp(20px, 5.4vw, 32px);
  line-height: 1.35; margin: 0 0 18px; text-wrap: balance;
}
.head p.sub { color: var(--muted); margin: 0 0 24px; max-width: 58ch; }

/* countdown to the opening */
.cd {
  border: 2px solid var(--line); background: var(--panel);
  padding: 20px; margin-bottom: 26px;
}
.cd-label {
  font-family: var(--pixel); font-size: 9px; letter-spacing: 1.2px;
  color: var(--muted); margin-bottom: 14px;
}
.cd-clock { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cd-unit {
  border: 2px solid var(--line-2); background: var(--slot);
  padding: 10px 14px; min-width: 76px; text-align: center;
}
.cd-unit b {
  display: block; font-family: var(--pixel); font-size: 18px;
  color: var(--green); font-variant-numeric: tabular-nums; line-height: 1.4;
}
.cd-unit i { font-style: normal; font-size: 12px; color: var(--muted); }
.cd-when { font-size: 15px; color: var(--text); }
.cd.live { border-color: var(--green-lo); }
.cd.live .cd-label { color: var(--green); }

.meta {
  display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  font-size: 14px; color: var(--muted); line-height: 1;
  border-top: 2px solid var(--line); padding-top: 18px;
}
.meta .on { color: var(--text); }
.meta > * { display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; background: var(--green); flex: none; }
.dot.off { background: var(--red); }
/* same chip treatment as .tag, so bordered elements read as one family */
.addr {
  font-family: var(--pixel); font-size: 11px; color: var(--text);
  border: 2px solid var(--line-2); background: var(--slot);
  padding: 8px 10px; word-break: break-all; line-height: 1.2;
}

/* ---------------------------------------------------------------- buttons */
.btn {
  font-family: var(--pixel); font-size: 11px; letter-spacing: .5px;
  color: var(--text); text-decoration: none; cursor: pointer;
  background: var(--panel-2);
  border: 2px solid var(--line-2);
  box-shadow: inset 2px 2px 0 var(--bevel-hi), inset -2px -2px 0 var(--bevel-lo);
  border-radius: 0;
  padding: 13px 20px;
  display: inline-block; line-height: 1.4;
}
.btn:hover { background: #2c2c2c; }
.btn:active { box-shadow: inset -2px -2px 0 var(--bevel-hi), inset 2px 2px 0 var(--bevel-lo); }
.btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.btn-go {
  background: var(--green-dk); border-color: var(--green-lo); color: #fff;
}
.btn-go:hover { background: #359b35; }
.btn-bad { background: #8f2f2f; border-color: #5c1d1d; color: #fff; }
.btn-bad:hover { background: #a03636; }
.btn-sm { font-size: 9px; padding: 9px 13px; }

/* ---------------------------------------------------------------- blocks */
.section { padding-block: 40px; }
.section > h2, .panel h2 {
  font-family: var(--pixel); font-size: 13px; letter-spacing: .5px;
  margin: 0 0 10px; text-wrap: balance;
}
.hint { color: var(--muted); margin: 0 0 26px; }

.panel {
  background: var(--panel);
  border: 2px solid var(--line);
  padding: clamp(20px, 4vw, 30px);
}

/* ---------------------------------------------------------------- team row */
/* Fixed columns, so the slots and the status badge line up across every row.
   Letting these size to content made WHITELISTED (wide) and PENDING (narrow)
   shift the slots sideways from row to row. */
.team {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content 3.4em 8.4em;
  align-items: center;
  column-gap: 16px; row-gap: 12px;
  border: 2px solid var(--line);
  border-left: 4px solid var(--line-2);
  background: var(--panel);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.team.approved { border-left-color: var(--green); }
.team.justadded { animation: blink 1s steps(1) 3; }
@keyframes blink { 50% { border-color: var(--green); } }
@media (prefers-reduced-motion: reduce) { .team.justadded { animation: none; } }

.tname {
  font-family: var(--pixel); font-size: 11px; letter-spacing: .4px;
  min-width: 0; word-break: break-word; line-height: 1.5;
}
.team.approved .tname { color: var(--green); }

.slots { display: flex; gap: 4px; }
.slot {
  width: 44px; height: 44px; flex: none;
  background: var(--slot);
  border: 2px solid var(--line-2);
  box-shadow: inset 2px 2px 0 var(--bevel-lo), inset -2px -2px 0 var(--bevel-hi);
  display: grid; place-items: center; overflow: hidden; position: relative;
}
.slot img { width: 100%; height: 100%; display: block; }
.slot.empty { background: #141414; }
.slot.empty::after {
  content: ""; width: 14px; height: 2px; background: var(--line-2);
}
.slot[data-name]:hover::before {
  content: attr(data-name);
  position: absolute; inset-inline: 0; bottom: 0;
  background: rgba(0,0,0,.85); color: #fff; font-size: 8px;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.tag {
  font-family: var(--pixel); font-size: 8px; letter-spacing: .6px;
  padding: 7px 9px; white-space: nowrap; text-align: center;
  border: 2px solid var(--line-2); color: var(--muted);
  display: block;             /* fills its fixed grid column, so badges align */
}
.tag-ok { color: var(--green); border-color: var(--green-lo); }
.count {
  color: var(--dim); font-size: 13px; font-variant-numeric: tabular-nums;
  white-space: nowrap; text-align: right;
}

/* ---------------------------------------------------------------- stats */
.stats {
  display: flex; gap: 0; flex-wrap: wrap;
  border: 2px solid var(--line); margin-bottom: 26px;
}
.stat { flex: 1 1 110px; padding: 16px 18px; border-right: 2px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b {
  display: block; font-family: var(--pixel); font-size: 17px; line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
.stat span { color: var(--muted); font-size: 13px; }
.stat.on b { color: var(--green); }

/* ---------------------------------------------------------------- form */
.field { margin-bottom: 24px; }
label {
  display: block; font-family: var(--pixel); font-size: 9px;
  letter-spacing: .8px; color: var(--muted); margin-bottom: 10px;
}
input[type=text], input[type=email] {
  width: 100%; font-family: var(--body); font-size: 16px; color: var(--text);
  background: var(--slot); border: 2px solid var(--line-2); border-radius: 0;
  box-shadow: inset 2px 2px 0 var(--bevel-lo);
  padding: 12px 14px;
}
input::placeholder { color: #5a5a5a; }
input[type=text]:focus, input[type=email]:focus { outline: none; border-color: var(--green); }

/* one-time code: wide tracking so six digits read as six digits */
.code-input {
  font-family: var(--pixel); font-size: 20px; letter-spacing: 10px;
  text-align: center; padding: 16px 12px;
}

.who {
  font-size: 12px; color: var(--dim);
  max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.members { display: grid; gap: 10px; }
.member-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
/* :not(.slot) matters — the preview slot is a div too, and a bare
   `> div` rule overrides its flex:none and stretches it. */
.member-row > div:not(.slot) { flex: 1; min-width: 0; }
/* Every row reserves the same label line, so the slots stay in a straight
   column instead of the TEAM LEAD row sitting taller than the rest. */
.lead {
  font-family: var(--pixel); font-size: 8px; color: var(--green);
  margin-bottom: 6px; min-height: 11px; line-height: 11px;
}

.flash { border: 2px solid; padding: 13px 15px; margin-bottom: 22px; font-size: 15px; }
.flash-bad { border-color: #7a2a2a; background: #2a1414; color: #ffc9c2; }
.flash-ok  { border-color: var(--green-lo); background: #142414; color: #cdf5cd; }

.addr-box {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--slot); border: 2px solid var(--line-2); padding: 14px 16px;
}

.empty-state { text-align: center; padding: 40px 16px; color: var(--muted); }

/* ---------------------------------------------------------------- footer */
.foot {
  border-top: 2px solid var(--line);
  padding-block: 26px 34px; margin-top: 30px;
  color: var(--dim); font-size: 13px;
}
.foot-row { display: flex; gap: 10px 22px; flex-wrap: wrap; align-items: center; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }
.foot .sp { margin-left: auto; }

/* ---------------------------------------------------------------- guide */
table.spec { width: 100%; border-collapse: collapse; font-size: 15px; }
table.spec th, table.spec td {
  text-align: left; vertical-align: top;
  padding: 12px 14px; border: 2px solid var(--line);
}
table.spec th {
  font-family: var(--pixel); font-size: 8px; letter-spacing: .6px;
  color: var(--muted); width: 32%; background: var(--panel);
}
table.spec td { background: var(--panel); color: var(--text); }
table.spec tr:first-child th:empty { background: transparent; border-color: transparent; }

ul.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
ul.plain li {
  position: relative; padding-left: 20px; color: var(--text);
}
ul.plain li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 8px; height: 8px; background: var(--line-2);
}

code {
  font-family: var(--body); font-size: .95em;
  background: var(--slot); border: 2px solid var(--line);
  padding: 1px 6px; color: var(--text);
}
strong.ok  { color: var(--green); }
strong.bad { color: var(--red); }

/* ---------------------------------------------------------------- admin */
.scroll-x { overflow-x: auto; }
table.admin { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 580px; }
table.admin th, table.admin td { text-align: left; padding: 11px 9px; border-bottom: 2px solid var(--line); vertical-align: middle; }
table.admin th { font-family: var(--pixel); font-size: 8px; letter-spacing: .8px; color: var(--muted); }

@media (max-width: 680px) {
  /* name on its own line, slots below, count and badge on the last line.
     The badge column stays a fixed width: each row is its own grid, so
     max-content would size differently per row and unalign them again. */
  .team { grid-template-columns: 1fr 8.4em; }
  .tname { grid-column: 1 / -1; }
  .slots { grid-column: 1 / -1; flex-wrap: wrap; }
  .count { grid-column: 1; text-align: left; }
  .tag { grid-column: 2; }
}
@media (max-width: 560px) {
  .stat { border-right: 0; border-bottom: 2px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
}
