/* ===== 启蒙英语 - 现代简约设计系统 ===== */
/* 设计理念：克制配色 + 柔和阴影 + 充足留白 + 精致细节 */

/* ===== 全局基础 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  /* 主色调 - Storynory风格（紫色+青绿） */
  --primary: #8B5CF6;
  --primary-light: #A78BFA;
  --primary-dark: #7C3AED;
  --primary-bg: #F5F3FF;
  
  /* 辅助色 - 青绿色系 */
  --secondary: #14B8A6;
  --secondary-light: #5EEAD4;
  
  /* 渐变色 */
  --gradient-start: #7C3AED;
  --gradient-end: #14B8A6;
  
  /* 中性色 - 核心配色 */
  --gray-50: #FAFAFA;
  --gray-100: #F5F5F7;
  --gray-200: #E8E8ED;
  --gray-300: #D2D2D7;
  --gray-400: #AEAEB2;
  --gray-500: #8E8E93;
  --gray-600: #636366;
  --gray-700: #48484A;
  --gray-800: #3A3A3C;
  --gray-900: #1D1D1F;
  
  /* 功能色 */
  --success: #34C759;
  --warning: #F59E0B;
  --error: #EF4444;
  
  /* 背景色 */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F0FDFA;
  --bg-tertiary: #FAFAFA;
  --bg-card: #FFFBEB;
  --bg-warm: #FEF3C7;
  
  /* 文字色 */
  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --text-tertiary: #9CA3AF;
  --text-quaternary: #D1D5DB;
  --text-dark: #1F2937;
  
  /* 边框色 */
  --border-light: #E5E7EB;
  --border-primary: rgba(0, 0, 0, 0.04);
  --border-secondary: rgba(0, 0, 0, 0.08);
  --border-tertiary: rgba(0, 0, 0, 0.12);
  
  /* 圆角 */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  /* 阴影 - 多层柔和阴影 */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
  
  /* 间距系统 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  
  /* 动画 */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #0D9488;
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

body { 
  min-height: 100dvh; 
  display: flex;
  justify-content: center;
}

#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-primary);
  box-shadow: var(--shadow-xl);
}

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ===== 顶部导航栏 - Storynory风格 ===== */
.header {
  display: flex;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  gap: var(--space-3);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-primary);
}

.kid-header {
  padding: var(--space-5) var(--space-5) var(--space-4);
}

.header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #8B5CF6, #14B8A6);
  box-shadow: var(--shadow-sm);
}

.header-title {
  flex: 1;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.02em;
}

.header-back {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: none;
  color: var(--text-primary);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.header-back:active { 
  background: var(--gray-200);
  transform: scale(0.95);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border-secondary);
}

.badge[onclick]:hover {
  background: var(--gray-200);
}

.content { 
  flex: 1; 
  padding: 0 var(--space-5) var(--space-6);
}

/* ===== 欢迎横幅 ===== */
.welcome-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(20, 184, 166, 0.1));
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.welcome-emoji {
  font-size: 28px;
}

.welcome-text {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

/* ===== 课程卡片 ===== */
.course-card {
  background: var(--bg-card);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: all var(--transition-normal);
  margin-bottom: var(--space-3);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.course-card:hover {
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
}

.course-card:active {
  transform: scale(0.98);
}

.course-cover {
  width: 100%;
  height: 216px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-secondary);
  margin-bottom: var(--space-2);
}

.course-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.course-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.course-content {
  flex: 1;
  min-width: 0;
  padding: 0 var(--space-1);
}

.course-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
  line-height: 1.3;
}

.course-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.course-tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-weight: 500;
  color: #fff;
}

.course-lessons {
  font-size: 11px;
  color: var(--text-secondary);
}

/* ===== 课时网格 ===== */
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.lesson-item {
  background: var(--bg-card);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 80px;
}

.lesson-item:active { 
  transform: scale(0.96);
  border-color: var(--border-tertiary);
}

.lesson-item.done { 
  border-color: #14B8A6;
  background: rgba(20, 184, 166, 0.08);
}

.lesson-item.done::after {
  content: '✓';
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 10px;
  color: var(--success);
  font-weight: 600;
}

.lesson-item.current { 
  border-color: #8B5CF6;
  background: rgba(139, 92, 246, 0.08);
}

.lesson-num { 
  font-size: 11px; 
  color: var(--text-tertiary); 
  font-weight: 500; 
}

.lesson-emoji { 
  font-size: 26px; 
  line-height: 1; 
}

.lesson-title-sm { 
  font-size: 10px; 
  color: var(--text-secondary); 
  text-align: center; 
  word-break: break-all;
  line-height: 1.2;
}

