/* Same dark palette as the main app (web/css/style.css's :root) — this is
   the public face of the same product, so it should look like it. Always
   dark: unlike the main app this has no per-user theme preference to
   respect, and dark is what "look like Neasy PC" means here. */
:root {
  color-scheme: dark;
  --bg: #100e17;
  --bg-gradient-inner: #241f33;
  --panel: #1a1723;
  --panel-2: #221e2d;
  --border: #2c2836;
  --text: #f4f1fa;
  --muted: #948da3;
  --accent: #ff5d73;
  --accent-2: #6a5cff;
  --ok: #4fd68a;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 50% -10%, var(--bg-gradient-inner), var(--bg) 60%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding: 40px 20px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.material-icon { font-family: 'Material Symbols Outlined'; font-variation-settings: 'FILL' 0; font-size: 1.1em; vertical-align: middle; }

.topbar { display: flex; align-items: center; gap: 14px; margin-bottom: 36px; }
.logo { width: 56px; height: 56px; border-radius: 16px; object-fit: cover; flex-shrink: 0; }
.topbar h1 { margin: 0; font-size: 24px; letter-spacing: -0.01em; }
.tagline { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }

.cards {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}
.loading, .empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 40px 0;
}

/* One wide, landscape card per session — art on the left, everything else
   stacked to its right, instead of the tall single-column "app store"
   tile this started as. Stacks vertically below ~560px so it still works
   on a phone. */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}
.card-art {
  width: 280px;
  height: auto;
  align-self: stretch;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--panel-2);
  display: block;
}
.card-body { flex: 1; min-width: 0; padding: 30px 34px; display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.card-title-row { display: flex; align-items: center; gap: 10px; }
.card-title { font-size: 27px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-lock { color: var(--accent); font-size: 24px; flex-shrink: 0; }

.card-players { display: flex; align-items: center; gap: 14px; }
.player-chip { display: flex; align-items: center; gap: 9px; font-size: 16px; color: var(--text); }
.player-chip img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--panel-2); }
.player-chip.waiting { color: var(--muted); }
.card-vs { color: var(--muted); font-size: 14px; }

.card-meta { color: var(--muted); font-size: 14px; }

.unlock-form { display: flex; gap: 10px; }
.unlock-input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-family: 'Consolas', monospace;
  font-size: 16px;
  letter-spacing: 0.08em;
}
.unlock-form .card-join { align-self: stretch; flex-shrink: 0; }
.unlock-form button:disabled { opacity: 0.6; cursor: default; }
.unlock-error { margin: 0; color: var(--accent); font-size: 13px; min-height: 16px; }

.card-join {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: flex-start;
  margin-top: 4px;
  padding: 13px 22px;
  border-radius: 9px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
}
.card-join:hover { filter: brightness(1.08); }

@media (max-width: 560px) {
  .card { flex-direction: column; }
  .card-art { width: 100%; aspect-ratio: 16 / 9; }
  .card-body { padding: 22px 24px; }
  .card-title { font-size: 22px; }
  .card-join { align-self: stretch; }
}

.footer-note {
  margin: 36px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
