/* Search guide pages (/games/ and /games/<slug>/), built by scripts/seo-pages.ts.
   Uses the app's default "Cosmos" look: tokens copied from src/styles/global.css (theme 'midnight'). */
:root {
  --bg: #0f1437;
  --bg-2: #161c4a;
  --card: #1e2660;
  --card-2: #2a3377;
  --line: rgba(160, 175, 255, 0.1);
  --text: #f6f4ff;
  --text-2: #b3b8e4;
  --text-3: #7a81b8;
  --accent: #ff9f43;
  --accent-2: #ff5d8f;
  --accent-3: #3dd6c6;
  --accent-text: #1a1036;
  --good: #3ddc97;
  --grad: linear-gradient(135deg, #ffc93c 0%, #ff8c42 48%, #ff5d8f 100%);
  --shadow: 0 12px 32px rgba(4, 6, 28, 0.45);
  --edge: rgba(4, 6, 28, 0.35);
  --nebula: rgba(126, 87, 255, 0.28);
  --wordmark: #5bebd2;
  --font: 'Nunito', ui-rounded, 'SF Pro Rounded', 'Varela Round', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(900px 520px at 85% -8%, var(--nebula), transparent 65%),
    radial-gradient(700px 480px at -10% 105%, color-mix(in srgb, var(--accent-3) 14%, transparent), transparent 65%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-3); }
h1, h2, h3 { font-weight: 900; line-height: 1.15; letter-spacing: -0.01em; margin: 0; }

/* starfield and planets, like the app backdrop and the link-preview art */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent),
    radial-gradient(1px 1px at 28% 72%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 44% 32%, #fff, transparent),
    radial-gradient(1px 1px at 63% 12%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 78% 58%, #fff, transparent),
    radial-gradient(1px 1px at 88% 26%, #fff, transparent),
    radial-gradient(1px 1px at 8% 88%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 55% 90%, #fff, transparent),
    radial-gradient(1px 1px at 35% 48%, #fff, transparent),
    radial-gradient(1px 1px at 94% 80%, #fff, transparent);
  opacity: 0.7;
}
.planet { position: absolute; border-radius: 50%; }
.planet.p1 { width: 120px; height: 120px; left: -30px; top: 90px; background: color-mix(in srgb, var(--card) 70%, transparent); }
.planet.p2 { width: 520px; height: 520px; right: -220px; bottom: -260px; background: color-mix(in srgb, var(--card) 45%, transparent); }

/* header and logo */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 16px;
}
.top nav { display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 50%; }
.wordmark { font-weight: 900; font-size: 1.35rem; color: var(--text); letter-spacing: -0.01em; }
.wordmark b { color: var(--wordmark); font-weight: 900; }
.all { color: var(--text-2); font-weight: 800; text-decoration: none; }
.all:hover { color: var(--text); }

/* buttons: the app's flat pill with a lip (global.css .btn / .btn-primary) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 17px;
  text-decoration: none;
  background: var(--card-2);
  color: var(--text);
  box-shadow: 0 4px 0 var(--edge);
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }
.btn-primary {
  background: var(--grad);
  color: var(--accent-text);
  box-shadow:
    0 4px 0 color-mix(in srgb, var(--accent-2) 55%, #000),
    0 10px 26px color-mix(in srgb, var(--accent) 32%, transparent);
}
.btn-primary:active { box-shadow: 0 1px 0 color-mix(in srgb, var(--accent-2) 55%, #000); }
.btn-sm { padding: 8px 16px; font-size: 15px; }
.btn-lg { padding: 16px 30px; font-size: 19px; }

main { max-width: 1040px; margin: 0 auto; padding: 4px 16px 48px; }
.crumbs { color: var(--text-3); font-size: 0.9rem; font-weight: 700; margin: 4px 0 12px; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.muted, .note { color: var(--text-2); }
.note { font-size: 0.92rem; margin: 10px 0 0; }

/* hero: title and sign-up beside the game's own animated demo */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: center;
  margin: 8px 0 28px;
}
.hero-hub { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.hero-hub .hero-text { max-width: 720px; }
.hero-logo { width: min(420px, 90%); height: auto; margin-bottom: 12px; }
.hero-id { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 8px; }
.tagline { font-size: 1.25rem; color: var(--text-2); margin: 0 0 22px; font-weight: 700; }
.chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero-demo { margin: 0; }
.demo-frame {
  display: block;
  width: 100%;
  max-width: 440px;
  height: 380px;
  margin: 0 auto;
  border: 0;
  background: transparent;
  color-scheme: dark;
}
.hero-demo figcaption { text-align: center; color: var(--text-3); font-size: 0.85rem; font-weight: 700; margin-top: 2px; }

/* the app's game tile: emoji on a gradient of the game colour */
.gicon {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #000));
  box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 35%, transparent);
}
.gicon-sm { width: 46px; height: 46px; border-radius: 14px; font-size: 23px; }
.gicon-lg { width: 72px; height: 72px; border-radius: 22px; font-size: 36px; }

/* cards, like the app's .card */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 5px 0 var(--edge);
}
.prose { padding: 24px 26px; margin: 18px 0; }
.prose h2 { font-size: 1.55rem; margin-bottom: 10px; }
.prose p { color: var(--text-2); margin: 10px 0; }
.prose p:last-child { margin-bottom: 0; }
section { scroll-margin-top: 16px; }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.toc a {
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-2);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
}
.toc a:hover { color: var(--text); border-color: var(--accent-3); }

/* how to play: numbered bubbles */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 6px 0 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 8px 0 8px 48px;
  color: var(--text-2);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 6px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--grad);
  color: var(--accent-text);
  font-weight: 900;
  font-size: 0.95rem;
}

