.games-index .page-description {
  margin-bottom: 1.5rem;
}

.game-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.game-card {
  display: block;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #333;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.game-card-preview {
  width: 100%;
  height: 110px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.9rem;
  background: #0a0a12;
  border: 1px solid #2a2a2a;
  transition: border-color 0.2s;
}

.game-card:hover .game-card-preview {
  border-color: #444;
}

.game-card-preview svg {
  width: 100%;
  height: 100%;
  display: block;
}

.game-card:hover {
  border-color: #c9a227;
  background: rgba(201, 162, 39, 0.08);
}

.game-card-title {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.game-card-desc {
  color: #a0a0a0;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.game-card-play {
  color: #c9a227;
  font-weight: 600;
  font-size: 0.95rem;
}

.game-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #333;
  scroll-margin-top: 1rem;
}

.game-section-title {
  color: #e0e0e0;
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.game-section .page-description {
  margin-bottom: 1rem;
}

.game-page .page-description {
  margin-bottom: 1rem;
}

.game-hud {
  display: flex;
  gap: 2rem;
  margin-bottom: 0.75rem;
  color: #a0a0a0;
  font-size: 1rem;
}

.game-hud strong {
  color: #fff;
}

.game-wrap {
  position: relative;
  display: inline-block;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  background: #0d0d0d;
}

#gameCanvas {
  display: block;
  background: #0d0d0d;
  max-width: 100%;
  height: auto;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  transition: opacity 0.2s;
}

.game-overlay.hidden {
  pointer-events: none;
  opacity: 0;
}

.overlay-text {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  text-align: center;
  padding: 0 1rem;
}

.restart-btn {
  padding: 0.6rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  background: #e0e0e0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.restart-btn:hover {
  background: #fff;
}

.game-embed-wrap iframe {
  display: block;
  width: 100%;
  max-width: 900px;
  height: 600px;
  border: none;
  border-radius: 8px;
}

@media (max-width: 860px) {
  #gameCanvas {
    width: 100%;
    height: auto;
  }
  .game-embed-wrap iframe {
    height: 500px;
  }
}
