﻿/* ============================================================
 * game_modern.css
 * 英语说 · 游戏模块现代化视觉升级（覆盖 style.css 旧样式）
 * 不修改原文件，仅通过更高优先级选择器覆盖。
 * 设计语言：现代儿童 App —— 大圆角、毛玻璃、柔和投影、
 *           弹性缓动、糖果色渐变、CSS 伪元素构造插画。
 * 适配：max-width 420px 移动端容器。
 * ============================================================ */

/* ---------- 全局基础 ---------- */
:root {
  --gm-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
  --gm-ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --gm-shadow-sm: 0 4px 12px rgba(60, 80, 120, 0.10);
  --gm-shadow-md: 0 8px 24px rgba(60, 80, 120, 0.14);
  --gm-shadow-lg: 0 16px 40px rgba(60, 80, 120, 0.18);
  --gm-pirate: linear-gradient(135deg, #5B9BD5, #3A7BD5);
  --gm-balloon: linear-gradient(135deg, #FF6B9D, #FF4081);
  --gm-whack: linear-gradient(135deg, #7BC96F, #5BAE4A);
  --gm-fish: linear-gradient(135deg, #4ECDC4, #3DBDB5);
  --gm-star: linear-gradient(135deg, #C780FA, #8E5BFF);
}

/* 让游戏画布背景由主题 class 控制；清除旧的内联渐变 */
.game-canvas {
  position: relative;
  background: #1a2a4a !important;
}

/* 游戏全局容器 — 背景铺满整个游戏页面（含画布外区域） */
#gamePlay {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  height: 100vh;
  padding: 0 !important;
  background: #0a2a4a;
  transition: background 0.4s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#gamePlay:has(.theme-pirate) {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255,200,100,0.25) 0%, transparent 55%),
    linear-gradient(180deg, #071e38 0%, #0f3d6b 40%, #1a5a9a 75%, #3a82d4 100%) !important;
}
#gamePlay:has(.theme-balloon) {
  background:
    radial-gradient(circle at 20% 80%, rgba(255,180,220,0.35) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(180,220,255,0.35) 0%, transparent 50%),
    linear-gradient(180deg, #6bb8e8 0%, #8ec9e8 35%, #FFD6E8 100%) !important;
}
#gamePlay:has(.theme-whack) {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(139,105,20,0.4) 0%, transparent 60%),
    linear-gradient(180deg, #7bc0e0 0%, #88d0c0 30%, #7BC96F 55%, #5BAE4A 80%, #7a5a20 100%) !important;
}
#gamePlay:has(.theme-fish) {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.12) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(0,60,100,0.5) 0%, transparent 60%),
    linear-gradient(180deg, #006090 0%, #0088b0 30%, #00a0c4 60%, #38b8d4 100%) !important;
}
#gamePlay:has(.theme-star) {
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.12) 0%, transparent 30%),
    radial-gradient(circle at 70% 60%, rgba(200,150,255,0.18) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(100,80,200,0.25) 0%, transparent 50%),
    linear-gradient(180deg, #080820 0%, #12123e 30%, #221f60 60%, #3d3278 100%) !important;
}
.game-canvas.theme-pirate,
.game-canvas.ut-themed.theme-pirate {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255,200,100,0.3) 0%, transparent 50%),
    linear-gradient(180deg, #0a2a4a 0%, #1a4a7a 40%, #2d6aa0 70%, #4a90d9 100%) !important;
}
.game-canvas.theme-balloon {
  background:
    radial-gradient(circle at 20% 80%, rgba(255,180,220,0.4) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(180,220,255,0.4) 0%, transparent 50%),
    linear-gradient(180deg, #87CEEB 0%, #B0E0E6 40%, #FFE4F0 100%) !important;
}
.game-canvas.theme-whack {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(139,105,20,0.5) 0%, transparent 60%),
    linear-gradient(180deg, #87CEEB 0%, #98D8C8 30%, #7BC96F 55%, #5BAE4A 80%, #8B6914 100%) !important;
}
.game-canvas.theme-fish {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.15) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(0,80,120,0.6) 0%, transparent 60%),
    linear-gradient(180deg, #0077B6 0%, #0099CC 30%, #00B4D8 60%, #48CAE4 100%) !important;
}
.game-canvas.theme-star {
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0%, transparent 30%),
    radial-gradient(circle at 70% 60%, rgba(200,150,255,0.2) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(100,80,200,0.3) 0%, transparent 50%),
    linear-gradient(180deg, #0d0d2b 0%, #1a1a4e 30%, #2d2b7a 60%, #4a3f8a 100%) !important;
}

/* ============================================================
 * 1. 游戏菜单卡片
 * ============================================================ */
#gameMenu .game-menu-card {
  padding: 22px 18px 26px !important;
  border-radius: 24px !important;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255, 185, 200, 0.35) 0%, transparent 55%),
    radial-gradient(120% 80% at 100% 0%, rgba(180, 220, 255, 0.45) 0%, transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f7faff 100%) !important;
  box-shadow: var(--gm-shadow-lg) !important;
  position: relative;
  overflow: hidden;
}
#gameMenu .game-menu-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(255, 215, 120, 0.35), transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
#gameMenu .card-title {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #2b3a55 !important;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}
#gameMenu .game-grid {
  gap: 14px !important;
  position: relative;
  z-index: 1;
}
#gameMenu .game-card {
  border-radius: 20px !important;
  padding: 16px 10px 14px !important;
  border: none !important;
  background: #ffffff !important;
  box-shadow: var(--gm-shadow-sm) !important;
  transition: transform 0.35s var(--gm-ease), box-shadow 0.3s var(--gm-ease-soft) !important;
  overflow: hidden;
}
#gameMenu .game-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0) 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
#gameMenu .game-card[onclick*="pirate"]  { background: linear-gradient(160deg,#eaf4ff,#ffffff 60%) !important; }
#gameMenu .game-card[onclick*="balloon"] { background: linear-gradient(160deg,#fff0f6,#ffffff 60%) !important; }
#gameMenu .game-card[onclick*="whack"]   { background: linear-gradient(160deg,#eefbe4,#ffffff 60%) !important; }
#gameMenu .game-card[onclick*="fish"]    { background: linear-gradient(160deg,#e3fbfa,#ffffff 60%) !important; }
#gameMenu .game-card[onclick*="star"]    { background: linear-gradient(160deg,#f1eaff,#ffffff 60%) !important; }

#gameMenu .game-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--gm-shadow-md) !important;
}
#gameMenu .game-card:active {
  transform: scale(0.95) !important;
  transition: transform 0.15s var(--gm-ease-soft) !important;
}
#gameMenu .game-card-icon {
  width: 56px !important;
  height: 56px !important;
  border-radius: 18px !important;
  font-size: 28px !important;
  margin: 0 auto 10px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(60, 80, 120, 0.22), inset 0 1px 0 rgba(255,255,255,0.6) !important;
  transition: transform 0.4s var(--gm-ease);
}
#gameMenu .game-card:hover .game-card-icon { transform: rotate(-6deg) scale(1.08); }
#gameMenu .game-card-name {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #2b3a55 !important;
}
#gameMenu .game-card-desc {
  font-size: 11px !important;
  color: #7a8aa3 !important;
  margin-top: 4px;
}
#gameMenu .game-card-tag {
  top: 8px !important;
  right: 8px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  padding: 3px 9px !important;
  border-radius: 999px !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
#gameMenu .tag-pirate  { background: rgba(58,123,213,0.14) !important; color:#2c6cc4 !important; }
#gameMenu .tag-balloon { background: rgba(255,64,129,0.14) !important; color:#e63a73 !important; }
#gameMenu .tag-whack   { background: rgba(91,174,74,0.16) !important; color:#4a9637 !important; }
#gameMenu .tag-fish    { background: rgba(61,189,181,0.16) !important; color:#2a9b94 !important; }
#gameMenu .tag-sentence{ background: rgba(142,91,255,0.14) !important; color:#7048e0 !important; }

/* ============================================================
 * 2. HUD
 * ============================================================ */
#gamePlay .game-hud {
  margin: 8px 12px 4px !important;
  padding: 10px 16px !important;
  min-height: 40px !important;
  flex-shrink: 0 !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: var(--gm-shadow-sm) !important;
  font-size: 15px !important;
  display: flex;
  align-items: center;
}
/* 深色背景游戏HUD */
.game-canvas.theme-pirate ~ .game-hud,
.game-canvas.theme-fish ~ .game-hud,
.game-canvas.theme-star ~ .game-hud,
#gamePlay:has(.theme-pirate) .game-hud,
#gamePlay:has(.theme-fish) .game-hud,
#gamePlay:has(.theme-star) .game-hud {
  background: rgba(0, 0, 0, 0.3) !important;
  border-color: rgba(255,255,255,0.15);
}
#gamePlay:has(.theme-pirate) .hud-item,
#gamePlay:has(.theme-fish) .hud-item,
#gamePlay:has(.theme-star) .hud-item {
  color: rgba(255,255,255,0.9) !important;
}
#gamePlay .hud-item {
  color: #51617a !important;
  font-weight: 700;
  display: flex; align-items: center; gap: 4px;
}
#gamePlay .hud-score {
  background: linear-gradient(135deg,#ffd54f,#ff8a3d);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent !important;
  font-size: 19px !important;
  font-weight: 900 !important;
}

