/* games/snake/style.css */

.difficulty-bar {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

#snake-canvas {
  border-radius: var(--border-radius);
  display: block;
  margin: 0 auto;
  touch-action: none; /* 防止手機滑動干擾 */
}

/* 限制容器寬度配合 canvas */
.game-canvas-wrap {
  max-width: 480px;
}

/* 虛擬方向鍵 */
.snake-dpad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
}

.dpad-row {
  display: flex;
  gap: 6px;
}

.dpad-btn {
  width: 64px;
  height: 64px;
  border-radius: var(--border-radius-sm);
  border: 2px solid var(--color-border);
  background: var(--color-bg-card);
  font-size: 28px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  box-shadow: var(--shadow-card);
  -webkit-tap-highlight-color: transparent;
}

.dpad-btn:active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.dpad-center {
  background: #f5f5f5;
  font-size: 22px;
}

/* 桌機可以隱藏方向鍵 */
@media (min-width: 768px) {
  .snake-dpad {
    display: none;
  }
}
