body {
	background-color: black;
	color: white;
	font-family: sans-serif;
}

.container {
	padding: 20px;
}

.box {
	margin: auto;
	background-color: white;
	padding: 10px;
	width: 100%;
	max-width: 1100px;
}

#glist {
	overflow-x: hidden;
	overflow-y: scroll;
	width: 100%;
	height: 70vh;
	padding: 0;
	text-align: center;
}

#gsearchbar {
	outline: none;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	font-size: 16px;
	border: 1px solid rgba(0, 0, 0, 0.3);
	border-radius: 4px;
	padding: 12px;
	margin-bottom: 10px;
	transition: 0.2s ease;
}

#gsearchbar:focus {
	background-color: #eee;
	box-shadow: inset 0 0 5px 1px rgba(0, 0, 0, 0.4);
	border-color: #007acc;
}

#glist h2 {
	display: block;
	color: white;
	font: 18px;
	border: 1px solid #060606;
	margin: -1px 0 0 0;
	background-color: #060606;
	padding: 12px;
	font-weight: bold;
	user-select: none;
}

#glist a {
	display: block;
	text-decoration: inherit;
	color: black;
	font-size: 18px;
	border: 1px solid #dddddd;
	margin-top: -1px;
	background-color: #f6f6f6;
	padding: 12px;
	transition: 0.2s ease;
}

#glist a:hover {
	background-color: #eeeeee;
	text-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
	}

/* Ad containers to reserve space and avoid CLS */
.ad-container { margin: 10px 0; min-height: 240px; display:flex; justify-content:center; align-items:center; }
.ad-top { min-height: 140px; margin: 8px 0; }
@media (max-width: 768px){ .ad-container { min-height: 200px; } .ad-top { min-height: 120px; } }
@media (max-width: 480px){ .ad-container { min-height: 160px; } .ad-top { min-height: 100px; } }

/* Logo and header styling */
.logo-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  justify-content: center;
}
.site-logo {
  height: 56px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  loading: eager;
}
.box h1 {
  color: black;
  font-size: 24px;
  margin: 0;
  font-weight: 600;
}

/* Tablet responsive */
@media (max-width: 768px) {
  .logo-header { gap: 12px; }
  .site-logo { height: 48px; }
  .box h1 { font-size: 22px; }
}

/* Mobile responsive logo */
@media (max-width: 480px) {
  .logo-header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .site-logo { height: 44px; }
  .box h1 { font-size: 20px; }
}

/* Category Filter Styles */
.category-filter {
  display: flex;
  gap: 8px;
  margin: 16px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.category-btn {
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.category-btn:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
}

.category-btn.active {
  background: #007acc;
  color: white;
  border-color: #007acc;
}

/* Games Grid Layout */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  margin: 20px 0;
  padding: 0;
}

.featured-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* Game Card Styles */
.game-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  text-decoration: none;
}

.thumb-wrap {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 10px;
  background: #111;
}

.game-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: block;
}

.game-info {
  padding: 16px;
}

.game-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #333;
}

.game-description {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
  margin: 0 0 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.game-tag {
  background: #f0f0f0;
  color: #666;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
}

/* Section Styles */
.featured-section, .all-games-section {
  margin: 24px 0;
}

.featured-section h2, .all-games-section h2 {
  color: #333;
  font-size: 24px;
  margin-bottom: 16px;
  text-align: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
  }

  .featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .category-filter {
    gap: 6px;
  }

  .category-btn {
    padding: 6px 12px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .games-grid, .featured-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }



  .category-filter {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 8px;
  }
}

/* Hero banner using assets_background.webp; centers image text as the visual title */
.hero {
  width: 100%;
  min-height: 40vh;
  background-image: url('/assets_background.webp');
  background-size: cover;
  background-position: center center;
  border-radius: 12px;
  margin: 16px 0 24px;
}
@media (max-width: 768px){
  .hero { min-height: 32vh; border-radius: 10px; margin: 12px 0 18px; }
}
@media (max-width: 480px){
  .hero { min-height: 28vh; margin: 10px 0 14px; }
}

/* Visually hidden but accessible heading for SEO and a11y */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}


}