/* 进度小圆点（JS 会动态切换，这里给样式） */
#gamePlay .hud-dots {
  display: inline-flex; gap: 4px; margin-left: 4px;
}
#gamePlay .hud-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(90,110,140,0.25);
}
#gamePlay .hud-dot.done { background: linear-gradient(135deg,#7BC96F,#4CAF50); }
#gamePlay .hud-dot.cur  { background: linear-gradient(135deg,#ffb74d,#ff7043); transform: scale(1.3); }

/* ============================================================
 * 3. 游戏画布
 * ============================================================ */
#gamePlay .game-canvas {
  margin: 0 !important;
  width: 100% !important;
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  border-radius: 0 !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15) !important;
  overflow: hidden !important;
  position: relative;
}
/* 画布顶部微光装饰 */
#gamePlay .game-canvas::before {
  content: '';
  position: absolute;
  top: -40%; left: -20%;
  width: 60%; height: 80%;
  background: radial-gradient(circle, rgba(255,255,255,0.25), transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* 通用场景装饰层 */
#gamePlay .game-canvas::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
  background-repeat: no-repeat;
}
/* 海盗：锚水印 */
#gamePlay .game-canvas.theme-pirate::after {
  content: '⚓';
  font-size: 200px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding-right: 20px;
  padding-bottom: 10px;
  opacity: 0.1;
  color: #fff;
}
/* 气球：云朵装饰 */
#gamePlay .game-canvas.theme-balloon::after {
  background:
    radial-gradient(ellipse 60px 30px at 15% 85%, rgba(255,255,255,0.7) 0%, transparent 70%),
    radial-gradient(ellipse 80px 40px at 75% 15%, rgba(255,255,255,0.6) 0%, transparent 70%),
    radial-gradient(ellipse 50px 25px at 45% 92%, rgba(255,255,255,0.5) 0%, transparent 70%);
  opacity: 0.6;
}
/* 打地鼠：草地纹理 */
#gamePlay .game-canvas.theme-whack::after {
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent 30px, rgba(255,255,255,0.08) 30px, rgba(255,255,255,0.08) 32px),
    radial-gradient(ellipse at 50% 100%, rgba(100,70,20,0.3) 0%, transparent 60%);
  opacity: 0.5;
}
/* 钓鱼：气泡 */
#gamePlay .game-canvas.theme-fish::after {
  background:
    radial-gradient(circle 8px at 20% 30%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(circle 12px at 70% 50%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(circle 6px at 40% 70%, rgba(255,255,255,0.25) 0%, transparent 100%),
    radial-gradient(circle 10px at 85% 25%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(circle 5px at 55% 85%, rgba(255,255,255,0.3) 0%, transparent 100%);
  opacity: 0.7;
}
/* 星星：星点 */
#gamePlay .game-canvas.theme-star::after {
  background:
    radial-gradient(circle 2px at 10% 20%, rgba(255,255,255,0.8) 0%, transparent 100%),
    radial-gradient(circle 2px at 30% 60%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(circle 3px at 50% 15%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(circle 2px at 70% 40%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(circle 2px at 85% 75%, rgba(255,255,255,0.8) 0%, transparent 100%),
    radial-gradient(circle 3px at 15% 80%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(circle 2px at 60% 90%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(circle 2px at 90% 10%, rgba(255,255,255,0.7) 0%, transparent 100%);
  opacity: 0.8;
}

/* ============================================================
 * 4. 目标元素
 * ============================================================ */
#gamePlay .g-target {
  z-index: 5;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.18));
  transition: transform 0.3s var(--gm-ease);
}
#gamePlay .g-target.target-active {
  z-index: 8;
  filter: drop-shadow(0 0 14px rgba(255,215,0,0.95)) drop-shadow(0 8px 16px rgba(0,0,0,0.2));
  transform: scale(1.08);
}

/* —— 气球：CSS 3D 高光 + 摇摆 —— */
#gamePlay .balloon-target {
  width: 78px;
  text-align: center;
  animation: gmBalloonSway 3s ease-in-out infinite !important;
  transform-origin: 50% 100%;
}
@keyframes gmBalloonSway {
  0%,100% { transform: rotate(-4deg); }
  50%     { transform: rotate(4deg); }
}
#gamePlay .balloon-body {
  position: relative;
  width: 72px;
  height: 86px;
  border-radius: 50% 50% 48% 48% / 55% 55% 45% 45%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset -8px -10px 18px rgba(0,0,0,0.18),
              inset 6px 6px 14px rgba(255,255,255,0.55),
              0 6px 14px rgba(0,0,0,0.18);
}
#gamePlay .balloon-body::before {
  content: '';
  position: absolute;
  top: 10px; left: 14px;
  width: 16px; height: 22px;
  background: radial-gradient(ellipse at 30% 30%, rgba(255,255,255,0.85), rgba(255,255,255,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}
#gamePlay .balloon-body::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid currentColor;
  color: inherit;
  opacity: 0.85;
}
#gamePlay .balloon-word {
  position: relative;
  z-index: 2;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  max-width: 64px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#gamePlay .balloon-string {
  width: 1.5px;
  height: 28px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.05));
}
#gamePlay .balloon-target.target-hit .balloon-body {
  animation: gmPop 0.45s var(--gm-ease) forwards;
}
@keyframes gmPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35) rotate(8deg); opacity: 1; }
  100% { transform: scale(0.2) rotate(40deg); opacity: 0; }
}

/* —— 地鼠：圆胖身体 —— */
#gamePlay .whack-grid {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 4% 6%;
  gap: 4% 2%;
}
#gamePlay .whack-hole {
  position: relative !important;
  width: auto !important; height: auto !important;
  left: auto !important; top: auto !important;
  display: flex; align-items: flex-end; justify-content: center;
}
#gamePlay .whack-hole::before {
  content: '';
  position: absolute;
  bottom: -4px; left: 8%; right: 8%;
  height: 22px;
  background: radial-gradient(ellipse at center, rgba(60,40,20,0.55), rgba(60,40,20,0) 70%);
  border-radius: 50%;
  z-index: 1;
}
#gamePlay .whack-mole {
  position: relative;
  font-size: 0 !important; /* 隐藏纯emoji，使用CSS绘制 */
  display: flex; flex-direction: column; align-items: center;
  transform: translateY(120%);
  transition: transform 0.35s var(--gm-ease), opacity 0.3s;
  z-index: 2;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.25));
}
#gamePlay .whack-mole.show { transform: translateY(0); opacity: 1; }
#gamePlay .whack-mole.whacked {
  transform: translateY(-12px) scale(0.6) rotate(-15deg);
  opacity: 0;
  transition: all 0.4s var(--gm-ease);
}
/* CSS 地鼠身体 */
#gamePlay .mole-emoji {
  display: none; /* 我们用CSS身体，emoji隐藏 */
}
#gamePlay .mole-body {
  width: 64px; height: 58px;
  background: radial-gradient(circle at 50% 30%, #c28a5a, #8a5a32);
  border-radius: 50% 50% 42% 42%;
  position: relative;
  box-shadow: inset -4px -6px 10px rgba(0,0,0,0.25),
              inset 4px 4px 10px rgba(255,220,180,0.35);
}
#gamePlay .mole-body::before,
#gamePlay .mole-body::after {
  content: '';
  position: absolute;
  top: -5px;
  width: 17px; height: 17px;
  background: radial-gradient(circle at 30% 30%, #c28a5a, #6e4422);
  border-radius: 50%;
}
#gamePlay .mole-body::before { left: 7px; }
#gamePlay .mole-body::after  { right: 7px; }
#gamePlay .mole-eyes {
  position: absolute;
  top: 17px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 12px;
}
#gamePlay .mole-eyes::before,
#gamePlay .mole-eyes::after {
  content: '';
  width: 10px; height: 10px;
  background: #1a1a1a;
  border-radius: 50%;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.5);
}
#gamePlay .mole-nose {
  position: absolute;
  top: 32px; left: 50%;
  transform: translateX(-50%);
  width: 14px; height: 11px;
  background: radial-gradient(circle at 30% 30%, #ff9aa2, #d65a64);
  border-radius: 50%;
}
#gamePlay .mole-word {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: rgba(40, 25, 10, 0.7);
  padding: 3px 10px;
  border-radius: 999px;
  margin-top: 5px;
  white-space: nowrap;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(4px);
}
#gamePlay .whack-mole.target-active .mole-body {
  box-shadow: inset -4px -6px 10px rgba(0,0,0,0.25),
              inset 4px 4px 10px rgba(255,220,180,0.35),
              0 0 0 3px rgba(255,215,0,0.8),
              0 0 18px rgba(255,215,0,0.7);
}

