/* =============================================================
   GAMES — page-specific styles
   Moved from games/index.html inline <style> block.
   ============================================================= */

/* --- Games index grid ---------------------------------------- */
.game-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.game-card {
  background-color: var(--bg-card, #1a1a1a);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-base, 250ms), box-shadow var(--transition-base, 250ms);
  border: 1px solid var(--border, #262626);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-color: var(--border-hover, #3a3a3a);
}

.game-card h3 {
  font-size: 1.4em;
  padding: 15px;
  color: var(--text-primary, #f5f5f5);
  border-bottom: 1px solid var(--border, #262626);
}

.game-description {
  padding: 15px;
  flex: 1;
  color: var(--text-secondary, #b8b8b8);
}

.game-link {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--accent, #00d4aa);
  color: #0f0f0f;
  text-decoration: none;
  border-radius: var(--radius-md, 8px);
  margin: 0 15px 15px;
  font-weight: 600;
  transition: background-color var(--transition-fast, 150ms), transform var(--transition-fast, 150ms);
  text-align: center;
}

.game-link:hover {
  background-color: var(--accent-hover, #1bf0c4);
  transform: translateY(-2px);
}

/* Mobile: force single-column card grid */
@media (max-width: 640px) {
  .game-container {
    grid-template-columns: 1fr;
  }
}


/* --- Game canvas wrapper ------------------------------------- */
.game-wrapper {
  display: flex;
  justify-content: center;
  margin: var(--space-xl, 2.5rem) auto;
  max-width: 820px;
  overflow: hidden;
}

.game-wrapper canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}