/* ===== 课时详情 ===== */
.lesson-hero {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(20, 184, 166, 0.05));
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.1);
}

.lesson-hero-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: linear-gradient(135deg, #8B5CF6, #A78BFA);
  flex-shrink: 0;
}

.lesson-hero-title { 
  font-size: 18px; 
  font-weight: 700; 
  margin-bottom: 6px; 
  color: var(--text-dark);
  letter-spacing: 0.3px;
}

.lesson-hero-sub { 
  font-size: 13px; 
  color: var(--text-secondary);
  letter-spacing: 0.2px;
}

/* ===== 功能入口 ===== */
.action-list { 
  display: flex; 
  flex-direction: column; 
  gap: 14px; 
}

.action-item {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.1);
  position: relative;
  overflow: hidden;
}

.action-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(139, 92, 246, 0.05));
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.action-item:active { 
  background: var(--bg-card-hover); 
  transform: translateY(2px);
  box-shadow: var(--shadow-sm);
}

.action-item:active::after {
  opacity: 1;
}

.action-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.action-icon-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.action-info { 
  flex: 1; 
  position: relative;
  z-index: 1;
}

.action-title { 
  font-size: 17px; 
  font-weight: 700; 
  color: var(--text-dark);
  letter-spacing: 0.3px;
}

.action-desc { 
  font-size: 13px; 
  color: var(--text-secondary); 
  margin-top: 4px;
  letter-spacing: 0.2px;
}

.action-arrow { 
  font-size: 22px; 
  color: #8B5CF6; 
  position: relative;
  z-index: 1;
  transition: transform var(--transition-fast);
}

.action-item:active .action-arrow {
  transform: translateX(4px);
}

