:root {
  --red:   #E63946;
  --blue:  #1D7CF2;
  --yellow:#FFD23F;
  --green: #2EC4B6;
  --navy:  #1A1A2E;
  --bg:    #FFFFFF;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Baloo 2', cursive, sans-serif;
  background: var(--bg);
  color: var(--navy);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
header {
  text-align: center;
  padding: 2.5rem 1rem 1rem;
}

h1 {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
}

.tagline {
  font-size: 1.2rem;
  color: #555;
  margin-top: 0.5rem;
}

/* ── Grid ── */
main {
  flex: 1;
  padding: 2rem 1.5rem;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

#game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

/* ── Tiles ── */
.game-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 1rem 1rem;
  border: 4px solid currentColor;
  border-radius: 16px;
  text-decoration: none;
  color: var(--navy);
  background: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

a.game-tile:hover,
a.game-tile:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  outline: none;
}

a.game-tile:focus-visible {
  outline: 3px dashed currentColor;
  outline-offset: 3px;
}

.tile-thumb {
  width: 100%;
  max-width: 160px;
  height: 130px;
  object-fit: contain;
}

.tile-title {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 0.6rem;
  text-align: center;
}

/* ── Coming-soon state ── */
.game-tile.coming-soon {
  filter: grayscale(1);
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 1.25rem;
  font-size: 0.85rem;
  color: #888;
}

footer a { color: #888; }
