:root {
  --bg:      #0f1216;
  --panel:   #171b21;
  --line:    #262c34;
  --ink:     #e7ebef;
  --muted:   #8a94a0;
  --accent:  #e07a3f;   /* gunpost-ish ember */
  --err:     #e0584f;
  --ok:      #46b681;
  --radius:  10px;
  --mono:    ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans:    system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -10%, #1b2230, transparent),
    var(--bg);
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  display: flex;
  justify-content: center;
}

.wrap {
  width: 100%;
  max-width: 540px;
  padding: 32px 20px 48px;
}

.head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.head h1 { font-size: 1.15rem; margin: 0; font-weight: 650; flex: 1; }
.logout { color: var(--muted); font-size: .85rem; text-decoration: none; }
.logout:hover { color: var(--ink); }

.dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(224,122,63,.15);
  flex: none;
}
.dot.dead { background: var(--err); box-shadow: 0 0 0 4px rgba(224,88,79,.15); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card.center { text-align: center; align-items: center; }
.card h1 { margin: 4px 0 0; font-size: 1.3rem; }
.card p  { margin: 0; color: var(--muted); }

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .9rem;
  color: var(--muted);
  text-align: left;
  width: 100%;
}

input[type=text], input[type=password], input[type=file] {
  width: 100%;
  padding: 11px 12px;
  background: #0f1318;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
legend { color: var(--ink); font-size: .82rem; padding: 0 6px; letter-spacing: .02em; }

button {
  padding: 11px 16px;
  background: var(--accent);
  color: #1a1206;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
button:hover { filter: brightness(1.06); }

.ghost {
  text-align: center;
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  padding-top: 4px;
}
.ghost:hover { color: var(--ink); }

.hint { font-size: .82rem; color: var(--muted); }
.hint.center { text-align: center; }
code { font-family: var(--mono); background: #0f1318; padding: 1px 5px; border-radius: 4px; }

.msg { padding: 10px 12px; border-radius: 8px; font-size: .9rem; width: 100%; text-align: left; }
.msg.err { background: rgba(224,88,79,.12); color: #f1a39d; border: 1px solid rgba(224,88,79,.3); }
.msg.ok  { background: rgba(70,182,129,.12); color: #8fe0b8; border: 1px solid rgba(70,182,129,.3); }

/* ---- reveal stage ---- */
.stage {
  position: relative;
  display: inline-block;
  max-width: 100%;
  user-select: none;
  -webkit-user-select: none;
  border-radius: 8px;
  overflow: hidden;
}
.stage img {
  display: block;
  max-width: 100%;
  height: auto;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;   /* blocks long-press save menu on mobile */
}
.shield {
  position: absolute;
  inset: 0;               /* transparent layer over the image */
}
.counter {
  font-family: var(--mono);
  font-size: 1.4rem;
  color: var(--accent);
  margin: 14px 0 0;
  min-height: 1.4em;
}
.expired {
  padding: 60px 24px;
  color: var(--muted);
  font-size: 1.05rem;
}

.foot {
  margin-top: 26px;
  font-size: .8rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.foot strong { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---- status board ---- */
.board-title { font-size: .95rem; margin: 0 0 4px; color: var(--ink); }
.status-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line);
  font-size: .9rem;
}
.status-row:last-child { border-bottom: none; }
.lbl { color: var(--muted); }
.val { color: var(--ink); font-family: var(--mono); font-size: .85rem; }
.val.good { color: var(--ok); }
.badge {
  font-size: .72rem; font-weight: 650; letter-spacing: .03em;
  padding: 3px 9px; border-radius: 999px; text-transform: uppercase;
}
.badge.ok   { background: rgba(70,182,129,.16);  color: #8fe0b8; }
.badge.wait { background: rgba(224,122,63,.16);   color: #f0b487; }
.badge.dead { background: rgba(224,88,79,.16);    color: #f1a39d; }
.recent { width: 100%; border-collapse: collapse; font-size: .88rem; }
.recent td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.recent tr:last-child td { border-bottom: none; }
.recent td:nth-child(2) { text-align: center; }
.recent td:last-child { text-align: right; }