/* —— 鱼：CSS 构造 —— */
#gamePlay .fish-target {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 8px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.94) !important;
  box-shadow: 0 6px 16px rgba(0,60,100,0.25), inset 0 1px 0 rgba(255,255,255,0.8) !important;
  animation: gmFishSwim 3s ease-in-out infinite;
  white-space: nowrap;
}
@keyframes gmFishSwim {
  0%,100% { transform: translateX(0) rotate(-2deg); }
  50%     { transform: translateX(12px) rotate(2deg); }
}
#gamePlay .fish-emoji {
  display: none;
}
#gamePlay .fish-shape {
  position: relative;
  width: 40px; height: 28px;
  background: linear-gradient(135deg, #ffd54f, #ff8a3d);
  border-radius: 50% 30% 30% 50% / 50% 50% 50% 50%;
  box-shadow: inset -4px -3px 6px rgba(0,0,0,0.2), inset 3px 2px 4px rgba(255,255,255,0.5);
}
#gamePlay .fish-shape::before {
  content: '';
  position: absolute;
  left: -10px; top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-right: 15px solid #ff8a3d;
}
#gamePlay .fish-shape::after {
  content: '';
  position: absolute;
  top: 8px; right: 8px;
  width: 6px; height: 6px;
  background: #1a1a1a;
  border-radius: 50%;
  box-shadow: 1px 1px 0 rgba(255,255,255,0.7);
}
#gamePlay .fish-word {
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #006994 !important;
}
#gamePlay .fish-target.fish-caught {
  animation: gmFishCaught 0.6s var(--gm-ease) forwards !important;
}
@keyframes gmFishCaught {
  0%   { transform: scale(1) rotate(0); }
  50%  { transform: scale(1.3) rotate(15deg); }
  100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

/* —— 星星：clip-path 发光 —— */
#gamePlay .star-target {
  text-align: center;
  animation: gmStarTwinkle 2.4s ease-in-out infinite;
}
@keyframes gmStarTwinkle {
  0%,100% { transform: scale(1) rotate(0); filter: drop-shadow(0 0 8px rgba(255,230,120,0.7)); }
  50%     { transform: scale(1.08) rotate(8deg); filter: drop-shadow(0 0 18px rgba(255,230,120,1)); }
}
#gamePlay .star-body {
  width: 64px; height: 64px;
  margin: 0 auto;
  background: radial-gradient(circle at 35% 30%, #fff8b0, #ffd54f 55%, #ff9800);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 0 12px rgba(255,200,60,0.85));
  font-size: 0;
}
#gamePlay .star-label {
  margin-top: 5px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: rgba(60,40,120,0.7);
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(4px);
}

/* —— 海盗船 —— */
#gamePlay .pirate-ship {
  width: 84px !important;
  z-index: 5;
  filter: drop-shadow(0 8px 12px rgba(0,30,60,0.35));
  animation: gmShipBob 3s ease-in-out infinite;
  transform-origin: center bottom;
}
@keyframes gmShipBob {
  0%,100% { transform: translateX(-50%) translateY(0) rotate(-2deg); }
  50%     { transform: translateX(-50%) translateY(-5px) rotate(2deg); }
}
#gamePlay .pirate-ship.target-ship {
  z-index: 10;
  filter: drop-shadow(0 0 14px rgba(255,215,0,0.95)) drop-shadow(0 8px 12px rgba(0,30,60,0.35));
}
#gamePlay .ship-flag {
  font-size: 24px;
  animation: gmFlagWave 1.6s ease-in-out infinite;
  transform-origin: bottom center;
}
@keyframes gmFlagWave {
  0%,100% { transform: skewX(-8deg); }
  50%     { transform: skewX(8deg); }
}
#gamePlay .ship-hull {
  width: 84px !important;
  height: 30px !important;
  background: linear-gradient(180deg, #d28a3a 0%, #8a4a18 100%) !important;
  box-shadow: 0 6px 12px rgba(0,0,0,0.4), inset 0 2px 0 rgba(255,220,180,0.4) !important;
}
#gamePlay .ship-word {
  font-size: 13px !important;
  font-weight: 800 !important;
  background: rgba(0,0,0,0.45) !important;
  padding: 3px 8px !important;
  border-radius: 8px !important;
}
#gamePlay .pirate-ship.target-ship .ship-word {
  background: linear-gradient(135deg,#ffd54f,#ff9800) !important;
  color: #3a2510 !important;
  animation: gmWordPulse 1.2s ease-in-out infinite;
}
@keyframes gmWordPulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,200,60,0.6); }
  50%     { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(255,200,60,0); }
}
#gamePlay .pirate-waves {
  height: 50px !important;
  background: repeating-linear-gradient(
    90deg,
    transparent 0, transparent 18px,
    rgba(255,255,255,0.35) 18px, rgba(255,255,255,0.35) 36px
  ) !important;
  z-index: 3;
}
/* 我方军舰更可爱 */
#gamePlay .our-warship {
  width: 180px !important;
}
#gamePlay .warship-deck {
  background: linear-gradient(180deg,#5b8bd1 0%,#2c4a7c 100%) !important;
  box-shadow: 0 6px 14px rgba(0,0,0,0.4), inset 0 2px 0 rgba(255,255,255,0.3) !important;
}
#gamePlay .warship-cabin {
  background: linear-gradient(180deg,#f5f9ff,#c2d4ee) !important;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
}

/* 击中/错误效果 */
#gamePlay .g-target.target-hit {
  animation: gmTargetHit 0.55s var(--gm-ease) forwards !important;
}
@keyframes gmTargetHit {
  0%   { transform: scale(1) rotate(0); }
  40%  { transform: scale(1.35) rotate(10deg); opacity: 1; }
  100% { transform: scale(0) rotate(30deg); opacity: 0; }
}
#gamePlay .g-target.target-miss,
#gamePlay .fish-target.fish-wrong {
  animation: gmShake 0.4s ease !important;
  opacity: 0.55;
}
@keyframes gmShake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-6px) rotate(-4deg); }
  40% { transform: translateX(6px) rotate(4deg); }
  60% { transform: translateX(-4px) rotate(-2deg); }
  80% { transform: translateX(4px) rotate(2deg); }
}

/* 击中特效 emoji */
#gamePlay .hit-effect {
  font-size: 44px !important;
  z-index: 20;
  animation: gmHitPop 0.7s var(--gm-ease) forwards !important;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}
@keyframes gmHitPop {
  0%   { transform: scale(0.4) translateY(0); opacity: 0; }
  30%  { transform: scale(1.6) translateY(-18px); opacity: 1; }
  100% { transform: scale(1) translateY(-50px); opacity: 0; }
}

/* 粒子爆炸（由JS插入 .gm-particle 元素时生效） */
.gm-particle {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 15;
  animation: gmParticle 0.7s var(--gm-ease) forwards;
}
@keyframes gmParticle {
  0%   { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; }
}

/* ============================================================
 * 5. 题目+控制 合并大卡片
 * ============================================================ */
#gamePlay .game-panel {
  margin: 4px 8px 4px !important;
  padding: 10px 14px 8px !important;
  flex-shrink: 0 !important;
  border-radius: 20px !important;
  background: rgba(255,255,255,0.55) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 8px 24px rgba(60,80,120,0.18),
              inset 0 1px 0 rgba(255,255,255,0.6) !important;
  position: relative;
}
/* 深色背景游戏面板加亮 */
#gamePlay:has(.theme-pirate) .game-panel,
#gamePlay:has(.theme-fish) .game-panel,
#gamePlay:has(.theme-star) .game-panel {
  background: rgba(255,255,255,0.18) !important;
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 12px 32px rgba(0,0,0,0.35),
              inset 0 1px 0 rgba(255,255,255,0.25) !important;
}

#gamePlay .game-question {
  margin: 0 0 10px !important;
  padding: 10px 16px !important;
  background: rgba(255,255,255,0.85) !important;
  border-radius: 16px !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(60,80,120,0.15),
              inset 0 1px 0 rgba(255,255,255,0.9) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  text-align: center;
}
#gamePlay:has(.theme-pirate) .gq-word,
#gamePlay:has(.theme-fish) .gq-word,
#gamePlay:has(.theme-star) .gq-word {
  background: linear-gradient(135deg,#ff8a3d,#ff4d6d 60%,#c62828);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent !important;
}
#gamePlay:has(.theme-pirate) .gq-cn,
#gamePlay:has(.theme-fish) .gq-cn,
#gamePlay:has(.theme-star) .gq-cn {
  color: #5a6680 !important;
}
#gamePlay .gq-word {
  font-size: 38px !important;
  font-weight: 900 !important;
  letter-spacing: 1px;
  background: linear-gradient(135deg,#ff6a4d,#e53935 60%,#c62828);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent !important;
  line-height: 1.2;
  text-shadow: none;
  filter: drop-shadow(0 2px 4px rgba(229,57,53,0.2));
}
#gamePlay .gq-cn {
  font-size: 16px !important;
  color: #6a7690 !important;
  margin-top: 4px;
  font-weight: 600;
}

/* ============================================================
 * 6. 控制按钮 / 麦克风 — 三列布局
 * ============================================================ */
#gamePlay .game-ctrl {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  padding: 4px 4px 8px !important;
  position: relative;
}
#gamePlay .ctrl-left,
#gamePlay .ctrl-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  width: 52px;
}
#gamePlay .ctrl-right { justify-content: center; }

