:root {
  /* Steam */
  --steam-dark: #171a21;
  --steam-navy: #1b2838;
  --steam-blue: #2a475e;
  --steam-light: #66c0f4;
  --steam-text: #c7d5e0;
  /* Twitch */
  --twitch: #9146ff;
  --twitch-dark: #772ce8;
  /* Discord */
  --discord: #5865f2;
  --discord-green: #57f287;
  --discord-red: #ed4245;

  --bg: var(--steam-dark);
  --surface: var(--steam-navy);
  --surface-2: #213245;
  --text: #e6edf3;
  --muted: var(--steam-text);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a { color: var(--steam-light); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(145, 70, 255, .55), transparent 55%),
    radial-gradient(circle at 85% 30%, rgba(88, 101, 242, .55), transparent 55%),
    linear-gradient(180deg, var(--steam-blue), var(--steam-dark));
  padding: 72px 16px 56px;
  text-align: center;
  border-bottom: 3px solid var(--twitch);
}
.hero-inner { max-width: 820px; margin: 0 auto; }

.logo {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(28px, 7vw, 56px);
  margin: 0 0 24px;
  letter-spacing: 1px;
  text-shadow: 4px 4px 0 var(--twitch-dark);
}
.logo .o2 { color: var(--steam-light); }
.logo .ia {
  color: #fff;
  background: var(--discord);
  padding: 0 .2em;
  border-radius: 8px;
  margin-left: .1em;
  text-shadow: none;
}

.tagline {
  font-size: clamp(20px, 3.6vw, 30px);
  font-weight: 800;
  margin: 0 0 8px;
}
.sub {
  font-size: clamp(16px, 2.4vw, 20px);
  color: var(--muted);
  margin: 0 0 24px;
}
.sub strong { color: var(--discord-red); }

.count {
  display: inline-block;
  margin: 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .35);
  border: 1px solid var(--twitch);
  font-weight: 600;
}
.count span { color: var(--discord-green); }

/* ---------- Toolbar ---------- */
main { max-width: 1200px; margin: 0 auto; padding: 32px 16px 48px; }

.toolbar { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }

#search {
  width: 100%;
  padding: 12px 16px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--steam-blue);
  border-radius: 10px;
  outline: none;
}
#search:focus { border-color: var(--discord); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--steam-blue);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.chip:hover { color: #fff; border-color: var(--twitch); }
.chip[aria-pressed="true"] { background: var(--twitch); border-color: var(--twitch); color: #fff; }

/* ---------- Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  --accent: var(--discord);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid #2a3a4d;
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform .15s, box-shadow .15s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4), 0 0 0 1px var(--accent);
}

.card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.badge {
  flex: none;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-family: "Press Start 2P", monospace;
  font-size: 13px;
}
.card h2 { margin: 0; font-size: 19px; line-height: 1.2; }
.cat {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--steam-light);
  font-weight: 600;
}

.what { margin: 0 0 16px; color: var(--muted); }

.sources h3 {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #8aa0b4;
}
.sources ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sources li { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
.sources a { text-decoration: none; word-break: break-word; }
.sources a:hover { text-decoration: underline; }

.lang {
  flex: none;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
}
.lang-en { background: var(--discord); }
.lang-fr { background: var(--twitch); }

.stop {
  margin-top: auto;
  padding-top: 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--discord-red);
}

/* Brand accents */
.brand-discord     { --accent: #5865f2; }
.brand-twitch      { --accent: #9146ff; }
.brand-steam       { --accent: #66c0f4; }
.brand-epic        { --accent: #4b4b4b; }
.brand-xbox        { --accent: #107c10; }
.brand-playstation { --accent: #0070d1; }
.brand-roblox      { --accent: #e2231a; }
.brand-ubisoft     { --accent: #0070ff; }
.brand-ea          { --accent: #ff4747; }
.brand-krafton     { --accent: #f2a900; }
.brand-nvidia      { --accent: #76b900; }
.brand-razer       { --accent: #44d62c; }
.brand-amd         { --accent: #ed1c24; }
.brand-squareenix  { --accent: #c8102e; }
.brand-cod         { --accent: #6b8e23; }
.brand-riot        { --accent: #d13639; }
.brand-unity       { --accent: #8a8f98; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Footer ---------- */
footer {
  border-top: 3px solid var(--discord);
  background: #11141a;
  color: #8aa0b4;
  text-align: center;
  font-size: 14px;
  padding: 24px 16px;
}
footer p { margin: 4px 0; }

@media (max-width: 480px) {
  .hero { padding: 48px 16px 40px; }
  .grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .chip { transition: none; }
  .card:hover { transform: none; }
}