/* strategies as small tiles */
.tips { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 6px; }
.tip { background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.tip h3 { font-size: 1.05rem; color: var(--text); margin-bottom: 4px; }
.tip p { margin: 0; font-size: 0.97rem; }

/* FAQ */
details { border-top: 1px solid var(--line); padding: 12px 0; }
details:first-of-type { border-top: 0; }
summary { cursor: pointer; font-weight: 800; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--accent-3); font-weight: 900; }
details[open] summary::after { content: '−'; }
details p { margin: 8px 0 0; }

/* sign-up boxes */
.cta {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 26px;
  margin: 26px 0;
  background:
    radial-gradient(420px 200px at 100% 0%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 70%),
    linear-gradient(135deg, var(--card-2), var(--card));
}
.cta img { border-radius: 50%; flex-shrink: 0; }
.cta h2 { font-size: 1.35rem; margin-bottom: 4px; }
.cta p { margin: 0 0 14px; color: var(--text-2); }

/* game lists */
.more { margin: 30px 0 10px; }
.more h2 { font-size: 1.5rem; margin-bottom: 6px; }
.grid { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.game-card {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.12s ease, border-color 0.12s;
}
.game-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent-3) 50%, transparent); }
.game-card > span:not(.gicon) { flex: 1; min-width: 0; }
.game-card strong { display: block; font-weight: 900; }
.game-card small { display: block; color: var(--text-2); font-size: 0.9rem; line-height: 1.35; }
.pro {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--accent-text);
  background: var(--grad);
  border-radius: 999px;
  padding: 3px 8px;
}

footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 26px 16px 48px;
  border-top: 1px solid var(--line);
  color: var(--text-3);
  font-size: 0.9rem;
}
footer .brand { margin-bottom: 8px; }
footer a { color: var(--text-2); }

/* phones: stacked hero and a sign-up bar pinned to the bottom */
.sticky { display: none; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 12px; }
  .hero-text { text-align: left; }
}
@media (max-width: 640px) {
  body { padding-bottom: 76px; }
  .all { display: none; }
  .wordmark { font-size: 1.15rem; }
  .prose { padding: 20px 18px; }
  .cta { flex-direction: column; align-items: flex-start; text-align: left; }
  .sticky {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    border-top: 1px solid var(--line);
    font-weight: 800;
    font-size: 0.92rem;
    z-index: 10;
  }
}