#gamePlay .play-btn,
#gamePlay .replay-btn {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  border: none !important;
  font-size: 20px !important;
  cursor: pointer;
  background: linear-gradient(180deg,#ffffff,#eef2f8) !important;
  color: #4a5a78 !important;
  box-shadow: 0 4px 10px rgba(60,80,120,0.18),
              inset 0 1px 0 rgba(255,255,255,0.9) !important;
  transition: transform 0.2s var(--gm-ease), box-shadow 0.2s;
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 0 !important;
}
#gamePlay .slow-btn {
  width: 34px !important;
  height: 34px !important;
  font-size: 15px !important;
  border: none !important;
  background: linear-gradient(180deg,#fff3e0,#ffe0b2) !important;
  color: #e65100 !important;
  box-shadow: 0 2px 6px rgba(255,152,0,0.25), inset 0 1px 0 rgba(255,255,255,0.8) !important;
  display: flex !important;
}
#gamePlay #gReplayBtn {
  border: none !important;
  background: linear-gradient(180deg,#e8f5e9,#c8e6c9) !important;
  color: #2e7d32 !important;
  box-shadow: 0 4px 10px rgba(76,175,80,0.25), inset 0 1px 0 rgba(255,255,255,0.8) !important;
}
#gamePlay .play-btn:active,
#gamePlay .replay-btn:active {
  transform: translateY(2px) scale(0.96);
  box-shadow: 0 2px 6px rgba(60,80,120,0.2) !important;
}
#gamePlay .play-btn.playing {
  animation: gmBtnPulse 0.8s ease-in-out infinite;
}
@keyframes gmBtnPulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.1); }
}

/* 麦克风主按钮 — 居中、最大、橙粉渐变（匹配效果图） */
#gamePlay .mic-btn {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  border: none !important;
  font-size: 32px !important;
  cursor: pointer;
  color: #fff !important;
  background: linear-gradient(135deg,#ffb347 0%,#ff6a88 50%,#e53935 100%) !important;
  box-shadow:
    0 8px 20px rgba(255,90,90,0.4),
    inset 0 2px 0 rgba(255,255,255,0.4),
    inset 0 -4px 8px rgba(0,0,0,0.15),
    0 0 0 3px rgba(255,255,255,0.3) !important;
  position: relative;
  transition: transform 0.2s var(--gm-ease);
  animation: gmMicBreathe 2.4s ease-in-out infinite;
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 2;
}
@keyframes gmMicBreathe {
  0%,100% { box-shadow:
      0 8px 20px rgba(255,90,90,0.4),
      inset 0 2px 0 rgba(255,255,255,0.4),
      inset 0 -4px 8px rgba(0,0,0,0.15),
      0 0 0 3px rgba(255,255,255,0.3),
      0 0 0 0 rgba(255,150,100,0.5); }
  50%     { box-shadow:
      0 8px 20px rgba(255,90,90,0.4),
      inset 0 2px 0 rgba(255,255,255,0.4),
      inset 0 -4px 8px rgba(0,0,0,0.15),
      0 0 0 3px rgba(255,255,255,0.3),
      0 0 0 16px rgba(255,150,100,0); }
}
#gamePlay .mic-btn:active {
  transform: translateY(3px) scale(0.96);
}
#gamePlay .mic-btn.recording {
  background: linear-gradient(135deg,#ff3b3b,#b71c1c) !important;
  animation: gmMicRecord 0.9s ease-in-out infinite;
}
@keyframes gmMicRecord {
  0%,100% { transform: scale(1);
    box-shadow: 0 8px 20px rgba(229,57,53,0.5), 0 0 0 0 rgba(255,60,60,0.6); }
  50%     { transform: scale(1.06);
    box-shadow: 0 8px 20px rgba(229,57,53,0.5), 0 0 0 18px rgba(255,60,60,0); }
}
#gamePlay .mic-btn.evaluating {
  background: linear-gradient(135deg,#ffb74d,#fb8c00) !important;
  animation: gmMicEval 1s linear infinite;
}
@keyframes gmMicEval {
  0%   { transform: rotate(0); }
  100% { transform: rotate(360deg); }
}

/* 下一题按钮隐藏在三列布局之外 */
#gamePlay #gNextBtn {
  position: absolute;
  bottom: -52px;
  left: 50%;
  transform: translateX(-50%);
}

#gamePlay .mic-hint {
  text-align: center;
  font-size: 12px;
  color: #8a96ab;
  font-weight: 600;
  margin: 8px 0 0 !important;
}
#gamePlay:has(.theme-pirate) .mic-hint,
#gamePlay:has(.theme-fish) .mic-hint,
#gamePlay:has(.theme-star) .mic-hint {
  color: rgba(255,255,255,0.7) !important;
}

/* ============================================================
 * 7. 通用按钮（返回/再玩/下一题）
 * ============================================================ */
#gamePlay .btn,
#gameResult .btn {
  border-radius: 999px !important;
  font-weight: 800 !important;
  padding: 12px 22px !important;
  border: none !important;
  cursor: pointer;
  transition: transform 0.2s var(--gm-ease), box-shadow 0.2s;
  font-size: 14px !important;
}
#gamePlay .btn-primary,
#gameResult .btn-primary {
  background: linear-gradient(135deg,#5B8DEF,#3A7BD5) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(58,123,213,0.38),
              inset 0 1px 0 rgba(255,255,255,0.4),
              inset 0 -3px 6px rgba(0,0,0,0.15) !important;
}
#gamePlay .btn-primary:active,
#gameResult .btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 3px 8px rgba(58,123,213,0.35) !important;
}
#gamePlay .btn-outline,
#gameResult .btn-outline {
  background: #fff !important;
  color: #51617a !important;
  border: 2px solid #e3e9f2 !important;
  box-shadow: 0 6px 14px rgba(60,80,120,0.1),
              inset 0 1px 0 rgba(255,255,255,0.9) !important;
}
#gamePlay .btn-outline:active,
#gameResult .btn-outline:active {
  transform: translateY(2px);
  box-shadow: 0 3px 8px rgba(60,80,120,0.12) !important;
}
#gamePlay .actions {
  display: flex;
  gap: 12px;
  padding: 8px 14px 18px;
}
#gamePlay .actions .btn { flex: 1; }

/* ============================================================
 * 8. 反馈弹层（toast 已由 App.toast 控制，这里补充游戏内反馈卡片）
 * ============================================================ */
.gm-feedback {
  position: absolute;
  left: 50%; top: 40%;
  transform: translate(-50%, -50%);
  z-index: 25;
  padding: 18px 26px;
  border-radius: 22px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--gm-shadow-lg);
  text-align: center;
  font-weight: 800;
  font-size: 18px;
  pointer-events: none;
  animation: gmFeedbackIn 0.5s var(--gm-ease);
}
.gm-feedback.correct { color: #2e7d32; }
.gm-feedback.wrong   { color: #c62828; animation: gmFeedbackIn 0.5s var(--gm-ease), gmShake 0.4s ease 0.5s; }
.gm-feedback .gm-check {
  font-size: 48px;
  display: block;
  margin-bottom: 4px;
  animation: gmCheckPop 0.6s var(--gm-ease);
}
@keyframes gmFeedbackIn {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.6); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes gmCheckPop {
  0%   { transform: scale(0) rotate(-30deg); }
  60%  { transform: scale(1.3) rotate(10deg); }
  100% { transform: scale(1) rotate(0); }
}
/* 五彩纸屑 */
.gm-confetti {
  position: absolute;
  width: 8px; height: 12px;
  top: 50%; left: 50%;
  pointer-events: none;
  z-index: 24;
  animation: gmConfetti 1.1s ease-out forwards;
}
@keyframes gmConfetti {
  0%   { transform: translate(0,0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(720deg); opacity: 0; }
}

/* ============================================================
 * 9. 结算页
 * ============================================================ */
#gameResult {
  position: relative;
}
#gameResult .result-card {
  padding: 38px 28px 32px !important;
  border-radius: 30px !important;
  background:
    radial-gradient(80% 60% at 10% 0%, rgba(255,200,220,0.5), transparent 60%),
    radial-gradient(80% 60% at 100% 10%, rgba(180,220,255,0.55), transparent 60%),
    radial-gradient(80% 60% at 50% 100%, rgba(200,255,220,0.45), transparent 60%),
    linear-gradient(180deg,#ffffff,#f7faff) !important;
  box-shadow: var(--gm-shadow-lg) !important;
  position: relative;
  overflow: hidden;
  animation: gmResultIn 0.6s var(--gm-ease);
}
@keyframes gmResultIn {
  0%   { transform: scale(0.5) translateY(30px); opacity: 0; }
  50%  { transform: scale(1.08) translateY(-5px); opacity: 1; }
  70%  { transform: scale(0.96) translateY(2px); }
  100% { transform: scale(1) translateY(0); }
}
/* 背景光斑 */
#gameResult .result-card::before,
#gameResult .result-card::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
#gameResult .result-card::before {
  width: 200px; height: 200px;
  top: -80px; right: -60px;
  background: radial-gradient(circle, rgba(255,215,120,0.35), transparent 65%);
}
#gameResult .result-card::after {
  width: 180px; height: 180px;
  bottom: -70px; left: -50px;
  background: radial-gradient(circle, rgba(180,140,255,0.3), transparent 65%);
}
#gameResult .result-emoji {
  font-size: 80px !important;
  margin-bottom: 10px;
  display: inline-block;
  animation: gmEmojiFloat 2.4s ease-in-out infinite;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.15));
}
@keyframes gmEmojiFloat {
  0%,100% { transform: translateY(0) rotate(-5deg); }
  50%     { transform: translateY(-8px) rotate(5deg); }
}
#gameResult .result-title {
  font-size: 26px !important;
  font-weight: 900 !important;
  background: linear-gradient(135deg,#5B8DEF,#8E5BFF);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent !important;
}
#gameResult .stars-big {
  font-size: 36px !important;
  letter-spacing: 6px !important;
  margin: 14px 0 !important;
  filter: drop-shadow(0 4px 8px rgba(255,180,0,0.5));
}
#gameResult .stars-big .star-char {
  display: inline-block;
  animation: gmStar3D 0.8s var(--gm-ease) both;
}
#gameResult .stars-big .star-char:nth-child(1) { animation-delay: 0.1s; }
#gameResult .stars-big .star-char:nth-child(2) { animation-delay: 0.3s; }
#gameResult .stars-big .star-char:nth-child(3) { animation-delay: 0.5s; }
@keyframes gmStar3D {
  0%   { transform: rotateY(0) scale(0); opacity: 0; }
  60%  { transform: rotateY(360deg) scale(1.4); opacity: 1; }
  100% { transform: rotateY(720deg) scale(1); }
}
#gameResult .result-score {
  font-size: 48px !important;
  font-weight: 900 !important;
  background: linear-gradient(135deg,#ff8a3d,#ff4d6d 60%,#c62828);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent !important;
  line-height: 1;
}
#gameResult .result-score span {
  font-size: 18px !important;
  color: #8a96ab !important;
  -webkit-text-fill-color: #8a96ab;
  font-weight: 700;
  margin-left: 4px;
}
#gameResult .result-msg {
  font-size: 14px !important;
  color: #51617a !important;
  font-weight: 600;
  margin-top: 10px;
}
#gameResult .result-detail {
  font-size: 13px !important;
  color: #8a96ab !important;
}
#gameResult .result-review {
  border-top: 1px dashed #d8e0ee !important;
  padding-top: 16px !important;
  position: relative;
  z-index: 1;
}
#gameResult .review-title { color: #51617a !important; }
#gameResult .review-item {
  background: #f5f8fd !important;
  border-radius: 12px !important;
  padding: 8px 12px !important;
}
#gameResult .ri-score {
  background: linear-gradient(135deg,#fff3e0,#ffe0b2) !important;
  color: #e65100 !important;
}
#gameResult .attempt-tag {
  background: #fff3e0 !important;
  color: #e65100 !important;
}

