/* gf-shell.css — aigamer 统一游戏外壳（标题/暂停/结束/返回主页 + 中英切换 + 道具栏）
 * 单一共享文件，所有游戏引用 /games/shared/gf-shell.*；改这一份全站生效。 */
.gf-shell-wrap { position: relative; display: inline-block; line-height: 0; }
.gf-shell-wrap canvas { display: block; }

/* 全屏叠层（标题/暂停/结束） */
.gf-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center; box-sizing: border-box; padding: 28px;
  line-height: 1.5;
  font-family: -apple-system, "PingFang SC", system-ui, sans-serif;
  color: #eaf6ff;
  background: radial-gradient(ellipse at center, rgba(10,10,30,.86), rgba(3,4,12,.96));
  pointer-events: auto;
}
.gf-overlay[hidden] { display: none; }

/* 暂停页：整体垂直+水平居中 */
.gf-pause-ov {
  justify-content: center;
  align-items: center;
  padding: 20px 16px;
  gap: 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.gf-pause-ov .gf-title {
  font-size: clamp(22px, 5.5vw, 32px);
  margin: 0;
  flex-shrink: 0;
}
.gf-pause-card {
  width: min(92%, 340px);
  box-sizing: border-box;
  padding: 14px 16px 12px;
  border-radius: 14px;
  text-align: left;
  background: rgba(8, 10, 26, .92);
  box-shadow: 0 0 20px rgba(0, 229, 255, .18), inset 0 0 0 1px rgba(0, 229, 255, .22);
  max-height: min(56vh, 420px);
  overflow-y: auto;
  line-height: 1.55;
}
.gf-pause-card .gf-pop-label {
  display: block; font-size: 12px; color: #06ffa5; letter-spacing: 2px; margin-bottom: 10px;
}
.gf-pause-card .gf-pop-how {
  font-size: 13px; display: flex; flex-direction: column; gap: 12px;
}
.gf-pause-card .gf-pop-ctl {
  font-size: 12px; color: rgba(234,246,255,.62); margin-top: 12px;
  padding-top: 10px; border-top: 1px solid rgba(234,246,255,.12);
}
.gf-pause-ov .gf-row { margin-top: 2px; flex-shrink: 0; }

/* 玩法分区 */
.gf-how-sec {
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gf-how-sec-play {
  background: rgba(0, 229, 255, .06);
  box-shadow: inset 0 0 0 1px rgba(0, 229, 255, .22);
}
.gf-how-sec-fail {
  background: rgba(255, 77, 109, .08);
  box-shadow: inset 0 0 0 1px rgba(255, 77, 109, .35);
}
.gf-how-sec-hd {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin-bottom: 2px;
}
.gf-how-sec-play .gf-how-sec-hd { color: #4deeea; }
.gf-how-sec-fail .gf-how-sec-hd { color: #ff4d6d; }

.gf-how-line { line-height: 1.55; }
.gf-how-text { font-size: 13px; }
.gf-how-goal .gf-how-text { color: #ffe066; font-weight: 700; }
.gf-how-play .gf-how-text { color: rgba(234,246,255,.95); }
.gf-how-score .gf-how-text { color: #06ffa5; font-weight: 600; }
.gf-how-item .gf-how-text { color: #4deeea; }
.gf-how-tip .gf-how-text { color: rgba(234,246,255,.72); font-size: 12px; }
.gf-how-fail .gf-how-text { color: #ff8fa3; font-weight: 600; }

.gf-how-swatches {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
.gf-how-swatch {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .35);
  box-shadow: inset 0 0 0 1px rgba(255, 77, 109, .45);
  font-size: 12px; font-weight: 700; color: #ffe0e6;
}
.gf-how-dot {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  background: #ff4d6d;
  box-shadow: 0 0 8px rgba(255, 77, 109, .7), inset 0 0 0 1.5px rgba(255,255,255,.35);
  flex-shrink: 0;
}
.gf-how-swatch-lab { line-height: 1.2; }

.gf-title {
  font-size: clamp(28px, 7vw, 44px); font-weight: 800; letter-spacing: 2px;
  color: #00e5ff; text-shadow: 0 0 18px rgba(0,229,255,.7);
}
.gf-best { font-size: 15px; color: #ffe066; }
.gf-score { font-size: 22px; color: #ff4d6d; font-weight: 800; }

.gf-hint {
  margin-top: 6px; font-size: 13px; color: rgba(234,246,255,.55);
  animation: gfpulse 1.6s ease-in-out infinite;
}

.gf-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.gf-btn {
  font: inherit; font-size: 16px; font-weight: 700; color: #06121a;
  background: #06ffa5; border: none; border-radius: 24px;
  padding: 12px 28px; cursor: pointer; letter-spacing: 1px;
  box-shadow: 0 0 16px rgba(6,255,165,.5); transition: transform .1s;
}
.gf-btn:active { transform: scale(.96); }
.gf-btn.ghost {
  background: transparent; color: #eaf6ff;
  box-shadow: inset 0 0 0 1.5px rgba(234,246,255,.4);
}

/* 悬浮按钮（右上暂停 / 左上 ⌂ · 语言） */
.gf-fab {
  position: absolute; top: 10px;
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.14); color: #eaf6ff;
  font-size: 16px; cursor: pointer; z-index: 6;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.gf-fab[hidden] { display: none; }
.gf-pause-btn { right: 10px; }
.gf-library-btn { left: 10px; top: 10px; bottom: auto; font-size: 18px; }
.gf-lang-btn { left: 56px; font-size: 12px; font-weight: 700; }

/* 统一道具栏：右上、暂停下方；仅 play 显示 */
.gf-item-bar {
  position: absolute; right: 8px; top: 56px; z-index: 5;
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  pointer-events: auto;
}
.gf-item-bar[hidden] { display: none; }
.gf-item-btn {
  min-width: 72px; max-width: 96px;
  padding: 8px 10px; border-radius: 12px; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-family: -apple-system, "PingFang SC", system-ui, sans-serif;
  background: rgba(10, 18, 36, .82); color: #eaf6ff;
  box-shadow: inset 0 0 0 1.5px rgba(77, 238, 234, .55), 0 0 12px rgba(0, 229, 255, .2);
  backdrop-filter: blur(6px);
}
.gf-item-btn:active { transform: scale(.96); }
.gf-item-btn:disabled {
  opacity: .45; cursor: default;
  box-shadow: inset 0 0 0 1px rgba(170, 190, 210, .35);
}
.gf-item-btn.is-active {
  box-shadow: inset 0 0 0 2px #ff4d6d, 0 0 14px rgba(255, 77, 109, .35);
}
.gf-item-btn .gf-item-label { font-size: 12px; font-weight: 800; letter-spacing: .5px; line-height: 1.2; }
.gf-item-btn .gf-item-cost { font-size: 11px; font-weight: 700; color: #ffe066; }
.gf-item-btn.gf-item-cyan { box-shadow: inset 0 0 0 1.5px rgba(77, 238, 234, .7), 0 0 12px rgba(77, 238, 234, .25); }
.gf-item-btn.gf-item-purple { box-shadow: inset 0 0 0 1.5px rgba(176, 107, 255, .7), 0 0 12px rgba(176, 107, 255, .25); }
.gf-item-btn.gf-item-pink { box-shadow: inset 0 0 0 1.5px rgba(255, 45, 149, .7), 0 0 12px rgba(255, 45, 149, .25); }
.gf-item-btn.gf-item-gold { box-shadow: inset 0 0 0 1.5px rgba(255, 224, 102, .7), 0 0 12px rgba(255, 224, 102, .22); }

/* 首次出现教练条：中上浮层，不挡右上道具栏与主点击区 */
.gf-coach-tip {
  position: absolute; left: 50%; top: 12%;
  transform: translateX(-50%);
  z-index: 4;
  width: min(86%, 300px);
  box-sizing: border-box;
  padding: 10px 14px;
  border-radius: 12px;
  pointer-events: none;
  font-family: -apple-system, "PingFang SC", system-ui, sans-serif;
  font-size: 13px; font-weight: 700; line-height: 1.45;
  text-align: center; color: #eaf6ff;
  background: rgba(8, 12, 28, .88);
  box-shadow: 0 0 16px rgba(0, 229, 255, .22), inset 0 0 0 1px rgba(77, 238, 234, .45);
  animation: gfcoachIn .28s ease-out;
}
.gf-coach-tip[hidden] { display: none; }
.gf-coach-tip.gf-coach-warn {
  color: #ffe0e6;
  box-shadow: 0 0 16px rgba(255, 77, 109, .28), inset 0 0 0 1.5px rgba(255, 77, 109, .55);
}
.gf-coach-tip.gf-coach-item {
  color: #d8fffb;
  box-shadow: 0 0 16px rgba(77, 238, 234, .3), inset 0 0 0 1.5px rgba(77, 238, 234, .65);
}
.gf-coach-tip.gf-coach-info {
  box-shadow: 0 0 14px rgba(255, 224, 102, .2), inset 0 0 0 1px rgba(255, 224, 102, .4);
}
.gf-coach-text { pointer-events: none; }

@keyframes gfcoachIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes gfpulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
