/* Page setup */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #f8fafc;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  user-select: none;
}

header {
  background: #1e293b;
  padding: 20px;
  text-align: center;
  border-bottom: 2px solid #334155;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

header h1 {
  margin: 0;
  font-size: 2.2rem;
  letter-spacing: 1px;
}

header p {
  color: #94a3b8;
  margin-top: 5px;
  font-size: 0.95rem;
}

/* Game grid */
main {
  flex: 1;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* Game card styling */
.game-card {
  background: #1e293b;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
  border: 2px solid transparent;
}

.game-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.4);
  border: 2px solid #38bdf8;
}

/* Thumbnail container with fixed aspect ratio */
.game-card .thumb-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

.game-card img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover; /* keeps aspect ratio, crops if needed */
  transform: translate(-50%, -50%);
  transition: transform 0.3s ease;
}

.game-card:hover img {
  transform: translate(-50%, -50%) scale(1.05);
}

/* Game info */
.game-info {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.game-card h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.game-card p {
  font-size: 0.9rem;
  color: #cbd5e1;
  flex-grow: 1;
}

/* Play button */
.game-card a {
  display: block;
  background: #3b82f6;
  color: white;
  padding: 10px;
  text-decoration: none;
  border-radius: 0 0 12px 12px;
  font-weight: bold;
  text-align: center;
  transition: background 0.2s ease;
}

.game-card a:hover {
  background: #2563eb;
}

/* Footer */
footer {
  background: #1e293b;
  text-align: center;
  padding: 12px;
  border-top: 2px solid #334155;
  font-size: 0.85rem;
  color: #94a3b8;
}