/* ============================================================
 * 10. 底部按钮区 — 沉底，距底2%
 * ============================================================ */
#gamePlay .actions {
  margin: 0 !important;
  padding: 6px 12px 2vh !important;
  flex-shrink: 0 !important;
  display: flex;
  gap: 10px;
}
#gamePlay .actions .btn {
  flex: 1;
  padding: 12px !important;
  border-radius: 16px !important;
  font-size: 15px !important;
  font-weight: 800 !important;
}

/* ============================================================
 * 10b. 结算页可滚动布局（适配小屏幕，顶部栏固定）
 * ============================================================ */
/* body.page-game 为 flex column + height:100dvh + overflow:hidden，
   #gameResult 作为 flex:1 子项独立滚动，与 #gameMenu 同理 */
body.page-game #gameResult {
  flex: 1 1 auto !important;
  min-height: 0 !important;       /* flex 子项滚动关键 */
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom)) !important;
  box-sizing: border-box;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}
/* result-card 内容不被裁剪，确保回顾列表/按钮完整可见 */
body.page-game #gameResult .result-card {
  overflow: visible !important;
}
/* 结算卡片在小屏幕上自适应内边距 */
@media (max-width: 360px) {
  body.page-game #gameResult {
    padding: 12px 12px calc(20px + env(safe-area-inset-bottom)) !important;
  }
  body.page-game #gameResult .result-card {
    padding: 28px 18px 24px !important;
  }
}

/* ============================================================
 * 11. 通用响应式
 * ============================================================ */
@media (max-width: 360px) {
  #gamePlay .gq-word { font-size: 32px !important; }
  #gameMenu .game-card-name { font-size: 14px !important; }
  #gamePlay .balloon-body { width: 64px; height: 76px; }
  #gamePlay .star-body { width: 56px; height: 56px; }
  #gamePlay .mole-body { width: 56px; height: 50px; }
  #gamePlay .fish-shape { width: 34px; height: 24px; }
  #gamePlay .pirate-ship { width: 72px !important; }
  #gamePlay .ship-hull { width: 72px !important; }
}

/* 尊重用户的动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
 * 12. 海盗炮击特效强化（覆盖旧样式）
 * ============================================================ */
/* 炮弹 — 金属高光球 + 发光 */
#gamePlay .cannonball {
  width: 14px !important;
  height: 14px !important;
  background: radial-gradient(circle at 35% 30%, #ffd27a 0%, #b87333 35%, #3a2410 100%) !important;
  box-shadow:
    0 0 8px rgba(255, 160, 60, 0.9),
    0 0 16px rgba(255, 120, 30, 0.6),
    0 0 2px #000 inset !important;
  z-index: 30 !important;
}
/* 炮口闪光 */
.muzzle-flash {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 29;
  background: radial-gradient(circle,
    rgba(255, 240, 180, 1) 0%,
    rgba(255, 170, 50, 0.8) 30%,
    rgba(255, 100, 20, 0.4) 60%,
    transparent 80%);
  animation: gmMuzzleFlash 0.22s ease-out forwards;
}
@keyframes gmMuzzleFlash {
  0%   { transform: scale(0.4); opacity: 1; }
  60%  { transform: scale(1.3); opacity: 0.9; }
  100% { transform: scale(2); opacity: 0; }
}
/* 炮弹拖尾火星 */
.cannon-trail {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 28;
  background: radial-gradient(circle, #ffe9a8 0%, #ff8a28 50%, transparent 100%);
  box-shadow: 0 0 6px rgba(255, 150, 40, 0.8);
  animation: gmTrailFade 0.36s ease-out forwards;
}
@keyframes gmTrailFade {
  0%   { transform: scale(1);   opacity: 0.9; }
  100% { transform: scale(0.2); opacity: 0; }
}
/* 命中爆炸 — 更有冲击力 */
#gamePlay .ship-explosion {
  font-size: 56px !important;
  z-index: 32 !important;
  filter: drop-shadow(0 0 12px rgba(255, 140, 0, 0.9));
  animation: gmExplode 0.65s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}
@keyframes gmExplode {
  0%   { transform: scale(0.2) rotate(-20deg); opacity: 0; }
  25%  { transform: scale(1.4) rotate(10deg);  opacity: 1; }
  60%  { transform: scale(1.8) rotate(-5deg);  opacity: 1; }
  100% { transform: scale(2.6) rotate(0deg);   opacity: 0; }
}
/* 水花 */
#gamePlay .water-splash {
  font-size: 30px !important;
  z-index: 27 !important;
}

/* ============================================================
 * 13. 海盗船现代化改造 — 现代舰艇风格
 * ============================================================ */

/* 敌船：现代海盗快艇（深色金属船体 + LED灯带） */
#gamePlay .pirate-ship {
  width: 92px !important;
  z-index: 6;
  filter: drop-shadow(0 8px 14px rgba(0, 15, 40, 0.55));
}
#gamePlay .pirate-ship .ship-flag {
  font-size: 20px;
  margin-bottom: -4px;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5));
}
#gamePlay .pirate-ship .ship-mast {
  width: 3px;
  height: 22px;
  background: linear-gradient(90deg, #1a1a1a, #444, #1a1a1a);
  border-radius: 2px;
}
#gamePlay .pirate-ship .ship-sail {
  width: 36px;
  height: 28px;
  background: linear-gradient(180deg, #2b3550 0%, #141a2e 100%);
  border-radius: 4px 4px 10px 10px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.15),
    inset 0 -3px 6px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.08);
}
#gamePlay .pirate-ship .ship-sail::before {
  content: '☠';
  font-size: 16px;
  color: #ff5252;
  text-shadow: 0 0 8px rgba(255, 60, 60, 0.8);
}
#gamePlay .pirate-ship .ship-hull {
  width: 92px !important;
  height: 28px !important;
  background: linear-gradient(180deg, #3a4a66 0%, #1c2436 60%, #0d1320 100%) !important;
  border-radius: 6px 6px 22px 22px / 6px 6px 16px 16px !important;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.18),
    inset 0 -4px 8px rgba(0,0,0,0.6),
    0 6px 12px rgba(0,0,0,0.5) !important;
  border: 1px solid rgba(255,255,255,0.08);
}
#gamePlay .pirate-ship .ship-hull::before {
  border-color: transparent transparent #0d1320 transparent !important;
  border-width: 0 0 28px 10px !important;
  left: -9px !important;
}
#gamePlay .pirate-ship .ship-hull::after {
  border-color: #0d1320 transparent transparent transparent !important;
  border-width: 28px 10px 0 0 !important;
  right: -9px !important;
}
/* 船体LED警示灯条 */
#gamePlay .pirate-ship .ship-hull {
  position: relative;
}
#gamePlay .pirate-ship .ship-word {
  font-size: 13px !important;
  font-weight: 900 !important;
  color: #fff !important;
  background: linear-gradient(135deg, #ff5252, #d32f2f) !important;
  padding: 3px 10px !important;
  border-radius: 8px !important;
  box-shadow:
    0 0 10px rgba(255, 80, 80, 0.7),
    inset 0 1px 0 rgba(255,255,255,0.4) !important;
  max-width: 78px !important;
  letter-spacing: 0.3px;
}
/* 当前要打的目标：金色高亮+脉冲 */
#gamePlay .pirate-ship.target-active .ship-word {
  background: linear-gradient(135deg, #ffd54f, #ff8f00) !important;
  color: #1a1a1a !important;
  box-shadow:
    0 0 16px rgba(255, 200, 0, 0.95),
    0 0 30px rgba(255, 160, 0, 0.6),
    inset 0 1px 0 rgba(255,255,255,0.6) !important;
}
#gamePlay .pirate-ship.target-active .ship-hull {
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.25),
    inset 0 -4px 8px rgba(0,0,0,0.6),
    0 0 18px rgba(255, 200, 0, 0.7),
    0 6px 12px rgba(0,0,0,0.5) !important;
}

