:root {
  --bg: #0b0d10;
  --panel: #141820;
  --text: #e6e9ef;
  --muted: #7a8190;
  --green: #3ecf8e;
  --amber: #f5a524;
  --red: #ef4444;
  --border: #232834;
}

* { box-sizing: border-box; }

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

main {
  width: 100%;
  max-width: 480px;
  padding: 2rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 1rem;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

h1 { font-size: 1.25rem; margin: 0; }
h2 { font-size: 1rem; margin: 0 0 1rem; }
h3 { font-size: 0.9rem; margin: 1rem 0 0.5rem; }

.pill {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pill-idle { background: rgba(62, 207, 142, 0.15); color: var(--green); }
.pill-armed { background: rgba(245, 165, 36, 0.15); color: var(--amber); }
.pill-firing { background: rgba(239, 68, 68, 0.15); color: var(--red); }

.view { display: flex; flex-direction: column; gap: 1rem; }
.view.hidden, .hidden { display: none !important; }

button {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}
button:hover { background: rgba(255, 255, 255, 0.04); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

button.primary { background: #2563eb; border-color: #2563eb; color: white; }
button.primary:hover { background: #1d4ed8; }
button.danger { background: var(--red); border-color: var(--red); color: white; }
button.danger:hover { background: #dc2626; }
button.link { background: none; border: none; color: var(--muted); padding: 0; }
button.link:hover { color: var(--text); background: none; }

.countdown {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 3rem;
  font-weight: 700;
  text-align: center;
  padding: 1.5rem;
  background: var(--bg);
  border-radius: 8px;
  color: var(--amber);
  letter-spacing: 0.05em;
}

.muted { color: var(--muted); font-size: 0.875rem; margin: 0; }
.red { color: var(--red); }

.row { display: flex; gap: 0.5rem; }
.row > button { flex: 1; }

label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--muted);
}
input {
  padding: 0.6rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
}

.results {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.5rem;
  font-size: 0.85rem;
}
.result-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border-radius: 6px;
  border-left: 3px solid var(--border);
}
.result-pass { border-left-color: var(--green); }
.result-fail { border-left-color: var(--red); }
.result-warn { border-left-color: var(--amber); }
.result-detail { color: var(--muted); font-size: 0.75rem; }

footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
