/* shadcn/ui "zinc" theme tokens */
:root {
  --background: #ffffff; --foreground: #09090b;
  --card: #ffffff; --muted: #f4f4f5; --muted-foreground: #71717a;
  --accent: #f4f4f5; --border: #e4e4e7; --ring: #a1a1aa;
  --primary: #18181b; --primary-foreground: #fafafa;
  --radius: 0.75rem;
  --green: #16a34a; --blue: #2563eb; --amber: #d97706; --zinc: #71717a; --violet: #7c3aed;
  --glow: rgb(124 58 237 / .12);
}
.dark {
  --background: #09090b; --foreground: #fafafa;
  --card: #0c0c0e; --muted: #27272a; --muted-foreground: #a1a1aa;
  --accent: #27272a; --border: #27272a; --ring: #52525b;
  --primary: #fafafa; --primary-foreground: #18181b;
  --green: #22c55e; --blue: #3b82f6; --amber: #f59e0b; --zinc: #a1a1aa; --violet: #a78bfa;
  --glow: rgb(167 139 250 / .14);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
html.dark { color-scheme: dark; }
body {
  margin: 0; background: var(--background); color: var(--foreground);
  font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::before { /* soft glow + dotted grid behind the hero */
  content: ""; position: absolute; inset: 0 0 auto; height: 520px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 300px at 50% 0, var(--glow), transparent 70%),
    radial-gradient(circle, var(--border) 1px, transparent 1px) 0 0 / 22px 22px;
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
}
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted-foreground); }
a { color: inherit; text-decoration: none; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 75%, transparent); backdrop-filter: blur(12px);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.logo { width: 28px; height: 28px; filter: drop-shadow(0 2px 6px rgb(124 58 237 / .35)); }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.sync { font-size: 12px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: calc(var(--radius) - 4px); background: var(--background);
  color: inherit; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: background .15s;
}
.btn:hover { background: var(--accent); }
.btn:focus-visible, .tab:focus-visible, .stat:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring); }
.btn-primary { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 88%, transparent); }
.hero-actions { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.gh { fill: currentColor; stroke: none; }
footer a { text-decoration: underline; text-underline-offset: 4px; }
footer a:hover { color: var(--foreground); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.dark .sun, .moon { display: none; }
.dark .moon { display: block; }

/* hero */
.hero { padding: 72px 0 40px; text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--border); border-radius: 9999px; background: var(--background);
}
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 6px transparent; } }
h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.1; font-weight: 700; letter-spacing: -0.04em; margin: 20px 0 12px; }
.lead { font-size: 17px; max-width: 560px; margin: 0 auto; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 32px; }
.stat {
  text-align: left; padding: 16px 20px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); color: inherit; font: inherit; cursor: pointer; transition: border-color .15s, transform .15s;
}
.stat:hover { border-color: var(--ring); transform: translateY(-1px); }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-foreground); font-weight: 500; }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; margin-top: 4px; }

/* toolbar */
.toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.input {
  height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: calc(var(--radius) - 4px);
  background: var(--background); color: inherit; font: inherit; box-shadow: 0 1px 2px rgb(0 0 0 / .05);
}
.input:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring); }
.search { position: relative; flex: 1; min-width: 220px; }
.search svg { position: absolute; left: 12px; top: 11px; color: var(--muted-foreground); }
.search .input { width: 100%; padding-left: 36px; }

.tabs {
  display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; margin-bottom: 20px;
  background: var(--muted); border-radius: calc(var(--radius) - 2px);
}
.tab {
  border: 0; background: transparent; color: var(--muted-foreground); font: inherit; font-weight: 500; font-size: 13px;
  padding: 5px 12px; border-radius: calc(var(--radius) - 5px); cursor: pointer; transition: color .15s;
}
.tab:hover { color: var(--foreground); }
.tab.active { background: var(--background); color: var(--foreground); box-shadow: 0 1px 3px rgb(0 0 0 / .1); }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
  box-shadow: 0 1px 2px rgb(0 0 0 / .04); transition: border-color .2s, box-shadow .2s, transform .2s;
  animation: fade-in .3s ease both;
}
.card::before { /* platform-coloured accent line */
  content: ""; position: absolute; inset: 0 0 auto; height: 2px;
  background: linear-gradient(90deg, transparent, hsl(var(--hue) 70% 55%), transparent); opacity: .8;
}
.card:hover { border-color: var(--ring); box-shadow: 0 8px 24px -12px rgb(0 0 0 / .25); transform: translateY(-2px); }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } }
.card-top { display: flex; justify-content: space-between; gap: 8px; }
.card h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.card .sub { margin: 4px 0 0; font-size: 13px; }
.card .desc { margin: 0; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; font-size: 12px; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--border); border-radius: 9999px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.badge.platform { font-weight: 500; }
.badge.platform .dot { background: hsl(var(--hue) 70% 55%); }
.released { --c: var(--green); }
.beta { --c: var(--blue); }
.development { --c: var(--amber); }
.unverified { --c: var(--zinc); }
.discovered { --c: var(--violet); }

.empty { padding: 48px; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius); }
.empty p { margin: 0; }
footer { margin: 40px 0; font-size: 13px; text-align: center; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
