/* ==========================================================
   Today's hot games  —  templates/partials/games.html
   Game list lives in pages/content.py (GAMES).
   .block-head / .block-title are shared with offers.css.
   ========================================================== */

.games {
  padding: 40px 0;
}

/* ---------- Shared block heading (games + offers) ---------- */

.block-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 58px;
}

.block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 600;
  line-height: 32px;
  letter-spacing: -0.01em;
  color: var(--text);
}

.block-title .ico {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.block-meta {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Grid ---------- */

.games-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Card ---------- */

.game-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.game-card:hover {
  border-color: rgba(255, 23, 68, 0.55);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.6),
    0 0 28px rgba(255, 23, 68, 0.18);
  transform: translateY(-4px);
}

.game-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #050505;
}

.game-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03); /* hides the thin frame baked into some artwork */
  transition: transform 0.5s ease;
}

.game-card:hover .game-media img {
  transform: scale(1.09);
}

/* Name art for games that don't have an image yet */
.game-art {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 20px 20px 48px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 23, 68, 0.35), transparent 60%),
    radial-gradient(circle at 50% 100%, rgba(255, 176, 0, 0.18), transparent 60%),
    var(--surface);
}

.game-art span {
  font-style: italic;
  font-weight: 900;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--golden-glow) 0%, var(--neon-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(255, 176, 0, 0.35));
}

/* Fade the art into the card body */
.game-media::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45%;
  background: linear-gradient(to top, var(--surface) 0%, rgba(11, 11, 11, 0) 100%);
  pointer-events: none;
}

.game-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--golden-glow), var(--neon-gold));
  color: var(--pure-black);
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5), 0 0 14px rgba(255, 176, 0, 0.35);
}

.game-badge svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.game-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  margin-top: -30px; /* name overlaps the faded bottom of the art */
  padding: 0 16px 16px;
}

.game-name {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
  color: var(--text);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.game-sub {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.game-sub.is-free {
  color: var(--gold);
}

/* ---------- Button ---------- */

.btn-game {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--on-btn);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-game .ico {
  width: 16px;
  height: 16px;
}

.game-card:hover .btn-game,
.btn-game:focus-visible {
  background: var(--btn-bg-hover);
  box-shadow: var(--glow-btn);
}

.btn-game:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .games-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .block-title {
    font-size: 22px;
    line-height: 28px;
  }
}

@media (max-width: 480px) {
  .games {
    padding: 32px 0;
  }

  .game-body {
    gap: 12px;
    margin-top: -24px;
    padding: 0 12px 12px;
  }

  .game-name {
    font-size: 15px;
    line-height: 20px;
  }

  .game-sub {
    font-size: 10px;
    letter-spacing: 0.06em;
  }

  .btn-game {
    height: 38px;
    font-size: 12px;
  }

  .game-art span {
    font-size: 20px;
  }

  .game-badge {
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    font-size: 10px;
  }
}
