/* === Vocab App — Mobile-first Styles === */

:root {
  --primary: #4F46E5;
  --primary-light: #818CF8;
  --primary-dark: #3730A3;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --text: #1E293B;
  --text-secondary: #64748B;
  --border: #E2E8F0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --nav-height: 64px;
}

body.dark {
  --bg: #0F172A;
  --card: #1E293B;
  --text: #F1F5F9;
  --text-secondary: #94A3B8;
  --border: #334155;
  --shadow: 0 1px 3px rgba(0,0,0,0.4);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

/* === App Shell === */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main.page {
  flex: 1;
  padding: 16px;
  padding-bottom: calc(var(--nav-height) + 24px);
  overflow-y: auto;
}

.hidden { display: none !important; }

/* === Bottom Navigation === */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-height);
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 16px;
  cursor: pointer;
  transition: color 0.2s;
  font-size: 11px;
}

.nav-btn.active { color: var(--primary); }
.nav-icon { font-size: 22px; }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-danger { color: var(--danger); border-color: var(--danger); }

.btn-large {
  width: 100%;
  padding: 16px 24px;
  font-size: 18px;
}

.btn-sm { padding: 8px 16px; font-size: 14px; }

.btn-pronounce {
  margin: 12px auto;
  display: block;
}

/* === Dashboard === */
.dashboard {
  text-align: center;
  padding-top: 16px;
}

.dashboard h2 {
  font-size: 20px;
  margin-bottom: 20px;
}

.big-stat {
  margin: 16px 0;
}