/* 图标背景 - Storynory风格 */
.video-icon-bg    { background: linear-gradient(135deg, #8B5CF6, #A78BFA); }
.word-icon-bg     { background: linear-gradient(135deg, #14B8A6, #5EEAD4); }
.sentence-icon-bg { background: linear-gradient(135deg, #10B981, #34D399); }
.listening-icon-bg { background: linear-gradient(135deg, #7C3AED, #A78BFA); }
.game-icon-bg     { background: linear-gradient(135deg, #EC4899, #F472B6); }
.match-icon-bg    { background: linear-gradient(135deg, #0EA5E9, #38BDF8); }
.report-icon-bg   { background: linear-gradient(135deg, #F59E0B, #FBBF24); }
.practice-icon-bg { background: linear-gradient(135deg, #8B5CF6, #C4B5FD); }

/* ===== 视频 ===== */
.video-wrap {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #1a1a1a;
  margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
}

.video-wrap video { width: 100%; display: block; }
.video-wrap iframe { width: 100%; display: block; border: none; }

.video-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

/* ===== 跟读 ===== */
.record-area {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.15);
}

.record-word { 
  font-size: 48px; 
  font-weight: 800; 
  color: #8B5CF6; 
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.record-emoji { 
  font-size: 60px; 
  margin-bottom: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.word-image {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.record-btn {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B5CF6, #A78BFA);
  border: none;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
  transition: all var(--transition-normal);
}

.record-btn:active { 
  transform: scale(0.92);
  box-shadow: 0 4px 16px rgba(255, 122, 69, 0.3);
}

.record-btn.recording {
  background: linear-gradient(135deg, #8B5CF6, #14B8A6);
  animation: pulse 1s infinite;
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.5); }
  50%      { box-shadow: 0 0 0 20px rgba(255, 82, 82, 0); }
}

/* 录音结果 */
.record-result {
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(20, 184, 166, 0.05));
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.record-stars {
  font-size: 36px;
  letter-spacing: 6px;
}

.record-message {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
}

.record-message.success { color: #14B8A6; }
.record-message.fail { color: var(--accent-pink); }

.play-record-btn {
  padding: 14px 28px;
  background: linear-gradient(135deg, #8B5CF6, #A78BFA);
  border: none;
  border-radius: 30px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
  transition: all var(--transition-fast);
}

.play-record-btn:active {
  transform: scale(0.96);
}

.word-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}

.word-nav-btn {
  background: var(--bg-card);
  border: 2px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
  transition: all var(--transition-fast);
}

.word-nav-btn:active {
  background: var(--bg-card-hover);
  transform: scale(0.97);
}

.word-nav-btn:disabled { 
  opacity: 0.4; 
  cursor: not-allowed;
}

/* ===== 句子跟读 ===== */
.sentence-display {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(20, 184, 166, 0.05));
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.1);
}

.sentence-text { 
  font-size: 24px; 
  font-weight: 700; 
  color: #8B5CF6; 
  line-height: 1.5; 
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.sentence-meaning { 
  font-size: 15px; 
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.sentence-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}

.sentence-nav-btn {
  background: var(--bg-card);
  border: 2px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
  text-align: center;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
  transition: all var(--transition-fast);
}

.sentence-nav-btn:active {
  background: var(--bg-card-hover);
  transform: scale(0.97);
}

.sentence-nav-btn:disabled { 
  opacity: 0.4; 
  cursor: not-allowed;
}

/* ===== 游戏通用 ===== */
.game-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.game-progress {
  flex: 1;
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}

.game-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8B5CF6, #14B8A6);
  border-radius: 4px;
  transition: width 0.4s;
}

.game-score { 
  font-size: 16px; 
  font-weight: 700; 
  color: #8B5CF6; 
  white-space: nowrap;
}

.game-tip {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(20, 184, 166, 0.08));
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 16px;
  border: 1px solid rgba(139, 92, 246, 0.15);
}

/* ===== 听音选图 ===== */
.listening-play-btn {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B5CF6, #A78BFA);
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.4);
  transition: all var(--transition-normal);
}

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

.listening-play-btn.playing { 
  background: linear-gradient(135deg, #8B5CF6, #14B8A6);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.4);
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.option-card {
  background: var(--bg-card);
  border: 3px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-lg);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-normal);
  min-height: 110px;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.1);
}

.option-card:active { 
  transform: scale(0.96);
}

.option-card.selected-correct { 
  border-color: #14B8A6; 
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(20, 184, 166, 0.05));
  box-shadow: 0 4px 16px rgba(20, 184, 166, 0.3);
}

.option-card.selected-wrong { 
  border-color: #EF4444; 
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
}

.option-card.correct-reveal { 
  border-color: #14B8A6;
}

.option-img { 
  width: 60px; 
  height: 60px; 
  object-fit: contain; 
}

.option-emoji { 
  font-size: 36px; 
  line-height: 1;
}

.option-word { 
  font-size: 13px; 
  font-weight: 600; 
  text-align: center;
  color: var(--text-primary);
}

/* ===== 词图连线 ===== */
.match-area {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}

.match-col { 
  flex: 1; 
  display: flex; 
  flex-direction: column; 
  gap: 10px; 
}

.match-word-card {
  background: var(--bg-card);
  border: 2px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-normal);
  min-height: 52px;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
}

.match-word-card:active { 
  transform: scale(0.96);
}

.match-word-card.selected { 
  border-color: #8B5CF6; 
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.match-word-card.matched { 
  border-color: #14B8A6; 
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(20, 184, 166, 0.05));
  opacity: 0.7;
}

.match-word-card.wrong { 
  border-color: #EF4444; 
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
}

.match-img-card {
  background: var(--bg-card);
  border: 2px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all var(--transition-normal);
  min-height: 80px;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
}

.match-img-card:active { 
  transform: scale(0.96);
}

.match-img-card.selected { 
  border-color: #8B5CF6; 
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.match-img-card.matched { 
  border-color: #14B8A6; 
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(20, 184, 166, 0.05));
  opacity: 0.7;
}

.match-img-card.wrong { 
  border-color: #EF4444; 
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
}

.match-card-img { 
  width: 54px; 
  height: 54px; 
  object-fit: contain; 
}

.match-card-emoji { 
  font-size: 36px; 
  line-height: 1;
}

.speaker-icon { 
  font-size: 12px; 
  opacity: 0.5;
}

.match-word-card.selected .speaker-icon { 
  opacity: 1; 
}

.match-lines-col {
  width: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 16px;
}

.match-line-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(20, 184, 166, 0.1));
  border: 2px solid #14B8A6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #14B8A6;
  font-weight: bold;
}

/* ===== 鼓励弹窗 ===== */
.praise-popup {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: linear-gradient(135deg, #8B5CF6, #14B8A6);
  border-radius: 50px;
  padding: 16px 36px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 999;
  white-space: nowrap;
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.5);
}

.praise-popup.visible { 
  opacity: 1; 
  transform: translateX(-50%) translateY(0); 
}

/* ===== 错误提示 ===== */
.wrong-popup {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: linear-gradient(135deg, #EF4444, #F97316);
  border-radius: 50px;
  padding: 16px 36px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 999;
  white-space: nowrap;
  box-shadow: 0 6px 24px rgba(239, 68, 68, 0.5);
}

.wrong-popup.visible { 
  opacity: 1; 
  transform: translateX(-50%) translateY(0); 
}

/* ===== 遮罩弹窗 ===== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(31, 41, 55, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 24px;
}

.modal {
  background: linear-gradient(160deg, var(--bg-card), #FFFFFF);
  border: none;
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(139, 92, 246, 0.2);
}

.modal-emoji { 
  font-size: 60px; 
  line-height: 1; 
}

.modal-title { 
  font-size: 28px; 
  font-weight: 800;
  color: var(--text-dark);
}

.modal-sub { 
  font-size: 14px; 
  color: var(--text-secondary);
}

.modal-stats { 
  display: flex; 
  gap: 32px; 
  margin: 8px 0; 
}

.stat-item { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 4px; 
}

.stat-val { 
  font-size: 36px; 
  font-weight: 800; 
  color: #8B5CF6;
}

.stat-key { 
  font-size: 13px; 
  color: var(--text-secondary);
}

.star-row { 
  display: flex; 
  gap: 8px; 
}

.star { 
  font-size: 34px; 
  filter: grayscale(1) opacity(0.35); 
  transition: all 0.3s; 
}

.star.lit { 
  filter: none; 
}

.modal-btns { 
  display: flex; 
  gap: 12px; 
  width: 100%; 
  margin-top: 8px;
}

.modal-btn {
  flex: 1;
  padding: 14px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-align: center;
  color: #fff;
}

.modal-btn:active { 
  transform: scale(0.96); 
}

.modal-btn-primary { 
  background: linear-gradient(135deg, #8B5CF6, #A78BFA);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}

.modal-btn-outline { 
  background: var(--bg-card); 
  border: 2px solid var(--border-light);
  color: var(--text-primary);
}

/* ===== 学习报告 ===== */
.report-card {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.1);
}

.report-title { 
  font-size: 16px; 
  font-weight: 700; 
  margin-bottom: 14px;
  color: var(--text-dark);
}

.report-items { 
  display: flex; 
  flex-direction: column; 
  gap: 12px; 
}

.report-item { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
}

.report-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.report-item-info { 
  flex: 1; 
}

.report-item-name { 
  font-size: 13px; 
  color: var(--text-secondary);
}

.report-item-stars { 
  font-size: 15px; 
  margin-top: 3px;
}

/* ===== 动画 ===== */
@keyframes shake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-6px); }
  40%  { transform: translateX(6px); }
  60%  { transform: translateX(-4px); }
  80%  { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

.shake { 
  animation: shake 0.4s ease; 
}

/* ===== 模块导航按钮 ===== */
.module-nav-btn-wrap {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px dashed var(--border-light);
  text-align: center;
}

.module-nav-tip {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.module-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #8B5CF6, #A78BFA);
  border: none;
  border-radius: 30px;
  padding: 16px 36px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.4);
  transition: all var(--transition-normal);
  letter-spacing: 0.5px;
}

.module-nav-btn:active {
  transform: scale(0.96);
  box-shadow: 0 4px 16px rgba(255, 122, 69, 0.3);
}

/* 游戏页底部导航 */
.game-nav-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid var(--border-light);
  text-align: center;
}

.game-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #14B8A6, #5EEAD4);
  border: none;
  border-radius: 30px;
  padding: 14px 32px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(20, 184, 166, 0.35);
  transition: all var(--transition-normal);
}

.game-nav-btn:active {
  transform: scale(0.96);
}

/* ===== 通用辅助 ===== */
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.gap-6 { gap: 6px; }
.gap-10 { gap: 10px; }
.flex-1 { flex: 1; }

/* ===== 激活引导页 - Storynory风格 ===== */
.activation-guide {
  min-height: 100vh;
  background: linear-gradient(135deg, #7C3AED 0%, #8B5CF6 50%, #14B8A6 100%);
  padding: 50px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ag-logo-img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  border: 5px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.ag-logo {
  font-size: 80px;
  margin-bottom: 16px;
  animation: bounce 2s infinite;
}

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

.ag-title {
  font-size: 34px;
  font-weight: 800;
  color: white;
  margin-bottom: 8px;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
  letter-spacing: 1px;
}

.ag-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 40px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.ag-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 32px 26px;
  width: 100%;
  max-width: 370px;
  box-shadow: 0 20px 60px rgba(139, 92, 246, 0.25);
}

.ag-card-title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 26px;
  letter-spacing: 0.5px;
}

.ag-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 26px;
}

.ag-tab {
  flex: 1;
  padding: 14px 12px;
  text-align: center;
  border-radius: var(--radius-md);
  font-size: 15px;
  background: var(--bg-warm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-normal);
  font-weight: 600;
}

.ag-tab.active {
  background: linear-gradient(135deg, #8B5CF6, #14B8A6);
  color: white;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}

.ag-panel {
  /* 默认显示 */
}

.ag-form-group {
  margin-bottom: 18px;
}

.ag-label {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.ag-input {
  width: 100%;
  padding: 16px 16px;
  border: 2px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-md);
  font-size: 17px;
  box-sizing: border-box;
  transition: all var(--transition-normal);
  background: var(--bg-card);
}

.ag-input:focus {
  outline: none;
  border-color: #8B5CF6;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
  background: white;
}

.ag-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #8B5CF6, #A78BFA);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
  letter-spacing: 0.5px;
}

.ag-btn:active {
  transform: scale(0.98);
  box-shadow: 0 4px 12px rgba(255, 122, 69, 0.25);
}

.ag-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ag-message {
  margin-top: 18px;
  text-align: center;
  font-size: 15px;
  min-height: 24px;
}

.ag-tips {
  margin-top: 32px;
  padding: 22px 24px;
  background: rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-lg);
  max-width: 370px;
  color: rgba(255, 255, 255, 0.98);
  font-size: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.ag-tips-title {
  font-weight: 700;
  margin-bottom: 14px;
  color: white;
  font-size: 16px;
  letter-spacing: 0.5px;
}

/* ===== 单词收集游戏 ===== */
.word-cards-container {
  position: relative;
  min-height: 420px;
  margin: 12px 0;
}

.word-card {
  position: absolute;
  width: 90px;
  background: linear-gradient(145deg, #FFFFFF, var(--bg-warm));
  border: 3px solid #8B5CF6;
  border-radius: var(--radius-md);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.25);
  animation: floatCard 2.5s ease-in-out infinite;
}

.word-card:active {
  transform: scale(0.92);
}

.word-card.collected {
  animation: collectCard 0.5s ease-out forwards;
}

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

@keyframes collectCard {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.8; }
  100% { transform: scale(0); opacity: 0; }
}

.card-emoji {
  font-size: 40px;
  line-height: 1;
}

.card-word {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
}

.card-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B5CF6, #A78BFA);
  border: 3px solid white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
  transition: all var(--transition-fast);
  margin-top: 6px;
}

.card-play-btn:active {
  transform: scale(0.9);
}

.card-play-btn.playing {
  animation: pulse 0.5s ease-in-out infinite;
}

/* 收集篮 */
.collect-basket {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(20, 184, 166, 0.05));
  border: 3px dashed #8B5CF6;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
}

.basket-label {
  font-size: 14px;
  font-weight: 700;
  color: #8B5CF6;
  margin-bottom: 10px;
  text-align: center;
}

.basket-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  min-height: 44px;
  align-items: center;
}

