*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: #1a1a2e;
  font-family: 'Nunito', sans-serif;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
}

header {
  text-align: center;
  margin-bottom: 48px;
  position: relative;
}

.about-btn {
  display: inline-block;
  margin-top: 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 8px 22px;
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s;
}

.about-btn:hover {
  background: rgba(240,192,64,0.15);
  border-color: #f0c040;
  color: #f0c040;
}

header h1 {
  font-family: 'Fredoka One', cursive;
  font-size: 3rem;
  color: #f0c040;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

header p {
  font-size: 1.1rem;
  color: #aab;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
  width: 100%;
  max-width: 960px;
}

.game-card {
  background: #16213e;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 2px solid transparent;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: #f0c040;
  box-shadow: 0 8px 32px rgba(240,192,64,0.25);
}

.game-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f3460;
  overflow: hidden;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-thumb-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  z-index: -1;
}

.game-info {
  padding: 16px 20px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.game-info h2 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.25rem;
  color: #fff;
  line-height: 1.2;
}

.play-btn {
  flex-shrink: 0;
  background: #f0c040;
  color: #1a1a2e;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 20px;
  white-space: nowrap;
}

.game-card:hover .play-btn {
  background: #ffd966;
}

.empty {
  color: #aab;
  font-size: 1.1rem;
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
}
