/* ============================================================
   四年级上册数学自学APP（苏教版2024） - 样式表
   ============================================================ */

/* ===== 基础重置 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --primary: #00b894;
  --primary-dark: #00a381;
  --primary-light: #55efc4;
  --bg: #f0f2f5;
  --card-bg: #ffffff;
  --text: #2d3436;
  --text-light: #636e72;
  --text-lighter: #b2bec3;
  --success: #00b894;
  --success-light: #e3fcef;
  --danger: #e74c3c;
  --danger-light: #ffeaea;
  --warning: #fdcb6e;
  --info: #0984e3;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-height: 64px;
  --header-height: 60px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  padding-bottom: var(--nav-height);
}

/* ===== 顶部标题栏 ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 16px;
  box-shadow: 0 2px 12px rgba(102, 126, 234, 0.3);
}

.app-header .back-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  margin-right: 12px;
}

.app-header .back-btn:active {
  transform: scale(0.9);
}

.app-header .back-btn.hidden {
  visibility: hidden;
}

.app-header h1 {
  font-size: 1.15rem;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-header .header-icon {
  font-size: 1.3rem;
  margin-right: 8px;
}

/* ===== 主内容区 ===== */
.main-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  min-height: calc(100vh - var(--nav-height) - var(--header-height));
}

/* ===== 视图切换动画 ===== */
.view {
  display: none;
  animation: fadeIn 0.4s ease;
}

.view.active {
  display: block;
}

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

/* ===== 首页 Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary), #00cec9);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.hero .hero-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.hero h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.hero p {
  font-size: 0.9rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
  line-height: 1.6;
}

/* ===== 进度概览卡片 ===== */
.progress-overview {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.progress-overview h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-bar-container {
  background: #ecf0f1;
  border-radius: 20px;
  height: 12px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--success), #55efc4);
  border-radius: 20px;
  transition: width 0.6s ease;
  width: 0%;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-light);
}

.progress-stats .stat-num {
  font-weight: 700;
  color: var(--success);
}

/* ===== 继续学习按钮 ===== */
.continue-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--success), #55efc4);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 16px 20px;
  width: 100%;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(0, 184, 148, 0.3);
  margin-bottom: 20px;
  font-family: inherit;
}

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

.continue-btn .btn-content {
  text-align: left;
}

.continue-btn .btn-label {
  font-size: 0.75rem;
  opacity: 0.85;
  margin-bottom: 2px;
}

.continue-btn .btn-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.continue-btn .btn-arrow {
  font-size: 1.5rem;
}

/* ===== 单元列表 ===== */
.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.unit-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.unit-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border-left: 5px solid var(--primary);
}

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

.unit-card:hover {
  box-shadow: var(--shadow-hover);
}

.unit-card .unit-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.unit-card .unit-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  flex-shrink: 0;
}

.unit-card .unit-info {
  flex: 1;
}

.unit-card .unit-number {
  font-size: 0.75rem;
  color: var(--text-lighter);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.unit-card .unit-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.unit-card .unit-subtitle {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 2px;
}

.unit-card .unit-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-light);
}

.unit-card .unit-status .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-lighter);
}

.unit-card .unit-status .status-dot.completed {
  background: var(--success);
}

.unit-card .unit-status .status-dot.in-progress {
  background: var(--warning);
}

.unit-card .unit-progress-bar {
  height: 5px;
  background: #ecf0f1;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
}

.unit-card .unit-progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease;
  width: 0%;
}

