/* ===================================================================
   Happy English Land - 儿童友好视觉设计系统
   专为1-3年级小朋友量身打造：高对比度、大圆角、萌趣跳动、卡片拟物、拼音辅助
   =================================================================== */

:root {
  --font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Comic Sans MS", cursive, sans-serif;
  --bg-gradient: linear-gradient(135deg, #FFF6E5 0%, #E8F5E9 50%, #E1F5FE 100%);
  --primary-color: #FF6B6B;
  --primary-dark: #EE5253;
  --secondary-color: #4ECDC4;
  --accent-yellow: #FFE66D;
  --accent-orange: #FF9F1C;
  --accent-purple: #8338EC;
  --text-main: #2D3436;
  --text-muted: #636E72;
  --card-bg: #FFFFFF;
  --card-shadow: 0 12px 28px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
  --card-hover-shadow: 0 18px 36px rgba(0, 0, 0, 0.12), 0 6px 14px rgba(0, 0, 0, 0.06);
  --border-radius-lg: 24px;
  --border-radius-md: 18px;
  --border-radius-sm: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: var(--font-family);
  background: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* 背景漂浮装饰（云朵、星星、音符） */
.bg-decorations {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-cloud {
  position: absolute;
  font-size: 3.5rem;
  opacity: 0.35;
  animation: floatCloud 24s infinite linear;
}

.cloud-1 { top: 8%; left: -100px; animation-duration: 32s; }
.cloud-2 { top: 40%; left: -120px; animation-duration: 40s; animation-delay: 8s; }
.cloud-3 { top: 75%; left: -80px; animation-duration: 36s; animation-delay: 16s; }

@keyframes floatCloud {
  0% { transform: translateX(-150px); }
  100% { transform: translateX(calc(100vw + 200px)); }
}

/* 顶部导航与状态栏 */
.top-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 3px solid #FFEAA7;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-container:hover {
  transform: scale(1.03);
}

.mascot-avatar {
  font-size: 2.2rem;
  background: #FFEAA7;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(255, 170, 0, 0.25);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: bounceGentle 3s infinite ease-in-out;
}

.mascot-avatar:hover {
  transform: scale(1.18) rotate(12deg);
  background: #FFD166;
}

.mascot-avatar:active {
  transform: scale(0.9);
}

@keyframes bounceGentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.logo-title h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #2D3436;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-title .badge-tag {
  font-size: 0.72rem;
  font-weight: 700;
  background: #FF6B6B;
  color: white;
  padding: 2px 8px;
  border-radius: 20px;
}

.logo-title p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-profile-pill {
  background: #FFF9E6;
  border: 2px solid #FFE66D;
  padding: 6px 14px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #D35400;
  cursor: pointer;
  transition: all 0.2s;
}

.user-profile-pill:hover {
  background: #FFEAA7;
  transform: scale(1.05);
}

.star-bank {
  background: #FFF3CD;
  border: 2px solid #FFD166;
  border-radius: 30px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.1rem;
  font-weight: 900;
  color: #D48806;
  box-shadow: 0 4px 8px rgba(255, 209, 102, 0.3);
  animation: pulseStar 2s infinite ease-in-out;
  cursor: pointer;
}

@keyframes pulseStar {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.icon-btn {
  background: #F1F2F6;
  border: 2px solid #CED6E0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.icon-btn:hover {
  transform: scale(1.12) rotate(6deg);
  background: #FFFFFF;
}

.icon-btn:active {
  transform: scale(0.92);
}

.icon-btn.active {
  background: #4ECDC4;
  border-color: #22A699;
  color: white;
}

/* 听小熊讲玩法超萌按钮 */
.voice-guide-btn {
  background: linear-gradient(135deg, #FFEAA7 0%, #FFD166 100%);
  border: 2px solid #FDCB6E;
  color: #D35400;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 10px rgba(253, 203, 110, 0.4);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.voice-guide-btn:hover {
  transform: scale(1.08) translateY(-2px);
  background: #FFD166;
}

/* 主内容区域包装 */
.main-content {
  position: relative;
  z-index: 10;
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* ================= 视图 1：单元探险地图 (Map View) ================= */
.map-view {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

.hero-banner {
  background: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 99%, #FECFEF 100%);
  border-radius: var(--border-radius-lg);
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  box-shadow: 0 16px 32px rgba(255, 154, 158, 0.25);
  position: relative;
  overflow: hidden;
}

.hero-text h2 {
  font-size: 2.1rem;
  font-weight: 900;
  color: #2C3A47;
  margin-bottom: 8px;
}

.hero-text p {
  font-size: 1.1rem;
  color: #576574;
  max-width: 580px;
  line-height: 1.6;
}

.hero-badges {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mini-pill {
  background: rgba(255, 255, 255, 0.85);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #E84118;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hero-mascot-img {
  font-size: 5rem;
  animation: wiggle 3s infinite ease-in-out;
  cursor: pointer;
  transition: transform 0.2s;
}

.hero-mascot-img:hover {
  transform: scale(1.25) rotate(10deg);
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}

.unit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.unit-card {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
  border: 3px solid transparent;
  display: flex;
  flex-direction: column;
}

.unit-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--card-hover-shadow);
}

.unit-card.unlocked {
  border-color: #FFEAA7;
}

.unit-card.locked {
  opacity: 0.72;
  filter: grayscale(0.2);
  cursor: not-allowed;
}

.unit-card.locked:hover {
  transform: none;
}

.unit-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.unit-number-tag {
  font-size: 0.9rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 30px;
  color: white;
}

.unit-icon-large {
  font-size: 2.8rem;
}

.unit-card h3 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #2D3436;
  margin-bottom: 4px;
}

.unit-card .unit-chinese {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-orange);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.unit-card .unit-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
}

.unit-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 2px dashed #F1F2F6;
  padding-top: 14px;
}

.unit-status-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: #10AC84;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-enter-unit {
  background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
  color: white;
  border: none;
  font-size: 0.95rem;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
  transition: transform 0.15s;
}

