/* css/style.css —— 页面与画布自适应 + 菜单面板 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; background: #222; overflow: hidden; font-family: "Microsoft YaHei", sans-serif; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
#game-root { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
#game { background: #000; max-width: 100vw; max-height: 100vh; aspect-ratio: 960 / 640; width: 100%; height: auto; display: block; touch-action: none; }   /* touch-action:none：拖拽种子/植物时阻止页面滚动/缩放，保证 pointermove 连续 */
.corner-btn { position: absolute; top: 8px; right: 8px; z-index: 20; font-size: 20px; border: none; background: rgba(0,0,0,.4); border-radius: 8px; padding: 4px 8px; cursor: pointer; }
.hidden { display: none !important; }

/* 竖屏提示：只提示不拦截——顶部细横幅，不遮住画面，✕ 可当场关掉 */
#rotate-hint { display: none; }
@media (orientation: portrait) and (max-width: 820px) {
  #rotate-hint {
    display: flex; position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    align-items: center; justify-content: center; gap: 12px;
    padding: 6px 10px; background: rgba(10, 12, 24, .78); color: #fff;
    font-size: 14px; text-align: center;
  }
}
#rotate-hint.dismissed { display: none !important; }        /* 本次页面内关掉后不再出现（刷新恢复） */
.rh-close { border: none; background: rgba(255,255,255,.18); color: #fff; border-radius: 6px; padding: 2px 9px; font-size: 14px; line-height: 1.4; cursor: pointer; }

/* 面板覆盖层 */
.panel {
  position: absolute; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: rgba(20, 24, 40, .82); color: #fff; text-align: center;
}
.logo { font-size: 46px; color: #8ee000; text-shadow: 3px 3px 0 #274; line-height: 1.25; }
.logo span { font-size: 34px; color: #ffd23e; }
.tip { opacity: .8; margin-bottom: 10px; }
.big-btn {
  font-size: 22px; padding: 10px 34px; border-radius: 30px; cursor: pointer;
  border: 3px solid #2f7a1f; background: linear-gradient(#a6e05a, #6cb33e); color: #1c3a10; font-weight: bold;
}
.big-btn:hover { filter: brightness(1.1); }
#level-grid { display: grid; grid-template-columns: repeat(3, 150px); gap: 14px; }
#level-grid button { font-size: 16px; padding: 18px 6px; border-radius: 12px; cursor: pointer; border: 2px solid #2f7a1f; background: #d9c08a; color: #3a2b0f; }
#level-grid button:disabled { background: #555; color: #999; cursor: not-allowed; }
#level-grid button.free-pick { background: #cdd8ee; border-color: #4a63a8; color: #24365e; }   /* 靠“自由选关”提前进入的关卡 */

/* 自由选关开关（选关页顶部） */
.toggle-btn { font-size: 15px; padding: 6px 18px; border-radius: 20px; cursor: pointer; border: 2px solid #5a6f9f; background: #33405f; color: #cfd8f5; }
.toggle-btn:hover { filter: brightness(1.15); }
.toggle-btn.on { border-color: #ffd23e; background: linear-gradient(#ffe07a, #e0a92e); color: #3a2b0f; font-weight: bold; }
#result-title { font-size: 34px; }
#result-stars { font-size: 30px; color: #ffd23e; letter-spacing: 6px; }
