/* ============================================
   Game Container Styles
   ============================================ */

#game-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: #0d1117;
  display: none;
  align-items: center;
  justify-content: center;
  /* iOS safe area handling for notched phones */
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

#game-container canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  /* Prevent browser gestures (pinch-zoom, scroll bounce) on canvas */
  touch-action: none;
}

/* Hide scrollbars when game is active */
body.game-active {
  overflow: hidden;
}

#game-container.active {
  display: flex;
}

/* Landscape prompt overlay — shown in portrait on phones */
.rotate-prompt {
  display: none;
  position: absolute;
  inset: 0;
  background: #0d1117;
  z-index: 210;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #8b949e;
  font-family: 'Fira Code', 'Cascadia Code', monospace;
  text-align: center;
  padding: 24px;
}

.rotate-prompt .rotate-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  animation: rotateHint 2s ease-in-out infinite;
}

.rotate-prompt .rotate-text {
  font-size: 1.1rem;
  color: #e6edf3;
  margin-bottom: 8px;
}

.rotate-prompt .rotate-sub {
  font-size: 0.8rem;
  color: #484f58;
}

@keyframes rotateHint {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(90deg); }
}

/* Show rotate prompt in portrait on mobile */
@media (orientation: portrait) and (max-width: 768px) {
  .rotate-prompt {
    display: flex;
  }

  #game-container canvas {
    display: none;
  }
}
