:root {
  --bg: #14181f;
  --card: #1d232d;
  --line: #2e3643;
  --text: #e8ecf1;
  --muted: #8b95a5;
  --green: #4caf50;
  --green-hover: #43a047;
  --amber: #f0b429;
  --red: #e5534b;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.card {
  width: 100%;
  max-width: 360px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
}

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

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  margin-bottom: 24px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.status--online   .dot { background: var(--green); }
.status--starting .dot { background: var(--amber); animation: pulse 1.2s infinite; }
.status--offline  .dot { background: var(--red); }
.status--online { color: var(--text); }

@keyframes pulse { 50% { opacity: .3; } }

form { display: flex; flex-direction: column; align-items: center; gap: 12px; }
label { color: var(--muted); font-size: .9rem; }

input {
  width: 9ch;
  font-size: 2rem;
  text-align: center;
  letter-spacing: .3em;
  padding: 8px 4px 8px 12px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--bg);
  color: var(--text);
}
input:focus { outline: none; border-color: var(--green); }

button {
  width: 100%;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
}
button:hover:not(:disabled) { background: var(--green-hover); }
button:disabled { background: var(--line); color: var(--muted); cursor: default; }

#msg { min-height: 1.5em; margin: 16px 0 0; }
#msg.ok { color: var(--green); }
#msg.error { color: var(--red); }
