:root {
  --bg: #0e1116;
  --bg-2: #161b22;
  --card: rgba(22, 27, 34, 0.9);
  --border: #2a313c;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #e57000;
  --accent-hover: #ff8412;
  --ok: #2ea043;
  --warn: #d29922;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, #1b2230 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  text-align: center;
}

/* --- Brand --- */
.brand {
  margin-bottom: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: rgba(229, 112, 0, 0.12);
  border: 1px solid rgba(229, 112, 0, 0.25);
  margin-bottom: 16px;
}

.brand__title {
  font-size: 1.15rem;
  font-weight: 650;
  margin: 0 0 4px;
  letter-spacing: 0.2px;
}

.brand__subtitle {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  word-break: break-all;
}

/* --- States --- */
.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 0 8px;
  min-height: 176px;
  justify-content: center;
}

.state[hidden] {
  display: none;
}

.state__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 10px 0 0;
}

.state__desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 34ch;
}

/* --- Spinner --- */
.spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}

.badge--ok {
  background: rgba(46, 160, 67, 0.15);
  border: 2px solid var(--ok);
  color: var(--ok);
}

.badge--warn {
  background: rgba(210, 153, 34, 0.15);
  border: 2px solid var(--warn);
  color: var(--warn);
}

/* --- Buttons / links --- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  margin-top: 14px;
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn--ghost:hover {
  border-color: var(--muted);
}

.link {
  display: inline-block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.85rem;
}

.link:hover {
  color: var(--text);
}

/* --- Footer --- */
.foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  min-height: 1.2em;
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2.4s;
  }
  .btn:active {
    transform: none;
  }
}