.basket-empty {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.basket-item {
  font-size: 28px;
  animation: popIn 0.3s ease-out;
}

@keyframes popIn {
  0% { transform: scale(0); }
  70% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* 完成卡片 */
.game-complete-card {
  background: linear-gradient(145deg, #FFFFFF, var(--bg-warm));
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  text-align: center;
  border: 4px solid var(--accent-yellow);
  box-shadow: 0 12px 48px rgba(255, 217, 61, 0.3);
}

.complete-stars {
  font-size: 40px;
  margin-bottom: 18px;
  animation: starBounce 0.5s ease-out;
}

@keyframes starBounce {
  0% { transform: scale(0) rotate(-180deg); }
  70% { transform: scale(1.3) rotate(10deg); }
  100% { transform: scale(1) rotate(0); }
}

.complete-title {
  font-size: 28px;
  font-weight: 800;
  color: #8B5CF6;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.complete-words {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 18px 0;
}

.complete-word {
  font-size: 36px;
  background: white;
  padding: 10px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.complete-score {
  font-size: 20px;
  font-weight: 700;
  color: #14B8A6;
  margin: 14px 0;
}

.complete-btn {
  background: linear-gradient(135deg, #8B5CF6, #14B8A6);
  color: white;
  border: none;
  padding: 16px 36px;
  border-radius: 30px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 18px;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
  letter-spacing: 0.5px;
}

/* ===== 单词收集游戏 - 选卡片版 ===== */
.word-collect-play-area {
  text-align: center;
  padding: 18px;
  margin-bottom: 14px;
}

.replay-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  color: var(--text-secondary);
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  border: 2px solid var(--border-light);
  cursor: pointer;
  margin-top: 12px;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.replay-btn:active {
  transform: scale(0.95);
  background: var(--bg-card-hover);
}

.play-sound-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #8B5CF6, #A78BFA);
  color: white;
  padding: 16px 32px;
  border-radius: 30px;
  font-size: 20px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.4);
  transition: all var(--transition-normal);
  letter-spacing: 0.5px;
}

.play-sound-btn:active {
  transform: scale(0.95);
}

.play-sound-btn.playing {
  background: linear-gradient(135deg, #14B8A6, #5EEAD4);
  box-shadow: 0 8px 28px rgba(20, 184, 166, 0.4);
}

.play-sound-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.playing-indicator {
  display: inline-block;
  background: linear-gradient(135deg, #14B8A6, #5EEAD4);
  color: white;
  padding: 16px 28px;
  border-radius: 30px;
  font-size: 17px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(20, 184, 166, 0.35);
}

.word-select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 12px;
}

.word-select-card {
  background: linear-gradient(145deg, #FFFFFF, var(--bg-warm));
  border: 3px solid #8B5CF6;
  border-radius: var(--radius-md);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
  position: relative;
}

.word-select-card:active {
  transform: scale(0.95);
}

.word-select-card.current {
  border-color: #14B8A6;
  box-shadow: 0 6px 24px rgba(20, 184, 166, 0.4);
  animation: glowCard 1.5s ease-in-out infinite;
}

@keyframes glowCard {
  0%, 100% { box-shadow: 0 6px 24px rgba(20, 184, 166, 0.4); }
  50% { box-shadow: 0 6px 36px rgba(20, 184, 166, 0.6); }
}

.word-select-card.wrong {
  border-color: #EF4444;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
  animation: shake 0.4s ease-in-out;
}

.word-select-card.collected {
  opacity: 0.5;
  pointer-events: none;
}

.select-feedback {
  margin-top: 14px;
  padding: 10px 24px;
  border-radius: 25px;
  font-size: 17px;
  font-weight: 700;
  animation: popIn 0.3s ease-out;
}

.select-feedback.correct {
  background: linear-gradient(135deg, #14B8A6, #5EEAD4);
  color: white;
  box-shadow: 0 4px 16px rgba(20, 184, 166, 0.35);
}

.select-feedback.wrong {
  background: linear-gradient(135deg, #EF4444, #F87171);
  color: white;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
}

.complete-btn:active {
  transform: scale(0.95);
}

/* ===== 口语100句页面 ===== */
.oral-content {
  padding-bottom: 30px;
}

.oral-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(20, 184, 166, 0.08));
  border-radius: 16px;
  margin-bottom: 20px;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.oral-intro-icon {
  font-size: 28px;
}

.oral-intro-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.oral-categories {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.oral-category {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.oral-category-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.oral-category-header:active {
  background: rgba(139, 92, 246, 0.05);
}

.oral-category-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.oral-category-info {
  flex: 1;
}

.oral-category-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.oral-category-count {
  font-size: 12px;
  color: var(--text-secondary);
}

.oral-category-arrow {
  font-size: 12px;
  color: var(--text-secondary);
  transition: transform 0.3s;
}

.oral-category-content {
  display: none;
  border-top: 1px solid rgba(139, 92, 246, 0.15);
}

.oral-sentence {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.1);
  cursor: pointer;
  transition: background 0.2s;
}

.oral-sentence:last-child {
  border-bottom: none;
}

.oral-sentence:active {
  background: rgba(139, 92, 246, 0.05);
}

.oral-sentence-text {
  flex: 1;
}

.oral-en {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.oral-zh {
  font-size: 13px;
  color: var(--text-secondary);
}

.oral-play-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B5CF6, #A78BFA);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  transition: all 0.2s;
  box-shadow: 0 3px 10px rgba(139, 92, 246, 0.3);
}

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

.oral-play-btn.playing {
  background: linear-gradient(135deg, #14B8A6, #5EEAD4);
  box-shadow: 0 3px 10px rgba(20, 184, 166, 0.4);
  animation: pulse 1s ease-in-out infinite;
}

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

/* ===== 口语页面视频区域 ===== */
.oral-video-section,
.home-video-section {
  margin-bottom: 20px;
}

.oral-video-wrap,
.home-video-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.oral-video-iframe,
.home-video-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.oral-brand-section,
.home-brand-section {
  padding: 20px 0;
}

.oral-brand-title,
.home-brand-title {
  font-size: 18px;
  font-weight: 700;
  color: #8B5CF6;
  margin-bottom: 12px;
}

.oral-brand-desc,
.home-brand-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.oral-tips-section,
.home-tips-section {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.06));
  border-radius: 16px;
  padding: 18px;
  border: 1px solid rgba(102, 126, 234, 0.15);
}

.oral-tips-title,
.home-tips-title {
  font-size: 15px;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 14px;
}

.oral-tips-list,
.home-tips-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.oral-tip-item,
.home-tip-item {
  font-size: 13px;
  color: var(--text-dark);
  line-height: 1.6;
  display: flex;
  gap: 8px;
}

.oral-tip-item .tip-num,
.home-tip-item .tip-num {
  color: #667eea;
  font-weight: 600;
  flex-shrink: 0;
}

/* ===== 日常口语视频区域 ===== */
.sentence-video-section {
  margin-bottom: 20px;
}

.sentence-video-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
}

.sentence-video-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ===== 打卡功能 ===== */
.checkin-section {
  margin-bottom: var(--space-5);
}

.checkin-status-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--border-primary);
}

.checkin-status-icon {
  font-size: 32px;
  line-height: 1;
}

.checkin-status-info {
  flex: 1;
}

.checkin-status-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.checkin-status-detail {
  font-size: 13px;
  color: var(--text-secondary);
}

/* 打卡成功弹窗 */
.checkin-success-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
}

.checkin-success-modal.show {
  opacity: 1;
}

.checkin-success-content {
  background: #fff;
  border-radius: 24px;
  padding: 40px 30px;
  text-align: center;
  max-width: 300px;
  width: 90%;
  transform: scale(0.9);
  transition: transform 0.3s;
}

.checkin-success-modal.show .checkin-success-content {
  transform: scale(1);
}

.checkin-success-icon {
  font-size: 64px;
  margin-bottom: 16px;
  animation: bounce 0.5s ease;
}

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

.checkin-success-title {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
}

.checkin-success-streak {
  font-size: 16px;
  color: #FF7A45;
  font-weight: 600;
  margin-bottom: 8px;
}

.checkin-success-msg {
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
}

.checkin-success-btn {
  background: linear-gradient(135deg, #FF7A45, #FFB347);
  color: #fff;
  border: none;
  padding: 12px 40px;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* ===== 单词视频区域 ===== */
.word-video-section {
  margin-bottom: 20px;
}

.word-video-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
}

.word-video-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ===== 动物园系统 ===== */
/* 资源栏 */
.zoo-resources {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  margin-bottom: var(--space-6);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
}

.resource-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.resource-num {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

/* 空状态 */
.zoo-empty {
  text-align: center;
  padding: var(--space-12) var(--space-5);
}

/* 动物卡片 */
.zoo-animals {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.zoo-animal-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-primary);
}

.zoo-animal-card:active {
  transform: scale(0.98);
  border-color: var(--border-secondary);
}

.animal-display {
  position: relative;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 50%;
  flex-shrink: 0;
}

.animal-outfit {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 20px;
}

.animal-info {
  flex: 1;
  min-width: 0;
}

.animal-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.level-badge {
  display: inline-block;
  background: var(--text-primary);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  margin-left: var(--space-2);
  font-weight: 500;
}

.satiety-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 2px;
}

.satiety-fill {
  height: 100%;
  background: var(--success);
  border-radius: var(--radius-full);
  transition: width 0.3s;
}

.satiety-text {
  font-size: 11px;
  color: var(--text-tertiary);
}

.feed-btn {
  padding: var(--space-2) var(--space-4);
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.feed-btn:active {
  transform: scale(0.95);
  background: var(--primary-dark);
}

/* 领养页面 - 动物网格 */
.animal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.animal-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-3);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-card);
}

