.homepage-sections {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.homepage-section {
  margin-bottom: 40px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-color, #4a9eff);
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-color, #fff);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-icon {
  font-size: 28px;
}

.view-all-btn {
  padding: 8px 16px;
  background: var(--accent-color, #4a9eff);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.view-all-btn:hover {
  background: var(--accent-hover, #3a8eef);
  transform: translateY(-2px);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 10px 0;
}

.game-card {
  background: var(--card-bg, rgba(255, 255, 255, 0.05));
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-color: var(--accent-color, #4a9eff);
}

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

.game-info {
  padding: 12px;
  background: var(--card-bg, rgba(255, 255, 255, 0.05));
}

.game-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color, #fff);
  margin: 0 0 8px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.play-btn {
  width: 100%;
  padding: 8px;
  background: var(--accent-color, #4a9eff);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.play-btn:hover {
  background: var(--accent-hover, #3a8eef);
  transform: scale(1.05);
}

.new-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff4757;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-color, #fff);
  opacity: 0.6;
}

.empty-state p {
  font-size: 16px;
  margin: 0;
}

.clear-history-btn {
  padding: 6px 12px;
  background: rgba(255, 71, 87, 0.2);
  color: #ff4757;
  border: 1px solid #ff4757;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.clear-history-btn:hover {
  background: #ff4757;
  color: #fff;
}


@media (max-width: 768px) {
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }

  .section-title {
    font-size: 20px;
  }

  .game-img {
    height: 120px;
  }
}

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

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}