/* Game pages specific styles */

.game-page {
  padding-top: 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.game-container {
  flex: 1;
  width: 100%;
  max-width: 1000px;
  margin: 20px auto;
  padding: 20px;
}

.game-title {
  text-align: center;
  margin: 30px 0;
  animation: neonFlicker 5s infinite alternate;
}

@keyframes neonFlicker {
  0%, 19.999%, 22%, 62.999%, 64%, 98.999%, 100% {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3),
                 0 0 20px rgba(255, 255, 255, 0.2),
                 0 0 30px var(--primary-blue),
                 0 0 40px var(--primary-purple);
  }
  20%, 21.999%, 63%, 63.999%, 99% {
    text-shadow: none;
  }
}

.game-frame-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5),
              0 0 20px rgba(76, 201, 255, 0.3),
              0 0 40px rgba(201, 97, 255, 0.2);
}

.game-frame-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 10px;
  padding: 3px;
  background: linear-gradient(45deg, var(--primary-blue), var(--primary-pink), var(--primary-purple));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 2;
}

.game-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 1;
}

.back-button {
  display: inline-block;
  margin: 30px auto;
  padding: 12px 30px;
  background: linear-gradient(90deg, var(--primary-blue), var(--primary-purple));
  color: var(--text-light);
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  border-radius: 50px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.back-button:hover {
  background: linear-gradient(90deg, var(--primary-purple), var(--primary-pink));
  color: var(--text-light);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5),
              0 0 10px rgba(255, 97, 229, 0.5);
}

.back-link-container {
  text-align: center;
}

/* Loading animation */
.game-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--dark-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.game-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid transparent;
  border-top-color: var(--primary-blue);
  border-right-color: var(--primary-pink);
  border-bottom-color: var(--primary-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .game-container {
    padding: 10px;
  }
  
  .game-title {
    font-size: 1.8rem;
    margin: 20px 0;
  }
  
  .game-frame-container {
    padding-bottom: 75%; /* More square aspect ratio for mobile */
  }
}