.animal-card:active {
  transform: scale(0.96);
  border-color: var(--border-tertiary);
}

.animal-emoji {
  font-size: 48px;
  line-height: 1;
  margin-bottom: var(--space-2);
  display: inline-block;
  animation: animal-idle 2s ease-in-out infinite;
}

/* 动物动画 - 跳跃 */
@keyframes animal-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.05); }
}

/* 动物动画 - 摇摆 */
@keyframes animal-wobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

/* 动物动画 - 呼吸 */
@keyframes animal-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

/* 动物动画 - 游泳 */
@keyframes animal-swim {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(5px) rotate(3deg); }
  75% { transform: translateX(-5px) rotate(-3deg); }
}

/* 动物动画 - 默认（轻微浮动） */
@keyframes animal-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* 动物园页面的动物卡片动画 */
.zoo-animal-card .animal-display {
  animation: animal-bounce 2s ease-in-out infinite;
}

.zoo-animal-card:nth-child(2) .animal-display {
  animation: animal-wobble 2.5s ease-in-out infinite;
}

.zoo-animal-card:nth-child(3) .animal-display {
  animation: animal-breathe 2s ease-in-out infinite;
}

/* 领养页面的动物卡片动画 */
.animal-card .animal-emoji {
  animation: animal-idle 2s ease-in-out infinite;
}

