/* Styling for the game dashboard (index.html). */

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 0 60px;
  background: var(--page-bg);
  background-image: radial-gradient(circle at 50% -10%, var(--page-glow) 0%, var(--page-glow-end) 65%);
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

header.hero {
  text-align: center;
  padding: 15px 0 0 0;
}

header.hero h1 {
  margin: 0;
  font-size: 52px;
  letter-spacing: -1px;
}

header.hero h1 .pips { font-size: 34px; vertical-align: 12px; letter-spacing: 4px; }
.pip-red { color: #ef5b5b; }
.pip-black { color: var(--text); }

header.hero p {
  margin: 12px auto 0;
  max-width: 620px;
  color: var(--text-soft);
  line-height: 1.6;
}

.filters {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 15px;
}

.filter {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 14px;
  cursor: pointer;
}

.filter:hover { background: var(--surface-hover); }

.filter.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 18px;
}

.game-card {
  display: flex;
  flex-direction: column;
  /* Every tile is a square, whatever column width the grid settles on. */
  aspect-ratio: 1 / 1;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  background: var(--surface-hover);
  border-color: var(--accent);
}

.game-card:focus-visible,
.filter:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.game-card[hidden] { display: none; }

.game-card .icon {
  font-size: 24px;
  letter-spacing: 2px;
  margin-bottom: 6px;
  text-align: center;
  flex: 0 0 auto;
}

/* Any heading level works as the tile title, so one stray <h4> in the
   markup cannot break the square with a browser default margin. */
.game-card h1,
.game-card h2,
.game-card h3,
.game-card h4 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* The description takes whatever height is left inside the square. */
.game-card p {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-soft);
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* Tags always sit on the floor of the square. */
.tags { display: flex; gap: 5px; flex-wrap: wrap; flex: 0 0 auto; margin-top: auto; }

.tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
}

.tag.players { color: var(--chip-players); }

h2.section {
  margin: 40px 0 14px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
}

footer {
  margin-top: 40px;
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.7;
}

footer a { color: var(--text-faint); }
