/* 彼得住英语启蒙 · 统一样式 */

:root {
  --primary: #4CAF50;
  --primary-dark: #388E3C;
  --primary-light: #81C784;
  --bg: #FAF8F5;
  --card-bg: #ffffff;
  --text: #333;
  --text-light: #666;
  --text-muted: #999;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 80px;
}

/* 通用卡片 */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}

/* 进度条 */
.progress-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.progress-bar .track {
  flex: 1;
  height: 6px;
  background: #eee;
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 3px;
  transition: width 0.3s;
}
.progress-bar .text {
  font-size: 13px;
  color: var(--text-muted);
  min-width: 50px;
  text-align: right;
}

/* 底部导航 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-top: 1px solid #eee;
  display: flex;
  padding: 8px 0;
  z-index: 100;
}
.bottom-nav a {
  flex: 1;
  text-align: center;
  padding: 6px;
  text-decoration: none;
  color: var(--text-light);
  font-size: 11px;
}
.bottom-nav a span { display: block; font-size: 22px; margin-bottom: 2px; }
.bottom-nav a.active { color: var(--primary); }

/* 导航按钮 */
.btn-group {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.btn {
  flex: 1;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.btn-prev { background: #f0f0f0; color: var(--text-light); }
.btn-next { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 徽章 */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.badge-s1 { background: #e8f5e9; color: #388E3C; }
.badge-s2 { background: #fff3e0; color: #F57C00; }
.badge-s3 { background: #e3f2fd; color: #1976D2; }
.badge-done { background: #e8f5e9; color: #388E3C; }
.badge-pending { background: #f5f5f5; color: var(--text-muted); }

/* 列表项 */
.list-item {
  display: flex;
  align-items: center;
  padding: 14px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.list-item:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.list-item .num {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  margin-right: 14px;
  flex-shrink: 0;
}
.list-item .info { flex: 1; }
.list-item .title { font-size: 15px; font-weight: 500; margin-bottom: 2px; }
.list-item .sub { font-size: 12px; color: var(--text-muted); }
.list-item .arrow { color: var(--text-muted); font-size: 18px; }

/* 词汇学习页 */
.vocab-card { text-align: center; padding: 30px 20px; }
.vocab-img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.vocab-word { font-size: 40px; font-weight: 700; margin-bottom: 8px; }
.vocab-phonetic { font-size: 18px; color: var(--text-muted); margin-bottom: 6px; }
.vocab-chinese { font-size: 22px; color: var(--primary); }

.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  cursor: pointer;
  margin: 16px 0;
}
.audio-btn:active { transform: scale(0.96); }

/* 完成页 */
.complete-page { text-align: center; padding: 50px 20px; display: none; }
.complete-icon { font-size: 80px; margin-bottom: 20px; }
.complete-title { font-size: 26px; font-weight: 600; margin-bottom: 8px; }
.complete-sub { font-size: 15px; color: var(--text-muted); margin-bottom: 24px; }

/* 头部大标题 */
.hero-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 30px 20px 50px;
  text-align: center;
}
.hero-header .icon { font-size: 50px; margin-bottom: 10px; }
.hero-header h1 { font-size: 24px; margin-bottom: 4px; }
.hero-header p { font-size: 14px; opacity: 0.9; }

/* 内容区域 */
.main-content {
  background: var(--card-bg);
  border-radius: 24px 24px 0 0;
  margin-top: -30px;
  padding: 20px 14px 100px;
  min-height: calc(100vh - 160px);
}

/* 系列网格 */
.series-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.series-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  display: block;
}
.series-item .icon { font-size: 40px; margin-bottom: 8px; }
.series-item .name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.series-item .sub { font-size: 12px; color: var(--text-muted); }

/* Toast */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 200;
  display: none;
}
.toast.show { display: block; }

/* 隐藏 */
.hidden { display: none !important; }
