:root {
  --bg: #0f1419;
  --card: #1a2230;
  --text: #e6edf3;
  --muted: #8b98a9;
  --green: #3fb950;
  --amber: #d29922;
  --grey: #6e7681;
  --red: #f85149;
  --accent: #2f81f7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: 1rem;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid #2a3441;
  border-radius: 14px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

h1 {
  margin: 0 0 1.5rem;
  font-size: 1.4rem;
  font-weight: 600;
}

.status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: none;
}
.dot.off { background: var(--grey); }
.dot.on { background: var(--green); box-shadow: 0 0 10px var(--green); }
.dot.starting,
.dot.stopping { background: var(--amber); box-shadow: 0 0 10px var(--amber); }

.players {
  color: var(--muted);
  margin: 0.25rem 0;
}

.detail {
  color: var(--red);
  font-size: 0.85rem;
  min-height: 1rem;
  margin: 0.25rem 0 1rem;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn {
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  color: #fff;
  background: var(--accent);
  transition: opacity 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-on { background: var(--green); }
.btn-off { background: var(--red); }
.btn-link {
  background: none;
  color: var(--muted);
  font-weight: 500;
  padding: 0.4rem;
}

.login {
  margin-top: 1rem;
  text-align: left;
}
.login label {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.login-row {
  display: flex;
  gap: 0.5rem;
}
.login input {
  flex: 1;
  padding: 0.7rem;
  border-radius: 10px;
  border: 1px solid #2a3441;
  background: #0f1622;
  color: var(--text);
  font-size: 1rem;
}
.login input:focus {
  outline: none;
  border-color: var(--accent);
}

.message {
  min-height: 1.2rem;
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.message.error { color: var(--red); }

.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hidden { display: none !important; }