.animal-card:hover .animal-emoji {
  animation: animal-bounce 0.5s ease-in-out infinite;
}

.animal-card:active .animal-emoji {
  transform: scale(0.9);
  animation: none;
}

.animal-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.animal-food {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: var(--space-2);
}

.animal-free {
  display: inline-block;
  background: var(--success);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.animal-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

/* 班级排名 */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-primary);
  transition: all var(--transition-fast);
}

.ranking-item.is-me {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.ranking-pos {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.pos-num {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.ranking-animal {
  font-size: 28px;
  flex-shrink: 0;
}

.ranking-info {
  flex: 1;
  min-width: 0;
}

.ranking-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.ranking-stats {
  display: flex;
  gap: var(--space-3);
  font-size: 11px;
  color: var(--text-tertiary);
}

.ranking-level {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-secondary);
  padding: 4px 8px;
  border-radius: var(--radius-xs);
}

/* 装扮商店 */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.shop-item {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-2);
  text-align: center;
  border: 1px solid var(--border-primary);
  transition: all var(--transition-fast);
}

.shop-item.owned {
  border-color: var(--success);
  background: rgba(52, 199, 89, 0.04);
}

.shop-emoji {
  font-size: 32px;
  margin-bottom: var(--space-2);
}

.shop-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.shop-owned {
  font-size: 11px;
  color: var(--success);
  font-weight: 500;
}

.shop-buy-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.shop-buy-btn:active {
  transform: scale(0.95);
}

/* ===== 首页组件 ===== */
/* 快捷入口 */
.quick-actions {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.quick-action-card {
  flex: 1;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  border: 1px solid var(--border-primary);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-card);
}

.quick-action-card:active {
  transform: scale(0.98);
  border-color: var(--border-secondary);
}

.quick-action-icon {
  font-size: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.quick-action-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.quick-action-desc {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* 动物园入口卡片 */
.zoo-entry-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  cursor: pointer;
  border: 1px solid var(--border-primary);
  margin-bottom: var(--space-5);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-card);
}

.zoo-entry-card:active {
  transform: scale(0.98);
  border-color: var(--primary);
}

.zoo-entry-icon {
  font-size: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zoo-entry-icon .nav-icon-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.zoo-entry-content {
  flex: 1;
}

.zoo-entry-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.zoo-entry-desc {
  font-size: 12px;
  color: var(--text-tertiary);
}

.zoo-entry-arrow {
  font-size: 18px;
  color: var(--text-tertiary);
}

/* 区块标题 */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.section-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.section-count {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* 孩子选择器 */
.child-selector-wrapper {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
}

.child-selector {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  background: white;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.child-selector:focus {
  border-color: var(--primary);
}

.add-child-btn {
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s;
}

.add-child-btn:active {
  transform: scale(0.95);
}

/* ===== Banner ===== */
.home-banner {
  width: 100%;
  height: 120px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-4);
  background: var(--bg-secondary);
}

.home-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== 口语100句卡片 ===== */
.oral-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  cursor: pointer;
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s;
  text-align: center;
}

.oral-card:active {
  transform: scale(0.98);
}

.oral-card-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
}

.oral-card-title {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}

.oral-card-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

/* ===== 底部导航栏 ===== */
.page-with-tabbar {
  padding-bottom: 70px;
}

.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: space-around;
  border-top: 1px solid var(--border-light);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
}

.tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.tabbar-item.active .tabbar-label {
  color: var(--primary);
  font-weight: 600;
}

.tabbar-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  margin-bottom: 2px;
}

.tabbar-icon-fallback {
  font-size: 20px;
  margin-bottom: 2px;
}

.tabbar-label {
  font-size: 11px;
  color: var(--text-secondary);
}

/* ===== 介绍页面 ===== */
.intro-section {
  padding: var(--space-4);
}

.intro-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.intro-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.intro-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.intro-tips {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.intro-tip-item {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  padding-left: var(--space-2);
}

.intro-tip-item .tip-num {
  color: var(--primary);
  font-weight: 600;
  margin-right: 4px;
}

/* ===== 我的页面 ===== */
.profile-section {
  padding: var(--space-4);
}

.profile-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

.profile-card {
  display: flex;
  align-items: center;
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  gap: var(--space-4);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.profile-card:active {
  transform: scale(0.98);
}

.profile-card-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-bg);
  border-radius: var(--radius-md);
}

.profile-card-content {
  flex: 1;
}

.profile-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.profile-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.profile-card-arrow {
  font-size: 20px;
  color: var(--text-tertiary);
}

.logout-btn {
  width: 100%;
  padding: var(--space-4);
  background: linear-gradient(135deg, #FF6B9D, #FF8F5C);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.logout-btn:active {
  transform: scale(0.98);
}

/* ===== 农场提示 ===== */
.farm-hint {
  background: linear-gradient(135deg, #4CAF50, #8BC34A);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.farm-hint-title {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: var(--space-2);
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.farm-hint-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.95);
  line-height: 1.6;
}


/* 过期课程样式 */
.course-card.expired {
  opacity: 0.6;
  position: relative;
}

.course-card.expired:hover {
  opacity: 0.8;
}

.course-expired-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(220, 53, 69, 0.9);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}
