.game-selection {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  margin: 0 auto;
  padding: 0;
  width: 100%;
  max-width: 800px;
  position: relative;
  margin-top: -520px;
}

.game-card {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  background: rgb(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgb(0, 0, 0, 0.2);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 5px;
}

.game-card:hover {
  transform: translateY(-4px) scale(1);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.6), 
              0 0 40px rgba(0, 255, 136, 0.3);
  background: rgba(0, 255, 136, 0.15);
  border-color: #00ff88;
}

#flappy-best-score, #invaders-best-score, #breakout-best-score, #snake-best-score{
  text-align: center;
  margin: 1px auto 1px;
  font-size: 20px;
  color: white;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 15px;
  border-radius: 8px;
  max-width: 500px;
  display: none;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: fit-content;
}

.game-mode #breakout-best-score,
.game-mode #snake-best-score,
.game-mode #flappy-best-score,
.game-mode #invaders-best-score {
  display: none;
}

.game-mode.game-active #breakout-best-score.active,
.game-mode.game-active #snake-best-score.active,
.game-mode.game-active #flappy-best-score.active,
.game-mode.game-active #invaders-best-score.active {
  display: block;
}

.game-cover {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.4rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
  background: rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

.game-cover.flappy {
  background: linear-gradient(45deg, #FF9800, #F57C00);
  font-family: 'Silkscreen', cursive;
  font-size: 1.4rem;
  text-transform: uppercase;
  text-shadow: 3px 3px 0 #E65100;
  letter-spacing: 2px;
  line-height: 1.5;
}

.game-cover.invaders {
  background: linear-gradient(45deg, #9C27B0, #6A1B9A);
  font-family: 'Orbitron', sans-serif;
  font-size: 1.3rem;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  letter-spacing: 1px;
}

.game-cover.snake {
  background: linear-gradient(45deg, #2196F3, #1976D2);
  font-family: 'VT323', monospace;
  font-size: 1.6rem;
  text-transform: uppercase;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
}

.game-cover.breakout {
  background: linear-gradient(45deg, #FF4081, #C51162);
  font-family: 'Bungee', cursive;
  font-size: 1.3rem;
  text-transform: uppercase;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 1px;
}

.game-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 20px;
  z-index: 9999;
}

.game-mode .mode-toggles {
  display: none !important;
}

.game-mode .menu-select,
.game-mode #leaderboard-container,
.game-mode #chat-container,
.game-mode .skin-button,
.game-mode #oiia-image,
.game-mode footer,
.game-mode #current-timer,
.game-mode .music-player,
.game-mode #map-container,
.game-mode .header {
  display: none !important;
}

@media (max-width: 768px) {
  .game-selection {
    gap: 8px;
    max-width: 250px;
    max-height: 400px;
    flex-direction: column;
    margin: 5px auto;
    padding: 0;
    margin-top: -280px;
  }
  #flappy-best-score, #invaders-best-score, #breakout-best-score, #snake-best-score {
    font-size: 10px;
  }
}

#game-mode-off {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgb(0, 0, 0, 0.5);
  border-radius: 10px;
  text-shadow: 0px 0px 3px rgba(0, 0, 0, 0.9);
  color: #ffffff;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}
#game-mode-off:hover {
  background: rgb(0, 0, 0, 0.3);
  border-color: #00ff88;
}