.big-number {
  font-size: 64px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.big-label {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.progress-bar-wrap {
  background: var(--border);
  border-radius: 99px;
  height: 8px;
  margin: 12px 0 24px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
  transition: width 0.5s ease;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.today-summary {
  margin-top: 20px;
  padding: 12px;
  background: var(--card);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-secondary);
}

/* === Study Setup === */
.study-setup {
  padding-top: 16px;
}

.study-setup h2 {
  margin-bottom: 20px;
}

.mode-select {
  margin-bottom: 24px;
}

.mode-select h3 {
  margin-bottom: 12px;
}

.mode-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mode-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s;
}

.mode-option:has(input:checked) {
  border-color: var(--primary);
  background: #EEF2FF;
}

body.dark .mode-option:has(input:checked) {
  background: #1E1B4B;
}

.mode-option input { display: none; }
.mode-icon { font-size: 28px; }
.mode-name { font-weight: 600; font-size: 15px; }
.mode-desc { font-size: 13px; color: var(--text-secondary); margin-left: auto; }

.study-info {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
}

.study-info p {
  margin-bottom: 4px;
  font-size: 15px;
}

/* === Flashcard === */
.flashcard {
  padding: 16px 0;
  text-align: center;
}

.session-progress {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.card-face {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  user-select: none;
}

.word-display {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.5px;
  word-break: break-all;
}

.word-display.small { font-size: 22px; }
.word-display.large { font-size: 40px; }

.paren { opacity: 0.4; }

.pos-tag {
  display: inline-block;
  padding: 2px 10px;
  background: #EEF2FF;
  color: var(--primary);
  border-radius: 99px;
  font-size: 13px;
  margin-top: 8px;
}

body.dark .pos-tag { background: #312E81; color: #A5B4FC; }

.chinese-display {
  font-size: 20px;
  line-height: 1.8;
  color: var(--text);
  margin-top: 8px;
}

.chinese-display.large { font-size: 24px; }

.tap-hint {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 24px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.rating-buttons {
  margin-top: 20px;
}

.rate-label {
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.rate-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.btn-rate {
  flex: 1;
  max-width: 80px;
  padding: 12px 8px;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.rate-again { background: #FEE2E2; color: #991B1B; }
.rate-hard { background: #FEF3C7; color: #92400E; }
.rate-good { background: #D1FAE5; color: #065F46; }
.rate-easy { background: #DBEAFE; color: #1E40AF; }

body.dark .rate-again { background: #7F1D1D; color: #FCA5A5; }
body.dark .rate-hard { background: #78350F; color: #FCD34D; }
body.dark .rate-good { background: #064E3B; color: #6EE7B7; }
body.dark .rate-easy { background: #1E3A5F; color: #93C5FD; }

/* === Multiple Choice === */
.choice-quiz { text-align: center; padding-top: 16px; }

.choice-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 24px 0;
}

.btn-choice {
  text-align: left;
  padding: 14px 18px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-choice:active { transform: scale(0.98); }
.btn-choice.correct { border-color: var(--success); background: #D1FAE5; }
.btn-choice.wrong { border-color: var(--danger); background: #FEE2E2; }

body.dark .btn-choice.correct { background: #064E3B; }
body.dark .btn-choice.wrong { background: #7F1D1D; }

.choice-feedback { margin: 16px 0; font-size: 18px; }

.feedback-correct { color: var(--success); font-weight: 600; }
.feedback-wrong { color: var(--danger); font-weight: 600; }

/* === Spelling === */
.spelling-quiz { text-align: center; padding-top: 16px; }

.spelling-input-wrap {
  display: flex;
  gap: 8px;
  margin: 24px 0;
}

.spelling-input {
  flex: 1;
  padding: 14px 18px;
  font-size: 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  outline: none;
  letter-spacing: 1px;
}

.spelling-input:focus { border-color: var(--primary); }

.spelling-feedback { margin: 16px 0; font-size: 18px; }

/* === Session End === */
.session-end {
  text-align: center;
  padding: 40px 16px;
}

.session-end h2 { font-size: 28px; margin-bottom: 20px; }

.session-stats {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.session-stats p {
  font-size: 18px;
  margin-bottom: 8px;
}

.session-end .btn { margin: 8px; }

/* === Stats Page === */
.stats-page { padding-top: 16px; }
.stats-page h2 { margin-bottom: 20px; }
.stats-page h3 { margin: 24px 0 12px; font-size: 16px; }

.stubborn-words { margin-top: 24px; }

.word-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stubborn-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stubborn-word {
  font-weight: 600;
  font-size: 15px;
}

.stubborn-chinese {
  flex: 1;
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stubborn-stats {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* === History Chart === */
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
  padding: 8px 0;
  overflow-x: auto;
}

.chart-bar-wrap {
  flex: 1;
  min-width: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.chart-bar {
  width: 100%;
  max-width: 14px;
  background: var(--border);
  border-radius: 4px 4px 0 0;
  position: relative;
  overflow: hidden;
  min-height: 2px;
}

.chart-bar-new {
  width: 100%;
  background: var(--primary);
  position: absolute;
  bottom: 0;
}

.chart-label {
  font-size: 9px;
  color: var(--text-secondary);
  margin-top: 4px;
  transform: rotate(-45deg);
  white-space: nowrap;
}

/* === Settings === */
.settings-page { padding-top: 16px; }
.settings-page h2 { margin-bottom: 20px; }
.settings-page h3 { margin: 20px 0 12px; font-size: 15px; color: var(--text-secondary); }

.setting-group {
  margin-bottom: 24px;
}

.setting-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.setting-input, select.setting-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  background: var(--card);
  color: var(--text);
  width: 100px;
  text-align: center;
}

select.setting-input { width: auto; }

/* === Loading === */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
  font-size: 16px;
}

/* === Setup Wizard === */
.setup-wizard {
  padding-top: 24px;
  text-align: center;
}

.setup-wizard h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.setup-desc {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 24px;
}

.setup-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: left;
  margin-bottom: 16px;
}

.setup-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.setup-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.setup-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

.setup-divider::before,
.setup-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.file-label {
  cursor: pointer;
  text-align: center;
}

.file-hint {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 4px;
}

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

.progress-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 12px;
}

/* === Example Sentence === */
.example-sentence {
  margin-top: 16px;
  padding: 12px 16px;
  background: #F0F9FF;
  border-left: 3px solid #0EA5E9;
  border-radius: 0 8px 8px 0;
  font-size: 15px;
  line-height: 1.6;
  color: #0C4A6E;
  text-align: left;
  font-style: italic;
}

body.dark .example-sentence {
  background: #0C1F2E;
  border-left-color: #38BDF8;
  color: #BAE6FD;
}

/* === Batch / 三环学习 === */
.batch-header {
  text-align: center;
  padding: 12px 0 20px;
}

.ring-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 12px;
}

.ring-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--border);
  transition: all 0.3s;
}

.ring-dot.active {
  background: var(--primary);
  color: white;
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

.ring-dot.done {
  background: var(--success);
  color: white;
}

.ring-line {
  width: 32px;
  height: 3px;
  background: var(--border);
  transition: background 0.3s;
}

.ring-line.done {
  background: var(--success);
}

.ring-label {
  font-size: 18px;
  font-weight: 700;
}

.ring-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* --- Learn card --- */
.learn-card {
  text-align: center;
  padding: 16px 0;
}

.learn-card .word-display {
  margin: 16px 0 8px;
}

.learn-card .chinese-display {
  margin: 16px 0;
  font-size: 20px;
}

.learn-sentences {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 20px;
  text-align: left;
}

.learn-sentence-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: #F8FAFC;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
}

body.dark .learn-sentence-item {
  background: #1E293B;
}

.learn-s-num {
  font-size: 11px;
  color: var(--text-secondary);
  min-width: 16px;
  padding-top: 2px;
}

.learn-s-text {
  flex: 1;
  color: var(--text);
}

.btn-learn-speak {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.6;
  flex-shrink: 0;
}
.btn-learn-speak:active { opacity: 1; transform: scale(1.2); }

.batch-progress {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* --- Dictation card --- */
.dictation-card {
  text-align: center;
  padding: 16px 0;
}

.dict-prompt {
  margin: 24px 0;
}

.btn-pronounce-dict {
  width: 100%;
  padding: 32px 16px;
  font-size: 20px;
  background: #EEF2FF;
  border: 2px dashed var(--primary);
  border-radius: var(--radius);
  color: var(--primary);
  cursor: pointer;
}

body.dark .btn-pronounce-dict {
  background: #1E1B4B;
  border-color: #6366F1;
}

.dict-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.dict-meaning-btn {
  margin: 0 auto 8px;
  display: block;
  font-size: 13px;
}

.dict-meaning-reveal {
  margin: 0 auto 12px;
  padding: 8px 16px;
  background: #FFF7ED;
  border-radius: 8px;
  max-width: 300px;
}

body.dark .dict-meaning-reveal {
  background: #2D1A0A;
}

.dict-meaning-text {
  font-size: 15px;
  color: var(--text);
}

.dict-answer {
  margin-top: 16px;
  padding: 12px;
  background: #FEF2F2;
  border-radius: var(--radius);
}

body.dark .dict-answer {
  background: #3B1111;
}

.dict-meaning {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* --- Meaning card --- */
.meaning-card {
  text-align: center;
  padding: 16px 0;
}

/* --- Batch summary --- */
.ring-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.ring-result {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
}

.ring-result.perfect { background: #D1FAE5; color: #065F46; }
.ring-result.good { background: #EEF2FF; color: #3730A3; }
.ring-result.needs-work { background: #FEF3C7; color: #92400E; }

body.dark .ring-result.perfect { background: #064E3B; color: #6EE7B7; }
body.dark .ring-result.good { background: #1E1B4B; color: #A5B4FC; }
body.dark .ring-result.needs-work { background: #3B1F00; color: #FCD34D; }

.ring-result-icon {
  font-size: 22px;
}

/* --- Batch review list --- */
.batch-review-list {
  text-align: left;
  margin-top: 16px;
}

.batch-review-list h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.batch-review-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.bri-num {
  width: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
}

.bri-word {
  flex: 1;
  font-weight: 500;
}

.bri-dict, .bri-meaning {
  width: 24px;
  text-align: center;
}

.bri-context {
  width: 36px;
  text-align: center;
  font-size: 14px;
}

/* --- Context / 语境选择题型 --- */
.context-card {
  text-align: center;
  padding: 8px 0;
}

.q-type-badge {
  display: inline-block;
  padding: 4px 12px;
  background: #EEF2FF;
  color: var(--primary);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

body.dark .q-type-badge {
  background: #1E1B4B;
  color: #A5B4FC;
}

.context-sentence-box {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  text-align: left;
}

body.dark .context-sentence-box {
  background: #0F172A;
}

.context-sentence {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
}

.context-sentence.cloze {
  letter-spacing: 0.5px;
}

.cloze-blank {
  display: inline-block;
  background: #FEF3C7;
  border-bottom: 3px solid #F59E0B;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  color: #92400E;
  margin: 0 2px;
}

body.dark .cloze-blank {
  background: #3B1F00;
  border-bottom-color: #F59E0B;
  color: #FCD34D;
}

.context-question {
  font-size: 15px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.context-detail {
  margin-top: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* --- Reading ring --- */
.reading-card {
  text-align: center;
  padding: 12px 0;
}

.reading-sentence-box {
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  border-radius: var(--radius);
  padding: 20px 16px;
  margin: 12px 0;
  text-align: left;
}

body.dark .reading-sentence-box {
  background: #0C1F2E;
  border-color: #0C4A6E;
}

.reading-sentence {
  font-size: 18px;
  line-height: 2;
  color: var(--text);
  letter-spacing: 0.3px;
}

.reading-word {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 8px 0;
}

/* === Clickable cards === */
.info-dot {
  display: inline-block;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  opacity: 0.5;
  margin-left: 2px;
}
.info-dot:hover { opacity: 1; }

.sm-tiers-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sm-tiers-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px;
  max-width: 320px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  font-size: 14px;
  line-height: 1.8;
}
.sm-tiers-card h4 {
  margin-bottom: 10px;
  font-size: 15px;
}
.sm-tier {
  font-size: 13px;
  padding: 3px 0;
}

/* === Clickable cards === */
.stat-card.clickable {
  cursor: pointer;
  transition: transform 0.15s;
}
.stat-card.clickable:active {
  transform: scale(0.96);
}

/* === Background Download Indicator === */
.bg-download {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;
  background: var(--card);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 200;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  cursor: pointer;
}

.bg-dl-icon { font-size: 20px; }
.bg-dl-text { font-size: 13px; flex: 1; color: var(--text); }
.bg-dl-bar {
  width: 60px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.bg-dl-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s;
  width: 0%;
}

/* === Word Bank Page === */
.wordbank-page { padding-top: 8px; }
.wordbank-page h2 { margin-bottom: 16px; }

.sentence-coverage-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.coverage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 600;
}

.coverage-pct {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
}

.coverage-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.downloading-badge {
  background: #FEF3C7;
  color: #92400E;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  animation: pulse 1.5s infinite;
}

body.dark .downloading-badge {
  background: #3B1F00;
  color: #FCD34D;
}

.coverage-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* --- Word Bank Toolbar --- */
.wordbank-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.wordbank-search {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.wordbank-search:focus { border-color: var(--primary); }

.wordbank-filter {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  min-width: 80px;
}

/* --- Word Bank List --- */
.wordbank-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wb-empty {
  text-align: center;
  padding: 32px;
  color: var(--text-secondary);
}

.wb-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}

.wb-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}

.wb-status { font-size: 16px; width: 24px; text-align: center; }
.wb-word { font-weight: 600; font-size: 15px; flex: 1; }
.wb-pos { font-size: 12px; color: var(--primary); padding: 1px 6px; background: #EEF2FF; border-radius: 99px; }
body.dark .wb-pos { background: #1E1B4B; }
.wb-sentence-icon { font-size: 14px; width: 24px; text-align: center; }
.wb-arrow { font-size: 12px; color: var(--text-secondary); transition: transform 0.2s; }

.wb-item-detail {
  padding: 0 12px 12px 44px;
}

.wb-chinese {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 8px;
  color: var(--text);
}

.wb-sentence {
  font-size: 13px;
  line-height: 1.6;
  color: #0C4A6E;
  background: #F0F9FF;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  font-style: italic;
}

body.dark .wb-sentence {
  color: #BAE6FD;
  background: #0C1F2E;
}

.wb-no-sentence {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.wb-synonyms {
  font-size: 12px;
  color: #6D28D9;
  background: #F5F3FF;
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
}

body.dark .wb-synonyms {
  color: #C4B5FD;
  background: #1E1030;
}

.wb-stats-row {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.wb-page-info {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.wb-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* === Responsive === */
@media (min-width: 480px) {
  .mode-options {
    flex-direction: row;
  }
  .mode-option {
    flex: 1;
    flex-direction: column;
    text-align: center;
  }
  .mode-desc { margin-left: 0; }
}
