/* The login page: style.css's palette (the iOS app's dark one), on its own. */
:root {
  color-scheme: dark;
  --canvas: #0E1320;
  --surface: #182033;
  --slot: #2E3A52;
  --ink: #E8ECF4;
  --ink-muted: #98A3B8;
  --accent: #5F82F5;
  --warning: #F0A06A;
  --discord: #5865F2;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--canvas); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  background: var(--canvas);
  color: var(--ink);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.card { width: 100%; max-width: 340px; display: grid; justify-items: center; gap: 14px; text-align: center; }
.mark { border-radius: 18px; }
h1 { margin: 6px 0 12px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.glyph { width: 20px; height: 20px; flex: none; display: block; }

.choose { width: 100%; display: grid; gap: 10px; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn.alt { background: var(--surface); color: var(--ink); }
.btn.provider-discord { background: var(--discord); }
.btn.small { height: 38px; padding: 0 16px; font-size: 15px; }
.btn.small .glyph { width: 16px; height: 16px; }
.btn:hover { filter: brightness(1.1); }
.btn:disabled { opacity: 0.6; cursor: progress; }
body:not([data-providers~="plex"]) .provider-plex,
body:not([data-providers~="discord"]) .provider-discord { display: none; }

.waiting { display: grid; justify-items: center; gap: 14px; color: var(--ink-muted); font-weight: 600; }
.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid var(--slot);
  border-top-color: var(--ink);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--warning); font-weight: 600; }
.members { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; color: var(--ink-muted); font-size: 14px; }
.members .glyph { width: 16px; height: 16px; }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
}
