/* ============================================
   行测大师 — 全局样式
   ============================================ */

:root {
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --primary-dark: #5A4BD1;
  --success: #00B894;
  --danger: #FF6B6B;
  --warning: #FDCB6E;
  --info: #74B9FF;
  --bg: #F0F2F5;
  --card-bg: #FFFFFF;
  --text: #2D3436;
  --text-secondary: #636E72;
  --text-light: #B2BEC3;
  --border: #DFE6E9;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --nav-height: 64px;
  --header-height: 56px;
  --xp-height: 24px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: calc(var(--header-height) + var(--xp-height));
  padding-bottom: var(--nav-height);
}

/* ============================================
   顶部导航
   ============================================ */
.app-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(108,92,231,0.3);
}
.header-left { display: flex; align-items: center; gap: 8px; }
.logo { font-size: 24px; }
.app-title { font-size: 18px; font-weight: 700; letter-spacing: 0.5px; }
.header-right { display: flex; align-items: center; }

.level-badge {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  backdrop-filter: blur(10px);
}
.level-icon { font-size: 16px; }
.level-text { font-weight: 600; }

/* ============================================
   经验条
   ============================================ */
.xp-bar-container {
  position: fixed; top: var(--header-height); left: 0; right: 0;
  height: var(--xp-height);
  background: rgba(108,92,231,0.08);
  z-index: 99;
  padding: 0 16px;
  display: flex; align-items: center;
}
.xp-info {
  font-size: 11px; color: var(--text-secondary);
  white-space: nowrap; margin-right: 10px;
}
.xp-current { color: var(--primary); font-weight: 700; }
.xp-separator { color: var(--text-light); }
.xp-max { color: var(--text-secondary); font-weight: 600; }

.xp-bar {
  flex: 1; height: 6px;
  background: rgba(108,92,231,0.15);
  border-radius: 3px; overflow: hidden;
}
.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ============================================
   页面：首页（仪表盘）
   ============================================ */