.btn-enter-unit:hover {
  transform: scale(1.08);
}

/* ================= 视图 2：单元大本营 (Unit Hub) ================= */
.unit-hub-view {
  display: none;
  animation: fadeIn 0.35s ease-out;
}

.hub-nav-header {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 20px 24px;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.hub-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-back-map {
  background: #F1F2F6;
  border: 2px solid #DFE4EA;
  padding: 8px 16px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-back-map:hover {
  background: #FFEAA7;
  border-color: #FDCB6E;
  transform: translateX(-3px);
}

.hub-title-text h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #2D3436;
}

.hub-title-text p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* 单元四大模块标签页选项卡 */
.hub-tabs {
  display: flex;
  gap: 10px;
  background: #F1F2F6;
  padding: 6px;
  border-radius: 40px;
  overflow-x: auto;
}

.tab-btn {
  border: none;
  background: transparent;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 800;
  color: #576574;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
}

.tab-btn.active {
  background: white;
  color: #FF6B6B;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: scale(1.04);
}

/* 模块容器 */
.module-panel {
  display: none;
  animation: slideUp 0.3s ease-out;
}

.module-panel.active {
  display: block;
}

/* ------------------ 模块 1：魔法单词卡 ------------------ */
.word-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  background: white;
  padding: 14px 20px;
  border-radius: var(--border-radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  gap: 12px;
  flex-wrap: wrap;
}

.word-control-tip {
  font-size: 0.95rem;
  font-weight: 700;
  color: #576574;
  display: flex;
  align-items: center;
  gap: 8px;
}

.word-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.word-card-wrap {
  perspective: 1000px;
  height: 340px;
}

.word-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  cursor: pointer;
}

.word-card-wrap.flipped .word-card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--border-radius-lg);
  padding: 18px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border: 3px solid #F1F2F6;
  background: white;
}

.card-face-front {
  background: white;
}

.card-face-back {
  background: #FFFDF9;
  transform: rotateY(180deg);
  border-color: #FFEAA7;
}

.word-svg-box {
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.word-svg-box:hover {
  transform: scale(1.15) rotate(6deg);
}

.word-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.06));
}