/* 我方战舰：现代化导弹巡洋舰 */
#gamePlay .our-warship {
  width: 200px !important;
  height: 82px !important;
  bottom: 4px !important;
  filter: drop-shadow(0 10px 18px rgba(0, 10, 30, 0.6));
}
/* 船体甲板 */
#gamePlay .warship-deck {
  height: 30px !important;
  background: linear-gradient(180deg, #5a7fb0 0%, #3a5a8c 40%, #1e3a5f 100%) !important;
  border-radius: 6px 6px 30px 30px / 6px 6px 18px 18px !important;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.3),
    inset 0 -4px 8px rgba(0,0,0,0.4),
    0 6px 14px rgba(0,0,0,0.5) !important;
}
#gamePlay .warship-deck::before {
  border-color: transparent transparent #1e3a5f transparent !important;
  border-width: 0 0 30px 14px !important;
  left: -13px !important;
}
#gamePlay .warship-deck::after {
  border-color: #1e3a5f transparent transparent transparent !important;
  border-width: 30px 14px 0 0 !important;
  right: -13px !important;
}
/* 舰桥 */
#gamePlay .warship-cabin {
  width: 64px !important;
  height: 22px !important;
  bottom: 28px !important;
  background: linear-gradient(180deg, #d8e4f0 0%, #8aa4c4 100%) !important;
  border-radius: 8px 8px 3px 3px !important;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,0.6),
    inset 0 -3px 6px rgba(0,0,0,0.2),
    0 2px 6px rgba(0,0,0,0.3) !important;
}
#gamePlay .warship-cabin::before {
  content: '🚩' !important;
  font-size: 18px !important;
  top: -20px !important;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}
/* 舰上士兵 */
#gamePlay .warship-soldier {
  font-size: 22px !important;
  bottom: 26px !important;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.4));
}
#gamePlay .warship-soldier.left { left: 20px !important; }
#gamePlay .warship-soldier.right { right: 20px !important; }

/* 主炮 — 现代化舰炮 */
#gamePlay .warship-cannon {
  bottom: 36px !important;
}
#gamePlay .wc-base {
  width: 40px !important;
  height: 12px !important;
  background: linear-gradient(180deg, #6a7a90 0%, #2a3548 100%) !important;
  border-radius: 6px !important;
  margin-top: 28px !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.3),
    0 2px 4px rgba(0,0,0,0.4) !important;
}
#gamePlay .wc-barrel {
  width: 13px !important;
  height: 32px !important;
  background: linear-gradient(90deg, #1a1a1a, #5a5a5a 40%, #8a8a8a 50%, #5a5a5a 60%, #1a1a1a) !important;
  border-radius: 4px 4px 3px 3px !important;
  bottom: 8px !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 2px 4px rgba(0,0,0,0.5) !important;
}
#gamePlay .wc-barrel::before {
  width: 17px !important;
  height: 7px !important;
  top: -3px !important;
  left: -2px !important;
  background: linear-gradient(180deg, #444, #111) !important;
  border-radius: 3px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
#gamePlay .wc-gunner {
  font-size: 17px !important;
  bottom: 22px !important;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}

/* 小屏适配 */
@media (max-width: 360px) {
  #gamePlay .pirate-ship { width: 78px !important; }
  #gamePlay .pirate-ship .ship-hull { width: 78px !important; }
  #gamePlay .pirate-ship .ship-word { font-size: 11px !important; max-width: 66px !important; }
  #gamePlay .our-warship { width: 170px !important; height: 74px !important; }
}

/* ============================================================
 * 引擎游戏题目面板样式
 * 引擎自带麦克风和识别，面板只保留目标单词+发音按钮
 * ============================================================ */
#gamePlay .engine-panel .game-ctrl {
  justify-content: center !important;
  gap: 16px !important;
  padding: 8px 0 4px !important;
}
#gamePlay .engine-panel .ctrl-left {
  display: flex !important;
  gap: 12px !important;
}
#gamePlay .engine-panel .play-btn {
  width: 48px !important;
  height: 48px !important;
  font-size: 22px !important;
  border-radius: 50% !important;
  border: none !important;
  cursor: pointer;
  transition: transform 0.15s var(--gm-ease-soft);
  box-shadow: 0 4px 12px rgba(60,80,120,0.18);
}
#gamePlay .engine-panel .play-btn:active {
  transform: scale(0.92);
}
#gamePlay .engine-panel #gPlayBtn {
  background: linear-gradient(135deg, #4facfe, #00c6fb);
  color: #fff;
}
#gamePlay .engine-panel #gPlaySlowBtn {
  background: linear-gradient(135deg, #43e97b, #38f9d7);
  color: #fff;
}
#gamePlay .engine-panel .game-question {
  text-align: center !important;
  padding: 10px 16px 4px !important;
}
#gamePlay .engine-panel .gq-word {
  font-size: 22px !important;
  font-weight: 800 !important;
  color: #2b3a55 !important;
  line-height: 1.3 !important;
}
#gamePlay .engine-panel .gq-cn {
  font-size: 14px !important;
  color: #7a8aa3 !important;
  margin-top: 2px !important;
}
#gamePlay .engine-panel .mic-hint {
  display: block !important;
  text-align: center;
  font-size: 12px;
  color: #8a96ab;
  font-weight: 600;
  margin: 8px 0 0 !important;
}
/* 深色背景下引擎面板文字颜色适配 */
#gamePlay:has(.theme-pirate) .engine-panel .gq-word,
#gamePlay:has(.theme-fish) .engine-panel .gq-word,
#gamePlay:has(.theme-star) .engine-panel .gq-word,
#gamePlay:has(.theme-shooter) .engine-panel .gq-word,
#gamePlay:has(.theme-rocket) .engine-panel .gq-word {
  color: #fff !important;
}
#gamePlay:has(.theme-pirate) .engine-panel .gq-cn,
#gamePlay:has(.theme-fish) .engine-panel .gq-cn,
#gamePlay:has(.theme-star) .engine-panel .gq-cn,
#gamePlay:has(.theme-shooter) .engine-panel .gq-cn,
#gamePlay:has(.theme-rocket) .engine-panel .gq-cn {
  color: rgba(255,255,255,0.7) !important;
}
/* 引擎面板整体 */
#gamePlay .game-panel.engine-panel {
  flex-shrink: 0 !important;
  margin: 4px 12px 0 !important;
  padding: 8px 12px !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,0.92) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--gm-shadow-sm) !important;
}
#gamePlay:has(.theme-pirate) .game-panel.engine-panel,
#gamePlay:has(.theme-fish) .game-panel.engine-panel,
#gamePlay:has(.theme-star) .game-panel.engine-panel,
#gamePlay:has(.theme-shooter) .game-panel.engine-panel,
#gamePlay:has(.theme-rocket) .game-panel.engine-panel {
  background: rgba(0,0,0,0.35) !important;
  border: 1px solid rgba(255,255,255,0.12);
}
/* 底部按钮栏 */
#gamePlay .actions {
  flex-shrink: 0 !important;
  display: flex !important;
  gap: 12px !important;
  padding: 8px 16px 12px !important;
  margin: 0 !important;
}
#gamePlay .actions .btn {
  flex: 1 !important;
  padding: 12px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  border-radius: 14px !important;
  border: none !important;
  cursor: pointer;
}
#gamePlay .actions .btn-outline {
  background: rgba(255,255,255,0.9) !important;
  color: #51617a !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
#gamePlay .actions .btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(102,126,234,0.35);
}

/* ============================================================
 * 21个引擎现代主题背景（v=20260816e）
 * 每个主题：多层渐变 + radial光晕，营造深度和现代感
 * ============================================================ */

