/* ============================================
   SNAKE GAME STYLES
   ============================================ */

.canvas-wrapper {
  position: relative;
  width: min(400px, 90vw);
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 40px rgba(6, 182, 212, 0.08);
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: var(--radius-xl);
}

/* Overlay screens */
.overlay-screen {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  transition: var(--transition-base);
  z-index: 10;
}

.overlay-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.overlay-content {
  text-align: center;
}

.overlay-icon {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
  animation: float 3s ease-in-out infinite;
}

.overlay-content h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.overlay-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.overlay-scores {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

/* Mobile D-Pad */
.mobile-controls {
  display: none;
  margin-top: 1.5rem;
}

.d-pad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.d-mid {
  display: flex;
  align-items: center;
  gap: 6px;
}

.d-btn {
  width: 60px;
  height: 60px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.d-btn:active {
  background: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
  transform: scale(0.92);
}

.d-center {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 768px) {
  .mobile-controls {
    display: flex;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .d-btn {
    width: 52px;
    height: 52px;
  }
  .d-center {
    width: 52px;
    height: 52px;
  }
}