.word-text-box h3 {
  font-size: 1.6rem;
  font-weight: 900;
  color: #2D3436;
  letter-spacing: 0.5px;
}

.word-phonetic {
  font-size: 0.95rem;
  color: #95A5A6;
  font-family: monospace;
}

/* 拼音与中文组合胶囊（低龄小朋友必备） */
.pinyin-chinese-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2px;
}

.pinyin-badge {
  font-size: 0.8rem;
  font-weight: 800;
  color: #E67E22;
  letter-spacing: 1px;
}

.word-chinese-badge {
  background: #FFEAA7;
  color: #D35400;
  font-size: 1.15rem;
  font-weight: 900;
  padding: 3px 16px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(255, 234, 167, 0.4);
}

.card-action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.speech-btn {
  background: #E8F5E9;
  border: 2px solid #81C784;
  color: #2E7D32;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 7px 14px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.speech-btn:hover {
  background: #C8E6C9;
  transform: scale(1.08);
}

.speech-btn.turtle {
  background: #FFF3E0;
  border-color: #FFB74D;
  color: #E65100;
}

.speech-btn.turtle:hover {
  background: #FFE0B2;
}

.card-flip-tip {
  font-size: 0.78rem;
  color: #B2BEC3;
}

.word-spelling-strip {
  display: flex;
  gap: 4px;
  margin: 6px 0;
}

.letter-badge {
  background: #E0F2FE;
  color: #0284C7;
  font-size: 1.1rem;
  font-weight: 800;
  width: 28px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #BAE6FD;
}

.example-sentence-box {
  background: #F8F9FA;
  border-radius: var(--border-radius-sm);
  padding: 10px 12px;
  width: 100%;
  margin: 6px 0;
}

.example-en {
  font-size: 0.95rem;
  font-weight: 800;
  color: #2D3436;
}

.example-cn {
  font-size: 0.84rem;
  color: #636E72;
  margin-top: 2px;
}

.word-fun-tip {
  font-size: 0.82rem;
  color: #D35400;
  background: #FFF9E6;
  padding: 6px 10px;
  border-radius: 8px;
  border-left: 3px solid #FFBE0B;
  width: 100%;
}

/* ------------------ 模块 2：萌友小剧场 ------------------ */
.dialogue-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dialogue-scene-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: var(--card-shadow);
  border: 3px solid #F1F2F6;
}

.scene-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 2px dashed #ECEFF1;
  padding-bottom: 12px;
}

.scene-title-group h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: #2D3436;
}

.scene-title-group p {
  font-size: 0.88rem;
  color: var(--accent-orange);
  font-weight: 700;
}

.btn-play-all {
  background: linear-gradient(135deg, #4ECDC4 0%, #22A699 100%);
  color: white;
  border: none;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 10px rgba(78, 205, 196, 0.3);
  transition: transform 0.15s;
}

.btn-play-all:hover {
  transform: scale(1.06);
}

.dialogue-lines-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dialogue-line-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--border-radius-md);
  transition: all 0.2s;
}

.dialogue-line-item:hover {
  background: #F8F9FA;
}

.dialogue-line-item.active-speaking {
  background: #FFF9E6;
  border: 2px solid #FFEAA7;
  transform: scale(1.02);
}

.char-avatar-bubble {
  font-size: 2.2rem;
  width: 50px;
  height: 50px;
  background: #FFEAA7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.dialogue-line-item:hover .char-avatar-bubble {
  transform: scale(1.15) rotate(8deg);
}

.dialogue-bubble {
  background: #FFFFFF;
  border: 2px solid #E2E8F0;
  border-radius: 18px;
  border-top-left-radius: 4px;
  padding: 12px 18px;
  position: relative;
  flex-grow: 1;
  box-shadow: 0 4px 8px rgba(0,0,0,0.03);
}

.speaker-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: #718096;
  margin-bottom: 4px;
}

.line-en {
  font-size: 1.15rem;
  font-weight: 800;
  color: #2D3748;
  display: flex;
  align-items: center;
  gap: 8px;
}

