/* ============================================================
   羡曦吾语AI · 功能组件样式（三）
   主题 / 字号 / 提醒 / 趋势图 / 快速搜索 / 命令面板 / 阅读模式 / 引导
   ============================================================ */

/* ---------- 主题 ---------- */
:root { --qh-bg: #fff; --qh-text: #1f2937; }
[data-theme="dark"] { --qh-bg: #0f172a; --qh-text: #e2e8f0; }
[data-theme="dark"] body { background: #0f172a; color: #e2e8f0; }
[data-theme="dark"] .qh-sc-section,
[data-theme="dark"] .qh-stat-card,
[data-theme="dark"] .qh-report-card,
[data-theme="dark"] .qh-fc-card,
[data-theme="dark"] .qh-post,
[data-theme="dark"] .qh-mistake-item,
[data-theme="dark"] .qh-calendar,
[data-theme="dark"] .qh-radar,
[data-theme="dark"] .qh-leader-item { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .qh-fav-item,
[data-theme="dark"] .qh-goal-item,
[data-theme="dark"] .qh-feat-card { background: #1e293b; border-color: #334155; }

.qh-theme h4, .qh-fontsize h4, .qh-reminder h4, .qh-reader h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #374151;
}
.qh-theme-opts, .qh-fs-opts, .qh-rm-opts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.qh-theme-opt, .qh-fs-opt, .qh-rm-opt {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  color: #374151;
}
.qh-theme-opt.qh-theme-active,
.qh-fs-opt.qh-fs-active,
.qh-rm-opt.qh-rm-active {
  background: var(--lake);
  color: #fff;
  border-color: var(--lake);
}

/* ---------- 趋势图 ---------- */
.qh-trend {
  background: #fff;
  border-radius: var(--r-m);
  padding: 14px;
  margin: 12px 0;
}
.qh-trend h4 { margin: 0 0 10px; color: #374151; }
.qh-trend-svg { width: 100%; height: auto; }
.qh-trend-summary {
  font-size: 12px;
  color: #6b7280;
  margin-top: 8px;
  text-align: center;
}

/* ---------- 快速搜索 ---------- */
.qh-quicksearch {
  background: #fff;
  border-radius: var(--r-m);
  padding: 14px;
  margin: 12px 0;
}
.qh-quicksearch h4 { margin: 0 0 10px; color: #374151; }
.qh-qs-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: var(--r-s);
  font-size: 14px;
  box-sizing: border-box;
  outline: none;
}
.qh-qs-input:focus { border-color: var(--lake); }
.qh-qs-results {
  margin-top: 10px;
  max-height: 300px;
  overflow-y: auto;
}
.qh-qs-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.qh-qs-item:hover { background: #f3f4f6; }
.qh-qs-emoji { font-size: 18px; }
.qh-qs-name { flex: 1; font-size: 13px; color: #1f2937; }
.qh-qs-type {
  font-size: 10px;
  color: var(--lake);
  background: #eef2ff;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ---------- 命令面板 ---------- */
.qh-cmd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}
.qh-cmd-box {
  width: 90%;
  max-width: 500px;
  background: #fff;
  border-radius: var(--r-m);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.qh-cmd-input {
  width: 100%;
  padding: 16px;
  border: none;
  border-bottom: 1px solid #e5e7eb;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
}
.qh-cmd-list {
  max-height: 300px;
  overflow-y: auto;
  padding: 8px;
}
.qh-cmd-item {
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #1f2937;
  transition: background .15s;
}
.qh-cmd-item:hover { background: #f3f4f6; }

/* ---------- 阅读模式 ---------- */
.qh-reader { padding: 8px 0; }
.qh-rd-toggle {
  background: var(--lake);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
}
.qh-rd-toggle:hover { background: var(--lake-deep); }
body.qh-reader-mode header,
body.qh-reader-mode footer,
body.qh-reader-mode nav,
body.qh-reader-mode .qh-float-bar { display: none !important; }
body.qh-reader-mode .qh-study-center { max-width: 720px; }

/* ---------- 引导 ---------- */
.qh-onboard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.qh-onboard-box {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.qh-onboard-box h2 {
  margin: 0 0 12px;
  color: #1f2937;
  font-size: 20px;
}
.qh-onboard-box p {
  color: #6b7280;
  font-size: 14px;
  margin: 8px 0;
}
.qh-onboard-box ul {
  text-align: left;
  padding-left: 20px;
  margin: 12px 0;
}
.qh-onboard-box ul li {
  font-size: 13px;
  color: #374151;
  margin-bottom: 6px;
}
.qh-onboard-start {
  background: var(--grad-main);
  color: #fff;
  border: none;
  border-radius: var(--r-m);
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
}
.qh-onboard-start:hover { transform: translateY(-2px); }

/* ---------- 设置面板 ---------- */
.qh-settings {
  background: #fff;
  border-radius: var(--r-m);
  padding: 14px;
  margin: 12px 0;
}
.qh-settings > div { margin-bottom: 14px; }
.qh-settings > div:last-child { margin-bottom: 0; }
.qh-set-about { text-align: center; }

/* ---------- 深色模式适配补充 ---------- */
[data-theme="dark"] .qh-daily-q { background: #312e81; }
[data-theme="dark"] .qh-daily-q h4 { color: #c4b5fd; }
[data-theme="dark"] .qh-dq-text { color: #f1f5f9; }
[data-theme="dark"] .qh-dq-opt { background: #1e293b; border-color: #475569; color: #e2e8f0; }
[data-theme="dark"] .qh-path-rec { background: #0c4a6e; }
[data-theme="dark"] .qh-path-rec h4 { color: #7dd3fc; }
[data-theme="dark"] .qh-advisor { background: #7f1d1d; }
[data-theme="dark"] .qh-advisor h4 { color: #fca5a5; }
[data-theme="dark"] .qh-pomodoro { background: #7c2d12; }
[data-theme="dark"] .qh-pomodoro h4 { color: #fdba74; }
[data-theme="dark"] .qh-flashcard { background: #713f12; }
[data-theme="dark"] .qh-flashcard h4 { color: #fde047; }
[data-theme="dark"] .qh-fc-card { background: #1e293b; }
[data-theme="dark"] .qh-cal-cell { background: #334155; color: #cbd5e1; }
[data-theme="dark"] .qh-review { background: #4c1d95; }
[data-theme="dark"] .qh-review h4 { color: #ddd6fe; }
[data-theme="dark"] .qh-medal-wall { background: #713f12; }
[data-theme="dark"] .qh-medal-wall h4 { color: #fde047; }
[data-theme="dark"] .qh-leader { background: #422006; }
[data-theme="dark"] .qh-leader h4 { color: #fde047; }
[data-theme="dark"] .qh-empty { color: #64748b; }
[data-theme="dark"] .qh-sc-section { background: #1e293b; }
[data-theme="dark"] .qh-sc-section h2 { color: #f1f5f9; }