/* shooter 单词闯关 🎯 — 深绿森林夜空 */
#gamePlay:has(.theme-shooter) {
  background:
    radial-gradient(circle at 80% 15%, rgba(255,240,180,0.15) 0%, transparent 25%),
    radial-gradient(ellipse at 50% 100%, rgba(0,40,20,0.5) 0%, transparent 60%),
    linear-gradient(180deg, #0a2818 0%, #0f4030 35%, #1a6048 65%, #0d3520 100%) !important;
}
.game-canvas.theme-shooter {
  background:
    radial-gradient(circle at 80% 15%, rgba(255,240,180,0.12) 0%, transparent 25%),
    radial-gradient(ellipse at 50% 100%, rgba(0,40,20,0.4) 0%, transparent 60%),
    linear-gradient(180deg, #0a2818 0%, #0f4030 35%, #1a6048 65%, #0d3520 100%) !important;
}

/* basketball 投篮高手 🏀 — 暖橙球场 */
#gamePlay:has(.theme-basketball) {
  background:
    radial-gradient(circle at 50% 20%, rgba(255,200,100,0.2) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(180,80,20,0.3) 0%, transparent 55%),
    linear-gradient(180deg, #2d1810 0%, #5c2e10 30%, #a0522a 60%, #d4824a 100%) !important;
}
.game-canvas.theme-basketball {
  background:
    radial-gradient(circle at 50% 20%, rgba(255,200,100,0.18) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(180,80,20,0.25) 0%, transparent 55%),
    linear-gradient(180deg, #2d1810 0%, #5c2e10 30%, #a0522a 60%, #d4824a 100%) !important;
}

/* rocket 火箭拼图 🚀 — 深蓝太空 */
#gamePlay:has(.theme-rocket) {
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 30%),
    radial-gradient(circle at 70% 60%, rgba(100,180,255,0.15) 0%, transparent 40%),
    radial-gradient(circle at 50% 85%, rgba(80,60,200,0.2) 0%, transparent 50%),
    linear-gradient(180deg, #050520 0%, #0a0a3e 30%, #1a1860 60%, #2d2880 100%) !important;
}
.game-canvas.theme-rocket {
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0%, transparent 30%),
    radial-gradient(circle at 70% 60%, rgba(100,180,255,0.12) 0%, transparent 40%),
    linear-gradient(180deg, #050520 0%, #0a0a3e 30%, #1a1860 60%, #2d2880 100%) !important;
}

/* bubble 泡泡消除 🫧 — 清爽海底 */
#gamePlay:has(.theme-bubble) {
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.12) 0%, transparent 35%),
    radial-gradient(ellipse at 50% 100%, rgba(0,60,100,0.4) 0%, transparent 60%),
    linear-gradient(180deg, #0a3a5c 0%, #0e6a9e 35%, #1a9fd4 70%, #5cc8e0 100%) !important;
}
.game-canvas.theme-bubble {
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.1) 0%, transparent 35%),
    radial-gradient(ellipse at 50% 100%, rgba(0,60,100,0.35) 0%, transparent 60%),
    linear-gradient(180deg, #0a3a5c 0%, #0e6a9e 35%, #1a9fd4 70%, #5cc8e0 100%) !important;
}