.line-cn {
  font-size: 0.9rem;
  color: #718096;
  margin-top: 4px;
}

.btn-speak-line {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: #4ECDC4;
  transition: transform 0.15s;
}

.btn-speak-line:hover {
  transform: scale(1.3);
}

/* ------------------ 模块 3：律动跳跳乐 (Let's Do) ------------------ */
.action-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.action-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: var(--card-shadow);
  text-align: center;
  border: 3px solid #E2E8F0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.action-card:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: #FF9F1C;
}

.action-icon-large {
  font-size: 3.5rem;
  margin-bottom: 12px;
  animation: bounceGentle 2s infinite ease-in-out;
}

.action-command-en {
  font-size: 1.28rem;
  font-weight: 900;
  color: #2D3436;
  margin-bottom: 4px;
}

.action-command-cn {
  font-size: 1.1rem;
  font-weight: 800;
  color: #E67E22;
  margin-bottom: 2px;
}

.action-command-pinyin {
  font-size: 0.82rem;
  color: #B2BEC3;
  margin-bottom: 12px;
}

.action-fun-desc {
  background: #FFF9E6;
  border-radius: var(--border-radius-sm);
  padding: 10px 14px;
  font-size: 0.88rem;
  color: #636E72;
  margin-bottom: 16px;
  line-height: 1.5;
}

