@keyframes canvasGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(191, 90, 242, 0.12), inset 0 0 60px rgba(0, 0, 0, 0.8);
  }
  50% {
    box-shadow: 0 0 30px rgba(191, 90, 242, 0.18), inset 0 0 60px rgba(0, 0, 0, 0.8);
  }
}

.game-page {
  background: radial-gradient(ellipse at top, #1a0a2e 0%, #0a0a1a 50%, #000000 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

.game-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 30%, rgba(191, 90, 242, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 80% 70%, rgba(138, 43, 226, 0.06) 0%, transparent 40%),
              radial-gradient(circle at 50% 50%, rgba(75, 0, 130, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.game-content {
  position: relative;
  z-index: 1;
}

#game-canvas {
  display: block;
  background: #000;
  border: 2px solid rgba(191, 90, 242, 0.35);
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(191, 90, 242, 0.12), inset 0 0 60px rgba(0, 0, 0, 0.8);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  animation: canvasGlow 3s ease-in-out infinite;
}

.game-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.back-to-arcade {
  display: inline-block;
  padding: 12px 24px;
  background: rgba(191, 90, 242, 0.15);
  border: 2px solid rgba(191, 90, 242, 0.4);
  border-radius: 4px;
  color: #bf5af2;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.back-to-arcade:hover {
  background: rgba(191, 90, 242, 0.25);
  border-color: rgba(191, 90, 242, 0.6);
  box-shadow: 0 0 15px rgba(191, 90, 242, 0.3);
  transform: translateY(-2px);
}

@media (max-width: 520px) {
  .game-page {
    background: radial-gradient(ellipse at top, #1a0a2e 0%, #0a0a1a 70%, #000000 100%);
  }

  #game-canvas {
    max-width: 100%;
    height: auto;
    border-width: 1px;
  }

  .back-to-arcade {
    padding: 10px 20px;
    font-size: 12px;
  }

  .game-area {
    gap: 12px;
    width: 100%;
  }
}
