/* NCE Flow · vocab.css · 生词本 + 划词收藏 + 语境复习 */

/* —— 课文页：划词收藏按钮 —— */
.vocab-add-btn {
  position: absolute;
  top: 12px;
  right: 50px;
  height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 1;
  cursor: pointer;
  z-index: 5;
}
.vocab-add-btn:hover { transform: scale(1.05); }
.vocab-add-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.word-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.word-chip {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s ease;
}
.word-chip:hover { border-color: var(--accent); color: var(--accent); }
.word-chip.added { opacity: .45; text-decoration: line-through; cursor: default; }

/* —— 生词本页 —— */
body.vocab-page { --lesson-ui-scale: 1; }
.vocab-section { max-width: var(--content-max); margin: 0 auto; padding: 16px 0 60px; }
.vocab-group { margin: 18px 0; }
.vocab-group-title { font-size: 13px; color: var(--muted); font-weight: 600; margin: 8px 2px; }

.vocab-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 10px 0;
  box-shadow: var(--shadow);
}
.vocab-word { font-size: 1.3rem; font-weight: 700; color: var(--text); }
.vocab-note { font-size: .9rem; color: var(--muted); margin-top: 4px; }
.vocab-note.muted { font-style: italic; opacity: .7; }
.vocab-note-input {
  width: 100%; margin-top: 6px; padding: 8px 10px;
  border: 1px solid var(--accent); border-radius: 8px;
  background: var(--bg); color: var(--text); font-size: .95rem;
}
.vocab-sentence { margin-top: 10px; font-size: 1rem; line-height: 1.6; color: var(--text); }
.vocab-sentence .cn { color: var(--muted); margin-top: 6px; font-size: .9rem; }
.vocab-meta { margin-top: 8px; font-size: 12px; color: var(--muted); }
.vocab-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.mini-btn {
  appearance: none; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); border-radius: 8px; padding: 6px 12px; font-size: 13px; cursor: pointer;
  box-shadow: var(--shadow); transition: transform .15s ease, background .15s ease;
}
.mini-btn:hover { transform: translateY(-1px); }
.mini-btn.danger { color: #ef4444; }
.mini-btn.ok { background: #16a34a; color: #fff; border-color: #16a34a; }
.mini-btn.bad { background: #ef4444; color: #fff; border-color: #ef4444; }

mark.vocab-hl, .vocab-hl {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--text);
  border-radius: 4px;
  padding: 0 3px;
  font-weight: 700;
}

/* 复习 / 听写 卡片 */
.review-card, .dictation-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); margin: 14px auto; max-width: 640px;
}
.rv-progress { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.rv-word-mask { font-size: 1.15rem; line-height: 1.7; color: var(--text); }
.rv-word-mask .cn { color: var(--muted); margin-top: 8px; font-size: .9rem; }
.rv-controls { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.rv-answer { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 14px; }
.rv-word { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.rv-note { color: var(--muted); margin-top: 6px; }
.rv-judge { display: flex; gap: 10px; margin-top: 14px; }

.dict-input-row { display: flex; gap: 8px; margin-top: 14px; }
.dict-input {
  flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg); color: var(--text); font-size: 1rem;
}
.dict-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.dict-feedback { margin-top: 10px; font-weight: 600; }
.dict-feedback.ok { color: #16a34a; }
.dict-feedback.bad { color: #ef4444; }

.vocab-info { text-align: center; color: var(--muted); font-size: 14px; margin: 10px 0; }
.vocab-empty { max-width: 460px; margin: 50px auto; text-align: center; color: var(--muted); line-height: 1.7; }
.vocab-empty a { color: var(--accent); }

/* 磨耳朵底部栏（生词本页内联，不用 fixed） */
body.vocab-page .bottom-player-bar {
  position: static; transform: none; width: auto; margin: 16px auto 0; max-width: var(--content-max);
}
body.vocab-page .bottom-player-bar .player { max-width: var(--content-max); }