.unit-card.completed-badge::after {
  content: "✓";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 26px;
  height: 26px;
  background: var(--success);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

/* ===== 课程详情页 ===== */
.lesson-header {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.lesson-header .lesson-breadcrumb {
  font-size: 0.8rem;
  color: var(--text-lighter);
  margin-bottom: 8px;
}

.lesson-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.lesson-header .lesson-subtitle {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 14px;
}

.goal-list {
  background: #f8f9ff;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  border-left: 4px solid var(--primary);
}

.goal-list .goal-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.goal-list ul {
  list-style: none;
}

.goal-list li {
  font-size: 0.88rem;
  color: var(--text);
  padding: 3px 0;
  padding-left: 22px;
  position: relative;
}

.goal-list li::before {
  content: "🎯";
  position: absolute;
  left: 0;
}

/* ===== 标签页 ===== */
.tabs {
  display: flex;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  gap: 4px;
}

.tab-btn {
  flex: 1;
  padding: 12px 8px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

/* ===== 学习内容样式 ===== */
.lesson-content {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 22px 18px;
  box-shadow: var(--shadow);
  line-height: 1.8;
  font-size: 0.92rem;
}

.lesson-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #ecf0f1;
}

.lesson-content h3:first-child {
  margin-top: 0;
}

.lesson-content h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  margin: 14px 0 8px;
}

.lesson-content p {
  margin-bottom: 8px;
  color: var(--text);
}

.lesson-content ul, .lesson-content ol {
  margin: 8px 0 12px 20px;
}

.lesson-content li {
  margin-bottom: 5px;
}

.lesson-content strong {
  color: var(--primary-dark);
}

/* 数学块 */
.math-block {
  background: #f8f9ff;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 10px 0;
  border-left: 4px solid var(--primary-light);
}

.math-block .conclusion {
  font-weight: 700;
  color: var(--success);
  margin-top: 6px;
}

/* 分数样式 */
.frac {
  display: inline-flex;
  flex-direction: column;
  vertical-align: middle;
  text-align: center;
  font-size: 0.82em;
  line-height: 1;
  margin: 0 2px;
}

.frac .num {
  border-bottom: 2px solid currentColor;
  padding: 0 4px 1px;
}

.frac .den {
  padding: 1px 4px 0;
}

/* 上标下标 */
sup { font-size: 0.7em; }
sub { font-size: 0.7em; }

/* 核心法则 */
.key-rule {
  background: linear-gradient(135deg, #fff9e6, #fff3cd);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 14px 0;
  border: 2px solid var(--warning);
}

.key-rule h4 {
  color: #e69500;
  margin-bottom: 6px;
}

/* 暂停想一想 */
.pause-think {
  background: linear-gradient(135deg, #f0e6ff, #e6d6ff);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 14px 0;
  border-left: 5px solid #9b59b6;
}

.pause-think h4 {
  color: #7d3c98;
  margin-bottom: 8px;
}

.pause-think p {
  color: #5b2c6f;
}

/* 提示框 */
.key-tip {
  background: #e8f8ff;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 12px 0;
  border-left: 4px solid var(--info);
}

/* 规则框 */
.rule-box {
  background: #fef9e7;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 10px 0;
  border: 1px dashed var(--warning);
}

/* 步骤框 */
.step-box {
  background: #f4f6f7;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 10px 0;
}

/* ===== 学一学 section 样式 ===== */
.learn-section {
  margin-bottom: 18px;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  border-left: 4px solid #d0d0d0;
}

.learn-section:last-child {
  margin-bottom: 0;
}

.learn-section-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.learn-section-body {
  font-size: 0.92rem;
  line-height: 1.8;
}

.learn-section-body p {
  margin-bottom: 8px;
}

.learn-section-body hr {
  border: none;
  border-top: 1px dashed #ccc;
  margin: 12px 0;
}

.learn-scenario {
  background: #f0f7ff;
  border-left-color: var(--info);
}
.learn-scenario .learn-section-title { color: #0765a3; }

.learn-example {
  background: #f0fff4;
  border-left-color: var(--success);
}
.learn-example .learn-section-title { color: var(--primary-dark); }

.learn-think {
  background: #f5f0ff;
  border-left-color: #9b59b6;
}
.learn-think .learn-section-title { color: #7d3c98; }

.learn-rule {
  background: linear-gradient(135deg, #fff9e6, #fff3cd);
  border-left-color: var(--warning);
  border: 2px solid var(--warning);
  border-left-width: 5px;
}
.learn-rule .learn-section-title { color: #e69500; }

/* 提示框 (data.js 中使用) */
.tip-box {
  background: #e8f8ff;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin: 12px 0;
  border-left: 4px solid var(--info);
}

/* 结论框 (data.js 中使用) */
.conclusion {
  background: var(--success-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 10px 0;
  font-weight: 600;
}

/* 竖式区域 */
.math-vertical {
  background: #fafafa;
  border-radius: var(--radius-sm);
  padding: 14px;
  margin: 10px 0;
  overflow-x: auto;
}

.math-vertical pre {
  font-family: "Courier New", monospace;
  font-size: 1em;
  line-height: 1.6;
  white-space: pre;
  color: var(--text);
  background: transparent;
  padding: 8px 0;
}

/* 表格 */
.table-wrapper {
  overflow-x: auto;
  margin: 12px 0;
  border-radius: var(--radius-sm);
  border: 1px solid #e0e0e0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 360px;
}

.data-table th {
  background: var(--primary);
  color: #fff;
  padding: 10px 8px;
  text-align: center;
  font-weight: 600;
}

.data-table td {
  padding: 8px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:nth-child(even) td {
  background: #f8f9fa;
}

/* 图示框 */
.diagram-box {
  background: #2d3436;
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 12px 0;
  overflow-x: auto;
}

.diagram-box pre {
  color: #55efc4;
  font-family: "Courier New", monospace;
  font-size: 0.82rem;
  white-space: pre;
}

/* 公式框 */
.formula-box {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 12px 0;
  text-align: center;
  border: 2px solid var(--info);
}

.formula-box h4 {
  color: var(--info);
  margin-bottom: 6px;
}

.formula-box p {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

/* ===== 练习题样式 ===== */
.practice-item {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.practice-item .practice-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.practice-item .practice-question {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.8;
}

.practice-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.practice-input {
  flex: 1;
  padding: 12px 14px;
  border: 2px solid #e0e0e0;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
  background: #fafafa;
}

.practice-input:focus {
  border-color: var(--primary);
  background: #fff;
}

.practice-input.correct {
  border-color: var(--success);
  background: var(--success-light);
}

.practice-input.wrong {
  border-color: var(--danger);
  background: var(--danger-light);
}

.check-btn {
  padding: 12px 18px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

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

.feedback {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: none;
  animation: fadeIn 0.3s ease;
}

.feedback.show {
  display: block;
}

.feedback.correct {
  background: var(--success-light);
  color: var(--success);
}

.feedback.wrong {
  background: var(--danger-light);
  color: var(--danger);
}

.feedback .feedback-hint {
  font-size: 0.82rem;
  color: var(--text-light);
  margin-top: 4px;
}

/* 自检答案 */
.self-check {
  background: #f8f9fa;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 16px;
  text-align: center;
}

.self-check-btn {
  background: var(--text-light);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 20px;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

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

.self-check-answer {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--success);
  font-weight: 600;
  display: none;
}

.self-check-answer.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ===== 总结卡片 ===== */
.summary-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow);
}

.summary-card h3 {
  font-size: 1.1rem;
  margin-bottom: 14px;
  text-align: center;
  color: var(--text);
}

/* 四年级总结样式 */
.summary-skills {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.summary-skill-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--success-light);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
}

.summary-notes {
  padding: 12px 14px;
  background: linear-gradient(135deg, #fff9e6, #fff3cd);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: #8a6d00;
  margin-bottom: 14px;
  line-height: 1.7;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
}

.summary-table th {
  background: var(--primary);
  color: #fff;
  padding: 10px 8px;
  font-size: 0.82rem;
  text-align: center;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.summary-table td {
  padding: 12px 8px;
  border-bottom: 1px solid #eee;
  font-size: 0.88rem;
  vertical-align: top;
}

.summary-table td:first-child {
  font-weight: 600;
  color: var(--primary-dark);
  white-space: nowrap;
}

.summary-table input {
  width: 100%;
  padding: 8px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: inherit;
  background: #fafafa;
}

.summary-table input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

.save-summary-btn {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

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

/* ===== 公式速查页 ===== */
.formula-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.formula-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--info);
  transition: var(--transition);
}

.formula-card .formula-name {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 4px;
  font-weight: 600;
}

.formula-card .formula-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.formula-card .formula-note {
  font-size: 0.8rem;
  color: var(--text-lighter);
}

/* ===== 清单页 ===== */
.checklist-container {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.checklist-container h3 {
  font-size: 1.05rem;
  margin-bottom: 14px;
  text-align: center;
}

.checklist-progress {
  margin-bottom: 16px;
}

.checklist-item {
  display: flex;
  align-items: center;
  padding: 12px 10px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: var(--transition);
}

.checklist-item:last-child {
  border-bottom: none;
}

.checklist-item:active {
  background: #f8f9fa;
}

.checklist-checkbox {
  width: 26px;
  height: 26px;
  border: 2px solid #d0d0d0;
  border-radius: 8px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.checklist-item.checked .checklist-checkbox {
  background: var(--success);
  border-color: var(--success);
}

.checklist-item.checked .checklist-checkbox::after {
  content: "✓";
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

.checklist-text {
  font-size: 0.92rem;
  color: var(--text);
  flex: 1;
}

.checklist-item.checked .checklist-text {
  color: var(--text-lighter);
  text-decoration: line-through;
}

/* ===== 成就徽章 ===== */
.achievements {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.achievements h3 {
  font-size: 1.05rem;
  margin-bottom: 14px;
  text-align: center;
}

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

.badge {
  text-align: center;
  padding: 14px 8px;
  border-radius: var(--radius-sm);
  background: #f8f9fa;
  transition: var(--transition);
}

.badge.unlocked {
  background: linear-gradient(135deg, #fff9e6, #fff3cd);
  border: 2px solid var(--warning);
}

.badge .badge-icon {
  font-size: 2rem;
  margin-bottom: 6px;
  filter: grayscale(100%);
  opacity: 0.4;
}

.badge.unlocked .badge-icon {
  filter: none;
  opacity: 1;
}

.badge .badge-name {
  font-size: 0.72rem;
  color: var(--text-light);
  font-weight: 600;
}

.badge.unlocked .badge-name {
  color: var(--text);
}

/* ===== 底部导航栏 ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  z-index: 100;
  max-width: 600px;
  margin: 0 auto;
  border-top: 1px solid #eee;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--text-lighter);
  font-size: 0.7rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  gap: 3px;
}

.nav-item i {
  font-size: 1.25rem;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item:active {
  transform: scale(0.92);
}

/* ===== Toast 提示 ===== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: rgba(45, 52, 54, 0.92);
  color: #fff;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 0.92rem;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  max-width: 90%;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ===== 完成全部提示 ===== */
.completion-banner {
  background: linear-gradient(135deg, #00b894, #55efc4);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(0, 184, 148, 0.3);
}

.completion-banner .banner-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.completion-banner h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.completion-banner p {
  font-size: 0.88rem;
  opacity: 0.9;
}

/* ===== 响应式 ===== */
@media (min-width: 768px) {
  .main-content {
    padding: 24px;
  }

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

  .badge-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border-radius: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}
