/* styles.css - SlitherGames global site chrome + design tokens.
   Placeholder palette per CLAUDE.md's open "branding" question -- swap
   freely once real branding is decided. The CSS variable NAMES below
   (--bg, --surface, --panel, --border, --text, --muted, --accent,
   --accent2, --radius, --shadow) are a fixed contract the sliding_puzzle
   module's own CSS depends on -- keep the names even if the values
   change. */

:root {
  --bg: #10151a;
  --surface: #171e25;
  --panel: #1a2129;
  --border: #2a333d;
  --text: #eef2f5;
  --muted: #8b98a5;
  --accent: #34d399;
  --accent2: #142a22;
  --radius: 16px;
  --shadow: 0 12px 32px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a { color: inherit; }

/* -- Site header ---------------------------------------------------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 20px 0;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .02em;
  color: var(--text);
}

.site-brand-mark {
  font-size: 24px;
}

.hub-admin-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
}

.hub-admin-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.hub-admin-link[hidden] {
  display: none;
}

/* -- Hub page -------------------------------------------------------------- */

.hub-loading {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 40px 20px;
  grid-column: 1 / -1;
}

.hub-hero {
  max-width: 720px;
  margin: 28px auto 0;
  padding: 0 20px;
  text-align: center;
}

.hub-kicker {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}

.hub-hero h1 {
  font-family: Georgia, serif;
  font-size: clamp(28px, 6vw, 40px);
  margin: 0 0 10px;
}

.hub-hero p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

.game-grid {
  max-width: 900px;
  margin: 36px auto 60px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.game-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform .15s ease, border-color .15s ease;
}

.game-tile:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

/* A real gameplay screenshot, not the old glyph-on-gradient placeholder
   block -- portrait to match these games' own mobile-first framing
   (see helpers/games_registry.py's "image" field / static/tiles/*.jpg).
   object-fit:cover so any source image (Sliders' is square) fills the
   same box consistently across every tile. */
.game-tile-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: linear-gradient(160deg, var(--accent2), var(--surface));
}

.game-tile-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.game-tile-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: Georgia, serif;
  font-size: 19px;
  margin: 0 0 6px;
}

/* The small per-game icon, now living next to the title instead of
   being the tile's main visual (see .game-tile-image above). */
.game-tile-glyph {
  font-size: 20px;
  line-height: 1;
}

.game-tile-desc {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 14px;
  flex: 1;
}

.game-tile-cta {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: var(--accent);
}

.game-tile.is-coming-soon {
  opacity: .82;
}

.game-tile-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(20, 21, 26, .78);
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

/* -- Simple utility pages (slither placeholder, login stub) ---------------- */

.simple-page {
  max-width: 560px;
  margin: 60px auto;
  padding: 0 20px;
  text-align: center;
}

.simple-page h1 {
  font-family: Georgia, serif;
  font-size: 28px;
  margin: 0 0 12px;
}

.simple-page p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 24px;
}

.simple-page .auth-back {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.simple-page .auth-back:hover {
  text-decoration: underline;
}

footer {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 20px 0 32px;
}

footer a {
  color: var(--muted);
  text-decoration: underline;
}

footer a:hover {
  color: var(--accent);
}
