/* Games Grid Styles */
.games-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.games-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  margin-bottom: 20px;
  min-height: 400px;
  overflow-x: auto;
  overflow-y: hidden;
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;      /* Firefox */
}

.games-grid::-webkit-scrollbar {
  display: none;              /* Chrome, Safari */
}

.game-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  flex: 0 0 300px; /* fixed width for horizontal paging */
}

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

.game-date {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 10px;
  text-align: center;
}

.game-image {
  text-align: center;
  margin-bottom: 15px;
}

.game-image img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.game-title h3 {
  font-size: 1.2em;
  margin: 0 0 10px 0;
  text-align: center;
  color: #333;
}

.game-theme {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 5px;
  text-align: center;
}

.game-author {
  font-size: 0.9em;
  color: #888;
  margin-bottom: 15px;
  text-align: center;
}

.game-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-actions .btn {
  width: 100%;
  margin: 0;
  color: #fff;
}

.game-actions-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 0;
}

.game-actions-row > * {
  flex: 0 0 auto;
}

.game-actions-row .btn {
  width: auto;
  text-align: center;
  white-space: nowrap;
}

.copy-link-icon {
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
  text-decoration: none;
}

.copy-link-icon:hover {
  opacity: 0.7;
}

.copy-link-icon img {
  vertical-align: middle;
}

/* Style for copy icon inside button */
.btn .copy-link-icon {
  text-decoration: none;
  display: inline;
}

.btn .copy-link-icon:hover {
  opacity: 0.7;
}

.btn .copy-link-icon img {
  vertical-align: middle;
  display: inline;
}

/* Smart Scrollbar Styles */
.smart-scrollbar-container {
  position: relative;
  margin: 20px 0;
  padding: 0 20px;
}

.smart-scrollbar {
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.smart-scrollbar-track {
  height: 100%;
  background: #007bff;
  border-radius: 4px;
  position: relative;
  transition: width 0.3s ease;
}

.smart-scrollbar-thumb {
  position: absolute;
  right: 0;
  top: 0;
  width: 20px;
  height: 100%;
  background: #0056b3;
  border-radius: 4px;
  cursor: grab;
}

.smart-scrollbar-thumb:active {
  cursor: grabbing;
}

.scrollbar-info {
  text-align: center;
  margin-top: 10px;
  font-size: 0.9em;
  color: #666;
}

.loading-indicator {
  text-align: center;
  padding: 20px;
  color: #666;
}

.loading-indicator .spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .games-grid {
    gap: 15px;
  }
  
  .game-card {
    padding: 12px;
    flex-basis: 260px;
  }
}