/* ===========================
   Games Grid Fix & Responsive
=========================== */
.games-grid {
  display: grid !important;
  grid-template-columns: repeat(8, 1fr); /* 8 cards per row on large screens */
  gap: 20px; /* thoda zyada gap for better spacing */
  margin-top: 25px;
  justify-items: stretch;
  align-items: stretch;
  width: 100%;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Each game card fills its grid column */
.games-grid > .game-card {
  width: 100%;
  box-sizing: border-box;
}

/* ===========================
   Responsive breakpoints
=========================== */
@media (max-width: 1600px) {
  .games-grid { grid-template-columns: repeat(8, 1fr); }
}
@media (max-width: 1400px) {
  .games-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 1200px) {
  .games-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 992px) {
  .games-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
  .games-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .games-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===========================
   Game Card Design
=========================== */
.game-card {
  text-align: center;
  background: rgba(255, 255, 255, 0.15); /* slightly brighter */
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  padding: 16px; /* larger padding */
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 25px rgba(0, 123, 255, 0.3);
  transition: all 0.35s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
  overflow: hidden;
  cursor: pointer;
  color: inherit;
}
.game-card:hover {
  transform: rotateY(8deg) rotateX(4deg) scale(1.08);
  box-shadow: 0 12px 45px rgba(33, 150, 243, 0.65);
}

/* ===========================
   Game Image
=========================== */
.game-card img {
  width: 100%;
  height: 180px; /* increased height */
  object-fit: cover; /* cover instead of contain for bigger look */
  border-radius: 14px;
  transition: all 0.3s ease;
}
.game-card:hover img {
  transform: scale(1.1) translateY(-4px);
  filter: brightness(1.1);
}

/* ===========================
   Game Title
=========================== */
.game-title {
  margin-top: 12px;
  font-size: 16px; /* slightly bigger */
  font-weight: 700;
  color: #1976d2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  transition: color 0.3s ease, transform 0.3s ease;
}
.game-card:hover .game-title {
  color: #ff5722;
  transform: translateY(-2px);
}

/* ===========================
   Game Meta
=========================== */
.game-meta {
  font-size: 13px;
  color: #666;
  margin-top: 5px;
  opacity: 0.9;
}

/* ===========================
   Dark Mode
=========================== */
body.dark-mode {
  background: #111;
  color: #ddd;
}
body.dark-mode .game-card {
  background: rgba(18, 18, 18, 0.85);
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 6px 30px rgba(0, 150, 255, 0.25);
}
body.dark-mode .game-title {
  color: #90caf9;
}
body.dark-mode .game-card:hover .game-title {
  color: #ff9800;
}