/* cooking 厨房做菜 🍳 — 暖黄厨房 */
#gamePlay:has(.theme-cooking) {
  background:
    radial-gradient(circle at 50% 15%, rgba(255,220,150,0.3) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(200,120,40,0.2) 0%, transparent 55%),
    linear-gradient(180deg, #fff5e0 0%, #ffe8c0 30%, #ffd090 60%, #f0a860 100%) !important;
}
.game-canvas.theme-cooking {
  background:
    radial-gradient(circle at 50% 15%, rgba(255,220,150,0.25) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(200,120,40,0.15) 0%, transparent 55%),
    linear-gradient(180deg, #fff5e0 0%, #ffe8c0 30%, #ffd090 60%, #f0a860 100%) !important;
}

/* tower 单词叠高塔 🧱 — 紫粉渐变天空 */
#gamePlay:has(.theme-tower) {
  background:
    radial-gradient(circle at 30% 20%, rgba(255,200,255,0.2) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(150,100,255,0.2) 0%, transparent 45%),
    linear-gradient(180deg, #2d1b69 0%, #5b3a9e 30%, #8e5bff 60%, #c780fa 100%) !important;
}
.game-canvas.theme-tower {
  background:
    radial-gradient(circle at 30% 20%, rgba(255,200,255,0.15) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(150,100,255,0.15) 0%, transparent 45%),
    linear-gradient(180deg, #2d1b69 0%, #5b3a9e 30%, #8e5bff 60%, #c780fa 100%) !important;
}

/* miner 矿山探宝 ⛏️ — 矿洞金棕 */
#gamePlay:has(.theme-miner) {
  background:
    radial-gradient(circle at 50% 10%, rgba(255,200,80,0.2) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(80,40,10,0.5) 0%, transparent 60%),
    linear-gradient(180deg, #1a1008 0%, #3d2810 30%, #6b4520 60%, #8b6030 100%) !important;
}
.game-canvas.theme-miner {
  background:
    radial-gradient(circle at 50% 10%, rgba(255,200,80,0.15) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(80,40,10,0.4) 0%, transparent 60%),
    linear-gradient(180deg, #1a1008 0%, #3d2810 30%, #6b4520 60%, #8b6030 100%) !important;
}

/* wheel 单词大转盘 🎡 — 嘉年华红金 */
#gamePlay:has(.theme-wheel) {
  background:
    radial-gradient(circle at 50% 30%, rgba(255,220,100,0.25) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(180,40,40,0.3) 0%, transparent 55%),
    linear-gradient(180deg, #4a0e0e 0%, #8b1a1a 30%, #c62828 60%, #ff6b6b 100%) !important;
}
.game-canvas.theme-wheel {
  background:
    radial-gradient(circle at 50% 30%, rgba(255,220,100,0.2) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(180,40,40,0.25) 0%, transparent 55%),
    linear-gradient(180deg, #4a0e0e 0%, #8b1a1a 30%, #c62828 60%, #ff6b6b 100%) !important;
}

/* spell 拼单词 🔤 — 清新蓝绿 */
#gamePlay:has(.theme-spell) {
  background:
    radial-gradient(circle at 25% 25%, rgba(100,220,200,0.2) 0%, transparent 40%),
    radial-gradient(circle at 75% 75%, rgba(100,150,255,0.2) 0%, transparent 45%),
    linear-gradient(180deg, #e8f8f5 0%, #d0f0ea 30%, #a0e0d8 60%, #60c8c0 100%) !important;
}
.game-canvas.theme-spell {
  background:
    radial-gradient(circle at 25% 25%, rgba(100,220,200,0.15) 0%, transparent 40%),
    radial-gradient(circle at 75% 75%, rgba(100,150,255,0.15) 0%, transparent 45%),
    linear-gradient(180deg, #e8f8f5 0%, #d0f0ea 30%, #a0e0d8 60%, #60c8c0 100%) !important;
}

/* flyer 飞行冒险 ✈️ — 天空蓝 */
#gamePlay:has(.theme-flyer) {
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.3) 0%, transparent 35%),
    radial-gradient(circle at 80% 40%, rgba(255,255,255,0.2) 0%, transparent 30%),
    radial-gradient(ellipse at 50% 100%, rgba(80,180,120,0.3) 0%, transparent 50%),
    linear-gradient(180deg, #4fc3f7 0%, #81d4fa 35%, #b3e5fc 65%, #c8e6c9 100%) !important;
}
.game-canvas.theme-flyer {
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.25) 0%, transparent 35%),
    radial-gradient(ellipse at 50% 100%, rgba(80,180,120,0.25) 0%, transparent 50%),
    linear-gradient(180deg, #4fc3f7 0%, #81d4fa 35%, #b3e5fc 65%, #c8e6c9 100%) !important;
}

/* rhythm 律动节拍 🎵 — 霓虹紫 */
#gamePlay:has(.theme-rhythm) {
  background:
    radial-gradient(circle at 30% 20%, rgba(255,50,150,0.2) 0%, transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(50,150,255,0.2) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(180,50,255,0.2) 0%, transparent 50%),
    linear-gradient(180deg, #0a0a2e 0%, #1a0a4e 30%, #2d1b69 60%, #4a2080 100%) !important;
}
.game-canvas.theme-rhythm {
  background:
    radial-gradient(circle at 30% 20%, rgba(255,50,150,0.15) 0%, transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(50,150,255,0.15) 0%, transparent 45%),
    linear-gradient(180deg, #0a0a2e 0%, #1a0a4e 30%, #2d1b69 60%, #4a2080 100%) !important;
}

/* connect 单词配对 🔗 — 活力青柠 */
#gamePlay:has(.theme-connect) {
  background:
    radial-gradient(circle at 30% 25%, rgba(150,255,150,0.15) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(100,200,255,0.15) 0%, transparent 45%),
    linear-gradient(180deg, #1a3a2a 0%, #2a5a40 30%, #3a7a58 60%, #5aaa78 100%) !important;
}
.game-canvas.theme-connect {
  background:
    radial-gradient(circle at 30% 25%, rgba(150,255,150,0.12) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(100,200,255,0.12) 0%, transparent 45%),
    linear-gradient(180deg, #1a3a2a 0%, #2a5a40 30%, #3a7a58 60%, #5aaa78 100%) !important;
}

/* runner 跑酷闯关 🏃 — 跑道橙红 */
#gamePlay:has(.theme-runner) {
  background:
    radial-gradient(circle at 50% 15%, rgba(255,200,100,0.2) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(200,60,20,0.3) 0%, transparent 55%),
    linear-gradient(180deg, #1a2a4a 0%, #2a4a6a 30%, #4a7aaa 60%, #f0a040 100%) !important;
}
.game-canvas.theme-runner {
  background:
    radial-gradient(circle at 50% 15%, rgba(255,200,100,0.18) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(200,60,20,0.25) 0%, transparent 55%),
    linear-gradient(180deg, #1a2a4a 0%, #2a4a6a 30%, #4a7aaa 60%, #f0a040 100%) !important;
}

/* blindbox 国风盲盒 🎁 — 国潮红金 */
#gamePlay:has(.theme-blindbox) {
  background:
    radial-gradient(circle at 50% 20%, rgba(255,215,100,0.25) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(150,20,20,0.3) 0%, transparent 55%),
    linear-gradient(180deg, #3d0a0a 0%, #6b1010 30%, #a01818 60%, #c82828 100%) !important;
}
.game-canvas.theme-blindbox {
  background:
    radial-gradient(circle at 50% 20%, rgba(255,215,100,0.2) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(150,20,20,0.25) 0%, transparent 55%),
    linear-gradient(180deg, #3d0a0a 0%, #6b1010 30%, #a01818 60%, #c82828 100%) !important;
}

/* dig 考古奇旅 🏺 — 探索棕 */
#gamePlay:has(.theme-dig) {
  background:
    radial-gradient(circle at 50% 15%, rgba(255,220,150,0.2) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(100,60,20,0.4) 0%, transparent 60%),
    linear-gradient(180deg, #2a1a0a 0%, #4a3018 30%, #7a5830 60%, #a08050 100%) !important;
}
.game-canvas.theme-dig {
  background:
    radial-gradient(circle at 50% 15%, rgba(255,220,150,0.15) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(100,60,20,0.3) 0%, transparent 60%),
    linear-gradient(180deg, #2a1a0a 0%, #4a3018 30%, #7a5830 60%, #a08050 100%) !important;
}

/* merge 神龙进化 🐉 — 神秘青绿 */
#gamePlay:has(.theme-merge) {
  background:
    radial-gradient(circle at 30% 20%, rgba(100,255,200,0.15) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(50,150,200,0.2) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(0,200,150,0.1) 0%, transparent 50%),
    linear-gradient(180deg, #051a1a 0%, #0a3030 30%, #0f5050 60%, #1a8070 100%) !important;
}
.game-canvas.theme-merge {
  background:
    radial-gradient(circle at 30% 20%, rgba(100,255,200,0.12) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(50,150,200,0.15) 0%, transparent 45%),
    linear-gradient(180deg, #051a1a 0%, #0a3030 30%, #0f5050 60%, #1a8070 100%) !important;
}

/* towerdefense 长城守卫军 🏰 — 雄关灰青 */
#gamePlay:has(.theme-towerdefense) {
  background:
    radial-gradient(circle at 50% 10%, rgba(255,200,100,0.15) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(60,50,40,0.4) 0%, transparent 60%),
    linear-gradient(180deg, #1a2a3a 0%, #2a3a4a 30%, #4a5a6a 60%, #7a8a90 100%) !important;
}
.game-canvas.theme-towerdefense {
  background:
    radial-gradient(circle at 50% 10%, rgba(255,200,100,0.12) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 100%, rgba(60,50,40,0.35) 0%, transparent 60%),
    linear-gradient(180deg, #1a2a3a 0%, #2a3a4a 30%, #4a5a6a 60%, #7a8a90 100%) !important;
}

/* idle 神兽乐园 🦄 — 梦幻粉紫 */
#gamePlay:has(.theme-idle) {
  background:
    radial-gradient(circle at 25% 20%, rgba(255,180,220,0.3) 0%, transparent 40%),
    radial-gradient(circle at 75% 60%, rgba(180,150,255,0.3) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, rgba(255,220,180,0.2) 0%, transparent 50%),
    linear-gradient(180deg, #2d1b4e 0%, #5b3a8e 30%, #9b6bd4 60%, #e8a0e0 100%) !important;
}
.game-canvas.theme-idle {
  background:
    radial-gradient(circle at 25% 20%, rgba(255,180,220,0.25) 0%, transparent 40%),
    radial-gradient(circle at 75% 60%, rgba(180,150,255,0.25) 0%, transparent 45%),
    linear-gradient(180deg, #2d1b4e 0%, #5b3a8e 30%, #9b6bd4 60%, #e8a0e0 100%) !important;
}

/* monopoly 丝路商旅 🐪 — 沙漠金棕 */
#gamePlay:has(.theme-monopoly) {
  background:
    radial-gradient(circle at 50% 15%, rgba(255,220,120,0.3) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(180,100,30,0.3) 0%, transparent 55%),
    linear-gradient(180deg, #4a3010 0%, #8b6020 30%, #c89040 60%, #f0c878 100%) !important;
}
.game-canvas.theme-monopoly {
  background:
    radial-gradient(circle at 50% 15%, rgba(255,220,120,0.25) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(180,100,30,0.25) 0%, transparent 55%),
    linear-gradient(180deg, #4a3010 0%, #8b6020 30%, #c89040 60%, #f0c878 100%) !important;
}

/* card 封神卡牌 🃏 — 仙术金蓝 */
#gamePlay:has(.theme-card) {
  background:
    radial-gradient(circle at 30% 20%, rgba(100,180,255,0.2) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(255,200,80,0.2) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(150,100,255,0.1) 0%, transparent 50%),
    linear-gradient(180deg, #0a1530 0%, #152550 30%, #1e3a70 60%, #2a5090 100%) !important;
}
.game-canvas.theme-card {
  background:
    radial-gradient(circle at 30% 20%, rgba(100,180,255,0.15) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(255,200,80,0.15) 0%, transparent 45%),
    linear-gradient(180deg, #0a1530 0%, #152550 30%, #1e3a70 60%, #2a5090 100%) !important;
}

/* partyrace 龙舟竞渡 🐉 — 江河青绿 */
#gamePlay:has(.theme-partyrace) {
  background:
    radial-gradient(circle at 30% 15%, rgba(255,255,255,0.15) 0%, transparent 35%),
    radial-gradient(ellipse at 50% 100%, rgba(0,80,100,0.4) 0%, transparent 60%),
    linear-gradient(180deg, #1a4a6a 0%, #2a7a9a 30%, #40a0c0 60%, #60c8e0 100%) !important;
}
.game-canvas.theme-partyrace {
  background:
    radial-gradient(circle at 30% 15%, rgba(255,255,255,0.12) 0%, transparent 35%),
    radial-gradient(ellipse at 50% 100%, rgba(0,80,100,0.35) 0%, transparent 60%),
    linear-gradient(180deg, #1a4a6a 0%, #2a7a9a 30%, #40a0c0 60%, #60c8e0 100%) !important;
}
#gamePlay:has(.theme-pirate) .engine-panel .mic-hint,
#gamePlay:has(.theme-fish) .engine-panel .mic-hint,
#gamePlay:has(.theme-star) .engine-panel .mic-hint,
#gamePlay:has(.theme-shooter) .engine-panel .mic-hint,
#gamePlay:has(.theme-rocket) .engine-panel .mic-hint {
  color: rgba(255,255,255,0.7) !important;
}
/* ===== 皮肤测试模式开关（放在"选择类型"标题右侧） ===== */
.skin-test-toggle {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7);
  background: linear-gradient(135deg,#667eea,#764ba2);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(102,126,234,0.5);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: auto;
  line-height: 1;
}
.skin-test-toggle:hover { transform: scale(1.08); }
.skin-test-toggle.active {
  background: linear-gradient(135deg,#f093fb,#f5576c);
  box-shadow: 0 3px 12px rgba(245,87,108,0.6);
  animation: stpulse 1.5s ease-in-out infinite;
}
@keyframes stpulse {
  0%,100% { box-shadow: 0 3px 12px rgba(245,87,108,0.6); }
  50% { box-shadow: 0 3px 20px rgba(245,87,108,0.9); }
}


/* ===== V8: 闯关引导视频按钮 + 弹窗 ===== */
.page-game .topbar { position: relative; }
.game-guide-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #FF8C42, #FFB088);
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(255,140,66,0.4);
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s;
}
.game-guide-btn:active { transform: scale(0.95); }
.ggb-icon { font-size: 16px; }

.game-guide-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.game-guide-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 400px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}
.ggm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  font-size: 17px;
  font-weight: 700;
  color: #FF8C42;
  border-bottom: 1px solid #f0f0f0;
}
.ggm-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
}
.ggm-video {
  width: 100%;
  display: block;
  background: #000;
}
.ggm-tip {
  padding: 14px 20px;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  text-align: center;
}
/* 大白wave34 P0：指引视频内联不进系统全屏，轻触任意处进游戏 */
.ggm-video-wrap { position: relative; width: 100%; background: #000; }
.ggm-video-wrap video { width: 100%; display: block; background: #000; }
.ggm-playhint {
  position: absolute; top: 50%; left: 50%;
  -webkit-transform: translate(-50%,-50%); transform: translate(-50%,-50%);
  background: rgba(0,0,0,0.55); color: #fff; font-size: 15px; font-weight: 700;
  padding: 12px 22px; border-radius: 999px; pointer-events: none; white-space: nowrap;
}
