/* =====================================
   GAMES PAGE STYLES
===================================== */

.games-section {
  padding-top: calc(var(--section-space) - 0.5rem);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
}

.game-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: rgba(21, 27, 46, 0.78);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: var(--shadow-card);
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 240, 255, 0.45);
  box-shadow:
    0 0 0 1px rgba(0, 240, 255, 0.2),
    0 14px 30px rgba(0, 0, 0, 0.45);
}

.game-card-image {
  height: 250px;
  background-size: cover;
  background-position: top;
  position: relative;
}

.game-card-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(11, 15, 26, 0.2), rgba(11, 15, 26, 0.85));
}

.game-card-content {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.game-card-content h3 {
  margin: 0 0 0.35rem;
}

.game-genre {
  color: var(--primary);
  font-size: 0.8rem;
  margin-bottom: 1rem;
  letter-spacing: 0.08em;
  /*text-transform: uppercase;*/
}

.game-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.2rem;
  padding: 0.9rem;
  border-radius: 10px;
  background: rgba(11, 15, 26, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat {
  flex: 1;
}

.stat-number {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  /*text-transform: uppercase;*/
  letter-spacing: 0.07em;
}

.game-arena-line {
  margin: -0.2rem 0 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.top-players-section {
  background: linear-gradient(180deg, rgba(7, 10, 20, 0), rgba(21, 27, 46, 0.35)); margin-top: 20px;
}

.top-players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
}

.top-players-card {
  display: flex;
  flex-direction: column;
  background: rgba(21, 27, 46, 0.75);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.3rem;
  box-shadow: var(--shadow-card);
}

.top-players-card h3 {
  margin-bottom: 0.9rem;
  color: var(--primary);
}

.leaderboard {
  list-style: none;
  margin: 0 0 1rem;
}

.game-card-content > .details-btn,
.top-players-card > .details-btn {
  margin-top: auto;
  align-self: flex-end;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  min-width: 86px;
  text-align: center;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.rank-item:last-child {
  border-bottom: 0;
}

.rank-badge {
  min-width: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
}

.player-name {
  flex: 1;
}

.player-rating {
  color: var(--primary);
  font-weight: 700;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem 1rem;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .games-grid {
    grid-template-columns: 1fr;
  }

  .top-players-grid {
    grid-template-columns: 1fr;
  }
}
