/* CSS Variables for Better Maintenance */
:root {
  --primary-color: #6C5CE7;
  --primary-hover: #4b3bbd;
  --secondary-color: #a29bfe;
  --bg-dark: #121212;
  --bg-card: #181828;
  --bg-gradient: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
  --text-light: #fff;
  --text-muted: #aaa;
  --shadow-light: 0 2px 8px rgba(0,0,0,0.12);
  --shadow-medium: 0 4px 16px rgba(108,92,231,0.15);
  --border-radius: 16px;
  --transition: all 0.3s ease;
}

/* Base Styles */
body { 
  background: var(--bg-dark); 
  color: var(--text-light); 
  font-family: 'Poppins', 'Segoe UI', Arial, sans-serif; 
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

.site-header { 
  box-shadow: var(--shadow-light); 
}

.nav-list { 
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.nav-list li a { 
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 0;
  transition: var(--transition);
  position: relative;
}

.nav-list li a:hover { 
  color: var(--primary-color);
}

.nav-list li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-list li a:hover::after {
  width: 100%;
}

/* Game Card Responsive Styles */
.game-card { 
  transition: var(--transition);
  background: var(--bg-card);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
}

.game-card:hover { 
  transform: translateY(-4px) scale(1.02); 
  box-shadow: var(--shadow-medium);
}

.play-btn {
  background: var(--primary-color);
  color: var(--text-light);
  border: none;
  padding: 10px 28px;
  border-radius: 20px;
  font-weight: bold;
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
  cursor: pointer;
}

.play-btn:hover { 
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* Responsive Grid System */
.games-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Mobile Responsive Breakpoints */
@media (max-width: 1200px) {
  .games-grid { 
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .games-grid { 
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
  }
  
  .game-card {
    margin-bottom: 8px;
  }
}

@media (max-width: 600px) {
  .games-grid { 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
  }
  
  .play-btn {
    padding: 8px 20px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .games-grid { 
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .game-card {
    max-width: 100%;
  }
  
  .play-btn {
    padding: 10px 24px;
    font-size: 0.85rem;
  }
}

/* Container Responsive */
.container-responsive {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 768px) {
  .container-responsive {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  .container-responsive {
    padding: 0 12px;
  }
}

/* Game Image Responsive */
.game-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}

/* Ensure thumbnails reserve space & block formatting context */
.game-image {
  display: block;
}

@media (max-width: 600px) {
  .game-image {
    height: 150px;
  }
}

@media (max-width: 480px) {
  .game-image {
    height: 140px;
  }
}
