/* 首页迷你游戏区（自动演示 / 悬停手玩 / 双击展开 / 右上角切换） */
.game-section {
  margin-top: 20px;
}

.game-zone {
  position: relative;
  width: 100%;
  height: 96px;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius);
  background: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
  overflow: hidden;
  transition: height .22s ease, border-color .16s ease, box-shadow .16s ease;
}

.game-zone[data-expanded="true"] {
  height: 160px;
}

.game-zone:hover,
.game-zone[data-mode="manual"] {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.game-zone:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.game-zone canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* 右下角状态提示：模式 + 展开/收起 */
.game-zone-hint {
  position: absolute;
  right: 8px;
  bottom: 6px;
  display: flex;
  gap: 12px;
  padding: 2px 8px;
  font-size: 10px;
  line-height: 1.4;
  color: var(--gray-500);
  background: rgba(255, 255, 255, .78);
  border-radius: 8px;
  opacity: .5;
  pointer-events: none;
  transition: opacity .16s ease;
}

.game-zone:hover .game-zone-hint,
.game-zone:focus-visible .game-zone-hint,
.game-zone[data-mode="manual"] .game-zone-hint {
  opacity: .95;
}

/* 右上角圆形切换按钮（显示“下一个游戏”的图标） */
.game-switch-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 11px;
  line-height: 1;
  color: var(--gray-600);
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: 50%;
  opacity: .35;
  cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
}

.game-switch-btn:hover,
.game-switch-btn:focus-visible {
  opacity: .9;
  transform: scale(1.1);
}

@media (max-width: 640px) {
  .game-zone {
    height: 84px;
  }

  .game-zone[data-expanded="true"] {
    height: 140px;
  }
}