.btn-do-action {
  background: linear-gradient(135deg, #FF9F1C 0%, #FF5722 100%);
  color: white;
  border: none;
  font-weight: 800;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 159, 28, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s;
}

.btn-do-action:hover {
  transform: scale(1.08);
}

/* Simon Says 挑战模式大卡片 */
.simon-says-box {
  background: linear-gradient(135deg, #A8EDEA 0%, #FED6E3 100%);
  border-radius: var(--border-radius-lg);
  padding: 28px;
  margin-top: 30px;
  text-align: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
}

.simon-says-box h3 {
  font-size: 1.4rem;
  font-weight: 900;
  color: #2D3436;
  margin-bottom: 8px;
}

.simon-says-box p {
  font-size: 1rem;
  color: #576574;
  margin-bottom: 18px;
}

.btn-start-simon {
  background: linear-gradient(135deg, #8338EC 0%, #3A86FF 100%);
  color: white;
  border: none;
  font-weight: 900;
  padding: 12px 28px;
  border-radius: 30px;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(131, 56, 236, 0.3);
  transition: transform 0.2s;
}

.btn-start-simon:hover {
  transform: scale(1.08);
}

/* ------------------ 模块 4：闯关游乐园 (Game Zone) ------------------ */
.game-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.game-select-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: var(--card-shadow);
  border: 3px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-select-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: #4ECDC4;
  box-shadow: var(--card-hover-shadow);
}

.game-select-card.active {
  border-color: #FF6B6B;
  background: #FFFDF9;
}

.game-icon-box {
  font-size: 3rem;
  width: 70px;
  height: 70px;
  border-radius: 20px;
  background: #E8F5E9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.game-info-box h4 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #2D3436;
  margin-bottom: 4px;
}

.game-info-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* 游戏舞台舞台框 */
.game-arena {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 32px 24px;
  box-shadow: var(--card-shadow);
  border: 4px solid #FFEAA7;
  min-height: 440px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.game-header-bar {
  position: absolute;
  top: 16px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-score-badge {
  background: #FFF3CD;
  border: 2px solid #FFD166;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 800;
  color: #D48806;
  display: flex;
  align-items: center;
  gap: 6px;
}

.game-prompt-box {
  text-align: center;
  margin-bottom: 24px;
}

.game-mascot-speech {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #F1F2F6;
  padding: 10px 24px;
  border-radius: 40px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.game-target-word {
  font-size: 1.8rem;
  font-weight: 900;
  color: #FF6B6B;
}

/* 游戏 1：气球网格 */
.balloon-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 760px;
}

.balloon-item {
  width: 130px;
  height: 170px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  animation: floatBalloon 3s infinite ease-in-out;
  transition: transform 0.2s;
  border: 3px solid rgba(255,255,255,0.4);
}

.balloon-item:hover {
  transform: scale(1.1) translateY(-6px);
}

.balloon-item::after {
  content: "";
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 18px;
  background: #A4B0BE;
}

.balloon-item .b-icon {
  font-size: 2.2rem;
  margin-bottom: 4px;
}

.balloon-item .b-text {
  font-size: 1.05rem;
  font-weight: 900;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

@keyframes floatBalloon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* 游戏 2：装进书包 / 魔法调色盘 */
.bag-game-wrap, .palette-game-wrap {
  width: 100%;
  max-width: 740px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.bag-drop-target {
  width: 180px;
  height: 180px;
  background: #FFF3E0;
  border: 4px dashed #FF9F1C;
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 20px rgba(255, 159, 28, 0.15);
  animation: pulseTarget 2s infinite ease-in-out;
}

@keyframes pulseTarget {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.items-shelf {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  background: #F8F9FA;
  padding: 16px 20px;
  border-radius: var(--border-radius-lg);
  width: 100%;
}

.shelf-item-btn {
  background: white;
  border: 2px solid #CED6E0;
  border-radius: 16px;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 8px rgba(0,0,0,0.04);
}

.shelf-item-btn:hover {
  transform: scale(1.1) translateY(-4px);
  border-color: #FF6B6B;
}

/* 游戏 3：翻翻乐记忆牌 */
.memory-board {
  display: grid;
  grid-template-columns: repeat(4, 110px);
  gap: 14px;
  justify-content: center;
}

.memory-card {
  width: 110px;
  height: 120px;
  perspective: 600px;
  cursor: pointer;
}

.memory-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.4s;
  transform-style: preserve-3d;
}

.memory-card.flipped .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-front, .memory-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  border: 2px solid #E2E8F0;
}

.memory-front {
  background: linear-gradient(135deg, #70D6FF 0%, #54A0FF 100%);
  color: white;
  font-size: 2.2rem;
}

.memory-back {
  background: white;
  transform: rotateY(180deg);
  border-color: #FFEAA7;
}

.memory-back .mem-icon {
  font-size: 2.2rem;
}

.memory-back .mem-text {
  font-size: 0.95rem;
  font-weight: 800;
  color: #2D3436;
  margin-top: 4px;
}

/* 模态弹窗（奖状证书、改名字等） */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 32px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  position: relative;
  text-align: center;
  border: 4px solid #FFEAA7;
  animation: scaleUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-close-modal {
  position: absolute;
  top: 14px;
  right: 16px;
  background: #F1F2F6;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.certificate-box {
  background: #FFFDF7;
  border: 6px double #FFD166;
  border-radius: 16px;
  padding: 24px;
  margin: 16px 0;
  box-shadow: inset 0 0 20px rgba(255, 209, 102, 0.15);
}

.cert-header {
  font-size: 1.5rem;
  font-weight: 900;
  color: #D48806;
  margin-bottom: 8px;
}

.cert-name {
  font-size: 1.6rem;
  font-weight: 900;
  color: #FF6B6B;
  border-bottom: 2px solid #FFBE0B;
  display: inline-block;
  padding: 0 16px 4px;
  margin: 10px 0;
}

.cert-body {
  font-size: 1rem;
  color: #576574;
  line-height: 1.6;
  margin-bottom: 16px;
}

.cert-seal {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 12px;
}

.seal-item {
  font-size: 0.82rem;
  font-weight: 700;
  color: #D35400;
}

/* 动效 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .top-navbar {
    padding: 10px 14px;
  }
  .logo-title h1 {
    font-size: 1.1rem;
  }
  .logo-title p {
    display: none;
  }
  .hero-banner {
    flex-direction: column;
    text-align: center;
    padding: 24px 18px;
  }
  .hero-mascot-img {
    margin-top: 14px;
  }
  .hub-nav-header {
    flex-direction: column;
    align-items: stretch;
  }
  .hub-tabs {
    justify-content: flex-start;
  }
  .memory-board {
    grid-template-columns: repeat(3, 90px);
  }
}
