#scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #5ac8fa;
  color: #000;
  border: none;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(90, 200, 250, 0.4);
  will-change: transform, opacity;
}

#scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#scroll-to-top:hover {
  background: #49b7d6;
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 6px 20px rgba(90, 200, 250, 0.6);
}

#scroll-to-top:active {
  transform: translateY(-2px) scale(1.05);
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #1a1c22;
  color: #e0e0e0;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s ease;
  border-left: 4px solid #5ac8fa;
  max-width: 300px;
  font-weight: 500;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-success {
  border-left-color: #4caf50;
}

.toast-error {
  border-left-color: #f44336;
}

.toast-info {
  border-left-color: #5ac8fa;
}

.favorite-btn {
  position: static;
  background: #5ac8fa;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all 0.3s ease;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(90, 200, 250, 0.3);
  color: #ffffff;
  font-weight: bold;
  font-family: 'Montserrat', system-ui, sans-serif;
  margin-top: 15px;
  will-change: transform;
}

.favorite-btn:hover {
  background: #49b7d6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(90, 200, 250, 0.5);
}

.favorite-btn.active {
  background: #ff4444;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(255, 68, 68, 0.5);
}

.favorite-btn.active:hover {
  background: #ff6666;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 68, 68, 0.7);
}

.favorite-btn.favorite-animate {
  animation: favoritePulse 0.6s ease;
}

@keyframes favoritePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3) rotate(10deg);
  }
  100% {
    transform: scale(1);
  }
}


.random-game-btn {
  padding: 12px 24px;
  font-size: 1em;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #5ac8fa, #49b7d6);
  color: #000;
  font-weight: bold;
  cursor: pointer;
  margin: 10px 5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(90, 200, 250, 0.3);
  will-change: transform;
}

.random-game-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(90, 200, 250, 0.5);
}

.random-game-btn:active {
  transform: translateY(-1px) scale(1.02);
}

#favorites-btn.active {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #000;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
}

#favorites-btn.active .star-icon {
  filter: brightness(0) invert(1);
  display: inline-block;
}

#favorites-btn.active:hover {
  background: linear-gradient(135deg, #ffed4e, #ffd700);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.7);
}

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.carousel-btn {
  padding: 12px 24px;
  background: #5ac8fa;
  color: #000;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  will-change: transform;
}

.carousel-btn:hover {
  background: #49b7d6;
  transform: translateY(-2px);
}

.carousel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.game-preview {
  display: none;
}

.game-preview h4 {
  color: #5ac8fa;
  margin-bottom: 10px;
  margin-top: 5px;
  font-size: 1.3em;
  font-weight: bold;
  text-shadow: 0 2px 15px rgba(90, 200, 250, 0.7), 0 0 5px rgba(90, 200, 250, 0.5);
}

.game-preview p {
  text-align: center;
  line-height: 1.6;
  font-size: 0.95em;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 1), 0 0 5px rgba(0, 0, 0, 0.9), 0 1px 3px rgba(0, 0, 0, 1);
  max-width: 95%;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px;
  border-radius: 6px;
}

.game-card .game-buttons {
  position: relative;
  z-index: 15;
  pointer-events: auto;
}

.game-card .favorite-btn {
  position: static;
  z-index: 1;
  pointer-events: auto;
}

.game-card h3,
.game-card p:not(.game-preview p),
.game-card .category {
  position: relative;
  z-index: 1;
}

.keyboard-hint {
  position: fixed;
  bottom: 20px;
  left: 20px;
  background: rgba(26, 28, 34, 0.9);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #333;
  font-size: 0.85em;
  color: #ccc;
  z-index: 999;
  backdrop-filter: blur(10px);
  max-width: 250px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.keyboard-hint.show {
  opacity: 1;
}

.keyboard-hint kbd {
  background: #1a1c22;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  color: #5ac8fa;
  font-size: 0.9em;
}

@media (max-width: 768px) {
  #scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
  
  .toast {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .keyboard-hint {
    display: none;
  }
}