.welcome-banner {
  background: linear-gradient(135deg, #6C5CE7, #A29BFE);
  border-radius: var(--radius);
  padding: 24px 20px;
  color: white;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.welcome-banner::after {
  content: '';
  position: absolute; top: -20px; right: -20px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}
.welcome-banner h2 { font-size: 20px; margin-bottom: 6px; }
.welcome-banner p { font-size: 13px; opacity: 0.9; }

.stat-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.stat-card:active { transform: scale(0.96); }
.stat-card .stat-icon { font-size: 28px; margin-bottom: 6px; }
.stat-card .stat-value { font-size: 22px; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

.section-title {
  font-size: 16px; font-weight: 700;
  margin: 20px 0 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.section-title .more-btn {
  font-size: 12px; color: var(--primary); cursor: pointer;
}

.module-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  margin-bottom: 8px;
}
.module-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.module-card:active { transform: scale(0.96); }
.module-card .module-icon { font-size: 32px; margin-bottom: 10px; }
.module-card .module-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.module-card .module-desc { font-size: 11px; color: var(--text-secondary); margin-bottom: 12px; }
.module-card .module-progress {
  height: 4px; background: var(--border); border-radius: 2px; overflow: hidden;
}
.module-card .module-progress-fill {
  height: 100%; border-radius: 2px; transition: width 0.5s;
}
.module-card .module-stats {
  display: flex; justify-content: space-between; margin-top: 6px;
  font-size: 10px; color: var(--text-light);
}

/* 每日挑战 */
.daily-challenge {
  background: linear-gradient(135deg, #FF6B6B, #ee5a24);
  border-radius: var(--radius);
  padding: 18px 16px;
  color: white;
  margin-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 4px 15px rgba(255,107,107,0.3);
  cursor: pointer;
  transition: transform 0.2s;
}
.daily-challenge:active { transform: scale(0.97); }
.daily-challenge .challenge-info h3 { font-size: 15px; margin-bottom: 3px; }
.daily-challenge .challenge-info p { font-size: 12px; opacity: 0.9; }
.daily-challenge .challenge-btn {
  background: rgba(255,255,255,0.25);
  border: none; color: white;
  padding: 8px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

/* ============================================
   页面：刷题
   ============================================ */
.module-selector {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 20px;
}
.module-tab {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.module-tab.active {
  border-color: var(--primary);
  background: rgba(108,92,231,0.05);
}
.module-tab:active { transform: scale(0.95); }
.module-tab .tab-icon { font-size: 24px; margin-bottom: 4px; }
.module-tab .tab-name { font-size: 12px; font-weight: 600; }

.diff-selector {
  display: flex; gap: 8px; margin-bottom: 20px;
}
.diff-btn {
  flex: 1;
  padding: 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.diff-btn.active-easy { border-color: var(--success); background: rgba(0,184,148,0.1); color: var(--success); }
.diff-btn.active-medium { border-color: var(--warning); background: rgba(253,203,110,0.15); color: #E17055; }
.diff-btn.active-hard { border-color: var(--danger); background: rgba(255,107,107,0.1); color: var(--danger); }
.diff-btn:active { transform: scale(0.95); }

.practice-mode-selector {
  display: flex; gap: 10px; margin-bottom: 20px;
}
.practice-mode-btn {
  flex: 1;
  padding: 12px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.practice-mode-btn.active { border-color: var(--primary); color: var(--primary); }

.start-practice-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(108,92,231,0.3);
}
.learn-mode-btn {
  flex: 1;
  padding: 12px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}
.learn-mode-btn.active { border-color: var(--success); color: var(--success); }
.learn-mode-btn:active { transform: scale(0.95); }

.learn-hint {
  background: linear-gradient(135deg, rgba(0,184,148,0.08), rgba(0,184,148,0.02));
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
  display: flex; align-items: flex-start; gap: 6px;
}

/* ============================================
   先学后练界面
   ============================================ */
.learn-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.learn-badge {
  font-size: 13px; font-weight: 700; color: var(--success);
  background: rgba(0,184,148,0.1);
  padding: 4px 12px; border-radius: 16px;
}
.learn-progress { font-size: 13px; color: var(--text-secondary); font-weight: 500; }

.learn-title {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.learn-title h3 { font-size: 16px; margin-bottom: 4px; }
.learn-title p { font-size: 12px; color: var(--text-secondary); }

.learn-examples { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }

.learn-example-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--success);
}
.learn-example-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.learn-example-badge {
  font-size: 11px; font-weight: 700; color: var(--success);
  background: rgba(0,184,148,0.1);
  padding: 2px 8px; border-radius: 10px;
}
.learn-example-question {
  font-size: 14px; line-height: 1.7; margin-bottom: 12px;
  color: var(--text);
}
.learn-example-options { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.learn-option {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg);
  font-size: 13px;
  position: relative;
}
.learn-option .option-label {
  min-width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.learn-option.correct {
  background: rgba(0,184,148,0.08);
  border: 1px solid rgba(0,184,148,0.3);
}
.learn-option.correct .option-label {
  background: var(--success); color: white;
}
.correct-mark {
  margin-left: auto;
  color: var(--success);
  font-weight: 700;
  font-size: 16px;
}

.learn-example-analysis {
  font-size: 12px; line-height: 1.7;
  color: var(--text-secondary);
  background: rgba(108,92,231,0.04);
  padding: 10px 12px;
  border-radius: 8px;
}

.learn-knowledge {
  background: linear-gradient(135deg, rgba(253,203,110,0.1), rgba(253,203,110,0.03));
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(253,203,110,0.3);
}
.learn-knowledge h4 { font-size: 14px; margin-bottom: 10px; color: var(--text); }
.knowledge-module {
  font-size: 13px; font-weight: 700; color: var(--primary);
  margin-bottom: 8px;
}
.knowledge-tips { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.knowledge-tip {
  font-size: 12px; line-height: 1.6; color: var(--text-secondary);
}
.knowledge-answer {
  font-size: 13px; color: var(--text);
  padding: 8px 12px;
  background: rgba(255,255,255,0.6);
  border-radius: 6px;
}

.learn-target-preview {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  border: 2px dashed var(--primary-light);
}
.learn-target-preview h4 { font-size: 14px; margin-bottom: 6px; color: var(--primary); }
.learn-target-q {
  font-size: 13px; line-height: 1.6; color: var(--text-secondary);
}

.learn-actions { display: flex; gap: 10px; }

/* ============================================
   答题界面
   ============================================ */
.quiz-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.quiz-progress {
  font-size: 13px; color: var(--text-secondary); font-weight: 500;
}
.quiz-timer {
  display: flex; align-items: center; gap: 4px;
  font-size: 14px; color: var(--danger); font-weight: 600;
}
.quiz-timer svg { width: 16px; height: 16px; }

.quiz-question-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  animation: slideIn 0.3s ease;
}

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

.question-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 12px;
}
.question-difficulty {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 6px;
}
.diff-easy { background: rgba(0,184,148,0.15); color: var(--success); }
.diff-medium { background: rgba(253,203,110,0.25); color: #E17055; }
.diff-hard { background: rgba(255,107,107,0.15); color: var(--danger); }

.question-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
  margin-bottom: 4px;
}

.quiz-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.option-btn {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  display: flex; align-items: flex-start; gap: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.option-btn:active { transform: scale(0.98); }
.option-btn .option-label {
  min-width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.option-btn:hover { border-color: var(--primary-light); }
.option-btn.selected { border-color: var(--primary); background: rgba(108,92,231,0.05); }
.option-btn.selected .option-label { background: var(--primary); color: white; }
.option-btn.correct { border-color: var(--success); background: rgba(0,184,148,0.08); }
.option-btn.correct .option-label { background: var(--success); color: white; }
.option-btn.wrong { border-color: var(--danger); background: rgba(255,107,107,0.08); }
.option-btn.wrong .option-label { background: var(--danger); color: white; }
.option-btn:disabled { cursor: default; }

.quiz-actions { display: flex; gap: 10px; }

.quiz-btn {
  flex: 1;
  padding: 13px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.quiz-btn:active { transform: scale(0.96); }
.quiz-btn:disabled { opacity: 0.4; cursor: default; }
.quiz-btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 12px rgba(108,92,231,0.3);
}
.quiz-btn-secondary {
  background: var(--bg);
  color: var(--text-secondary);
}
.quiz-btn-success {
  background: linear-gradient(135deg, var(--success), #00a884);
  color: white;
}
.quiz-btn-danger {
  background: linear-gradient(135deg, var(--danger), #e55555);
  color: white;
}

/* 解析区域 */
.analysis-card {
  background: linear-gradient(135deg, #f8f9ff, #f0f2ff);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-top: 16px;
  border-left: 4px solid var(--primary);
  animation: slideIn 0.3s ease;
}
.analysis-card h4 {
  font-size: 14px;
  color: var(--primary);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.analysis-card p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-wrap;
}

/* ============================================
   答题结果
   ============================================ */
.result-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.result-score {
  font-size: 56px;
  font-weight: 800;
  margin: 10px 0;
}
.result-score.excellent { color: var(--success); }
.result-score.good { color: var(--primary); }
.result-score.average { color: var(--warning); }
.result-score.poor { color: var(--danger); }
.result-label { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }

.result-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  margin-bottom: 20px;
}
.result-stat {
  padding: 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}
.result-stat .rs-value { font-size: 22px; font-weight: 700; }
.result-stat .rs-label { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

.result-xp {
  background: linear-gradient(135deg, rgba(108,92,231,0.1), rgba(162,155,254,0.1));
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
}
.result-xp .xp-amount { font-size: 28px; font-weight: 800; color: var(--primary); }
.result-xp .xp-label { font-size: 12px; color: var(--text-secondary); }

.result-actions { display: flex; gap: 10px; }

/* ============================================
   页面：错题本
   ============================================ */
.mistakes-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.mistakes-count { font-size: 13px; color: var(--text-secondary); }
.review-btn {
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.mistakes-empty {
  text-align: center; padding: 60px 20px;
}
.mistakes-empty .empty-icon { font-size: 64px; margin-bottom: 12px; }
.mistakes-empty h3 { font-size: 16px; margin-bottom: 6px; }
.mistakes-empty p { font-size: 13px; color: var(--text-secondary); }

.mistake-item {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s;
}
.mistake-item:active { transform: scale(0.98); }
.mistake-item .mi-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.mistake-item .mi-module { font-size: 11px; color: var(--primary); font-weight: 600; }
.mistake-item .mi-date { font-size: 11px; color: var(--text-light); }
.mistake-item .mi-question {
  font-size: 14px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.mistake-item .mi-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px;
}
.mistake-item .mi-times { font-size: 11px; color: var(--danger); font-weight: 600; }
.mistake-item .mi-category { font-size: 11px; color: var(--text-secondary); }

.spaced-review-info {
  background: linear-gradient(135deg, rgba(253,203,110,0.15), rgba(253,203,110,0.05));
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  display: flex; align-items: center; gap: 8px;
}

/* ============================================
   页面：分析报告
   ============================================ */
.radar-container {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  text-align: center;
}
.radar-container h3 { font-size: 15px; margin-bottom: 12px; }
.radar-canvas { max-width: 100%; }

.trend-container {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.trend-container h3 { font-size: 15px; margin-bottom: 12px; }
.trend-chart {
  display: flex; align-items: flex-end; gap: 6px;
  height: 120px; padding: 10px 0;
}
.trend-bar-wrapper { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.trend-bar {
  width: 100%;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
  transition: height 0.5s;
}
.trend-label { font-size: 10px; color: var(--text-light); }
.trend-value { font-size: 10px; color: var(--text-secondary); font-weight: 600; }

.streak-card {
  background: linear-gradient(135deg, #FF6B6B, #ee5a24);
  border-radius: var(--radius);
  padding: 20px;
  color: white;
  box-shadow: 0 4px 15px rgba(255,107,107,0.3);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 16px;
}
.streak-fire { font-size: 48px; }
.streak-info .streak-num { font-size: 32px; font-weight: 800; }
.streak-info .streak-label { font-size: 12px; opacity: 0.9; }

.achievement-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.achievement-item {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 16px 8px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.achievement-item.locked { opacity: 0.4; filter: grayscale(1); }
.achievement-item .ach-icon { font-size: 30px; margin-bottom: 6px; }
.achievement-item .ach-name { font-size: 11px; font-weight: 600; }
.achievement-item .ach-desc { font-size: 10px; color: var(--text-light); margin-top: 2px; }

/* ============================================
   页面：我的
   ============================================ */
.profile-header {
  text-align: center; padding: 20px 0;
}
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  margin: 0 auto 12px;
  box-shadow: 0 4px 15px rgba(108,92,231,0.3);
}
.profile-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.profile-level { font-size: 13px; color: var(--text-secondary); }

.settings-list {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}
.settings-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}
.settings-item:last-child { border-bottom: none; }
.settings-item:active { background: var(--bg); }
.settings-item .si-left { display: flex; align-items: center; gap: 10px; }
.settings-item .si-icon { font-size: 20px; }
.settings-item .si-label { font-size: 14px; }
.settings-item .si-arrow { color: var(--text-light); font-size: 12px; }

/* ============================================
   底部导航
   ============================================ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--card-bg);
  display: flex;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  background: none; border: none;
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.nav-item.active { color: var(--primary); }
.nav-icon { font-size: 20px; }
.nav-label { font-size: 10px; font-weight: 500; }

/* ============================================
   弹窗
   ============================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px 20px;
  width: 85%;
  max-width: 360px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes modalSlideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal h3 { font-size: 17px; margin-bottom: 16px; text-align: center; }
.modal-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none;
  font-size: 22px; cursor: pointer;
  color: var(--text-light);
}

/* 升级弹窗 */
.levelup-modal { text-align: center; }
.levelup-modal .lu-icon { font-size: 64px; margin-bottom: 12px; }
.levelup-modal .lu-level { font-size: 36px; font-weight: 800; color: var(--primary); }
.levelup-modal .lu-message { font-size: 14px; color: var(--text-secondary); margin: 8px 0 20px; }

/* 成就弹窗 */
.achievement-unlock { text-align: center; }
.achievement-unlock .au-icon { font-size: 64px; margin-bottom: 12px; animation: bounceIn 0.5s; }
@keyframes bounceIn {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.achievement-unlock .au-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.achievement-unlock .au-desc { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }

/* ============================================
   连击特效
   ============================================ */
.combo-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  font-weight: 800;
  color: var(--danger);
  text-shadow: 0 0 20px rgba(255,107,107,0.5);
  pointer-events: none;
  z-index: 300;
  animation: comboAnim 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes comboAnim {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
  30% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
  70% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -80%) scale(0.8); opacity: 0; }
}

/* ============================================
   撒花特效
   ============================================ */
.confetti-container {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 250; overflow: hidden;
}
.confetti {
  position: absolute;
  width: 10px; height: 10px;
  top: -10px;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* ============================================
   申论答题界面
   ============================================ */
.shenlun-editor {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.shenlun-editor .material-box {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary);
  max-height: 200px;
  overflow-y: auto;
}
.shenlun-editor textarea {
  width: 100%;
  min-height: 120px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 14px;
  line-height: 1.7;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s;
}
.shenlun-editor textarea:focus { outline: none; border-color: var(--primary); }
.shenlun-editor .word-count { text-align: right; font-size: 12px; color: var(--text-light); margin-top: 6px; }

.ai-feedback {
  background: linear-gradient(135deg, rgba(0,184,148,0.08), rgba(0,184,148,0.02));
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-top: 16px;
  border-left: 4px solid var(--success);
}
.ai-feedback h4 { font-size: 14px; color: var(--success); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.ai-feedback .score { font-size: 28px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.ai-feedback .feedback-text { font-size: 13px; line-height: 1.8; white-space: pre-wrap; }

/* ============================================
   响应式
   ============================================ */
@media (min-width: 600px) {
  .module-grid { grid-template-columns: repeat(3, 1fr); }
  .module-selector { grid-template-columns: repeat(6, 1fr); }
  .achievement-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================
   动画
   ============================================ */
.fade-in { animation: fadeIn 0.3s ease; }
.slide-up { animation: slideIn 0.3s ease; }
.pulse { animation: pulse 2s infinite; }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* 骨架屏 */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
